[Webkit-unassigned] [Bug 220814] New: Top-side value erroneously serialized by getPropertyValue when shorthand is a custom property
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Thu Jan 21 12:38:40 PST 2021
https://bugs.webkit.org/show_bug.cgi?id=220814
Bug ID: 220814
Summary: Top-side value erroneously serialized by
getPropertyValue when shorthand is a custom property
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: twilco.o at protonmail.com
Given `element.style.getPropertyValue(<shorthand property name>)`, if any of the associated longhands for this shorthand are pending substitution we should serialize an empty string, not the top-side value.
https://wpt.fyi/results/css/css-variables/variable-reference-shorthands.html?label=master&label=experimental&aligned&q=variable-reference-short
We fail the "target1 margin" test[1] (serializing "10px"):
```
<div id="target1" style="margin: var(--prop); margin-top: 10px"></div>
var testcases = [{ element: "target1", propertyName: "margin", expectedPropertyValue: "" }, ...]
```
because this:
https://github.com/WebKit/WebKit/blob/27018096404e5df088accf03481b693a8fd81eac/Source/WebCore/css/StyleProperties.cpp#L484#L485
unconditionally serializes the top shorthand value, which is normally fine except in this case where the shorthand is a custom property value.
Relevant spec: https://drafts.csswg.org/cssom/#dom-cssstyledeclaration-getpropertyvalue
[1]: https://github.com/WebKit/WebKit/blob/27018096404e5df088accf03481b693a8fd81eac/LayoutTests/imported/w3c/web-platform-tests/css/css-variables/variable-reference-shorthands.html#L25
--
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/20210121/7fd74348/attachment.htm>
More information about the webkit-unassigned
mailing list