OLD | NEW |
1 /* | 1 /* |
2 * (C) 1999-2003 Lars Knoll (knoll@kde.org) | 2 * (C) 1999-2003 Lars Knoll (knoll@kde.org) |
3 * Copyright (C) 2004, 2006, 2007, 2008, 2009, 2010, 2012 Apple Inc. All rights
reserved. | 3 * Copyright (C) 2004, 2006, 2007, 2008, 2009, 2010, 2012 Apple Inc. All rights
reserved. |
4 * | 4 * |
5 * This library is free software; you can redistribute it and/or | 5 * This library is free software; you can redistribute it and/or |
6 * modify it under the terms of the GNU Library General Public | 6 * modify it under the terms of the GNU Library General Public |
7 * License as published by the Free Software Foundation; either | 7 * License as published by the Free Software Foundation; either |
8 * version 2 of the License, or (at your option) any later version. | 8 * version 2 of the License, or (at your option) any later version. |
9 * | 9 * |
10 * This library is distributed in the hope that it will be useful, | 10 * This library is distributed in the hope that it will be useful, |
(...skipping 26 matching lines...) Expand all Loading... |
37 namespace blink { | 37 namespace blink { |
38 | 38 |
39 class CSSStyleSheet; | 39 class CSSStyleSheet; |
40 class CSSStyleSheetResource; | 40 class CSSStyleSheetResource; |
41 class Document; | 41 class Document; |
42 class Node; | 42 class Node; |
43 class SecurityOrigin; | 43 class SecurityOrigin; |
44 class StyleRuleBase; | 44 class StyleRuleBase; |
45 class StyleRuleFontFace; | 45 class StyleRuleFontFace; |
46 class StyleRuleImport; | 46 class StyleRuleImport; |
| 47 class StyleRuleNamespace; |
47 | 48 |
48 class CORE_EXPORT StyleSheetContents : public RefCountedWillBeGarbageCollectedFi
nalized<StyleSheetContents> { | 49 class CORE_EXPORT StyleSheetContents : public RefCountedWillBeGarbageCollectedFi
nalized<StyleSheetContents> { |
49 public: | 50 public: |
50 static PassRefPtrWillBeRawPtr<StyleSheetContents> create(const CSSParserCont
ext& context) | 51 static PassRefPtrWillBeRawPtr<StyleSheetContents> create(const CSSParserCont
ext& context) |
51 { | 52 { |
52 return adoptRefWillBeNoop(new StyleSheetContents(0, String(), context)); | 53 return adoptRefWillBeNoop(new StyleSheetContents(0, String(), context)); |
53 } | 54 } |
54 static PassRefPtrWillBeRawPtr<StyleSheetContents> create(const String& origi
nalURL, const CSSParserContext& context) | 55 static PassRefPtrWillBeRawPtr<StyleSheetContents> create(const String& origi
nalURL, const CSSParserContext& context) |
55 { | 56 { |
56 return adoptRefWillBeNoop(new StyleSheetContents(0, originalURL, context
)); | 57 return adoptRefWillBeNoop(new StyleSheetContents(0, originalURL, context
)); |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
95 void findFontFaceRules(WillBeHeapVector<RawPtrWillBeMember<const StyleRuleFo
ntFace>>& fontFaceRules); | 96 void findFontFaceRules(WillBeHeapVector<RawPtrWillBeMember<const StyleRuleFo
ntFace>>& fontFaceRules); |
96 | 97 |
97 void parserAddNamespace(const AtomicString& prefix, const AtomicString& uri)
; | 98 void parserAddNamespace(const AtomicString& prefix, const AtomicString& uri)
; |
98 void parserAppendRule(PassRefPtrWillBeRawPtr<StyleRuleBase>); | 99 void parserAppendRule(PassRefPtrWillBeRawPtr<StyleRuleBase>); |
99 | 100 |
100 void clearRules(); | 101 void clearRules(); |
101 | 102 |
102 // Rules other than @import. | 103 // Rules other than @import. |
103 const WillBeHeapVector<RefPtrWillBeMember<StyleRuleBase>>& childRules() cons
t { return m_childRules; } | 104 const WillBeHeapVector<RefPtrWillBeMember<StyleRuleBase>>& childRules() cons
t { return m_childRules; } |
104 const WillBeHeapVector<RefPtrWillBeMember<StyleRuleImport>>& importRules() c
onst { return m_importRules; } | 105 const WillBeHeapVector<RefPtrWillBeMember<StyleRuleImport>>& importRules() c
onst { return m_importRules; } |
| 106 const WillBeHeapVector<RefPtrWillBeMember<StyleRuleNamespace>>& namespaceRul
es() const { return m_namespaceRules; } |
105 | 107 |
106 void notifyLoadedSheet(const CSSStyleSheetResource*); | 108 void notifyLoadedSheet(const CSSStyleSheetResource*); |
107 | 109 |
108 StyleSheetContents* parentStyleSheet() const; | 110 StyleSheetContents* parentStyleSheet() const; |
109 StyleRuleImport* ownerRule() const { return m_ownerRule; } | 111 StyleRuleImport* ownerRule() const { return m_ownerRule; } |
110 void clearOwnerRule() { m_ownerRule = nullptr; } | 112 void clearOwnerRule() { m_ownerRule = nullptr; } |
111 | 113 |
112 // Note that href is the URL that started the redirect chain that led to | 114 // Note that href is the URL that started the redirect chain that led to |
113 // this style sheet. This property probably isn't useful for much except | 115 // this style sheet. This property probably isn't useful for much except |
114 // the JavaScript binding (which needs to use this value for security). | 116 // the JavaScript binding (which needs to use this value for security). |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
164 StyleSheetContents& operator=(const StyleSheetContents&) = delete; | 166 StyleSheetContents& operator=(const StyleSheetContents&) = delete; |
165 void notifyRemoveFontFaceRule(const StyleRuleFontFace*); | 167 void notifyRemoveFontFaceRule(const StyleRuleFontFace*); |
166 | 168 |
167 Document* clientSingleOwnerDocument() const; | 169 Document* clientSingleOwnerDocument() const; |
168 | 170 |
169 RawPtrWillBeMember<StyleRuleImport> m_ownerRule; | 171 RawPtrWillBeMember<StyleRuleImport> m_ownerRule; |
170 | 172 |
171 String m_originalURL; | 173 String m_originalURL; |
172 | 174 |
173 WillBeHeapVector<RefPtrWillBeMember<StyleRuleImport>> m_importRules; | 175 WillBeHeapVector<RefPtrWillBeMember<StyleRuleImport>> m_importRules; |
| 176 WillBeHeapVector<RefPtrWillBeMember<StyleRuleNamespace>> m_namespaceRules; |
174 WillBeHeapVector<RefPtrWillBeMember<StyleRuleBase>> m_childRules; | 177 WillBeHeapVector<RefPtrWillBeMember<StyleRuleBase>> m_childRules; |
175 typedef HashMap<AtomicString, AtomicString> PrefixNamespaceURIMap; | 178 typedef HashMap<AtomicString, AtomicString> PrefixNamespaceURIMap; |
176 PrefixNamespaceURIMap m_namespaces; | 179 PrefixNamespaceURIMap m_namespaces; |
177 | 180 |
178 bool m_hasSyntacticallyValidCSSHeader : 1; | 181 bool m_hasSyntacticallyValidCSSHeader : 1; |
179 bool m_didLoadErrorOccur : 1; | 182 bool m_didLoadErrorOccur : 1; |
180 bool m_isMutable : 1; | 183 bool m_isMutable : 1; |
181 bool m_isInMemoryCache : 1; | 184 bool m_isInMemoryCache : 1; |
182 bool m_hasFontFaceRule : 1; | 185 bool m_hasFontFaceRule : 1; |
183 bool m_hasMediaQueries : 1; | 186 bool m_hasMediaQueries : 1; |
184 bool m_hasSingleOwnerDocument : 1; | 187 bool m_hasSingleOwnerDocument : 1; |
185 | 188 |
186 CSSParserContext m_parserContext; | 189 CSSParserContext m_parserContext; |
187 | 190 |
188 WillBeHeapHashSet<RawPtrWillBeWeakMember<CSSStyleSheet>> m_loadingClients; | 191 WillBeHeapHashSet<RawPtrWillBeWeakMember<CSSStyleSheet>> m_loadingClients; |
189 WillBeHeapHashSet<RawPtrWillBeWeakMember<CSSStyleSheet>> m_completedClients; | 192 WillBeHeapHashSet<RawPtrWillBeWeakMember<CSSStyleSheet>> m_completedClients; |
190 | 193 |
191 OwnPtrWillBeMember<RuleSet> m_ruleSet; | 194 OwnPtrWillBeMember<RuleSet> m_ruleSet; |
192 String m_sourceMapURL; | 195 String m_sourceMapURL; |
193 }; | 196 }; |
194 | 197 |
195 } // namespace | 198 } // namespace |
196 | 199 |
197 #endif | 200 #endif |
OLD | NEW |