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 RefCounted<StyleSheetContents> { | 47 class StyleSheetContents : public RefCounted<StyleSheetContents> { |
47 public: | 48 public: |
48 static PassRefPtr<StyleSheetContents> create(const CSSParserContext& context
= CSSParserContext(HTMLStandardMode)) | 49 static PassRefPtr<StyleSheetContents> create(const CSSParserContext& context
= CSSParserContext(HTMLStandardMode)) |
49 { | 50 { |
50 return adoptRef(new StyleSheetContents(0, String(), context)); | 51 return adoptRef(new StyleSheetContents(0, String(), context)); |
51 } | 52 } |
52 static PassRefPtr<StyleSheetContents> create(const String& originalURL, cons
t CSSParserContext& context) | 53 static PassRefPtr<StyleSheetContents> create(const String& originalURL, cons
t CSSParserContext& context) |
53 { | 54 { |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
86 bool hasFailedOrCanceledSubresources() const; | 87 bool hasFailedOrCanceledSubresources() const; |
87 | 88 |
88 KURL completeURL(const String& url) const; | 89 KURL completeURL(const String& url) const; |
89 void addSubresourceStyleURLs(ListHashSet<KURL>&); | 90 void addSubresourceStyleURLs(ListHashSet<KURL>&); |
90 | 91 |
91 void setHasSyntacticallyValidCSSHeader(bool b) { m_hasSyntacticallyValidCSSH
eader = b; } | 92 void setHasSyntacticallyValidCSSHeader(bool b) { m_hasSyntacticallyValidCSSH
eader = b; } |
92 bool hasSyntacticallyValidCSSHeader() const { return m_hasSyntacticallyValid
CSSHeader; } | 93 bool hasSyntacticallyValidCSSHeader() const { return m_hasSyntacticallyValid
CSSHeader; } |
93 | 94 |
94 void setHasFontFaceRule(bool b) { m_hasFontFaceRule = b; } | 95 void setHasFontFaceRule(bool b) { m_hasFontFaceRule = b; } |
95 bool hasFontFaceRule() const { return m_hasFontFaceRule; } | 96 bool hasFontFaceRule() const { return m_hasFontFaceRule; } |
| 97 void extractFontFaceRule(Vector<const StyleRuleFontFace*>& fontFaceRules); |
96 | 98 |
97 void parserAddNamespace(const AtomicString& prefix, const AtomicString& uri)
; | 99 void parserAddNamespace(const AtomicString& prefix, const AtomicString& uri)
; |
98 void parserAppendRule(PassRefPtr<StyleRuleBase>); | 100 void parserAppendRule(PassRefPtr<StyleRuleBase>); |
99 void parserSetEncodingFromCharsetRule(const String& encoding); | 101 void parserSetEncodingFromCharsetRule(const String& encoding); |
100 void parserSetUsesRemUnits(bool b) { m_usesRemUnits = b; } | 102 void parserSetUsesRemUnits(bool b) { m_usesRemUnits = b; } |
101 | 103 |
102 void clearRules(); | 104 void clearRules(); |
103 | 105 |
104 bool hasCharsetRule() const { return !m_encodingFromCharsetRule.isNull(); } | 106 bool hasCharsetRule() const { return !m_encodingFromCharsetRule.isNull(); } |
105 String encodingFromCharsetRule() const { return m_encodingFromCharsetRule; } | 107 String encodingFromCharsetRule() const { return m_encodingFromCharsetRule; } |
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
177 | 179 |
178 CSSParserContext m_parserContext; | 180 CSSParserContext m_parserContext; |
179 | 181 |
180 Vector<CSSStyleSheet*> m_clients; | 182 Vector<CSSStyleSheet*> m_clients; |
181 OwnPtr<RuleSet> m_ruleSet; | 183 OwnPtr<RuleSet> m_ruleSet; |
182 }; | 184 }; |
183 | 185 |
184 } // namespace | 186 } // namespace |
185 | 187 |
186 #endif | 188 #endif |
OLD | NEW |