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

Unified Diff: Source/core/css/StylePropertySet.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/CSSParserMode.h ('k') | Source/core/css/StylePropertySet.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/css/StylePropertySet.h
diff --git a/Source/core/css/StylePropertySet.h b/Source/core/css/StylePropertySet.h
index 725257f14dc21326513f34d0f33830dd439e3559..8e9c913568e04c9741be2b1f0a5ec6b577769a8f 100644
--- a/Source/core/css/StylePropertySet.h
+++ b/Source/core/css/StylePropertySet.h
@@ -124,6 +124,9 @@ public:
bool propertyMatches(CSSPropertyID, const CSSValue*) const;
protected:
+
+ enum { MaxArraySize = (1 << 28) - 1 };
+
StylePropertySet(CSSParserMode cssParserMode)
: m_cssParserMode(cssParserMode)
, m_isMutable(true)
@@ -133,12 +136,12 @@ protected:
StylePropertySet(CSSParserMode cssParserMode, unsigned immutableArraySize)
: m_cssParserMode(cssParserMode)
, m_isMutable(false)
- , m_arraySize(immutableArraySize)
+ , m_arraySize(std::min(immutableArraySize, unsigned(MaxArraySize)))
{ }
- unsigned m_cssParserMode : 2;
+ unsigned m_cssParserMode : 3;
mutable unsigned m_isMutable : 1;
- unsigned m_arraySize : 29;
+ unsigned m_arraySize : 28;
friend class PropertySetCSSStyleDeclaration;
};
« no previous file with comments | « Source/core/css/CSSParserMode.h ('k') | Source/core/css/StylePropertySet.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698