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

Unified Diff: third_party/WebKit/Source/core/css/cssom/CSSRotation.cpp

Issue 2867883003: [CSS Typed OM] Delete obsolete number and length classes from Typed OM (Closed)
Patch Set: rebase Created 3 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/cssom/CSSRotation.cpp
diff --git a/third_party/WebKit/Source/core/css/cssom/CSSRotation.cpp b/third_party/WebKit/Source/core/css/cssom/CSSRotation.cpp
index 898f4f1e8f0c4eae91f9e567f5c1f973882334f6..d1567d219276257fb422e722dba0e3eaf9ef4799 100644
--- a/third_party/WebKit/Source/core/css/cssom/CSSRotation.cpp
+++ b/third_party/WebKit/Source/core/css/cssom/CSSRotation.cpp
@@ -20,7 +20,7 @@ CSSRotation* FromCSSRotate(const CSSFunctionValue& value) {
const CSSPrimitiveValue& primitive_value = ToCSSPrimitiveValue(value.Item(0));
if (primitive_value.IsCalculated() || !primitive_value.IsAngle())
return nullptr;
- return CSSRotation::Create(CSSAngleValue::FromCSSValue(primitive_value));
+ return CSSRotation::Create(CSSNumericValue::FromCSSValue(primitive_value));
}
CSSRotation* FromCSSRotate3d(const CSSFunctionValue& value) {
@@ -36,7 +36,7 @@ CSSRotation* FromCSSRotate3d(const CSSFunctionValue& value) {
double y = ToCSSPrimitiveValue(value.Item(1)).GetDoubleValue();
double z = ToCSSPrimitiveValue(value.Item(2)).GetDoubleValue();
- return CSSRotation::Create(x, y, z, CSSAngleValue::FromCSSValue(angle));
+ return CSSRotation::Create(x, y, z, CSSNumericValue::FromCSSValue(angle));
}
CSSRotation* FromCSSRotateXYZ(const CSSFunctionValue& value) {
@@ -44,7 +44,7 @@ CSSRotation* FromCSSRotateXYZ(const CSSFunctionValue& value) {
const CSSPrimitiveValue& primitive_value = ToCSSPrimitiveValue(value.Item(0));
if (primitive_value.IsCalculated())
return nullptr;
- CSSAngleValue* angle = CSSAngleValue::FromCSSValue(primitive_value);
+ CSSNumericValue* angle = CSSNumericValue::FromCSSValue(primitive_value);
switch (value.FunctionType()) {
case CSSValueRotateX:
return CSSRotation::Create(1, 0, 0, angle);
@@ -77,18 +77,22 @@ CSSRotation* CSSRotation::FromCSSValue(const CSSFunctionValue& value) {
}
CSSFunctionValue* CSSRotation::ToCSSValue() const {
- CSSFunctionValue* result =
- CSSFunctionValue::Create(is2d_ ? CSSValueRotate : CSSValueRotate3d);
- if (!is2d_) {
- result->Append(
- *CSSPrimitiveValue::Create(x_, CSSPrimitiveValue::UnitType::kNumber));
- result->Append(
- *CSSPrimitiveValue::Create(y_, CSSPrimitiveValue::UnitType::kNumber));
- result->Append(
- *CSSPrimitiveValue::Create(z_, CSSPrimitiveValue::UnitType::kNumber));
- }
- result->Append(*CSSPrimitiveValue::Create(angle_->Value(), angle_->Unit()));
- return result;
+ return nullptr;
+ // TODO(meade): Re-implement this when we finish rewriting number/length
+ // types.
+ // CSSFunctionValue* result =
+ // CSSFunctionValue::Create(is2d_ ? CSSValueRotate : CSSValueRotate3d);
+ // if (!is2d_) {
+ // result->Append(
+ // *CSSPrimitiveValue::Create(x_, CSSPrimitiveValue::UnitType::kNumber));
+ // result->Append(
+ // *CSSPrimitiveValue::Create(y_, CSSPrimitiveValue::UnitType::kNumber));
+ // result->Append(
+ // *CSSPrimitiveValue::Create(z_, CSSPrimitiveValue::UnitType::kNumber));
+ // }
+ // result->Append(*CSSPrimitiveValue::Create(angle_->Value(),
+ // angle_->Unit()));
+ // return result;
}
} // namespace blink
« no previous file with comments | « third_party/WebKit/Source/core/css/cssom/CSSRotation.h ('k') | third_party/WebKit/Source/core/css/cssom/CSSRotation.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698