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

Unified Diff: Source/core/css/parser/CSSPropertyParser.cpp

Issue 371443003: Merge .in files for css/svg properties into a single file (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@cascade
Patch Set: Created 6 years, 5 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/parser/CSSPropertyParser.cpp
diff --git a/Source/core/css/parser/CSSPropertyParser.cpp b/Source/core/css/parser/CSSPropertyParser.cpp
index 62ae9f4b38e97fc9d680a2f462683da171916601..e010b2284eef8dbaa663c5234b705fd83dec331a 100644
--- a/Source/core/css/parser/CSSPropertyParser.cpp
+++ b/Source/core/css/parser/CSSPropertyParser.cpp
@@ -169,8 +169,13 @@ void CSSPropertyParser::addProperty(CSSPropertyID propId, PassRefPtrWillBeRawPtr
Vector<StylePropertyShorthand, 4> shorthands;
getMatchingShorthandsForLonghand(propId, &shorthands);
+
+ // It's simpler if the shorthand system doesn't know about the width and
+ // height shorthands for viewport descriptors
+ ASSERT(!shorthands.isEmpty() || propId == CSSPropertyMinWidth || propId == CSSPropertyMinHeight || propId == CSSPropertyMaxWidth || propId == CSSPropertyMaxHeight);
+
// The longhand does not belong to multiple shorthands.
- if (shorthands.size() == 1)
+ if (shorthands.size() <= 1)
m_parsedProperties.append(CSSProperty(propId, value, important, true, CSSPropertyInvalid, m_implicitShorthand || implicit));
else
m_parsedProperties.append(CSSProperty(propId, value, important, true, indexOfShorthandForLonghand(m_currentShorthand, shorthands), m_implicitShorthand || implicit));

Powered by Google App Engine
This is Rietveld 408576698