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

Side by Side Diff: third_party/WebKit/Source/core/css/CSSURIValue.h

Issue 2165833006: Merge CSSSVGDocumentValue with CSSURIValue (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixup FilterInterpolationFunctions Created 4 years, 5 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
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CSSURIValue_h 5 #ifndef CSSURIValue_h
6 #define CSSURIValue_h 6 #define CSSURIValue_h
7 7
8 #include "core/css/CSSValue.h" 8 #include "core/css/CSSValue.h"
9 #include "core/fetch/DocumentResource.h"
9 10
10 namespace blink { 11 namespace blink {
11 12
13 class Document;
14
12 class CSSURIValue : public CSSValue { 15 class CSSURIValue : public CSSValue {
13 public: 16 public:
14 static CSSURIValue* create(const String& str) 17 static CSSURIValue* create(const String& str)
15 { 18 {
16 return new CSSURIValue(str); 19 return new CSSURIValue(str);
17 } 20 }
21 ~CSSURIValue();
18 22
19 String value() const { return m_string; } 23 DocumentResource* cachedDocument() const { return m_document; }
24 DocumentResource* load(Document&) const;
25
26 const String& value() const { return m_url; }
27 const String& url() const { return m_url; }
20 28
21 String customCSSText() const; 29 String customCSSText() const;
22 30
23 bool equals(const CSSURIValue& other) const 31 bool loadRequested() const { return m_loadRequested; }
24 { 32 bool equals(const CSSURIValue&) const;
25 return m_string == other.m_string;
26 }
27 33
28 DECLARE_TRACE_AFTER_DISPATCH(); 34 DECLARE_TRACE_AFTER_DISPATCH();
29 35
30 private: 36 private:
31 CSSURIValue(const String&); 37 CSSURIValue(const String&);
32 38
33 String m_string; 39 String m_url;
40
41 // Document cache.
42 mutable Member<DocumentResource> m_document;
43 mutable bool m_loadRequested;
34 }; 44 };
35 45
36 DEFINE_CSS_VALUE_TYPE_CASTS(CSSURIValue, isURIValue()); 46 DEFINE_CSS_VALUE_TYPE_CASTS(CSSURIValue, isURIValue());
37 47
38 } // namespace blink 48 } // namespace blink
39 49
40 #endif // CSSURIValue_h 50 #endif // CSSURIValue_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/css/CSSSVGDocumentValue.cpp ('k') | third_party/WebKit/Source/core/css/CSSURIValue.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698