[Webkit-unassigned] [Bug 247769] New: CSSOM fails to serialize some shorthands set to 'initial' (or any css-wide keyword)

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Nov 10 15:41:47 PST 2022


https://bugs.webkit.org/show_bug.cgi?id=247769

            Bug ID: 247769
           Summary: CSSOM fails to serialize some shorthands set to
                    'initial' (or any css-wide keyword)
           Product: WebKit
           Version: WebKit Nightly Build
          Hardware: Unspecified
                OS: Unspecified
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: CSS
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: obrufau at igalia.com

Run this code:

var allCSSProps = new Set();
for (let obj = document.createElement("div").style; obj; obj = Reflect.getPrototypeOf(obj)) {
  for (let name of Object.getOwnPropertyNames(obj)) {
    let prop = name.replace(/[A-Z]/g, c => "-" + c.toLowerCase());
    if (CSS.supports(prop, "initial")) {
      allCSSProps.add(prop);
    }
  }
}
var style = document.createElement("div").style;
var bad = new Map();
for (let prop of allCSSProps) {
  style.cssText = "";
  style.setProperty(prop, "initial");
  let result = style.getPropertyValue(prop);
  if (result !== "initial") {
    bad.set(prop, result);
  }
}
bad;

Expected: empty map
Actual: a map with some failures:

Map {
  "-webkit-border-radius" => "",
  "-webkit-column-break-after" => "",
  "-webkit-column-break-before" => "",
  "-webkit-column-break-inside" => "",
  "-webkit-perspective" => "",
  "grid" => "",
  "grid-area" => "initial / initial / initial / initial"
  "grid-column" => "initial / initial"
  "grid-row" => "initial / initial"
  "offset" => "",
}

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20221110/ca4d7318/attachment.htm>


More information about the webkit-unassigned mailing list