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 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
145 bool isCSSStyleSheet() const override { return true; } | 145 bool isCSSStyleSheet() const override { return true; } |
146 String type() const override { return "text/css"; } | 146 String type() const override { return "text/css"; } |
147 | 147 |
148 void reattachChildRuleCSSOMWrappers(); | 148 void reattachChildRuleCSSOMWrappers(); |
149 | 149 |
150 bool canAccessRules() const; | 150 bool canAccessRules() const; |
151 | 151 |
152 void setLoadCompleted(bool); | 152 void setLoadCompleted(bool); |
153 | 153 |
154 Member<StyleSheetContents> m_contents; | 154 Member<StyleSheetContents> m_contents; |
155 bool m_isInlineStylesheet; | 155 bool m_isInlineStylesheet = false; |
156 bool m_isDisabled; | 156 bool m_isDisabled = false; |
| 157 bool m_loadCompleted = false; |
157 String m_title; | 158 String m_title; |
158 Member<MediaQuerySet> m_mediaQueries; | 159 Member<MediaQuerySet> m_mediaQueries; |
159 | 160 |
160 RefPtr<SecurityOrigin> m_allowRuleAccessFromOrigin; | 161 RefPtr<SecurityOrigin> m_allowRuleAccessFromOrigin; |
161 | 162 |
162 Member<Node> m_ownerNode; | 163 Member<Node> m_ownerNode; |
163 Member<CSSRule> m_ownerRule; | 164 Member<CSSRule> m_ownerRule; |
164 | 165 |
165 TextPosition m_startPosition; | 166 TextPosition m_startPosition; |
166 bool m_loadCompleted; | |
167 mutable Member<MediaList> m_mediaCSSOMWrapper; | 167 mutable Member<MediaList> m_mediaCSSOMWrapper; |
168 mutable HeapVector<Member<CSSRule>> m_childRuleCSSOMWrappers; | 168 mutable HeapVector<Member<CSSRule>> m_childRuleCSSOMWrappers; |
169 mutable Member<CSSRuleList> m_ruleListCSSOMWrapper; | 169 mutable Member<CSSRuleList> m_ruleListCSSOMWrapper; |
170 }; | 170 }; |
171 | 171 |
172 inline CSSStyleSheet::RuleMutationScope::RuleMutationScope(CSSStyleSheet* sheet) | 172 inline CSSStyleSheet::RuleMutationScope::RuleMutationScope(CSSStyleSheet* sheet) |
173 : m_styleSheet(sheet) { | 173 : m_styleSheet(sheet) { |
174 if (m_styleSheet) | 174 if (m_styleSheet) |
175 m_styleSheet->willMutateRules(); | 175 m_styleSheet->willMutateRules(); |
176 } | 176 } |
177 | 177 |
178 inline CSSStyleSheet::RuleMutationScope::RuleMutationScope(CSSRule* rule) | 178 inline CSSStyleSheet::RuleMutationScope::RuleMutationScope(CSSRule* rule) |
179 : m_styleSheet(rule ? rule->parentStyleSheet() : 0) { | 179 : m_styleSheet(rule ? rule->parentStyleSheet() : nullptr) { |
180 if (m_styleSheet) | 180 if (m_styleSheet) |
181 m_styleSheet->willMutateRules(); | 181 m_styleSheet->willMutateRules(); |
182 } | 182 } |
183 | 183 |
184 inline CSSStyleSheet::RuleMutationScope::~RuleMutationScope() { | 184 inline CSSStyleSheet::RuleMutationScope::~RuleMutationScope() { |
185 if (m_styleSheet) | 185 if (m_styleSheet) |
186 m_styleSheet->didMutateRules(); | 186 m_styleSheet->didMutateRules(); |
187 } | 187 } |
188 | 188 |
189 DEFINE_TYPE_CASTS(CSSStyleSheet, | 189 DEFINE_TYPE_CASTS(CSSStyleSheet, |
190 StyleSheet, | 190 StyleSheet, |
191 sheet, | 191 sheet, |
192 sheet->isCSSStyleSheet(), | 192 sheet->isCSSStyleSheet(), |
193 sheet.isCSSStyleSheet()); | 193 sheet.isCSSStyleSheet()); |
194 | 194 |
195 } // namespace blink | 195 } // namespace blink |
196 | 196 |
197 #endif | 197 #endif |
OLD | NEW |