| 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 23 matching lines...) Expand all Loading... |
| 34 | 34 |
| 35 | 35 |
| 36 namespace WebCore { | 36 namespace WebCore { |
| 37 | 37 |
| 38 class CSSStyleSheet; | 38 class CSSStyleSheet; |
| 39 class CSSStyleSheetResource; | 39 class CSSStyleSheetResource; |
| 40 class Document; | 40 class Document; |
| 41 class Node; | 41 class Node; |
| 42 class SecurityOrigin; | 42 class SecurityOrigin; |
| 43 class StyleRuleBase; | 43 class StyleRuleBase; |
| 44 class StyleRuleFontFace; | |
| 45 class StyleRuleImport; | 44 class StyleRuleImport; |
| 46 | 45 |
| 47 class StyleSheetContents : public RefCounted<StyleSheetContents> { | 46 class StyleSheetContents : public RefCounted<StyleSheetContents> { |
| 48 public: | 47 public: |
| 49 static PassRefPtr<StyleSheetContents> create(const CSSParserContext& context
) | 48 static PassRefPtr<StyleSheetContents> create(const CSSParserContext& context
) |
| 50 { | 49 { |
| 51 return adoptRef(new StyleSheetContents(0, String(), context)); | 50 return adoptRef(new StyleSheetContents(0, String(), context)); |
| 52 } | 51 } |
| 53 static PassRefPtr<StyleSheetContents> create(const String& originalURL, cons
t CSSParserContext& context) | 52 static PassRefPtr<StyleSheetContents> create(const String& originalURL, cons
t CSSParserContext& context) |
| 54 { | 53 { |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 87 bool loadCompleted() const; | 86 bool loadCompleted() const; |
| 88 bool hasFailedOrCanceledSubresources() const; | 87 bool hasFailedOrCanceledSubresources() const; |
| 89 | 88 |
| 90 KURL completeURL(const String& url) const; | 89 KURL completeURL(const String& url) const; |
| 91 | 90 |
| 92 void setHasSyntacticallyValidCSSHeader(bool isValidCss); | 91 void setHasSyntacticallyValidCSSHeader(bool isValidCss); |
| 93 bool hasSyntacticallyValidCSSHeader() const { return m_hasSyntacticallyValid
CSSHeader; } | 92 bool hasSyntacticallyValidCSSHeader() const { return m_hasSyntacticallyValid
CSSHeader; } |
| 94 | 93 |
| 95 void setHasFontFaceRule(bool b) { m_hasFontFaceRule = b; } | 94 void setHasFontFaceRule(bool b) { m_hasFontFaceRule = b; } |
| 96 bool hasFontFaceRule() const { return m_hasFontFaceRule; } | 95 bool hasFontFaceRule() const { return m_hasFontFaceRule; } |
| 97 void findFontFaceRules(Vector<const StyleRuleFontFace*>& fontFaceRules); | |
| 98 | 96 |
| 99 void parserAddNamespace(const AtomicString& prefix, const AtomicString& uri)
; | 97 void parserAddNamespace(const AtomicString& prefix, const AtomicString& uri)
; |
| 100 void parserAppendRule(PassRefPtr<StyleRuleBase>); | 98 void parserAppendRule(PassRefPtr<StyleRuleBase>); |
| 101 void parserSetEncodingFromCharsetRule(const String& encoding); | 99 void parserSetEncodingFromCharsetRule(const String& encoding); |
| 102 void parserSetUsesRemUnits(bool b) { m_usesRemUnits = b; } | 100 void parserSetUsesRemUnits(bool b) { m_usesRemUnits = b; } |
| 103 | 101 |
| 104 void clearRules(); | 102 void clearRules(); |
| 105 | 103 |
| 106 bool hasCharsetRule() const { return !m_encodingFromCharsetRule.isNull(); } | 104 bool hasCharsetRule() const { return !m_encodingFromCharsetRule.isNull(); } |
| 107 String encodingFromCharsetRule() const { return m_encodingFromCharsetRule; } | 105 String encodingFromCharsetRule() const { return m_encodingFromCharsetRule; } |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 148 bool hasMediaQueries() { return m_hasMediaQueries; } | 146 bool hasMediaQueries() { return m_hasMediaQueries; } |
| 149 | 147 |
| 150 void shrinkToFit(); | 148 void shrinkToFit(); |
| 151 RuleSet& ruleSet() { ASSERT(m_ruleSet); return *m_ruleSet.get(); } | 149 RuleSet& ruleSet() { ASSERT(m_ruleSet); return *m_ruleSet.get(); } |
| 152 RuleSet& ensureRuleSet(const MediaQueryEvaluator&, AddRuleFlags); | 150 RuleSet& ensureRuleSet(const MediaQueryEvaluator&, AddRuleFlags); |
| 153 void clearRuleSet(); | 151 void clearRuleSet(); |
| 154 | 152 |
| 155 private: | 153 private: |
| 156 StyleSheetContents(StyleRuleImport* ownerRule, const String& originalURL, co
nst CSSParserContext&); | 154 StyleSheetContents(StyleRuleImport* ownerRule, const String& originalURL, co
nst CSSParserContext&); |
| 157 StyleSheetContents(const StyleSheetContents&); | 155 StyleSheetContents(const StyleSheetContents&); |
| 158 void notifyRemoveFontFaceRule(const StyleRuleFontFace*); | |
| 159 | 156 |
| 160 void clearCharsetRule(); | 157 void clearCharsetRule(); |
| 161 | 158 |
| 162 StyleRuleImport* m_ownerRule; | 159 StyleRuleImport* m_ownerRule; |
| 163 | 160 |
| 164 String m_originalURL; | 161 String m_originalURL; |
| 165 | 162 |
| 166 String m_encodingFromCharsetRule; | 163 String m_encodingFromCharsetRule; |
| 167 Vector<RefPtr<StyleRuleImport> > m_importRules; | 164 Vector<RefPtr<StyleRuleImport> > m_importRules; |
| 168 Vector<RefPtr<StyleRuleBase> > m_childRules; | 165 Vector<RefPtr<StyleRuleBase> > m_childRules; |
| (...skipping 10 matching lines...) Expand all Loading... |
| 179 | 176 |
| 180 CSSParserContext m_parserContext; | 177 CSSParserContext m_parserContext; |
| 181 | 178 |
| 182 Vector<CSSStyleSheet*> m_clients; | 179 Vector<CSSStyleSheet*> m_clients; |
| 183 OwnPtr<RuleSet> m_ruleSet; | 180 OwnPtr<RuleSet> m_ruleSet; |
| 184 }; | 181 }; |
| 185 | 182 |
| 186 } // namespace | 183 } // namespace |
| 187 | 184 |
| 188 #endif | 185 #endif |
| OLD | NEW |