Commit 5d95bb80 authored by Mason Freed's avatar Mason Freed Committed by Chromium LUCI CQ

Document the need for !IsAtShadowBoundary() in matched styles cache

Some styles (e.g. webkitUserModify) should not propagate from a
ShadowRoot to the children. Note [1] that it is possible all such
properties are deprecated. But they still have decent [2] usage.
See [3] for what happens if this check is removed.

[1] https://crbug.com/687462
[2] https://chromestatus.com/metrics/css/timeline/popularity/338
[3] https://ci.chromium.org/p/chromium/builders/try/linux-rel/570174?

Fixed: 1158424
Change-Id: I994691cb63d96d60d8a47d8698ad86a43f8ea10e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2593285
Auto-Submit: Mason Freed <masonfreed@chromium.org>
Commit-Queue: Anders Hartvoll Ruud <andruud@chromium.org>
Reviewed-by: default avatarAnders Hartvoll Ruud <andruud@chromium.org>
Cr-Commit-Position: refs/heads/master@{#837469}
parent 025b7ade
......@@ -1376,7 +1376,8 @@ StyleResolver::CacheSuccess StyleResolver::ApplyMatchedCache(
// earlier style object built using the same exact style declarations. We
// then only need to apply the inherited properties, if any, as their values
// can depend on the element context. This is fast and saves memory by
// reusing the style data structures.
// reusing the style data structures. Note that we cannot do this if the
// direct parent is a ShadowRoot.
if (state.ParentStyle()->InheritedDataShared(
*cached_matched_properties->parent_computed_style) &&
!IsAtShadowBoundary(&element)) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment