| 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 14 matching lines...) Expand all Loading... |
| 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 XSLStyleSheetResource; | 33 class XSLStyleSheetResource; |
| 34 | 34 |
| 35 class XSLImportRule final : public NoBaseWillBeGarbageCollectedFinalized<XSLImpo
rtRule> { | 35 class XSLImportRule final : public GarbageCollectedFinalized<XSLImportRule> { |
| 36 WTF_MAKE_FAST_ALLOCATED_WILL_BE_REMOVED; | |
| 37 public: | 36 public: |
| 38 static PassOwnPtrWillBeRawPtr<XSLImportRule> create(XSLStyleSheet* parentShe
et, const String& href) | 37 static XSLImportRule* create(XSLStyleSheet* parentSheet, const String& href) |
| 39 { | 38 { |
| 40 ASSERT(RuntimeEnabledFeatures::xsltEnabled()); | 39 ASSERT(RuntimeEnabledFeatures::xsltEnabled()); |
| 41 return adoptPtrWillBeNoop(new XSLImportRule(parentSheet, href)); | 40 return new XSLImportRule(parentSheet, href); |
| 42 } | 41 } |
| 43 | 42 |
| 44 virtual ~XSLImportRule(); | 43 virtual ~XSLImportRule(); |
| 45 virtual void trace(Visitor*); | 44 virtual void trace(Visitor*); |
| 46 | 45 |
| 47 const String& href() const { return m_strHref; } | 46 const String& href() const { return m_strHref; } |
| 48 XSLStyleSheet* styleSheet() const { return m_styleSheet.get(); } | 47 XSLStyleSheet* styleSheet() const { return m_styleSheet.get(); } |
| 49 | 48 |
| 50 XSLStyleSheet* parentStyleSheet() const { return m_parentStyleSheet; } | 49 XSLStyleSheet* parentStyleSheet() const { return m_parentStyleSheet; } |
| 51 void setParentStyleSheet(XSLStyleSheet* styleSheet) { m_parentStyleSheet = s
tyleSheet; } | 50 void setParentStyleSheet(XSLStyleSheet* styleSheet) { m_parentStyleSheet = s
tyleSheet; } |
| 52 | 51 |
| 53 bool isLoading(); | 52 bool isLoading(); |
| 54 void loadSheet(); | 53 void loadSheet(); |
| 55 | 54 |
| 56 private: | 55 private: |
| 57 XSLImportRule(XSLStyleSheet* parentSheet, const String& href); | 56 XSLImportRule(XSLStyleSheet* parentSheet, const String& href); |
| 58 | 57 |
| 59 void setXSLStyleSheet(const String& href, const KURL& baseURL, const String&
sheet); | 58 void setXSLStyleSheet(const String& href, const KURL& baseURL, const String&
sheet); |
| 60 | 59 |
| 61 RawPtrWillBeMember<XSLStyleSheet> m_parentStyleSheet; | 60 RawPtrWillBeMember<XSLStyleSheet> m_parentStyleSheet; |
| 62 String m_strHref; | 61 String m_strHref; |
| 63 RefPtrWillBeMember<XSLStyleSheet> m_styleSheet; | 62 RefPtrWillBeMember<XSLStyleSheet> m_styleSheet; |
| 64 bool m_loading; | 63 bool m_loading; |
| 65 }; | 64 }; |
| 66 | 65 |
| 67 } // namespace blink | 66 } // namespace blink |
| 68 | 67 |
| 69 #endif // XSLImportRule_h | 68 #endif // XSLImportRule_h |
| OLD | NEW |