| 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..9b2c770c632e96e6ce2cd8512c1b9779e6c7d14d 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 SelectorProfile { DynamicProfile, StaticProfile };
|
| +
|
| 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(),
|
| + SelectorProfile = 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;
|
| + SelectorProfile m_profile = DynamicProfile;
|
| Referrer m_referrer;
|
| bool m_isHTMLDocument;
|
| bool m_useLegacyBackgroundSizeShorthandBehavior;
|
|
|