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

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

Issue 2921223002: [CSS Typed OM] Hook up getting CSSUnitValues from inline StylePropertyMaps (Closed)
Patch Set: Fix missed LayoutTests Created 3 years, 6 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/CSSNumericValue.cpp
diff --git a/third_party/WebKit/Source/core/css/cssom/CSSNumericValue.cpp b/third_party/WebKit/Source/core/css/cssom/CSSNumericValue.cpp
index 01f4905299ff2b0c1fbb1ab338c76420417cd514..02c3281a32131e93ef085fc09cf88bd66341ee49 100644
--- a/third_party/WebKit/Source/core/css/cssom/CSSNumericValue.cpp
+++ b/third_party/WebKit/Source/core/css/cssom/CSSNumericValue.cpp
@@ -4,6 +4,9 @@
#include "core/css/cssom/CSSNumericValue.h"
+#include "core/css/CSSPrimitiveValue.h"
+#include "core/css/cssom/CSSUnitValue.h"
+
namespace blink {
CSSNumericValue* CSSNumericValue::parse(const String& css_text,
@@ -12,4 +15,12 @@ CSSNumericValue* CSSNumericValue::parse(const String& css_text,
return nullptr;
}
+CSSNumericValue* CSSNumericValue::FromCSSValue(const CSSPrimitiveValue& value) {
+ if (value.IsCalculated()) {
+ // TODO(meade): Implement this case.
+ return nullptr;
+ }
+ return CSSUnitValue::FromCSSValue(value);
+}
+
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698