| 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 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 156 | 156 |
| 157 didMutate(PartialRuleUpdate); | 157 didMutate(PartialRuleUpdate); |
| 158 } | 158 } |
| 159 | 159 |
| 160 void CSSStyleSheet::didMutate(StyleSheetUpdateType updateType) | 160 void CSSStyleSheet::didMutate(StyleSheetUpdateType updateType) |
| 161 { | 161 { |
| 162 Document* owner = ownerDocument(); | 162 Document* owner = ownerDocument(); |
| 163 if (!owner) | 163 if (!owner) |
| 164 return; | 164 return; |
| 165 | 165 |
| 166 // Need FullStyleUpdate when insertRule or deleteRule, | 166 owner->modifiedStyleSheet(this); |
| 167 // because StyleSheetCollection::analyzeStyleSheetChange cannot detect parti
al rule update. | |
| 168 StyleResolverUpdateMode updateMode = updateType != PartialRuleUpdate ? Analy
zedStyleUpdate : FullStyleUpdate; | |
| 169 owner->modifiedStyleSheet(this, updateMode); | |
| 170 } | 167 } |
| 171 | 168 |
| 172 void CSSStyleSheet::reattachChildRuleCSSOMWrappers() | 169 void CSSStyleSheet::reattachChildRuleCSSOMWrappers() |
| 173 { | 170 { |
| 174 for (unsigned i = 0; i < m_childRuleCSSOMWrappers.size(); ++i) { | 171 for (unsigned i = 0; i < m_childRuleCSSOMWrappers.size(); ++i) { |
| 175 if (!m_childRuleCSSOMWrappers[i]) | 172 if (!m_childRuleCSSOMWrappers[i]) |
| 176 continue; | 173 continue; |
| 177 m_childRuleCSSOMWrappers[i]->reattach(m_contents->ruleAt(i)); | 174 m_childRuleCSSOMWrappers[i]->reattach(m_contents->ruleAt(i)); |
| 178 } | 175 } |
| 179 } | 176 } |
| (...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 330 { | 327 { |
| 331 return ownerNode() ? &ownerNode()->document() : 0; | 328 return ownerNode() ? &ownerNode()->document() : 0; |
| 332 } | 329 } |
| 333 | 330 |
| 334 void CSSStyleSheet::clearChildRuleCSSOMWrappers() | 331 void CSSStyleSheet::clearChildRuleCSSOMWrappers() |
| 335 { | 332 { |
| 336 m_childRuleCSSOMWrappers.clear(); | 333 m_childRuleCSSOMWrappers.clear(); |
| 337 } | 334 } |
| 338 | 335 |
| 339 } // namespace blink | 336 } // namespace blink |
| OLD | NEW |