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

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

Issue 211233003: CSS Transforms: Implement perspective (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Disable compositing assert hit by new tests. Created 6 years, 9 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/CSSComputedStyleDeclaration.cpp ('k') | Source/core/css/resolver/AnimatedStyleBuilder.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/css/parser/CSSPropertyParser.cpp
diff --git a/Source/core/css/parser/CSSPropertyParser.cpp b/Source/core/css/parser/CSSPropertyParser.cpp
index 5b96d311d4b379b7987a3f108b7fedc67d61f18f..d99958effea56e8a347e7a1bff2b4aac5426dd5c 100644
--- a/Source/core/css/parser/CSSPropertyParser.cpp
+++ b/Source/core/css/parser/CSSPropertyParser.cpp
@@ -1138,19 +1138,21 @@ bool CSSPropertyParser::parseValue(CSSPropertyID propId, bool important)
}
return false;
}
+ case CSSPropertyPerspective:
+ if (id == CSSValueNone) {
+ validPrimitive = true;
+ } else if (validUnit(value, FLength | FNonNeg)) {
+ addProperty(propId, createPrimitiveNumericValue(value), important);
+ return true;
+ }
+ break;
case CSSPropertyWebkitPerspective:
- if (id == CSSValueNone)
+ if (id == CSSValueNone) {
validPrimitive = true;
- else {
+ } else if (validUnit(value, FNumber | FLength | FNonNeg)) {
// Accepting valueless numbers is a quirk of the -webkit prefixed version of the property.
- if (validUnit(value, FNumber | FLength | FNonNeg)) {
- RefPtrWillBeRawPtr<CSSValue> val = createPrimitiveNumericValue(value);
- if (val) {
- addProperty(propId, val.release(), important);
- return true;
- }
- return false;
- }
+ addProperty(propId, createPrimitiveNumericValue(value), important);
+ return true;
}
break;
case CSSPropertyWebkitPerspectiveOrigin:
@@ -1610,7 +1612,6 @@ bool CSSPropertyParser::parseValue(CSSPropertyID propId, bool important)
validPrimitive = false;
break;
// FIXME: crbug.com/154772 Unimplemented css-transforms properties
- case CSSPropertyPerspective:
case CSSPropertyPerspectiveOrigin:
case CSSPropertyTransform:
case CSSPropertyTransformOrigin:
« no previous file with comments | « Source/core/css/CSSComputedStyleDeclaration.cpp ('k') | Source/core/css/resolver/AnimatedStyleBuilder.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698