| 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 void setHasSyntacticallyValidCSSHeader(bool isValidCss); | 90 void setHasSyntacticallyValidCSSHeader(bool isValidCss); |
| 91 bool hasSyntacticallyValidCSSHeader() const { return m_hasSyntacticallyValid
CSSHeader; } | 91 bool hasSyntacticallyValidCSSHeader() const { return m_hasSyntacticallyValid
CSSHeader; } |
| 92 | 92 |
| 93 void setHasFontFaceRule(bool b) { m_hasFontFaceRule = b; } | 93 void setHasFontFaceRule(bool b) { m_hasFontFaceRule = b; } |
| 94 bool hasFontFaceRule() const { return m_hasFontFaceRule; } | 94 bool hasFontFaceRule() const { return m_hasFontFaceRule; } |
| 95 void findFontFaceRules(WillBeHeapVector<RawPtrWillBeMember<const StyleRuleFo
ntFace>>& fontFaceRules); | 95 void findFontFaceRules(WillBeHeapVector<RawPtrWillBeMember<const StyleRuleFo
ntFace>>& fontFaceRules); |
| 96 | 96 |
| 97 void parserAddNamespace(const AtomicString& prefix, const AtomicString& uri)
; | 97 void parserAddNamespace(const AtomicString& prefix, const AtomicString& uri)
; |
| 98 void parserAppendRule(PassRefPtrWillBeRawPtr<StyleRuleBase>); | 98 void parserAppendRule(PassRefPtrWillBeRawPtr<StyleRuleBase>); |
| 99 void parserSetUsesRemUnits(bool b) { m_usesRemUnits = b; } | 99 void parserSetUsesRemUnits(bool b) { m_usesRemUnits = b; } |
| 100 void parserSetUsesVariables(bool b) { m_usesVariables = b; } |
| 100 | 101 |
| 101 void clearRules(); | 102 void clearRules(); |
| 102 | 103 |
| 103 // Rules other than @import. | 104 // Rules other than @import. |
| 104 const WillBeHeapVector<RefPtrWillBeMember<StyleRuleBase>>& childRules() cons
t { return m_childRules; } | 105 const WillBeHeapVector<RefPtrWillBeMember<StyleRuleBase>>& childRules() cons
t { return m_childRules; } |
| 105 const WillBeHeapVector<RefPtrWillBeMember<StyleRuleImport>>& importRules() c
onst { return m_importRules; } | 106 const WillBeHeapVector<RefPtrWillBeMember<StyleRuleImport>>& importRules() c
onst { return m_importRules; } |
| 106 | 107 |
| 107 void notifyLoadedSheet(const CSSStyleSheetResource*); | 108 void notifyLoadedSheet(const CSSStyleSheetResource*); |
| 108 | 109 |
| 109 StyleSheetContents* parentStyleSheet() const; | 110 StyleSheetContents* parentStyleSheet() const; |
| 110 StyleRuleImport* ownerRule() const { return m_ownerRule; } | 111 StyleRuleImport* ownerRule() const { return m_ownerRule; } |
| 111 void clearOwnerRule() { m_ownerRule = nullptr; } | 112 void clearOwnerRule() { m_ownerRule = nullptr; } |
| 112 | 113 |
| 113 // 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 |
| 114 // 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 |
| 115 // the JavaScript binding (which needs to use this value for security). | 116 // the JavaScript binding (which needs to use this value for security). |
| 116 String originalURL() const { return m_originalURL; } | 117 String originalURL() const { return m_originalURL; } |
| 117 const KURL& baseURL() const { return m_parserContext.baseURL(); } | 118 const KURL& baseURL() const { return m_parserContext.baseURL(); } |
| 118 | 119 |
| 119 unsigned ruleCount() const; | 120 unsigned ruleCount() const; |
| 120 StyleRuleBase* ruleAt(unsigned index) const; | 121 StyleRuleBase* ruleAt(unsigned index) const; |
| 121 | 122 |
| 122 bool usesRemUnits() const { return m_usesRemUnits; } | 123 bool usesRemUnits() const { return m_usesRemUnits; } |
| 124 bool usesVariables() const { return m_usesVariables; } |
| 123 | 125 |
| 124 unsigned estimatedSizeInBytes() const; | 126 unsigned estimatedSizeInBytes() const; |
| 125 | 127 |
| 126 bool wrapperInsertRule(PassRefPtrWillBeRawPtr<StyleRuleBase>, unsigned index
); | 128 bool wrapperInsertRule(PassRefPtrWillBeRawPtr<StyleRuleBase>, unsigned index
); |
| 127 void wrapperDeleteRule(unsigned index); | 129 void wrapperDeleteRule(unsigned index); |
| 128 | 130 |
| 129 PassRefPtrWillBeRawPtr<StyleSheetContents> copy() const | 131 PassRefPtrWillBeRawPtr<StyleSheetContents> copy() const |
| 130 { | 132 { |
| 131 return adoptRefWillBeNoop(new StyleSheetContents(*this)); | 133 return adoptRefWillBeNoop(new StyleSheetContents(*this)); |
| 132 } | 134 } |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 174 String m_originalURL; | 176 String m_originalURL; |
| 175 | 177 |
| 176 WillBeHeapVector<RefPtrWillBeMember<StyleRuleImport>> m_importRules; | 178 WillBeHeapVector<RefPtrWillBeMember<StyleRuleImport>> m_importRules; |
| 177 WillBeHeapVector<RefPtrWillBeMember<StyleRuleBase>> m_childRules; | 179 WillBeHeapVector<RefPtrWillBeMember<StyleRuleBase>> m_childRules; |
| 178 typedef HashMap<AtomicString, AtomicString> PrefixNamespaceURIMap; | 180 typedef HashMap<AtomicString, AtomicString> PrefixNamespaceURIMap; |
| 179 PrefixNamespaceURIMap m_namespaces; | 181 PrefixNamespaceURIMap m_namespaces; |
| 180 | 182 |
| 181 bool m_hasSyntacticallyValidCSSHeader : 1; | 183 bool m_hasSyntacticallyValidCSSHeader : 1; |
| 182 bool m_didLoadErrorOccur : 1; | 184 bool m_didLoadErrorOccur : 1; |
| 183 bool m_usesRemUnits : 1; | 185 bool m_usesRemUnits : 1; |
| 186 bool m_usesVariables : 1; |
| 184 bool m_isMutable : 1; | 187 bool m_isMutable : 1; |
| 185 bool m_isInMemoryCache : 1; | 188 bool m_isInMemoryCache : 1; |
| 186 bool m_hasFontFaceRule : 1; | 189 bool m_hasFontFaceRule : 1; |
| 187 bool m_hasMediaQueries : 1; | 190 bool m_hasMediaQueries : 1; |
| 188 bool m_hasSingleOwnerDocument : 1; | 191 bool m_hasSingleOwnerDocument : 1; |
| 189 | 192 |
| 190 CSSParserContext m_parserContext; | 193 CSSParserContext m_parserContext; |
| 191 | 194 |
| 192 WillBeHeapHashSet<RawPtrWillBeWeakMember<CSSStyleSheet>> m_loadingClients; | 195 WillBeHeapHashSet<RawPtrWillBeWeakMember<CSSStyleSheet>> m_loadingClients; |
| 193 WillBeHeapHashSet<RawPtrWillBeWeakMember<CSSStyleSheet>> m_completedClients; | 196 WillBeHeapHashSet<RawPtrWillBeWeakMember<CSSStyleSheet>> m_completedClients; |
| 194 | 197 |
| 195 OwnPtrWillBeMember<RuleSet> m_ruleSet; | 198 OwnPtrWillBeMember<RuleSet> m_ruleSet; |
| 196 String m_sourceMapURL; | 199 String m_sourceMapURL; |
| 197 }; | 200 }; |
| 198 | 201 |
| 199 } // namespace | 202 } // namespace |
| 200 | 203 |
| 201 #endif | 204 #endif |
| OLD | NEW |