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

Side by Side Diff: third_party/WebKit/Source/core/css/CSSSelector.h

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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 1999-2003 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999-2003 Lars Knoll (knoll@kde.org)
3 * 1999 Waldo Bastian (bastian@kde.org) 3 * 1999 Waldo Bastian (bastian@kde.org)
4 * Copyright (C) 2004, 2006, 2007, 2008, 2009, 2010, 2013 Apple Inc. All rights reserved. 4 * Copyright (C) 2004, 2006, 2007, 2008, 2009, 2010, 2013 Apple Inc. All rights reserved.
5 * 5 *
6 * This library is free software; you can redistribute it and/or 6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Library General Public 7 * modify it under the terms of the GNU Library General Public
8 * License as published by the Free Software Foundation; either 8 * License as published by the Free Software Foundation; either
9 * version 2 of the License, or (at your option) any later version. 9 * version 2 of the License, or (at your option) any later version.
10 * 10 *
(...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after
213 213
214 enum AttributeMatchType { 214 enum AttributeMatchType {
215 CaseSensitive, 215 CaseSensitive,
216 CaseInsensitive, 216 CaseInsensitive,
217 }; 217 };
218 218
219 PseudoType getPseudoType() const { return static_cast<PseudoType>(m_pseudoTy pe); } 219 PseudoType getPseudoType() const { return static_cast<PseudoType>(m_pseudoTy pe); }
220 void updatePseudoType(const AtomicString&, bool hasArguments); 220 void updatePseudoType(const AtomicString&, bool hasArguments);
221 221
222 static PseudoType parsePseudoType(const AtomicString&, bool hasArguments); 222 static PseudoType parsePseudoType(const AtomicString&, bool hasArguments);
223 static PseudoId parsePseudoId(const String&);
223 static PseudoId pseudoId(PseudoType); 224 static PseudoId pseudoId(PseudoType);
224 225
225 // Selectors are kept in an array by CSSSelectorList. The next component of the selector is 226 // Selectors are kept in an array by CSSSelectorList. The next component of the selector is
226 // the next item in the array. 227 // the next item in the array.
227 const CSSSelector* tagHistory() const { return m_isLastInTagHistory ? 0 : co nst_cast<CSSSelector*>(this + 1); } 228 const CSSSelector* tagHistory() const { return m_isLastInTagHistory ? 0 : co nst_cast<CSSSelector*>(this + 1); }
228 229
229 const QualifiedName& tagQName() const; 230 const QualifiedName& tagQName() const;
230 const AtomicString& value() const; 231 const AtomicString& value() const;
231 const AtomicString& serializingValue() const; 232 const AtomicString& serializingValue() const;
232 233
(...skipping 268 matching lines...) Expand 10 before | Expand all | Expand 10 after
501 inline bool CSSSelector::isIdClassOrAttributeSelector() const 502 inline bool CSSSelector::isIdClassOrAttributeSelector() const
502 { 503 {
503 return isAttributeSelector() 504 return isAttributeSelector()
504 || match() == CSSSelector::Id 505 || match() == CSSSelector::Id
505 || match() == CSSSelector::Class; 506 || match() == CSSSelector::Class;
506 } 507 }
507 508
508 } // namespace blink 509 } // namespace blink
509 510
510 #endif // CSSSelector_h 511 #endif // CSSSelector_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/css/CSSComputedStyleDeclaration.cpp ('k') | third_party/WebKit/Source/core/css/CSSSelector.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698