| 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 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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(bool b) { m_hasFontFaceRule = b; } |
| 95 bool hasFontFaceRule() const { return m_hasFontFaceRule; } | 95 bool hasFontFaceRule() const { return m_hasFontFaceRule; } |
| 96 void findFontFaceRules(WillBeHeapVector<RawPtrWillBeMember<const StyleRuleFo
ntFace> >& fontFaceRules); | 96 void findFontFaceRules(WillBeHeapVector<RawPtrWillBeMember<const StyleRuleFo
ntFace> >& fontFaceRules); |
| 97 | 97 |
| 98 void parserAddNamespace(const AtomicString& prefix, const AtomicString& uri)
; | 98 void parserAddNamespace(const AtomicString& prefix, const AtomicString& uri)
; |
| 99 void parserAppendRule(PassRefPtrWillBeRawPtr<StyleRuleBase>); | 99 void parserAppendRule(PassRefPtrWillBeRawPtr<StyleRuleBase>); |
| 100 void parserSetEncodingFromCharsetRule(const String& encoding); | |
| 101 void parserSetUsesRemUnits(bool b) { m_usesRemUnits = b; } | 100 void parserSetUsesRemUnits(bool b) { m_usesRemUnits = b; } |
| 102 | 101 |
| 103 void clearRules(); | 102 void clearRules(); |
| 104 | 103 |
| 105 bool hasCharsetRule() const { return !m_encodingFromCharsetRule.isNull(); } | 104 // Rules other than @import. |
| 106 String encodingFromCharsetRule() const { return m_encodingFromCharsetRule; } | |
| 107 // Rules other than @charset and @import. | |
| 108 const WillBeHeapVector<RefPtrWillBeMember<StyleRuleBase> >& childRules() con
st { return m_childRules; } | 105 const WillBeHeapVector<RefPtrWillBeMember<StyleRuleBase> >& childRules() con
st { return m_childRules; } |
| 109 const WillBeHeapVector<RefPtrWillBeMember<StyleRuleImport> >& importRules()
const { return m_importRules; } | 106 const WillBeHeapVector<RefPtrWillBeMember<StyleRuleImport> >& importRules()
const { return m_importRules; } |
| 110 | 107 |
| 111 void notifyLoadedSheet(const CSSStyleSheetResource*); | 108 void notifyLoadedSheet(const CSSStyleSheetResource*); |
| 112 | 109 |
| 113 StyleSheetContents* parentStyleSheet() const; | 110 StyleSheetContents* parentStyleSheet() const; |
| 114 StyleRuleImport* ownerRule() const { return m_ownerRule; } | 111 StyleRuleImport* ownerRule() const { return m_ownerRule; } |
| 115 void clearOwnerRule() { m_ownerRule = nullptr; } | 112 void clearOwnerRule() { m_ownerRule = nullptr; } |
| 116 | 113 |
| 117 // 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 |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 162 void clearRuleSet(); | 159 void clearRuleSet(); |
| 163 | 160 |
| 164 void trace(Visitor*); | 161 void trace(Visitor*); |
| 165 | 162 |
| 166 private: | 163 private: |
| 167 StyleSheetContents(StyleRuleImport* ownerRule, const String& originalURL, co
nst CSSParserContext&); | 164 StyleSheetContents(StyleRuleImport* ownerRule, const String& originalURL, co
nst CSSParserContext&); |
| 168 StyleSheetContents(const StyleSheetContents&); | 165 StyleSheetContents(const StyleSheetContents&); |
| 169 void notifyRemoveFontFaceRule(const StyleRuleFontFace*); | 166 void notifyRemoveFontFaceRule(const StyleRuleFontFace*); |
| 170 | 167 |
| 171 Document* clientSingleOwnerDocument() const; | 168 Document* clientSingleOwnerDocument() const; |
| 172 void clearCharsetRule(); | |
| 173 | 169 |
| 174 RawPtrWillBeMember<StyleRuleImport> m_ownerRule; | 170 RawPtrWillBeMember<StyleRuleImport> m_ownerRule; |
| 175 | 171 |
| 176 String m_originalURL; | 172 String m_originalURL; |
| 177 | 173 |
| 178 String m_encodingFromCharsetRule; | |
| 179 WillBeHeapVector<RefPtrWillBeMember<StyleRuleImport> > m_importRules; | 174 WillBeHeapVector<RefPtrWillBeMember<StyleRuleImport> > m_importRules; |
| 180 WillBeHeapVector<RefPtrWillBeMember<StyleRuleBase> > m_childRules; | 175 WillBeHeapVector<RefPtrWillBeMember<StyleRuleBase> > m_childRules; |
| 181 typedef HashMap<AtomicString, AtomicString> PrefixNamespaceURIMap; | 176 typedef HashMap<AtomicString, AtomicString> PrefixNamespaceURIMap; |
| 182 PrefixNamespaceURIMap m_namespaces; | 177 PrefixNamespaceURIMap m_namespaces; |
| 183 | 178 |
| 184 bool m_hasSyntacticallyValidCSSHeader : 1; | 179 bool m_hasSyntacticallyValidCSSHeader : 1; |
| 185 bool m_didLoadErrorOccur : 1; | 180 bool m_didLoadErrorOccur : 1; |
| 186 bool m_usesRemUnits : 1; | 181 bool m_usesRemUnits : 1; |
| 187 bool m_isMutable : 1; | 182 bool m_isMutable : 1; |
| 188 bool m_isInMemoryCache : 1; | 183 bool m_isInMemoryCache : 1; |
| 189 bool m_hasFontFaceRule : 1; | 184 bool m_hasFontFaceRule : 1; |
| 190 bool m_hasMediaQueries : 1; | 185 bool m_hasMediaQueries : 1; |
| 191 bool m_hasSingleOwnerDocument : 1; | 186 bool m_hasSingleOwnerDocument : 1; |
| 192 | 187 |
| 193 CSSParserContext m_parserContext; | 188 CSSParserContext m_parserContext; |
| 194 | 189 |
| 195 WillBeHeapHashSet<RawPtrWillBeWeakMember<CSSStyleSheet> > m_loadingClients; | 190 WillBeHeapHashSet<RawPtrWillBeWeakMember<CSSStyleSheet> > m_loadingClients; |
| 196 WillBeHeapHashSet<RawPtrWillBeWeakMember<CSSStyleSheet> > m_completedClients
; | 191 WillBeHeapHashSet<RawPtrWillBeWeakMember<CSSStyleSheet> > m_completedClients
; |
| 197 | 192 |
| 198 OwnPtrWillBeMember<RuleSet> m_ruleSet; | 193 OwnPtrWillBeMember<RuleSet> m_ruleSet; |
| 199 }; | 194 }; |
| 200 | 195 |
| 201 } // namespace | 196 } // namespace |
| 202 | 197 |
| 203 #endif | 198 #endif |
| OLD | NEW |