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

Unified Diff: third_party/WebKit/Source/core/css/resolver/StyleResolver.cpp

Issue 1898403002: [WIP] Implement :dir() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase... other changes too probably Created 4 years, 7 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/css/resolver/StyleResolver.cpp
diff --git a/third_party/WebKit/Source/core/css/resolver/StyleResolver.cpp b/third_party/WebKit/Source/core/css/resolver/StyleResolver.cpp
index 346846a93476fd69ec567ee82784ea8c5b029b88..3d14c1f5d1f6c20b4739b62a133124565f569e65 100644
--- a/third_party/WebKit/Source/core/css/resolver/StyleResolver.cpp
+++ b/third_party/WebKit/Source/core/css/resolver/StyleResolver.cpp
@@ -619,13 +619,9 @@ void StyleResolver::matchAllRules(StyleResolverState& state, ElementRuleCollecto
// after all attributes, since their mapped style depends on the values of multiple attributes.
collector.addElementStyleProperties(state.element()->additionalPresentationAttributeStyle());
- if (state.element()->isHTMLElement()) {
- bool isAuto;
- TextDirection textDirection = toHTMLElement(state.element())->directionalityIfhasDirAutoAttribute(isAuto);
- if (isAuto) {
- state.setHasDirAutoAttribute(true);
- collector.addElementStyleProperties(textDirection == LTR ? leftToRightDeclaration() : rightToLeftDeclaration());
- }
+ if (state.element()->isHTMLElement() && toHTMLElement(state.element())->hasDirectionAuto()) {
+ state.setHasDirAutoAttribute(true);
+ collector.addElementStyleProperties(state.element()->directionality() == LTR ? leftToRightDeclaration() : rightToLeftDeclaration());
}
}

Powered by Google App Engine
This is Rietveld 408576698