Chromium Code Reviews| Index: third_party/WebKit/Source/core/css/parser/CSSParserMode.h |
| diff --git a/third_party/WebKit/Source/core/css/parser/CSSParserMode.h b/third_party/WebKit/Source/core/css/parser/CSSParserMode.h |
| index 442dbc86ce6a55b5e180648ea8b349a6de415681..568629b487a9413ddc190e709f1fec73076bd3d3 100644 |
| --- a/third_party/WebKit/Source/core/css/parser/CSSParserMode.h |
| +++ b/third_party/WebKit/Source/core/css/parser/CSSParserMode.h |
| @@ -85,6 +85,9 @@ class CORE_EXPORT CSSParserContext { |
| USING_FAST_MALLOC(CSSParserContext); |
| public: |
| + // https://drafts.csswg.org/selectors/#profiles |
| + enum Profile { DynamicProfile, StaticProfile }; |
|
Timothy Loh
2016/11/15 02:27:07
SelectorProfile?
kochi
2016/11/15 04:24:38
Done.
SelectorProfile sounds better and clearer.
|
| + |
| CSSParserContext(CSSParserMode, UseCounter*); |
| // FIXME: We shouldn't need the UseCounter argument as we could infer it from |
| // the Document but some callers want to disable use counting (e.g. the |
| @@ -92,7 +95,8 @@ class CORE_EXPORT CSSParserContext { |
| CSSParserContext(const Document&, |
| UseCounter*, |
| const KURL& baseURL = KURL(), |
| - const String& charset = emptyString()); |
| + const String& charset = emptyString(), |
| + Profile = DynamicProfile); |
| // FIXME: This constructor shouldn't exist if we properly piped the UseCounter |
| // through the CSS subsystem. Currently the UseCounter life time is too crazy |
| // and we need a way to override it. |
| @@ -109,6 +113,8 @@ class CORE_EXPORT CSSParserContext { |
| const String& charset() const { return m_charset; } |
| const Referrer& referrer() const { return m_referrer; } |
| bool isHTMLDocument() const { return m_isHTMLDocument; } |
| + bool isDynamicProfile() const { return m_profile == DynamicProfile; } |
| + bool isStaticProfile() const { return m_profile == StaticProfile; } |
| // This quirk is to maintain compatibility with Android apps built on |
| // the Android SDK prior to and including version 18. Presumably, this |
| @@ -140,6 +146,7 @@ class CORE_EXPORT CSSParserContext { |
| String m_charset; |
| CSSParserMode m_mode; |
| CSSParserMode m_matchMode; |
| + Profile m_profile = DynamicProfile; |
| Referrer m_referrer; |
| bool m_isHTMLDocument; |
| bool m_useLegacyBackgroundSizeShorthandBehavior; |