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

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

Issue 2019993003: Set "auto" as default for rx and ry (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Added CSS Parsing Created 4 years, 7 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: third_party/WebKit/Source/core/css/parser/CSSPropertyParser.cpp
diff --git a/third_party/WebKit/Source/core/css/parser/CSSPropertyParser.cpp b/third_party/WebKit/Source/core/css/parser/CSSPropertyParser.cpp
index 30ba7ff08afdc5fba6435c593e048e388627720a..8d0101550322b00fc280f381d261b521052201bc 100644
--- a/third_party/WebKit/Source/core/css/parser/CSSPropertyParser.cpp
+++ b/third_party/WebKit/Source/core/css/parser/CSSPropertyParser.cpp
@@ -1939,6 +1939,13 @@ static CSSPrimitiveValue* consumeBaselineShift(CSSParserTokenRange& range)
return consumeLengthOrPercent(range, SVGAttributeMode, ValueRangeAll);
}
+static CSSPrimitiveValue* consumeRxOrRy(CSSParserTokenRange& range)
+{
+ if (range.peek().id() == CSSValueAuto)
+ return consumeIdent(range);
+ return consumeLengthOrPercent(range, SVGAttributeMode, ValueRangeAll, UnitlessQuirk::Forbid);
+}
+
static CSSValue* createCSSImageValueWithReferrer(const AtomicString& rawValue, const CSSParserContext& context)
{
CSSValue* imageValue = CSSImageValue::create(rawValue, context.completeURL(rawValue));
@@ -3849,9 +3856,10 @@ CSSValue* CSSPropertyParser::parseSingleValue(CSSPropertyID unresolvedProperty,
case CSSPropertyX:
case CSSPropertyY:
case CSSPropertyR:
+ return consumeLengthOrPercent(m_range, SVGAttributeMode, ValueRangeAll, UnitlessQuirk::Forbid);
case CSSPropertyRx:
case CSSPropertyRy:
- return consumeLengthOrPercent(m_range, SVGAttributeMode, ValueRangeAll, UnitlessQuirk::Forbid);
+ return consumeRxOrRy(m_range);
case CSSPropertyCursor:
return consumeCursor(m_range, m_context, inQuirksMode());
case CSSPropertyContain:
« no previous file with comments | « third_party/WebKit/Source/core/css/CSSProperties.in ('k') | third_party/WebKit/Source/core/style/SVGComputedStyle.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698