OLD | NEW |
1 /* | 1 /* |
2 * This file is part of the XSL implementation. | 2 * This file is part of the XSL implementation. |
3 * | 3 * |
4 * Copyright (C) 2004, 2006, 2008 Apple Inc. All rights reserved. | 4 * Copyright (C) 2004, 2006, 2008 Apple Inc. All rights reserved. |
5 * | 5 * |
6 * This library is free software; you can redistribute it and/or | 6 * This library is free software; you can redistribute it and/or |
7 * modify it under the terms of the GNU Library General Public | 7 * modify it under the terms of the GNU Library General Public |
8 * License as published by the Free Software Foundation; either | 8 * License as published by the Free Software Foundation; either |
9 * version 2 of the License, or (at your option) any later version. | 9 * version 2 of the License, or (at your option) any later version. |
10 * | 10 * |
(...skipping 12 matching lines...) Expand all Loading... |
23 #ifndef XSLImportRule_h | 23 #ifndef XSLImportRule_h |
24 #define XSLImportRule_h | 24 #define XSLImportRule_h |
25 | 25 |
26 #include "core/fetch/ResourcePtr.h" | 26 #include "core/fetch/ResourcePtr.h" |
27 #include "core/xml/XSLStyleSheet.h" | 27 #include "core/xml/XSLStyleSheet.h" |
28 #include "platform/RuntimeEnabledFeatures.h" | 28 #include "platform/RuntimeEnabledFeatures.h" |
29 #include "wtf/PassOwnPtr.h" | 29 #include "wtf/PassOwnPtr.h" |
30 | 30 |
31 namespace blink { | 31 namespace blink { |
32 | 32 |
33 class XSLImportRule final : public NoBaseWillBeGarbageCollectedFinalized<XSLImpo
rtRule> { | 33 class XSLImportRule final : public GarbageCollectedFinalized<XSLImportRule> { |
34 WTF_MAKE_FAST_ALLOCATED_WILL_BE_REMOVED(XSLImportRule); | |
35 public: | 34 public: |
36 static PassOwnPtrWillBeRawPtr<XSLImportRule> create(XSLStyleSheet* parentShe
et, const String& href) | 35 static XSLImportRule* create(XSLStyleSheet* parentSheet, const String& href) |
37 { | 36 { |
38 ASSERT(RuntimeEnabledFeatures::xsltEnabled()); | 37 ASSERT(RuntimeEnabledFeatures::xsltEnabled()); |
39 return adoptPtrWillBeNoop(new XSLImportRule(parentSheet, href)); | 38 return new XSLImportRule(parentSheet, href); |
40 } | 39 } |
41 | 40 |
42 virtual ~XSLImportRule(); | 41 virtual ~XSLImportRule(); |
43 DECLARE_VIRTUAL_TRACE(); | 42 DECLARE_VIRTUAL_TRACE(); |
44 | 43 |
45 const String& href() const { return m_strHref; } | 44 const String& href() const { return m_strHref; } |
46 XSLStyleSheet* styleSheet() const { return m_styleSheet.get(); } | 45 XSLStyleSheet* styleSheet() const { return m_styleSheet.get(); } |
47 | 46 |
48 XSLStyleSheet* parentStyleSheet() const { return m_parentStyleSheet; } | 47 XSLStyleSheet* parentStyleSheet() const { return m_parentStyleSheet; } |
49 void setParentStyleSheet(XSLStyleSheet* styleSheet) { m_parentStyleSheet = s
tyleSheet; } | 48 void setParentStyleSheet(XSLStyleSheet* styleSheet) { m_parentStyleSheet = s
tyleSheet; } |
50 | 49 |
51 bool isLoading(); | 50 bool isLoading(); |
52 void loadSheet(); | 51 void loadSheet(); |
53 | 52 |
54 private: | 53 private: |
55 XSLImportRule(XSLStyleSheet* parentSheet, const String& href); | 54 XSLImportRule(XSLStyleSheet* parentSheet, const String& href); |
56 | 55 |
57 void setXSLStyleSheet(const String& href, const KURL& baseURL, const String&
sheet); | 56 void setXSLStyleSheet(const String& href, const KURL& baseURL, const String&
sheet); |
58 | 57 |
59 RawPtrWillBeMember<XSLStyleSheet> m_parentStyleSheet; | 58 RawPtrWillBeMember<XSLStyleSheet> m_parentStyleSheet; |
60 String m_strHref; | 59 String m_strHref; |
61 RefPtrWillBeMember<XSLStyleSheet> m_styleSheet; | 60 RefPtrWillBeMember<XSLStyleSheet> m_styleSheet; |
62 bool m_loading; | 61 bool m_loading; |
63 }; | 62 }; |
64 | 63 |
65 } // namespace blink | 64 } // namespace blink |
66 | 65 |
67 #endif // XSLImportRule_h | 66 #endif // XSLImportRule_h |
OLD | NEW |