Registering a property can fail to invalidate custom paint |
|||||||
Issue descriptionAs described in the patch description on https://codereview.chromium.org/2426323003/ Property registration invalidates style, but generally will not cause paint invalidation. Custom paint invalidation checks whether any of the input properties have changed, but for custom properties it only looks at any explicitly set token stream value. This misses two cases: - The property is not set, but is now assigned an initial value. - The property is set and parses under the given syntax. The value from the FilteredComputedStylePropertyMap will use a parsed type instead of unparsed type.
,
Feb 13 2017
,
Apr 11 2017
,
Apr 18 2017
,
Dec 6 2017
,
Oct 31
,
Nov 1
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/24c885e661e8932b648f7cc534dbbadeb22bc2f5 commit 24c885e661e8932b648f7cc534dbbadeb22bc2f5 Author: Anders Hartvoll Ruud <andruud@chromium.org> Date: Thu Nov 01 16:16:48 2018 [css-properties-values-api] Invalidate paint worklet on registration. Due to how initial values of registered custom properties used to be handled, the style diff function for custom paint could not discover that the computed value for some property changed due to a new property registration. This meant that, if you used the property '--x' in your paint worklet (without applying '--x' on any element in the document), and _then_ registered the property '--x' (giving it an initial value), the worklet would not repaint even though the computed value of --x changed from "nothing" to the registered initial value. Now that initial values are returned from ::GetRegisteredVariable, simply compare those values when diffing for custom paint invalidation. Note that the second test in this CL is already passing before this CL, but I'm including it anyway since that case is also mentioned in the bug. R=ikilpatrick@chromium.org Bug: 657706 Change-Id: I2b7707d48d73693a70b100fe1121bd7f977b4db1 Reviewed-on: https://chromium-review.googlesource.com/c/1309788 Commit-Queue: Anders Ruud <andruud@chromium.org> Reviewed-by: Ian Kilpatrick <ikilpatrick@chromium.org> Cr-Commit-Position: refs/heads/master@{#604607} [modify] https://crrev.com/24c885e661e8932b648f7cc534dbbadeb22bc2f5/third_party/WebKit/LayoutTests/external/wpt/common/worklet-reftest.js [add] https://crrev.com/24c885e661e8932b648f7cc534dbbadeb22bc2f5/third_party/WebKit/LayoutTests/external/wpt/css/css-paint-api/registered-property-invalidation-001.https.html [add] https://crrev.com/24c885e661e8932b648f7cc534dbbadeb22bc2f5/third_party/WebKit/LayoutTests/external/wpt/css/css-paint-api/registered-property-invalidation-002.https.html [modify] https://crrev.com/24c885e661e8932b648f7cc534dbbadeb22bc2f5/third_party/blink/renderer/core/style/computed_style.cc [modify] https://crrev.com/24c885e661e8932b648f7cc534dbbadeb22bc2f5/third_party/blink/renderer/core/style/computed_style.h [modify] https://crrev.com/24c885e661e8932b648f7cc534dbbadeb22bc2f5/third_party/blink/renderer/core/style/style_initial_data.h
,
Dec 11
|
|||||||
►
Sign in to add a comment |
|||||||
Comment 1 by timloh@chromium.org
, Jan 9 2017Status: Available (was: Assigned)