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

Unified Diff: third_party/WebKit/Source/core/css/SelectorChecker.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/SelectorChecker.cpp
diff --git a/third_party/WebKit/Source/core/css/SelectorChecker.cpp b/third_party/WebKit/Source/core/css/SelectorChecker.cpp
index 3416c2386789fce0db221a12c9e35cd4d44c2431..e7c6b93b9356b4cdefd4130f2da8a2a4956297cf 100644
--- a/third_party/WebKit/Source/core/css/SelectorChecker.cpp
+++ b/third_party/WebKit/Source/core/css/SelectorChecker.cpp
@@ -866,6 +866,13 @@ bool SelectorChecker::checkPseudoClass(const SelectorCheckingContext& context, M
return element.shouldAppearIndeterminate();
case CSSSelector::PseudoRoot:
return element == element.document().documentElement();
+ case CSSSelector::PseudoDir:
+ {
+ const AtomicString& argument = selector.argument();
+ if (element.directionality() == LTR)
+ return equalIgnoringASCIICase(argument, "ltr");
+ return equalIgnoringASCIICase(argument, "rtl");
+ }
case CSSSelector::PseudoLang:
{
AtomicString value;

Powered by Google App Engine
This is Rietveld 408576698