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

Side by Side 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: Add unit test with CSSImageValue 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 unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef CSSURLImageValue_h
6 #define CSSURLImageValue_h
7
8 #include "core/css/cssom/CSSStyleImageValue.h"
9
10 namespace blink {
11
12 class CORE_EXPORT CSSURLImageValue : public CSSStyleImageValue {
13 WTF_MAKE_NONCOPYABLE(CSSURLImageValue);
14 DEFINE_WRAPPERTYPEINFO();
15 public:
16 static CSSURLImageValue* create(const AtomicString& url)
17 {
18 return new CSSURLImageValue(CSSImageValue::create(url));
19 }
20 static CSSURLImageValue* create(const CSSImageValue* imageValue)
21 {
22 return new CSSURLImageValue(imageValue);
23 }
24
25 StyleValueType type() const override { return URLImageType; }
26
27 const CSSValue* toCSSValue() const { return m_imageValue.get(); }
28
29 const String& url() const { return m_imageValue->url(); }
30
31 private:
32 CSSURLImageValue(const CSSImageValue* imageValue)
33 : CSSStyleImageValue(imageValue)
34 {
35 }
36 };
37
38 } // namespace blink
39
40 #endif // CSSResourceValue_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698