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

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

Issue 1817143002: Use LocalStyleChange for text direction changes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 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 | « third_party/WebKit/LayoutTests/fast/dom/dir-auto-insert-text-invalidation-expected.txt ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/html/HTMLElement.cpp
diff --git a/third_party/WebKit/Source/core/html/HTMLElement.cpp b/third_party/WebKit/Source/core/html/HTMLElement.cpp
index 8a769e463247fc9a050100fcd8c0ca6c9659a497..09c5d06855a4ac4bdef93d8668ff39d5ca760ff2 100644
--- a/third_party/WebKit/Source/core/html/HTMLElement.cpp
+++ b/third_party/WebKit/Source/core/html/HTMLElement.cpp
@@ -792,7 +792,7 @@ void HTMLElement::adjustDirectionalityIfNeededAfterChildAttributeChanged(Element
Element* elementToAdjust = this;
for (; elementToAdjust; elementToAdjust = FlatTreeTraversal::parentElement(*elementToAdjust)) {
if (elementAffectsDirectionality(elementToAdjust)) {
- elementToAdjust->setNeedsStyleRecalc(SubtreeStyleChange, StyleChangeReasonForTracing::create(StyleChangeReason::WritingModeChange));
+ elementToAdjust->setNeedsStyleRecalc(LocalStyleChange, StyleChangeReasonForTracing::create(StyleChangeReason::WritingModeChange));
return;
}
}
@@ -803,7 +803,7 @@ void HTMLElement::calculateAndAdjustDirectionality()
{
TextDirection textDirection = directionality();
if (layoutObject() && layoutObject()->style() && layoutObject()->style()->direction() != textDirection)
- setNeedsStyleRecalc(SubtreeStyleChange, StyleChangeReasonForTracing::create(StyleChangeReason::WritingModeChange));
+ setNeedsStyleRecalc(LocalStyleChange, StyleChangeReasonForTracing::create(StyleChangeReason::WritingModeChange));
}
void HTMLElement::adjustDirectionalityIfNeededAfterChildrenChanged(const ChildrenChange& change)
« no previous file with comments | « third_party/WebKit/LayoutTests/fast/dom/dir-auto-insert-text-invalidation-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698