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

Unified Diff: third_party/WebKit/Source/core/css/parser/CSSPropertyParser.h

Issue 1916853002: Pass around shorthand info instead of storing it (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: V4 Created 4 years, 8 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 | « no previous file | third_party/WebKit/Source/core/css/parser/CSSPropertyParser.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/css/parser/CSSPropertyParser.h
diff --git a/third_party/WebKit/Source/core/css/parser/CSSPropertyParser.h b/third_party/WebKit/Source/core/css/parser/CSSPropertyParser.h
index e74f77853ca63e7b9559080e9d6d5ac707f2514f..604cfd724b5b96926b5bb5a248b271922e2e9e5f 100644
--- a/third_party/WebKit/Source/core/css/parser/CSSPropertyParser.h
+++ b/third_party/WebKit/Source/core/css/parser/CSSPropertyParser.h
@@ -58,14 +58,14 @@ private:
// TODO(timloh): Rename once the CSSParserValue-based parseValue is removed
bool parseValueStart(CSSPropertyID unresolvedProperty, bool important);
bool consumeCSSWideKeyword(CSSPropertyID unresolvedProperty, bool important);
- CSSValue* parseSingleValue(CSSPropertyID);
+ CSSValue* parseSingleValue(CSSPropertyID, CSSPropertyID = CSSPropertyInvalid);
bool inQuirksMode() const { return isQuirksModeBehavior(m_context.mode()); }
bool parseViewportDescriptor(CSSPropertyID propId, bool important);
bool parseFontFaceDescriptor(CSSPropertyID);
- void addProperty(CSSPropertyID, CSSValue*, bool important, bool implicit = false);
+ void addProperty(CSSPropertyID, CSSPropertyID, CSSValue*, bool important, bool implicit = false);
void addExpandedPropertyForValue(CSSPropertyID propId, CSSValue*, bool);
bool consumeBorder(bool important);
@@ -81,8 +81,8 @@ private:
bool consumeColumns(bool important);
bool consumeGridItemPositionShorthand(CSSPropertyID, bool important);
- bool consumeGridTemplateRowsAndAreasAndColumns(bool important);
- bool consumeGridTemplateShorthand(bool important);
+ bool consumeGridTemplateRowsAndAreasAndColumns(CSSPropertyID, bool important);
+ bool consumeGridTemplateShorthand(CSSPropertyID, bool important);
bool consumeGridShorthand(bool important);
bool consumeGridAreaShorthand(bool important);
@@ -98,35 +98,12 @@ private:
bool consumeLegacyBreakProperty(CSSPropertyID, bool important);
- class ShorthandScope {
- STACK_ALLOCATED();
- public:
- ShorthandScope(CSSPropertyParser* parser, CSSPropertyID propId) : m_parser(parser)
- {
- if (!(m_parser->m_inParseShorthand++))
- m_parser->m_currentShorthand = propId;
- }
- ~ShorthandScope()
- {
- if (!(--m_parser->m_inParseShorthand))
- m_parser->m_currentShorthand = CSSPropertyInvalid;
- }
-
- private:
- CSSPropertyParser* m_parser;
- };
-
private:
// Inputs:
CSSParserTokenRange m_range;
const CSSParserContext& m_context;
-
// Outputs:
HeapVector<CSSProperty, 256>* m_parsedProperties;
-
- // Locals during parsing:
- int m_inParseShorthand;
- CSSPropertyID m_currentShorthand;
};
CSSPropertyID unresolvedCSSPropertyID(const CSSParserString&);
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/css/parser/CSSPropertyParser.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698