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

Unified Diff: Source/core/css/CSSParserMode.h

Issue 22917005: New parser mode for CSSOM @viewport descriptors. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 7 years, 4 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
Index: Source/core/css/CSSParserMode.h
diff --git a/Source/core/css/CSSParserMode.h b/Source/core/css/CSSParserMode.h
index 59ef416d316a2fc4f12b27cd0b81a22f2186ccc9..37e44349aa5df47c4fd25e945af607ffa4b5b6ed 100644
--- a/Source/core/css/CSSParserMode.h
+++ b/Source/core/css/CSSParserMode.h
@@ -44,7 +44,9 @@ enum CSSParserMode {
SVGAttributeMode,
// User agent style sheet should always be in strict mode. Enables internal
// only properties and values.
- UASheetMode
+ UASheetMode,
+ // Parsing @viewport descriptors. Always strict.
+ ViewportMode
};
inline CSSParserMode strictToCSSParserMode(bool inStrictMode)
@@ -54,7 +56,7 @@ inline CSSParserMode strictToCSSParserMode(bool inStrictMode)
inline bool isStrictParserMode(CSSParserMode cssParserMode)
{
- return cssParserMode == CSSStrictMode || cssParserMode == SVGAttributeMode || cssParserMode == UASheetMode;
+ return cssParserMode != CSSQuirksMode;
}
struct CSSParserContext {

Powered by Google App Engine
This is Rietveld 408576698