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

Unified Diff: Source/core/html/HTMLElement.cpp

Issue 547823002: Track reasons for |Node::SetNeedsStyleRecalc| (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: use const char[] 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
Index: Source/core/html/HTMLElement.cpp
diff --git a/Source/core/html/HTMLElement.cpp b/Source/core/html/HTMLElement.cpp
index f9dff426403e18215fdd92b3f3597386140f0978..6380def6d4b5aef65a1568286540d7171b1c2ab3 100644
--- a/Source/core/html/HTMLElement.cpp
+++ b/Source/core/html/HTMLElement.cpp
@@ -749,7 +749,7 @@ void HTMLElement::adjustDirectionalityIfNeededAfterChildAttributeChanged(Element
Element* elementToAdjust = this;
for (; elementToAdjust; elementToAdjust = elementToAdjust->parentElement()) {
if (elementAffectsDirectionality(elementToAdjust)) {
- elementToAdjust->setNeedsStyleRecalc(SubtreeStyleChange);
+ elementToAdjust->setNeedsStyleRecalc(StyleChangeReasonForTracing::WritingModeChange, SubtreeStyleChange);
return;
}
}
@@ -764,7 +764,7 @@ void HTMLElement::calculateAndAdjustDirectionality()
for (ShadowRoot* root = youngestShadowRoot(); root; root = root->olderShadowRoot())
setHasDirAutoFlagRecursively(root, hasDirectionAuto());
if (renderer() && renderer()->style() && renderer()->style()->direction() != textDirection)
- setNeedsStyleRecalc(SubtreeStyleChange);
+ setNeedsStyleRecalc(StyleChangeReasonForTracing::WritingModeChange, SubtreeStyleChange);
}
void HTMLElement::adjustDirectionalityIfNeededAfterChildrenChanged(const ChildrenChange& change)

Powered by Google App Engine
This is Rietveld 408576698