2 * This file is part of the XSL implementation.
4 * Copyright (C) 2004, 2006, 2008 Apple Inc. All rights reserved.
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Library General Public
8 * License as published by the Free Software Foundation; either
9 * version 2 of the License, or (at your option) any later version.
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Library General Public License for more details.
16 * You should have received a copy of the GNU Library General Public License
17 * along with this library; see the file COPYING.LIB. If not, write to
18 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
19 * Boston, MA 02110-1301, USA.
23 #ifndef XSLImportRule_h
24 #define XSLImportRule_h
26 #include "core/fetch/ResourcePtr.h"
27 #include "core/xml/XSLStyleSheet.h"
28 #include "platform/RuntimeEnabledFeatures.h"
29 #include "wtf/PassOwnPtr.h"
33 class XSLStyleSheetResource;
35 class XSLImportRule final : public NoBaseWillBeGarbageCollectedFinalized<XSLImportRule> {
36 WTF_MAKE_FAST_ALLOCATED_WILL_BE_REMOVED;
38 static PassOwnPtrWillBeRawPtr<XSLImportRule> create(XSLStyleSheet* parentSheet, const String& href)
40 ASSERT(RuntimeEnabledFeatures::xsltEnabled());
41 return adoptPtrWillBeNoop(new XSLImportRule(parentSheet, href));
44 virtual ~XSLImportRule();
45 virtual void trace(Visitor*);
47 const String& href() const { return m_strHref; }
48 XSLStyleSheet* styleSheet() const { return m_styleSheet.get(); }
50 XSLStyleSheet* parentStyleSheet() const { return m_parentStyleSheet; }
51 void setParentStyleSheet(XSLStyleSheet* styleSheet) { m_parentStyleSheet = styleSheet; }
57 XSLImportRule(XSLStyleSheet* parentSheet, const String& href);
59 void setXSLStyleSheet(const String& href, const KURL& baseURL, const String& sheet);
61 RawPtrWillBeMember<XSLStyleSheet> m_parentStyleSheet;
63 RefPtrWillBeMember<XSLStyleSheet> m_styleSheet;
69 #endif // XSLImportRule_h