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, 2012 Apple Inc. All rights reserved. | 3 * Copyright (C) 2004, 2006, 2007, 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 157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
168 | 168 |
169 didMutate(PartialRuleUpdate); | 169 didMutate(PartialRuleUpdate); |
170 } | 170 } |
171 | 171 |
172 void CSSStyleSheet::didMutate(StyleSheetUpdateType updateType) { | 172 void CSSStyleSheet::didMutate(StyleSheetUpdateType updateType) { |
173 Document* owner = ownerDocument(); | 173 Document* owner = ownerDocument(); |
174 if (!owner) | 174 if (!owner) |
175 return; | 175 return; |
176 | 176 |
177 // Need FullStyleUpdate when insertRule or deleteRule, | 177 // Need FullStyleUpdate when insertRule or deleteRule, |
178 // because StyleSheetCollection::analyzeStyleSheetChange cannot detect partial
rule update. | 178 // because StyleSheetCollection::analyzeStyleSheetChange cannot detect partial |
| 179 // rule update. |
179 StyleResolverUpdateMode updateMode = | 180 StyleResolverUpdateMode updateMode = |
180 updateType != PartialRuleUpdate ? AnalyzedStyleUpdate : FullStyleUpdate; | 181 updateType != PartialRuleUpdate ? AnalyzedStyleUpdate : FullStyleUpdate; |
181 owner->styleEngine().setNeedsActiveStyleUpdate(this, updateMode); | 182 owner->styleEngine().setNeedsActiveStyleUpdate(this, updateMode); |
182 } | 183 } |
183 | 184 |
184 void CSSStyleSheet::reattachChildRuleCSSOMWrappers() { | 185 void CSSStyleSheet::reattachChildRuleCSSOMWrappers() { |
185 for (unsigned i = 0; i < m_childRuleCSSOMWrappers.size(); ++i) { | 186 for (unsigned i = 0; i < m_childRuleCSSOMWrappers.size(); ++i) { |
186 if (!m_childRuleCSSOMWrappers[i]) | 187 if (!m_childRuleCSSOMWrappers[i]) |
187 continue; | 188 continue; |
188 m_childRuleCSSOMWrappers[i]->reattach(m_contents->ruleAt(i)); | 189 m_childRuleCSSOMWrappers[i]->reattach(m_contents->ruleAt(i)); |
(...skipping 243 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
432 visitor->trace(m_mediaQueries); | 433 visitor->trace(m_mediaQueries); |
433 visitor->trace(m_ownerNode); | 434 visitor->trace(m_ownerNode); |
434 visitor->trace(m_ownerRule); | 435 visitor->trace(m_ownerRule); |
435 visitor->trace(m_mediaCSSOMWrapper); | 436 visitor->trace(m_mediaCSSOMWrapper); |
436 visitor->trace(m_childRuleCSSOMWrappers); | 437 visitor->trace(m_childRuleCSSOMWrappers); |
437 visitor->trace(m_ruleListCSSOMWrapper); | 438 visitor->trace(m_ruleListCSSOMWrapper); |
438 StyleSheet::trace(visitor); | 439 StyleSheet::trace(visitor); |
439 } | 440 } |
440 | 441 |
441 } // namespace blink | 442 } // namespace blink |
OLD | NEW |