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

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

Issue 2514043002: [CSS Typed OM] Add CSSValue->CSSSkew conversions (Closed)
Patch Set: Merge branch 'update-transform-tests' into cssskew-fromcssvalue-2 Created 4 years 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/CSSAngleValue.cpp
diff --git a/third_party/WebKit/Source/core/css/cssom/CSSAngleValue.cpp b/third_party/WebKit/Source/core/css/cssom/CSSAngleValue.cpp
index a1216f52b1544f6e6a910796069551ca8eebb482..fe6c9cebb02528f0dad2040a2418f0d69c12cf29 100644
--- a/third_party/WebKit/Source/core/css/cssom/CSSAngleValue.cpp
+++ b/third_party/WebKit/Source/core/css/cssom/CSSAngleValue.cpp
@@ -10,11 +10,16 @@
namespace blink {
+CSSAngleValue* CSSAngleValue::create(double value,
+ CSSPrimitiveValue::UnitType unit) {
+ DCHECK(CSSPrimitiveValue::isAngle(unit));
+ return new CSSAngleValue(value, unit);
+}
+
CSSAngleValue* CSSAngleValue::create(double value, const String& unit) {
CSSPrimitiveValue::UnitType primitiveUnit =
CSSPrimitiveValue::stringToUnitType(unit);
- DCHECK(CSSPrimitiveValue::isAngle(primitiveUnit));
- return new CSSAngleValue(value, primitiveUnit);
+ return create(value, primitiveUnit);
}
CSSAngleValue* CSSAngleValue::fromCSSValue(const CSSPrimitiveValue& value) {
« no previous file with comments | « third_party/WebKit/Source/core/css/cssom/CSSAngleValue.h ('k') | third_party/WebKit/Source/core/css/cssom/CSSSkew.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698