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 17 matching lines...) Expand all Loading... |
28 #include "core/css/CSSValue.h" | 28 #include "core/css/CSSValue.h" |
29 #include "core/fetch/DocumentResource.h" | 29 #include "core/fetch/DocumentResource.h" |
30 #include "core/fetch/ResourcePtr.h" | 30 #include "core/fetch/ResourcePtr.h" |
31 | 31 |
32 namespace blink { | 32 namespace blink { |
33 | 33 |
34 class Document; | 34 class Document; |
35 | 35 |
36 class CSSSVGDocumentValue : public CSSValue { | 36 class CSSSVGDocumentValue : public CSSValue { |
37 public: | 37 public: |
38 static PassRefPtrWillBeRawPtr<CSSSVGDocumentValue> create(const String& url) | 38 static PassRefPtr<CSSSVGDocumentValue> create(const String& url) |
39 { | 39 { |
40 return adoptRefWillBeNoop(new CSSSVGDocumentValue(url)); | 40 return adoptRef(new CSSSVGDocumentValue(url)); |
41 } | 41 } |
42 ~CSSSVGDocumentValue(); | 42 ~CSSSVGDocumentValue(); |
43 | 43 |
44 DocumentResource* cachedSVGDocument() const { return m_document.get(); } | 44 DocumentResource* cachedSVGDocument() const { return m_document.get(); } |
45 DocumentResource* load(Document*); | 45 DocumentResource* load(Document*); |
46 | 46 |
47 String customCSSText() const; | 47 String customCSSText() const; |
48 const String& url() const { return m_url; } | 48 const String& url() const { return m_url; } |
49 bool loadRequested() const { return m_loadRequested; } | 49 bool loadRequested() const { return m_loadRequested; } |
50 bool equals(const CSSSVGDocumentValue&) const; | 50 bool equals(const CSSSVGDocumentValue&) const; |
51 | 51 |
52 DEFINE_INLINE_TRACE_AFTER_DISPATCH() { CSSValue::traceAfterDispatch(visitor)
; } | |
53 | |
54 private: | 52 private: |
55 CSSSVGDocumentValue(const String& url); | 53 CSSSVGDocumentValue(const String& url); |
56 | 54 |
57 String m_url; | 55 String m_url; |
58 ResourcePtr<DocumentResource> m_document; | 56 ResourcePtr<DocumentResource> m_document; |
59 bool m_loadRequested; | 57 bool m_loadRequested; |
60 }; | 58 }; |
61 | 59 |
62 DEFINE_CSS_VALUE_TYPE_CASTS(CSSSVGDocumentValue, isSVGDocumentValue()); | 60 DEFINE_CSS_VALUE_TYPE_CASTS(CSSSVGDocumentValue, isSVGDocumentValue()); |
63 | 61 |
64 } // namespace blink | 62 } // namespace blink |
65 | 63 |
66 #endif // CSSSVGDocumentValue_h | 64 #endif // CSSSVGDocumentValue_h |
OLD | NEW |