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

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

Issue 2042943003: Move CSSValue->CSSStyleValue logic out of StylePropertyMap and into the StyleValueFactory. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@stylevaue
Patch Set: Created 4 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/StyleValueFactory.cpp
diff --git a/third_party/WebKit/Source/core/css/cssom/StyleValueFactory.cpp b/third_party/WebKit/Source/core/css/cssom/StyleValueFactory.cpp
index 76d836372cf57ad828833276804ccf53a769f5a3..f8892f1e077e9503bdc53d7b1d67a7bbaa7426aa 100644
--- a/third_party/WebKit/Source/core/css/cssom/StyleValueFactory.cpp
+++ b/third_party/WebKit/Source/core/css/cssom/StyleValueFactory.cpp
@@ -10,16 +10,19 @@
namespace blink {
-CSSStyleValue* StyleValueFactory::create(CSSPropertyID propertyID, const CSSValue& value)
+CSSStyleValueVector StyleValueFactory::cssValueToStyleValueVector(CSSPropertyID propertyID, const CSSValue& value)
{
+ CSSStyleValueVector styleValueVector;
+
if (value.isPrimitiveValue()) {
const CSSPrimitiveValue& primitiveValue = toCSSPrimitiveValue(value);
if (primitiveValue.isLength() && !primitiveValue.isCalculated()) {
- return CSSSimpleLength::create(primitiveValue.getDoubleValue(), primitiveValue.typeWithCalcResolved());
+ styleValueVector.append(CSSSimpleLength::create(primitiveValue.getDoubleValue(), primitiveValue.typeWithCalcResolved()));
+ return styleValueVector;
}
}
// TODO(meade): Implement the rest.
- return nullptr;
+ return styleValueVector;
}
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698