Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(566)

Unified Diff: third_party/WebKit/Source/core/dom/shadow/ShadowRoot.cpp

Issue 2220873002: Add a fast-path for independent inherited properties (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix for shadow roots Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/dom/shadow/ShadowRoot.cpp
diff --git a/third_party/WebKit/Source/core/dom/shadow/ShadowRoot.cpp b/third_party/WebKit/Source/core/dom/shadow/ShadowRoot.cpp
index af3defa3ebec4c8926879ad994004671287d9e59..9e60a6188ced64e3c2eae38344d91d2d4a051b53 100644
--- a/third_party/WebKit/Source/core/dom/shadow/ShadowRoot.cpp
+++ b/third_party/WebKit/Source/core/dom/shadow/ShadowRoot.cpp
@@ -134,8 +134,13 @@ void ShadowRoot::recalcStyle(StyleRecalcChange change)
StyleSharingDepthScope sharingScope(*this);
- if (getStyleChangeType() >= SubtreeStyleChange)
+ if (getStyleChangeType() >= SubtreeStyleChange) {
change = Force;
+ } else if (change == IndependentInherit) {
+ // Independent inheritance can't continue through shadow roots, since we
+ // assume inheritance from the parent element which isn't the case here.
+ change = Inherit;
sashab 2016/08/18 04:47:15 Fix for shadow roots problem - crbug.com/633859. I
rune 2016/08/18 08:06:49 I think I know what's happening. We traverse the f
sashab 2016/08/19 05:35:25 Thanks for the excellent summary Rune! You were ab
+ }
// There's no style to update so just calling recalcStyle means we're updated.
clearNeedsStyleRecalc();

Powered by Google App Engine
This is Rietveld 408576698