OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2012 Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
6 * are met: | 6 * are met: |
7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
(...skipping 23 matching lines...) Expand all Loading... |
34 | 34 |
35 class CSSSVGDocumentValue : public CSSValue { | 35 class CSSSVGDocumentValue : public CSSValue { |
36 public: | 36 public: |
37 static CSSSVGDocumentValue* create(const String& url) | 37 static CSSSVGDocumentValue* create(const String& url) |
38 { | 38 { |
39 return new CSSSVGDocumentValue(url); | 39 return new CSSSVGDocumentValue(url); |
40 } | 40 } |
41 ~CSSSVGDocumentValue(); | 41 ~CSSSVGDocumentValue(); |
42 | 42 |
43 DocumentResource* cachedSVGDocument() const { return m_document.get(); } | 43 DocumentResource* cachedSVGDocument() const { return m_document.get(); } |
44 DocumentResource* load(Document*); | 44 DocumentResource* load(Document*) const; |
45 | 45 |
46 String customCSSText() const; | 46 String customCSSText() const; |
47 const String& url() const { return m_url; } | 47 const String& url() const { return m_url; } |
48 bool loadRequested() const { return m_loadRequested; } | 48 bool loadRequested() const { return m_loadRequested; } |
49 bool equals(const CSSSVGDocumentValue&) const; | 49 bool equals(const CSSSVGDocumentValue&) const; |
50 | 50 |
51 DEFINE_INLINE_TRACE_AFTER_DISPATCH() | 51 DEFINE_INLINE_TRACE_AFTER_DISPATCH() |
52 { | 52 { |
53 visitor->trace(m_document); | 53 visitor->trace(m_document); |
54 CSSValue::traceAfterDispatch(visitor); | 54 CSSValue::traceAfterDispatch(visitor); |
55 } | 55 } |
56 | 56 |
57 private: | 57 private: |
58 CSSSVGDocumentValue(const String& url); | 58 CSSSVGDocumentValue(const String& url); |
59 | 59 |
60 String m_url; | 60 String m_url; |
61 Member<DocumentResource> m_document; | 61 |
62 bool m_loadRequested; | 62 // Document cache. |
| 63 mutable Member<DocumentResource> m_document; |
| 64 mutable bool m_loadRequested; |
63 }; | 65 }; |
64 | 66 |
65 DEFINE_CSS_VALUE_TYPE_CASTS(CSSSVGDocumentValue, isSVGDocumentValue()); | 67 DEFINE_CSS_VALUE_TYPE_CASTS(CSSSVGDocumentValue, isSVGDocumentValue()); |
66 | 68 |
67 } // namespace blink | 69 } // namespace blink |
68 | 70 |
69 #endif // CSSSVGDocumentValue_h | 71 #endif // CSSSVGDocumentValue_h |
OLD | NEW |