| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) |
| 3 * (C) 1999 Antti Koivisto (koivisto@kde.org) | 3 * (C) 1999 Antti Koivisto (koivisto@kde.org) |
| 4 * (C) 2001 Dirk Mueller (mueller@kde.org) | 4 * (C) 2001 Dirk Mueller (mueller@kde.org) |
| 5 * (C) 2006 Alexey Proskuryakov (ap@webkit.org) | 5 * (C) 2006 Alexey Proskuryakov (ap@webkit.org) |
| 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2011, 2012 Apple Inc. All r
ights reserved. | 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2011, 2012 Apple Inc. All r
ights reserved. |
| 7 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t
orchmobile.com/) | 7 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t
orchmobile.com/) |
| 8 * Copyright (C) 2008, 2009, 2011, 2012 Google Inc. All rights reserved. | 8 * Copyright (C) 2008, 2009, 2011, 2012 Google Inc. All rights reserved. |
| 9 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies) | 9 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies) |
| 10 * Copyright (C) Research In Motion Limited 2010-2011. All rights reserved. | 10 * Copyright (C) Research In Motion Limited 2010-2011. All rights reserved. |
| (...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 186 ASSERT(isHTMLStyleElement(node) || treeScope == m_document); | 186 ASSERT(isHTMLStyleElement(node) || treeScope == m_document); |
| 187 | 187 |
| 188 TreeScopeStyleSheetCollection* collection = styleSheetCollectionFor(treeScop
e); | 188 TreeScopeStyleSheetCollection* collection = styleSheetCollectionFor(treeScop
e); |
| 189 ASSERT(collection); | 189 ASSERT(collection); |
| 190 collection->removeStyleSheetCandidateNode(node, scopingNode); | 190 collection->removeStyleSheetCandidateNode(node, scopingNode); |
| 191 | 191 |
| 192 markTreeScopeDirty(treeScope); | 192 markTreeScopeDirty(treeScope); |
| 193 m_activeTreeScopes.remove(&treeScope); | 193 m_activeTreeScopes.remove(&treeScope); |
| 194 } | 194 } |
| 195 | 195 |
| 196 void StyleEngine::clearMediaQueryRuleSetOnTreeScopeStyleSheets(TreeScopeSet tree
Scopes) | |
| 197 { | |
| 198 for (TreeScopeSet::iterator it = treeScopes.begin(); it != treeScopes.end();
++it) { | |
| 199 TreeScope& treeScope = **it; | |
| 200 ASSERT(treeScope != m_document); | |
| 201 ShadowTreeStyleSheetCollection* collection = static_cast<ShadowTreeStyle
SheetCollection*>(styleSheetCollectionFor(treeScope)); | |
| 202 ASSERT(collection); | |
| 203 collection->clearMediaQueryRuleSetStyleSheets(); | |
| 204 } | |
| 205 } | |
| 206 | |
| 207 void StyleEngine::clearMediaQueryRuleSetStyleSheets() | |
| 208 { | |
| 209 documentStyleSheetCollection()->clearMediaQueryRuleSetStyleSheets(); | |
| 210 clearMediaQueryRuleSetOnTreeScopeStyleSheets(m_activeTreeScopes); | |
| 211 clearMediaQueryRuleSetOnTreeScopeStyleSheets(m_dirtyTreeScopes); | |
| 212 } | |
| 213 | |
| 214 void StyleEngine::updateActiveStyleSheets() | 196 void StyleEngine::updateActiveStyleSheets() |
| 215 { | 197 { |
| 216 ASSERT(isMaster()); | 198 ASSERT(isMaster()); |
| 217 ASSERT(!document().inStyleRecalc()); | 199 ASSERT(!document().inStyleRecalc()); |
| 218 | 200 |
| 219 if (!document().isActive()) | 201 if (!document().isActive()) |
| 220 return; | 202 return; |
| 221 | 203 |
| 222 documentStyleSheetCollection()->updateActiveStyleSheets(this); | 204 documentStyleSheetCollection()->updateActiveStyleSheets(this); |
| 223 | 205 |
| (...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 415 { | 397 { |
| 416 if (!document().isActive()) | 398 if (!document().isActive()) |
| 417 return; | 399 return; |
| 418 | 400 |
| 419 if (m_resolver) | 401 if (m_resolver) |
| 420 m_resolver->invalidateMatchedPropertiesCache(); | 402 m_resolver->invalidateMatchedPropertiesCache(); |
| 421 document().setNeedsStyleRecalc(SubtreeStyleChange); | 403 document().setNeedsStyleRecalc(SubtreeStyleChange); |
| 422 } | 404 } |
| 423 | 405 |
| 424 } | 406 } |
| OLD | NEW |