OLD | NEW |
1 /* | 1 /* |
2 * (C) 1999-2003 Lars Knoll (knoll@kde.org) | 2 * (C) 1999-2003 Lars Knoll (knoll@kde.org) |
3 * (C) 2002-2003 Dirk Mueller (mueller@kde.org) | 3 * (C) 2002-2003 Dirk Mueller (mueller@kde.org) |
4 * Copyright (C) 2002, 2006, 2008, 2012 Apple Inc. All rights reserved. | 4 * Copyright (C) 2002, 2006, 2008, 2012 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 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
47 StyleSheetContents* styleSheet() const { return m_styleSheet.get(); } | 47 StyleSheetContents* styleSheet() const { return m_styleSheet.get(); } |
48 | 48 |
49 bool isLoading() const; | 49 bool isLoading() const; |
50 MediaQuerySet* mediaQueries() { return m_mediaQueries.get(); } | 50 MediaQuerySet* mediaQueries() { return m_mediaQueries.get(); } |
51 | 51 |
52 void requestStyleSheet(); | 52 void requestStyleSheet(); |
53 | 53 |
54 private: | 54 private: |
55 // NOTE: We put the StyleSheetResourceClient in a member instead of inheriti
ng from it | 55 // NOTE: We put the StyleSheetResourceClient in a member instead of inheriti
ng from it |
56 // to avoid adding a vptr to StyleRuleImport. | 56 // to avoid adding a vptr to StyleRuleImport. |
57 class ImportedStyleSheetClient : public StyleSheetResourceClient { | 57 class ImportedStyleSheetClient FINAL : public StyleSheetResourceClient { |
58 public: | 58 public: |
59 ImportedStyleSheetClient(StyleRuleImport* ownerRule) : m_ownerRule(owner
Rule) { } | 59 ImportedStyleSheetClient(StyleRuleImport* ownerRule) : m_ownerRule(owner
Rule) { } |
60 virtual ~ImportedStyleSheetClient() { } | 60 virtual ~ImportedStyleSheetClient() { } |
61 virtual void setCSSStyleSheet(const String& href, const KURL& baseURL, c
onst String& charset, const CSSStyleSheetResource* sheet) | 61 virtual void setCSSStyleSheet(const String& href, const KURL& baseURL, c
onst String& charset, const CSSStyleSheetResource* sheet) OVERRIDE |
62 { | 62 { |
63 m_ownerRule->setCSSStyleSheet(href, baseURL, charset, sheet); | 63 m_ownerRule->setCSSStyleSheet(href, baseURL, charset, sheet); |
64 } | 64 } |
65 private: | 65 private: |
66 StyleRuleImport* m_ownerRule; | 66 StyleRuleImport* m_ownerRule; |
67 }; | 67 }; |
68 | 68 |
69 void setCSSStyleSheet(const String& href, const KURL& baseURL, const String&
charset, const CSSStyleSheetResource*); | 69 void setCSSStyleSheet(const String& href, const KURL& baseURL, const String&
charset, const CSSStyleSheetResource*); |
70 friend class ImportedStyleSheetClient; | 70 friend class ImportedStyleSheetClient; |
71 | 71 |
72 StyleRuleImport(const String& href, PassRefPtr<MediaQuerySet>); | 72 StyleRuleImport(const String& href, PassRefPtr<MediaQuerySet>); |
73 | 73 |
74 StyleSheetContents* m_parentStyleSheet; | 74 StyleSheetContents* m_parentStyleSheet; |
75 | 75 |
76 ImportedStyleSheetClient m_styleSheetClient; | 76 ImportedStyleSheetClient m_styleSheetClient; |
77 String m_strHref; | 77 String m_strHref; |
78 RefPtr<MediaQuerySet> m_mediaQueries; | 78 RefPtr<MediaQuerySet> m_mediaQueries; |
79 RefPtr<StyleSheetContents> m_styleSheet; | 79 RefPtr<StyleSheetContents> m_styleSheet; |
80 ResourcePtr<CSSStyleSheetResource> m_resource; | 80 ResourcePtr<CSSStyleSheetResource> m_resource; |
81 bool m_loading; | 81 bool m_loading; |
82 }; | 82 }; |
83 | 83 |
84 DEFINE_STYLE_RULE_TYPE_CASTS(Import); | 84 DEFINE_STYLE_RULE_TYPE_CASTS(Import); |
85 | 85 |
86 } // namespace WebCore | 86 } // namespace WebCore |
87 | 87 |
88 #endif | 88 #endif |
OLD | NEW |