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

Unified Diff: third_party/WebKit/Source/core/css/properties/CSSPropertyAPITranslate.cpp

Issue 2643643007: CSS: Translate support for none. (Closed)
Patch Set: Created 3 years, 11 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/properties/CSSPropertyAPITranslate.cpp
diff --git a/third_party/WebKit/Source/core/css/properties/CSSPropertyAPITranslate.cpp b/third_party/WebKit/Source/core/css/properties/CSSPropertyAPITranslate.cpp
index bb443698a2913a0d4fb047e025b31a4be7af10a4..91c93acb292fd99c3929996f67a6aae4021587f3 100644
--- a/third_party/WebKit/Source/core/css/properties/CSSPropertyAPITranslate.cpp
+++ b/third_party/WebKit/Source/core/css/properties/CSSPropertyAPITranslate.cpp
@@ -15,6 +15,10 @@ const CSSValue* CSSPropertyAPITranslate::parseSingleValue(
CSSParserTokenRange& range,
const CSSParserContext* context) {
DCHECK(RuntimeEnabledFeatures::cssIndependentTransformPropertiesEnabled());
+ CSSValueID id = range.peek().id();
+ if (id == CSSValueNone)
+ return CSSPropertyParserHelpers::consumeIdent(range);
+
CSSValue* translate = CSSPropertyParserHelpers::consumeLengthOrPercent(
range, context->mode(), ValueRangeAll);
if (!translate)

Powered by Google App Engine
This is Rietveld 408576698