| Index: Source/core/css/CSSSelector.h
|
| diff --git a/Source/core/css/CSSSelector.h b/Source/core/css/CSSSelector.h
|
| index b67a3fad229c54f15a36c8439c2ecdbbd5a7664e..a29ebbbe7fb37b684cf954abdfaadead57d787c7 100644
|
| --- a/Source/core/css/CSSSelector.h
|
| +++ b/Source/core/css/CSSSelector.h
|
| @@ -31,6 +31,8 @@
|
| namespace blink {
|
| class CSSSelectorList;
|
|
|
| + enum TagSelectorCase { TagLowerCase, TagCamelCase };
|
| +
|
| // This class represents a selector for a StyleRule.
|
|
|
| // CSS selector representation is somewhat complicated and subtle. A representative list of selectors is
|
| @@ -84,7 +86,7 @@ namespace blink {
|
| public:
|
| CSSSelector();
|
| CSSSelector(const CSSSelector&);
|
| - explicit CSSSelector(const QualifiedName&, bool tagIsImplicit = false);
|
| + explicit CSSSelector(const QualifiedName&, bool tagIsImplicit = false, TagSelectorCase = TagLowerCase);
|
|
|
| ~CSSSelector();
|
|
|
| @@ -320,6 +322,8 @@ namespace blink {
|
|
|
| bool relationIsAffectedByPseudoContent() const { return m_relationIsAffectedByPseudoContent; }
|
| void setRelationIsAffectedByPseudoContent() { m_relationIsAffectedByPseudoContent = true; }
|
| + bool tagIsCamelCase() const { return m_tagSelectorCase == TagCamelCase; }
|
| + void setTagIsCamelCase() { m_tagSelectorCase = TagCamelCase; }
|
|
|
| private:
|
| unsigned m_relation : 3; // enum Relation
|
| @@ -331,6 +335,7 @@ namespace blink {
|
| unsigned m_hasRareData : 1;
|
| unsigned m_isForPage : 1;
|
| unsigned m_tagIsImplicit : 1;
|
| + unsigned m_tagSelectorCase : 1; // enum TagSelectorCase
|
| unsigned m_relationIsAffectedByPseudoContent : 1;
|
|
|
| unsigned specificityForOneSelector() const;
|
| @@ -476,11 +481,12 @@ inline CSSSelector::CSSSelector()
|
| , m_hasRareData(false)
|
| , m_isForPage(false)
|
| , m_tagIsImplicit(false)
|
| + , m_tagSelectorCase(TagLowerCase)
|
| , m_relationIsAffectedByPseudoContent(false)
|
| {
|
| }
|
|
|
| -inline CSSSelector::CSSSelector(const QualifiedName& tagQName, bool tagIsImplicit)
|
| +inline CSSSelector::CSSSelector(const QualifiedName& tagQName, bool tagIsImplicit, TagSelectorCase tagSelectorCase)
|
| : m_relation(SubSelector)
|
| , m_match(Tag)
|
| , m_pseudoType(PseudoNotParsed)
|
| @@ -490,6 +496,7 @@ inline CSSSelector::CSSSelector(const QualifiedName& tagQName, bool tagIsImplici
|
| , m_hasRareData(false)
|
| , m_isForPage(false)
|
| , m_tagIsImplicit(tagIsImplicit)
|
| + , m_tagSelectorCase(tagSelectorCase)
|
| , m_relationIsAffectedByPseudoContent(false)
|
| {
|
| m_data.m_tagQName = tagQName.impl();
|
| @@ -506,6 +513,7 @@ inline CSSSelector::CSSSelector(const CSSSelector& o)
|
| , m_hasRareData(o.m_hasRareData)
|
| , m_isForPage(o.m_isForPage)
|
| , m_tagIsImplicit(o.m_tagIsImplicit)
|
| + , m_tagSelectorCase(o.m_tagSelectorCase)
|
| , m_relationIsAffectedByPseudoContent(o.m_relationIsAffectedByPseudoContent)
|
| {
|
| if (o.m_match == Tag) {
|
|
|