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 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
84 Document* singleOwnerDocument() const; | 84 Document* singleOwnerDocument() const; |
85 | 85 |
86 const String& charset() const { return m_parserContext.charset(); } | 86 const String& charset() const { return m_parserContext.charset(); } |
87 | 87 |
88 bool loadCompleted() const; | 88 bool loadCompleted() const; |
89 bool hasFailedOrCanceledSubresources() const; | 89 bool hasFailedOrCanceledSubresources() const; |
90 | 90 |
91 void setHasSyntacticallyValidCSSHeader(bool isValidCss); | 91 void setHasSyntacticallyValidCSSHeader(bool isValidCss); |
92 bool hasSyntacticallyValidCSSHeader() const { return m_hasSyntacticallyValid
CSSHeader; } | 92 bool hasSyntacticallyValidCSSHeader() const { return m_hasSyntacticallyValid
CSSHeader; } |
93 | 93 |
94 void setHasFontFaceRule(bool b) { m_hasFontFaceRule = b; } | 94 void setHasFontFaceRule() { m_hasFontFaceRule = true; } |
95 bool hasFontFaceRule() const { return m_hasFontFaceRule; } | 95 bool hasFontFaceRule() const { return m_hasFontFaceRule; } |
96 void findFontFaceRules(HeapVector<Member<const StyleRuleFontFace>>& fontFace
Rules); | 96 void findFontFaceRules(HeapVector<Member<const StyleRuleFontFace>>& fontFace
Rules); |
97 | 97 |
| 98 void setHasViewportRule() { m_hasViewportRule = true; } |
| 99 bool hasViewportRule() const { return m_hasViewportRule; } |
| 100 |
98 void parserAddNamespace(const AtomicString& prefix, const AtomicString& uri)
; | 101 void parserAddNamespace(const AtomicString& prefix, const AtomicString& uri)
; |
99 void parserAppendRule(StyleRuleBase*); | 102 void parserAppendRule(StyleRuleBase*); |
100 | 103 |
101 void clearRules(); | 104 void clearRules(); |
102 | 105 |
103 // Rules other than @import. | 106 // Rules other than @import. |
104 const HeapVector<Member<StyleRuleBase>>& childRules() const { return m_child
Rules; } | 107 const HeapVector<Member<StyleRuleBase>>& childRules() const { return m_child
Rules; } |
105 const HeapVector<Member<StyleRuleImport>>& importRules() const { return m_im
portRules; } | 108 const HeapVector<Member<StyleRuleImport>>& importRules() const { return m_im
portRules; } |
106 const HeapVector<Member<StyleRuleNamespace>>& namespaceRules() const { retur
n m_namespaceRules; } | 109 const HeapVector<Member<StyleRuleNamespace>>& namespaceRules() const { retur
n m_namespaceRules; } |
107 | 110 |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
146 void setReferencedFromResource(CSSStyleSheetResource*); | 149 void setReferencedFromResource(CSSStyleSheetResource*); |
147 void clearReferencedFromResource(); | 150 void clearReferencedFromResource(); |
148 | 151 |
149 void setHasMediaQueries(); | 152 void setHasMediaQueries(); |
150 bool hasMediaQueries() const { return m_hasMediaQueries; } | 153 bool hasMediaQueries() const { return m_hasMediaQueries; } |
151 | 154 |
152 bool didLoadErrorOccur() const { return m_didLoadErrorOccur; } | 155 bool didLoadErrorOccur() const { return m_didLoadErrorOccur; } |
153 | 156 |
154 RuleSet& ruleSet() { ASSERT(m_ruleSet); return *m_ruleSet.get(); } | 157 RuleSet& ruleSet() { ASSERT(m_ruleSet); return *m_ruleSet.get(); } |
155 RuleSet& ensureRuleSet(const MediaQueryEvaluator&, AddRuleFlags); | 158 RuleSet& ensureRuleSet(const MediaQueryEvaluator&, AddRuleFlags); |
| 159 RuleSet& ensureEmptyRuleSet(); |
156 void clearRuleSet(); | 160 void clearRuleSet(); |
157 | 161 |
158 String sourceMapURL() const { return m_sourceMapURL; } | 162 String sourceMapURL() const { return m_sourceMapURL; } |
159 | 163 |
160 DECLARE_TRACE(); | 164 DECLARE_TRACE(); |
161 | 165 |
162 private: | 166 private: |
163 StyleSheetContents(StyleRuleImport* ownerRule, const String& originalURL, co
nst CSSParserContext&); | 167 StyleSheetContents(StyleRuleImport* ownerRule, const String& originalURL, co
nst CSSParserContext&); |
164 StyleSheetContents(const StyleSheetContents&); | 168 StyleSheetContents(const StyleSheetContents&); |
165 StyleSheetContents() = delete; | 169 StyleSheetContents() = delete; |
(...skipping 11 matching lines...) Expand all Loading... |
177 HeapVector<Member<StyleRuleBase>> m_childRules; | 181 HeapVector<Member<StyleRuleBase>> m_childRules; |
178 using PrefixNamespaceURIMap = HashMap<AtomicString, AtomicString>; | 182 using PrefixNamespaceURIMap = HashMap<AtomicString, AtomicString>; |
179 PrefixNamespaceURIMap m_namespaces; | 183 PrefixNamespaceURIMap m_namespaces; |
180 AtomicString m_defaultNamespace; | 184 AtomicString m_defaultNamespace; |
181 WeakMember<CSSStyleSheetResource> m_referencedFromResource; | 185 WeakMember<CSSStyleSheetResource> m_referencedFromResource; |
182 | 186 |
183 bool m_hasSyntacticallyValidCSSHeader : 1; | 187 bool m_hasSyntacticallyValidCSSHeader : 1; |
184 bool m_didLoadErrorOccur : 1; | 188 bool m_didLoadErrorOccur : 1; |
185 bool m_isMutable : 1; | 189 bool m_isMutable : 1; |
186 bool m_hasFontFaceRule : 1; | 190 bool m_hasFontFaceRule : 1; |
| 191 bool m_hasViewportRule : 1; |
187 bool m_hasMediaQueries : 1; | 192 bool m_hasMediaQueries : 1; |
188 bool m_hasSingleOwnerDocument : 1; | 193 bool m_hasSingleOwnerDocument : 1; |
189 | 194 |
190 CSSParserContext m_parserContext; | 195 CSSParserContext m_parserContext; |
191 | 196 |
192 HeapHashSet<WeakMember<CSSStyleSheet>> m_loadingClients; | 197 HeapHashSet<WeakMember<CSSStyleSheet>> m_loadingClients; |
193 HeapHashSet<WeakMember<CSSStyleSheet>> m_completedClients; | 198 HeapHashSet<WeakMember<CSSStyleSheet>> m_completedClients; |
194 | 199 |
195 Member<RuleSet> m_ruleSet; | 200 Member<RuleSet> m_ruleSet; |
196 String m_sourceMapURL; | 201 String m_sourceMapURL; |
197 }; | 202 }; |
198 | 203 |
199 } // namespace blink | 204 } // namespace blink |
200 | 205 |
201 #endif | 206 #endif |
OLD | NEW |