| 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 15 matching lines...) Expand all Loading... |
| 26 #include "RuntimeEnabledFeatures.h" | 26 #include "RuntimeEnabledFeatures.h" |
| 27 #include "core/fetch/ResourcePtr.h" | 27 #include "core/fetch/ResourcePtr.h" |
| 28 #include "core/fetch/StyleSheetResourceClient.h" | 28 #include "core/fetch/StyleSheetResourceClient.h" |
| 29 #include "core/xml/XSLStyleSheet.h" | 29 #include "core/xml/XSLStyleSheet.h" |
| 30 #include "wtf/PassOwnPtr.h" | 30 #include "wtf/PassOwnPtr.h" |
| 31 | 31 |
| 32 namespace WebCore { | 32 namespace WebCore { |
| 33 | 33 |
| 34 class XSLStyleSheetResource; | 34 class XSLStyleSheetResource; |
| 35 | 35 |
| 36 class XSLImportRule : private StyleSheetResourceClient { | 36 class XSLImportRule FINAL : private StyleSheetResourceClient { |
| 37 WTF_MAKE_FAST_ALLOCATED; | 37 WTF_MAKE_FAST_ALLOCATED; |
| 38 public: | 38 public: |
| 39 static PassOwnPtr<XSLImportRule> create(XSLStyleSheet* parentSheet, const St
ring& href) | 39 static PassOwnPtr<XSLImportRule> create(XSLStyleSheet* parentSheet, const St
ring& href) |
| 40 { | 40 { |
| 41 ASSERT(RuntimeEnabledFeatures::xsltEnabled()); | 41 ASSERT(RuntimeEnabledFeatures::xsltEnabled()); |
| 42 return adoptPtr(new XSLImportRule(parentSheet, href)); | 42 return adoptPtr(new XSLImportRule(parentSheet, href)); |
| 43 } | 43 } |
| 44 | 44 |
| 45 virtual ~XSLImportRule(); | 45 virtual ~XSLImportRule(); |
| 46 | 46 |
| 47 const String& href() const { return m_strHref; } | 47 const String& href() const { return m_strHref; } |
| 48 XSLStyleSheet* styleSheet() const { return m_styleSheet.get(); } | 48 XSLStyleSheet* styleSheet() const { return m_styleSheet.get(); } |
| 49 | 49 |
| 50 XSLStyleSheet* parentStyleSheet() const { return m_parentStyleSheet; } | 50 XSLStyleSheet* parentStyleSheet() const { return m_parentStyleSheet; } |
| 51 void setParentStyleSheet(XSLStyleSheet* styleSheet) { m_parentStyleSheet = s
tyleSheet; } | 51 void setParentStyleSheet(XSLStyleSheet* styleSheet) { m_parentStyleSheet = s
tyleSheet; } |
| 52 | 52 |
| 53 bool isLoading(); | 53 bool isLoading(); |
| 54 void loadSheet(); | 54 void loadSheet(); |
| 55 | 55 |
| 56 private: | 56 private: |
| 57 XSLImportRule(XSLStyleSheet* parentSheet, const String& href); | 57 XSLImportRule(XSLStyleSheet* parentSheet, const String& href); |
| 58 | 58 |
| 59 virtual void setXSLStyleSheet(const String& href, const KURL& baseURL, const
String& sheet); | 59 virtual void setXSLStyleSheet(const String& href, const KURL& baseURL, const
String& sheet) OVERRIDE; |
| 60 | 60 |
| 61 XSLStyleSheet* m_parentStyleSheet; | 61 XSLStyleSheet* m_parentStyleSheet; |
| 62 String m_strHref; | 62 String m_strHref; |
| 63 RefPtr<XSLStyleSheet> m_styleSheet; | 63 RefPtr<XSLStyleSheet> m_styleSheet; |
| 64 ResourcePtr<XSLStyleSheetResource> m_resource; | 64 ResourcePtr<XSLStyleSheetResource> m_resource; |
| 65 bool m_loading; | 65 bool m_loading; |
| 66 }; | 66 }; |
| 67 | 67 |
| 68 } // namespace WebCore | 68 } // namespace WebCore |
| 69 | 69 |
| 70 #endif // XSLImportRule_h | 70 #endif // XSLImportRule_h |
| OLD | NEW |