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 | 3 * Copyright (C) 2004, 2006, 2007, 2008, 2009, 2010, 2012 Apple Inc. All rights |
4 * reserved. | 4 * reserved. |
5 * | 5 * |
6 * This library is free software; you can redistribute it and/or | 6 * This library is free software; you can redistribute it and/or |
7 * modify it under the terms of the GNU Library General Public | 7 * modify it under the terms of the GNU Library General Public |
8 * License as published by the Free Software Foundation; either | 8 * License as published by the Free Software Foundation; either |
9 * version 2 of the License, or (at your option) any later version. | 9 * version 2 of the License, or (at your option) any later version. |
10 * | 10 * |
(...skipping 24 matching lines...) Expand all Loading... |
35 class CSSImportRule; | 35 class CSSImportRule; |
36 class CSSRule; | 36 class CSSRule; |
37 class CSSRuleList; | 37 class CSSRuleList; |
38 class CSSStyleSheet; | 38 class CSSStyleSheet; |
39 class Document; | 39 class Document; |
40 class ExceptionState; | 40 class ExceptionState; |
41 class MediaQuerySet; | 41 class MediaQuerySet; |
42 class SecurityOrigin; | 42 class SecurityOrigin; |
43 class StyleSheetContents; | 43 class StyleSheetContents; |
44 | 44 |
45 enum StyleSheetUpdateType { PartialRuleUpdate, EntireStyleSheetUpdate }; | |
46 | |
47 class CORE_EXPORT CSSStyleSheet final : public StyleSheet { | 45 class CORE_EXPORT CSSStyleSheet final : public StyleSheet { |
48 DEFINE_WRAPPERTYPEINFO(); | 46 DEFINE_WRAPPERTYPEINFO(); |
49 WTF_MAKE_NONCOPYABLE(CSSStyleSheet); | 47 WTF_MAKE_NONCOPYABLE(CSSStyleSheet); |
50 | 48 |
51 public: | 49 public: |
52 static CSSStyleSheet* create(StyleSheetContents*, | 50 static CSSStyleSheet* create(StyleSheetContents*, |
53 CSSImportRule* ownerRule = nullptr); | 51 CSSImportRule* ownerRule = nullptr); |
54 static CSSStyleSheet* create(StyleSheetContents*, Node& ownerNode); | 52 static CSSStyleSheet* create(StyleSheetContents*, Node& ownerNode); |
55 static CSSStyleSheet* createInline( | 53 static CSSStyleSheet* createInline( |
56 Node&, | 54 Node&, |
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
122 explicit RuleMutationScope(CSSStyleSheet*); | 120 explicit RuleMutationScope(CSSStyleSheet*); |
123 explicit RuleMutationScope(CSSRule*); | 121 explicit RuleMutationScope(CSSRule*); |
124 ~RuleMutationScope(); | 122 ~RuleMutationScope(); |
125 | 123 |
126 private: | 124 private: |
127 Member<CSSStyleSheet> m_styleSheet; | 125 Member<CSSStyleSheet> m_styleSheet; |
128 }; | 126 }; |
129 | 127 |
130 void willMutateRules(); | 128 void willMutateRules(); |
131 void didMutateRules(); | 129 void didMutateRules(); |
132 void didMutate(StyleSheetUpdateType = PartialRuleUpdate); | 130 void didMutate(); |
133 | 131 |
134 StyleSheetContents* contents() const { return m_contents.get(); } | 132 StyleSheetContents* contents() const { return m_contents.get(); } |
135 | 133 |
136 bool isInline() const { return m_isInlineStylesheet; } | 134 bool isInline() const { return m_isInlineStylesheet; } |
137 TextPosition startPositionInSource() const { return m_startPosition; } | 135 TextPosition startPositionInSource() const { return m_startPosition; } |
138 | 136 |
139 bool sheetLoaded(); | 137 bool sheetLoaded(); |
140 bool loadCompleted() const { return m_loadCompleted; } | 138 bool loadCompleted() const { return m_loadCompleted; } |
141 void startLoadingDynamicSheet(); | 139 void startLoadingDynamicSheet(); |
142 void setText(const String&); | 140 void setText(const String&); |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
198 | 196 |
199 DEFINE_TYPE_CASTS(CSSStyleSheet, | 197 DEFINE_TYPE_CASTS(CSSStyleSheet, |
200 StyleSheet, | 198 StyleSheet, |
201 sheet, | 199 sheet, |
202 sheet->isCSSStyleSheet(), | 200 sheet->isCSSStyleSheet(), |
203 sheet.isCSSStyleSheet()); | 201 sheet.isCSSStyleSheet()); |
204 | 202 |
205 } // namespace blink | 203 } // namespace blink |
206 | 204 |
207 #endif | 205 #endif |
OLD | NEW |