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

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

Issue 2222863002: [Typed-OM] Enable getting CSSURLImageValue from stylemap (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@CSSProperties_Image
Patch Set: Rebase Created 4 years, 4 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
« no previous file with comments | « third_party/WebKit/LayoutTests/typedcssom/inlinestyle/unsupported-properties.html ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 2d5dd5a0a2a2d6e4db9076cc6a5d383a1faa0903..0c930d29eb22acbf5d4e0eb2ff7b648a6380b46b 100644
--- a/third_party/WebKit/Source/core/css/cssom/StyleValueFactory.cpp
+++ b/third_party/WebKit/Source/core/css/cssom/StyleValueFactory.cpp
@@ -4,6 +4,7 @@
#include "core/css/cssom/StyleValueFactory.h"
+#include "core/css/CSSImageValue.h"
#include "core/css/CSSValue.h"
#include "core/css/cssom/CSSNumberValue.h"
#include "core/css/cssom/CSSSimpleLength.h"
@@ -11,6 +12,7 @@
#include "core/css/cssom/CSSStyleVariableReferenceValue.h"
#include "core/css/cssom/CSSTokenStreamValue.h"
#include "core/css/cssom/CSSTransformValue.h"
+#include "core/css/cssom/CSSURLImageValue.h"
#include "core/css/cssom/CSSUnsupportedStyleValue.h"
namespace blink {
@@ -39,6 +41,11 @@ CSSStyleValue* styleValueForProperty(CSSPropertyID propertyID, const CSSValue& v
return CSSTokenStreamValue::fromCSSValue(toCSSVariableReferenceValue(value));
}
+ if (value.isImageValue()) {
+ const CSSImageValue& imageValue = toCSSImageValue(value);
+ return CSSURLImageValue::create(imageValue.valueWithURLMadeAbsolute());
esprehn 2016/08/30 21:39:19 Note this causes two allocations for every image v
anthonyhkf 2016/08/31 01:45:59 Acknowledged.
+ }
+
return nullptr;
}
« no previous file with comments | « third_party/WebKit/LayoutTests/typedcssom/inlinestyle/unsupported-properties.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698