[css-typed-om] StyleMap in custom paint callback should be filled with initial values. |
||
Issue descriptionWhen an unregistered custom property is specified in the inputProperties() and it is not specified elsewhere, then it should have the initial value of an empty CSSUnparsedValue().
,
Jan 20 2018
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/2b63d92e98cfdb984a8aab368c4586e2ac122aa9 commit 2b63d92e98cfdb984a8aab368c4586e2ac122aa9 Author: Darren Shen <shend@chromium.org> Date: Sat Jan 20 06:42:15 2018 [css-typed-om] Update paint style map behaviour for invalid properties. Custom paint callbacks receive a computed style map (implemented as FilteredComputedStylePropertyMap) that contain only properties specified in inputProperties(). For forwards-compatiblity, inputProperties() is allowed to have "invalid" or shorthand properties, which are not allowed to be in the styleMap. As resolved in [1], the style map should ignore any invalid/shorthand properties. Furthermore, if a custom property is specified in inputProperties(), it should have a default value of CSSUnparsedValue() (not "null"). These changes also require changes in custom paint tests. Namely: - Can no longer get "border-radius" from the style map. Have to use a longhand property like "border-left-radius". - Getting custom properties like "--bar" will have a default value of CSSUnparsedValue. [1] https://github.com/w3c/css-houdini-drafts/issues/523 Bug: 803690 Change-Id: I148b52568de698f69ee0bf594a2b92a9751ea484 Reviewed-on: https://chromium-review.googlesource.com/874984 Commit-Queue: Darren Shen <shend@chromium.org> Reviewed-by: Xida Chen <xidachen@chromium.org> Reviewed-by: Ian Kilpatrick <ikilpatrick@chromium.org> Cr-Commit-Position: refs/heads/master@{#530763} [modify] https://crrev.com/2b63d92e98cfdb984a8aab368c4586e2ac122aa9/third_party/WebKit/LayoutTests/external/wpt/css/css-paint-api/style-background-image.https.html [modify] https://crrev.com/2b63d92e98cfdb984a8aab368c4586e2ac122aa9/third_party/WebKit/LayoutTests/external/wpt/css/css-paint-api/style-before-pseudo.https.html [modify] https://crrev.com/2b63d92e98cfdb984a8aab368c4586e2ac122aa9/third_party/WebKit/Source/core/css/CSSVariableData.h [modify] https://crrev.com/2b63d92e98cfdb984a8aab368c4586e2ac122aa9/third_party/WebKit/Source/core/css/cssom/CSSUnparsedValue.cpp [modify] https://crrev.com/2b63d92e98cfdb984a8aab368c4586e2ac122aa9/third_party/WebKit/Source/core/css/cssom/CSSUnparsedValue.h [modify] https://crrev.com/2b63d92e98cfdb984a8aab368c4586e2ac122aa9/third_party/WebKit/Source/core/css/cssom/FilteredComputedStylePropertyMap.cpp [modify] https://crrev.com/2b63d92e98cfdb984a8aab368c4586e2ac122aa9/third_party/WebKit/Source/core/css/cssom/FilteredComputedStylePropertyMapTest.cpp
,
Jan 21 2018
|
||
►
Sign in to add a comment |
||
Comment 1 by shend@chromium.org
, Jan 19 2018Status: Started (was: Available)