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

Unified Diff: Source/core/dom/Document.cpp

Issue 18298016: updateStyleForNodeIfNeeded should be Shadow DOM aware (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Var names Created 7 years, 5 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
« no previous file with comments | « LayoutTests/fast/dom/shadow/offsetWidth-host-style-change-expected.txt ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/dom/Document.cpp
diff --git a/Source/core/dom/Document.cpp b/Source/core/dom/Document.cpp
index 95f472d66f5410d5b3092bf470ae642040180b90..b96388f74579976d9a272a7a35d66891e6821338 100644
--- a/Source/core/dom/Document.cpp
+++ b/Source/core/dom/Document.cpp
@@ -1698,8 +1698,8 @@ void Document::updateStyleForNodeIfNeeded(Node* node)
return;
bool needsStyleRecalc = hasPendingForcedStyleRecalc();
- for (Node* n = node; n && !needsStyleRecalc; n = n->parentNode())
- needsStyleRecalc = n->needsStyleRecalc();
+ for (Node* ancestor = node; ancestor && !needsStyleRecalc; ancestor = ancestor->parentOrShadowHostNode())
+ needsStyleRecalc = ancestor->needsStyleRecalc();
if (needsStyleRecalc)
updateStyleIfNeeded();
}
« no previous file with comments | « LayoutTests/fast/dom/shadow/offsetWidth-host-style-change-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698