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

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

Issue 548693002: Share recalcChildStyle between Element and ShadowRoot. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Add back parent scope for ShadowRoot. Created 6 years, 3 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 | « Source/core/dom/Element.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/dom/shadow/ShadowRoot.cpp
diff --git a/Source/core/dom/shadow/ShadowRoot.cpp b/Source/core/dom/shadow/ShadowRoot.cpp
index e78d269c3b213f08f42a028edb26097af779b157..5b5ea21018c4317eaaf04c3a6e57ef5dfb7b726e 100644
--- a/Source/core/dom/shadow/ShadowRoot.cpp
+++ b/Source/core/dom/shadow/ShadowRoot.cpp
@@ -140,26 +140,10 @@ void ShadowRoot::recalcStyle(StyleRecalcChange change)
if (styleChangeType() >= SubtreeStyleChange)
change = Force;
- if (change < Force && hasRareData() && childNeedsStyleRecalc())
- checkForChildrenAdjacentRuleChanges();
-
// There's no style to update so just calling recalcStyle means we're updated.
clearNeedsStyleRecalc();
- // FIXME: This doesn't handle :hover + div properly like Element::recalcStyle does.
- Text* lastTextNode = 0;
- for (Node* child = lastChild(); child; child = child->previousSibling()) {
- if (child->isTextNode()) {
- toText(child)->recalcTextStyle(change, lastTextNode);
- lastTextNode = toText(child);
- } else if (child->isElementNode()) {
- if (child->shouldCallRecalcStyle(change))
- toElement(child)->recalcStyle(change, lastTextNode);
- if (child->renderer())
- lastTextNode = 0;
- }
- }
-
+ recalcChildStyle(change);
clearChildNeedsStyleRecalc();
}
« no previous file with comments | « Source/core/dom/Element.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698