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

Unified Diff: third_party/WebKit/Source/core/css/CSSSelector.cpp

Issue 2349633002: Move PseudoId parsing out of CSSComputedStyleDeclaration constructor into CSSSelector (Closed)
Patch Set: Fix typo Created 4 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 | « third_party/WebKit/Source/core/css/CSSSelector.h ('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/css/CSSSelector.cpp
diff --git a/third_party/WebKit/Source/core/css/CSSSelector.cpp b/third_party/WebKit/Source/core/css/CSSSelector.cpp
index 3209dc1c17472cbd8c2a92653dd8aef8856f7e06..71f52e5de4879a33e4626f6d625ed1c2c60736a5 100644
--- a/third_party/WebKit/Source/core/css/CSSSelector.cpp
+++ b/third_party/WebKit/Source/core/css/CSSSelector.cpp
@@ -468,6 +468,13 @@ CSSSelector::PseudoType CSSSelector::parsePseudoType(const AtomicString& name, b
return PseudoUnknown;
}
+PseudoId CSSSelector::parsePseudoId(const String& name)
+{
+ unsigned nameWithoutColonsStart = name[0] == ':' ? (name[1] == ':' ? 2 : 1) : 0;
+ return pseudoId(parsePseudoType(
+ AtomicString(name.substring(nameWithoutColonsStart)), false));
+}
+
void CSSSelector::updatePseudoType(const AtomicString& value, bool hasArguments)
{
ASSERT(m_match == PseudoClass || m_match == PseudoElement || m_match == PagePseudoClass);
« no previous file with comments | « third_party/WebKit/Source/core/css/CSSSelector.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698