| OLD | NEW |
| 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 #include "wtf/text/WTFString.h" |
| 10 | 10 |
| 11 namespace blink { | 11 namespace blink { |
| 12 | 12 |
| 13 class Document; | 13 class Document; |
| 14 class SVGElementProxy; |
| 14 | 15 |
| 15 class CSSURIValue : public CSSValue { | 16 class CSSURIValue : public CSSValue { |
| 16 public: | 17 public: |
| 17 static CSSURIValue* create(const String& str) { return new CSSURIValue(str); } | 18 static CSSURIValue* create(const String& str) { return new CSSURIValue(str); } |
| 18 ~CSSURIValue(); | 19 ~CSSURIValue(); |
| 19 | 20 |
| 20 DocumentResource* cachedDocument() const { return m_document; } | 21 SVGElementProxy& ensureElementProxy(Document&) const; |
| 21 DocumentResource* load(Document&) const; | |
| 22 | 22 |
| 23 const String& value() const { return m_url; } | 23 const String& value() const { return m_url; } |
| 24 const String& url() const { return m_url; } | 24 const String& url() const { return m_url; } |
| 25 | 25 |
| 26 String customCSSText() const; | 26 String customCSSText() const; |
| 27 | 27 |
| 28 bool loadRequested() const { return m_loadRequested; } | |
| 29 bool equals(const CSSURIValue&) const; | 28 bool equals(const CSSURIValue&) const; |
| 30 | 29 |
| 31 DECLARE_TRACE_AFTER_DISPATCH(); | 30 DECLARE_TRACE_AFTER_DISPATCH(); |
| 32 | 31 |
| 33 private: | 32 private: |
| 34 CSSURIValue(const String&); | 33 explicit CSSURIValue(const String&); |
| 35 | 34 |
| 36 String m_url; | 35 String m_url; |
| 37 | 36 |
| 38 // Document cache. | 37 mutable Member<SVGElementProxy> m_proxy; |
| 39 mutable Member<DocumentResource> m_document; | |
| 40 mutable bool m_loadRequested; | |
| 41 }; | 38 }; |
| 42 | 39 |
| 43 DEFINE_CSS_VALUE_TYPE_CASTS(CSSURIValue, isURIValue()); | 40 DEFINE_CSS_VALUE_TYPE_CASTS(CSSURIValue, isURIValue()); |
| 44 | 41 |
| 45 } // namespace blink | 42 } // namespace blink |
| 46 | 43 |
| 47 #endif // CSSURIValue_h | 44 #endif // CSSURIValue_h |
| OLD | NEW |