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

Unified Diff: Source/core/css/resolver/StyleBuilderCustom.cpp

Issue 211233003: CSS Transforms: Implement perspective (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase and update interpolation 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
Index: Source/core/css/resolver/StyleBuilderCustom.cpp
diff --git a/Source/core/css/resolver/StyleBuilderCustom.cpp b/Source/core/css/resolver/StyleBuilderCustom.cpp
index 4fb05442e23cd75afd597bd250793401adece073..7e8de7e2a9ece58f5a6fd604212db2c4bc39b110 100644
--- a/Source/core/css/resolver/StyleBuilderCustom.cpp
+++ b/Source/core/css/resolver/StyleBuilderCustom.cpp
@@ -1429,6 +1429,7 @@ void StyleBuilder::oldApplyProperty(CSSPropertyID id, StyleResolverState& state,
state.style()->setTransform(operations);
return;
}
+ case CSSPropertyPerspective:
case CSSPropertyWebkitPerspective: {
HANDLE_INHERIT_AND_INITIAL(perspective, Perspective)
@@ -1443,8 +1444,8 @@ void StyleBuilder::oldApplyProperty(CSSPropertyID id, StyleResolverState& state,
float perspectiveValue;
if (primitiveValue->isLength()) {
perspectiveValue = primitiveValue->computeLength<float>(state.cssToLengthConversionData());
- } else if (primitiveValue->isNumber()) {
- // For backward compatibility, treat valueless numbers as px.
+ } else if (id == CSSPropertyWebkitPerspective && primitiveValue->isNumber()) {
+ // Prefixed version treats unitless numbers as px.
perspectiveValue = CSSPrimitiveValue::create(primitiveValue->getDoubleValue(), CSSPrimitiveValue::CSS_PX)->computeLength<float>(state.cssToLengthConversionData());
} else {
return;
@@ -1741,7 +1742,6 @@ void StyleBuilder::oldApplyProperty(CSSPropertyID id, StyleResolverState& state,
}
// FIXME: crbug.com/154772 Unimplemented css-transforms properties
- case CSSPropertyPerspective:
case CSSPropertyPerspectiveOrigin:
case CSSPropertyTransform:
case CSSPropertyTransformOrigin:
« Source/core/animation/css/CSSAnimations.cpp ('K') | « Source/core/css/resolver/StyleAdjuster.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698