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