| 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; |
| 44 class StyleRuleImport; | 45 class StyleRuleImport; |
| 45 | 46 |
| 46 class StyleSheetContents : public RefCountedWillBeRefCountedGarbageCollected<Sty
leSheetContents> { | 47 class StyleSheetContents : public RefCountedWillBeRefCountedGarbageCollected<Sty
leSheetContents> { |
| 47 DECLARE_GC_INFO | 48 DECLARE_GC_INFO |
| 48 public: | 49 public: |
| 49 static PassRefPtrWillBeRawPtr<StyleSheetContents> create(const CSSParserCont
ext& context) | 50 static PassRefPtrWillBeRawPtr<StyleSheetContents> create(const CSSParserCont
ext& context) |
| 50 { | 51 { |
| 51 return adoptRefCountedWillBeRefCountedGarbageCollected(new StyleSheetCon
tents(0, String(), context)); | 52 return adoptRefCountedWillBeRefCountedGarbageCollected(new StyleSheetCon
tents(0, String(), context)); |
| 52 } | 53 } |
| 53 static PassRefPtrWillBeRawPtr<StyleSheetContents> create(const String& origi
nalURL, const CSSParserContext& context) | 54 static PassRefPtrWillBeRawPtr<StyleSheetContents> create(const String& origi
nalURL, const CSSParserContext& context) |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 87 bool loadCompleted() const; | 88 bool loadCompleted() const; |
| 88 bool hasFailedOrCanceledSubresources() const; | 89 bool hasFailedOrCanceledSubresources() const; |
| 89 | 90 |
| 90 KURL completeURL(const String& url) const; | 91 KURL completeURL(const String& url) const; |
| 91 | 92 |
| 92 void setHasSyntacticallyValidCSSHeader(bool isValidCss); | 93 void setHasSyntacticallyValidCSSHeader(bool isValidCss); |
| 93 bool hasSyntacticallyValidCSSHeader() const { return m_hasSyntacticallyValid
CSSHeader; } | 94 bool hasSyntacticallyValidCSSHeader() const { return m_hasSyntacticallyValid
CSSHeader; } |
| 94 | 95 |
| 95 void setHasFontFaceRule(bool b) { m_hasFontFaceRule = b; } | 96 void setHasFontFaceRule(bool b) { m_hasFontFaceRule = b; } |
| 96 bool hasFontFaceRule() const { return m_hasFontFaceRule; } | 97 bool hasFontFaceRule() const { return m_hasFontFaceRule; } |
| 98 void findFontFaceRules(Vector<const StyleRuleFontFace*>& fontFaceRules); |
| 97 | 99 |
| 98 void parserAddNamespace(const AtomicString& prefix, const AtomicString& uri)
; | 100 void parserAddNamespace(const AtomicString& prefix, const AtomicString& uri)
; |
| 99 void parserAppendRule(PassRefPtr<StyleRuleBase>); | 101 void parserAppendRule(PassRefPtr<StyleRuleBase>); |
| 100 void parserSetEncodingFromCharsetRule(const String& encoding); | 102 void parserSetEncodingFromCharsetRule(const String& encoding); |
| 101 void parserSetUsesRemUnits(bool b) { m_usesRemUnits = b; } | 103 void parserSetUsesRemUnits(bool b) { m_usesRemUnits = b; } |
| 102 | 104 |
| 103 void clearRules(); | 105 void clearRules(); |
| 104 | 106 |
| 105 bool hasCharsetRule() const { return !m_encodingFromCharsetRule.isNull(); } | 107 bool hasCharsetRule() const { return !m_encodingFromCharsetRule.isNull(); } |
| 106 String encodingFromCharsetRule() const { return m_encodingFromCharsetRule; } | 108 String encodingFromCharsetRule() const { return m_encodingFromCharsetRule; } |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 149 void shrinkToFit(); | 151 void shrinkToFit(); |
| 150 RuleSet& ruleSet() { ASSERT(m_ruleSet); return *m_ruleSet.get(); } | 152 RuleSet& ruleSet() { ASSERT(m_ruleSet); return *m_ruleSet.get(); } |
| 151 RuleSet& ensureRuleSet(const MediaQueryEvaluator&, AddRuleFlags); | 153 RuleSet& ensureRuleSet(const MediaQueryEvaluator&, AddRuleFlags); |
| 152 void clearRuleSet(); | 154 void clearRuleSet(); |
| 153 | 155 |
| 154 void trace(Visitor*); | 156 void trace(Visitor*); |
| 155 | 157 |
| 156 private: | 158 private: |
| 157 StyleSheetContents(StyleRuleImport* ownerRule, const String& originalURL, co
nst CSSParserContext&); | 159 StyleSheetContents(StyleRuleImport* ownerRule, const String& originalURL, co
nst CSSParserContext&); |
| 158 StyleSheetContents(const StyleSheetContents&); | 160 StyleSheetContents(const StyleSheetContents&); |
| 161 void notifyRemoveFontFaceRule(const StyleRuleFontFace*); |
| 159 | 162 |
| 160 void clearCharsetRule(); | 163 void clearCharsetRule(); |
| 161 | 164 |
| 162 StyleRuleImport* m_ownerRule; | 165 StyleRuleImport* m_ownerRule; |
| 163 | 166 |
| 164 String m_originalURL; | 167 String m_originalURL; |
| 165 | 168 |
| 166 String m_encodingFromCharsetRule; | 169 String m_encodingFromCharsetRule; |
| 167 Vector<RefPtr<StyleRuleImport> > m_importRules; | 170 Vector<RefPtr<StyleRuleImport> > m_importRules; |
| 168 Vector<RefPtr<StyleRuleBase> > m_childRules; | 171 Vector<RefPtr<StyleRuleBase> > m_childRules; |
| (...skipping 10 matching lines...) Expand all Loading... |
| 179 | 182 |
| 180 CSSParserContext m_parserContext; | 183 CSSParserContext m_parserContext; |
| 181 | 184 |
| 182 Vector<CSSStyleSheet*> m_clients; | 185 Vector<CSSStyleSheet*> m_clients; |
| 183 OwnPtr<RuleSet> m_ruleSet; | 186 OwnPtr<RuleSet> m_ruleSet; |
| 184 }; | 187 }; |
| 185 | 188 |
| 186 } // namespace | 189 } // namespace |
| 187 | 190 |
| 188 #endif | 191 #endif |
| OLD | NEW |