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

Unified Diff: third_party/WebKit/Source/core/css/cssom/CSSURLImageValue.h

Issue 2208283002: [Typed-OM] Add CSSURLImageValue (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
Index: third_party/WebKit/Source/core/css/cssom/CSSURLImageValue.h
diff --git a/third_party/WebKit/Source/core/css/cssom/CSSURLImageValue.h b/third_party/WebKit/Source/core/css/cssom/CSSURLImageValue.h
new file mode 100644
index 0000000000000000000000000000000000000000..d6a223740dc6531bd082999d08b36015f22245cb
--- /dev/null
+++ b/third_party/WebKit/Source/core/css/cssom/CSSURLImageValue.h
@@ -0,0 +1,40 @@
+// Copyright 2016 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CSSURLImageValue_h
+#define CSSURLImageValue_h
+
+#include "core/css/cssom/CSSStyleImageValue.h"
+
+namespace blink {
+
+class CORE_EXPORT CSSURLImageValue final : public CSSStyleImageValue {
+ WTF_MAKE_NONCOPYABLE(CSSURLImageValue);
+ DEFINE_WRAPPERTYPEINFO();
+public:
+ static CSSURLImageValue* create(const AtomicString& url)
+ {
+ return new CSSURLImageValue(CSSImageValue::create(url));
+ }
+ static CSSURLImageValue* create(const CSSImageValue* imageValue)
+ {
+ return new CSSURLImageValue(imageValue);
+ }
+
+ StyleValueType type() const override { return URLImageType; }
+
+ const CSSValue* toCSSValue() const { return m_imageValue.get(); }
+
+ const String& url() const { return m_imageValue->url(); }
+
+private:
+ explicit CSSURLImageValue(const CSSImageValue* imageValue)
+ : CSSStyleImageValue(imageValue)
+ {
+ }
+};
+
+} // namespace blink
+
+#endif // CSSResourceValue_h

Powered by Google App Engine
This is Rietveld 408576698