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

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: More comments added. Created 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/css/CSSParser-in.cpp ('k') | Source/core/css/StylePropertySet.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/css/CSSParserMode.h
diff --git a/Source/core/css/CSSParserMode.h b/Source/core/css/CSSParserMode.h
index 075d2e28cee8decb30770cc301c50c45b906cc30..6a40a5f72271dec843a0741b48c4960b6052e072 100644
--- a/Source/core/css/CSSParserMode.h
+++ b/Source/core/css/CSSParserMode.h
@@ -44,7 +44,10 @@ 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. Set as mode on StylePropertySet
+ // to make sure CSSOM modifications use CSSParser::parseViewportProperty.
+ ViewportMode
};
inline CSSParserMode strictToCSSParserMode(bool inStrictMode)
@@ -54,7 +57,7 @@ inline CSSParserMode strictToCSSParserMode(bool inStrictMode)
inline bool isStrictParserMode(CSSParserMode cssParserMode)
{
- return cssParserMode == CSSStrictMode || cssParserMode == SVGAttributeMode || cssParserMode == UASheetMode;
+ return cssParserMode != CSSQuirksMode;
}
struct CSSParserContext {
« no previous file with comments | « Source/core/css/CSSParser-in.cpp ('k') | Source/core/css/StylePropertySet.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698