|
1 /* |
|
2 * This file is part of the DOM implementation for KDE. |
|
3 * |
|
4 * (C) 1999-2003 Lars Knoll (knoll@kde.org) |
|
5 * (C) 2002-2003 Dirk Mueller (mueller@kde.org) |
|
6 * Copyright (C) 2002, 2006 Apple Computer, Inc. |
|
7 * |
|
8 * This library is free software; you can redistribute it and/or |
|
9 * modify it under the terms of the GNU Library General Public |
|
10 * License as published by the Free Software Foundation; either |
|
11 * version 2 of the License, or (at your option) any later version. |
|
12 * |
|
13 * This library is distributed in the hope that it will be useful, |
|
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
|
16 * Library General Public License for more details. |
|
17 * |
|
18 * You should have received a copy of the GNU Library General Public License |
|
19 * along with this library; see the file COPYING.LIB. If not, write to |
|
20 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, |
|
21 * Boston, MA 02110-1301, USA. |
|
22 */ |
|
23 |
|
24 #ifndef CSSImportRule_h |
|
25 #define CSSImportRule_h |
|
26 |
|
27 #include "CSSRule.h" |
|
28 #include "CachedResourceClient.h" |
|
29 #include "PlatformString.h" |
|
30 |
|
31 namespace WebCore { |
|
32 |
|
33 class CachedCSSStyleSheet; |
|
34 class MediaList; |
|
35 |
|
36 class CSSImportRule : public CSSRule, public CachedResourceClient { |
|
37 public: |
|
38 CSSImportRule(StyleBase* parent, const String& href, MediaList*); |
|
39 virtual ~CSSImportRule(); |
|
40 |
|
41 virtual bool isImportRule() { return true; } |
|
42 |
|
43 String href() const { return m_strHref; } |
|
44 MediaList* media() const { return m_lstMedia.get(); } |
|
45 CSSStyleSheet* styleSheet() const { return m_styleSheet.get(); } |
|
46 |
|
47 // Inherited from CSSRule |
|
48 virtual unsigned short type() const { return IMPORT_RULE; } |
|
49 |
|
50 virtual String cssText() const; |
|
51 |
|
52 // Not part of the CSSOM |
|
53 bool isLoading() const; |
|
54 |
|
55 // from CachedResourceClient |
|
56 virtual void setCSSStyleSheet(const String& url, const String& charset, const String& sheet); |
|
57 |
|
58 virtual void insertedIntoParent(); |
|
59 |
|
60 protected: |
|
61 String m_strHref; |
|
62 RefPtr<MediaList> m_lstMedia; |
|
63 RefPtr<CSSStyleSheet> m_styleSheet; |
|
64 CachedCSSStyleSheet* m_cachedSheet; |
|
65 bool m_loading; |
|
66 }; |
|
67 |
|
68 } // namespace WebCore |
|
69 |
|
70 #endif // CSSImportRule_h |