| 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 | 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2011, 2012 Apple Inc. All |
| 7 * rights reserved. | 7 * rights reserved. |
| 8 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. | 8 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. |
| 9 * (http://www.torchmobile.com/) | 9 * (http://www.torchmobile.com/) |
| 10 * Copyright (C) 2008, 2009, 2011, 2012 Google Inc. All rights reserved. | 10 * Copyright (C) 2008, 2009, 2011, 2012 Google Inc. All rights reserved. |
| (...skipping 319 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 330 UnorderedTreeScopeSet treeScopesRemoved; | 330 UnorderedTreeScopeSet treeScopesRemoved; |
| 331 | 331 |
| 332 if (m_allTreeScopesDirty) { | 332 if (m_allTreeScopesDirty) { |
| 333 for (TreeScope* treeScope : m_activeTreeScopes) | 333 for (TreeScope* treeScope : m_activeTreeScopes) |
| 334 updateActiveStyleSheetsInShadow(treeScope, treeScopesRemoved); | 334 updateActiveStyleSheetsInShadow(treeScope, treeScopesRemoved); |
| 335 } else { | 335 } else { |
| 336 for (TreeScope* treeScope : m_dirtyTreeScopes) | 336 for (TreeScope* treeScope : m_dirtyTreeScopes) |
| 337 updateActiveStyleSheetsInShadow(treeScope, treeScopesRemoved); | 337 updateActiveStyleSheetsInShadow(treeScope, treeScopesRemoved); |
| 338 } | 338 } |
| 339 for (TreeScope* treeScope : treeScopesRemoved) | 339 for (TreeScope* treeScope : treeScopesRemoved) |
| 340 m_activeTreeScopes.remove(treeScope); | 340 m_activeTreeScopes.erase(treeScope); |
| 341 } | 341 } |
| 342 | 342 |
| 343 InspectorInstrumentation::activeStyleSheetsUpdated(m_document); | 343 InspectorInstrumentation::activeStyleSheetsUpdated(m_document); |
| 344 | 344 |
| 345 m_dirtyTreeScopes.clear(); | 345 m_dirtyTreeScopes.clear(); |
| 346 m_documentScopeDirty = false; | 346 m_documentScopeDirty = false; |
| 347 m_allTreeScopesDirty = false; | 347 m_allTreeScopesDirty = false; |
| 348 } | 348 } |
| 349 | 349 |
| 350 void StyleEngine::updateViewport() { | 350 void StyleEngine::updateViewport() { |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 382 } | 382 } |
| 383 | 383 |
| 384 // FIXME: Inspector needs a vector which has all active stylesheets. | 384 // FIXME: Inspector needs a vector which has all active stylesheets. |
| 385 // However, creating such a large vector might cause performance regression. | 385 // However, creating such a large vector might cause performance regression. |
| 386 // Need to implement some smarter solution. | 386 // Need to implement some smarter solution. |
| 387 return activeStyleSheets; | 387 return activeStyleSheets; |
| 388 } | 388 } |
| 389 | 389 |
| 390 void StyleEngine::shadowRootRemovedFromDocument(ShadowRoot* shadowRoot) { | 390 void StyleEngine::shadowRootRemovedFromDocument(ShadowRoot* shadowRoot) { |
| 391 m_styleSheetCollectionMap.erase(shadowRoot); | 391 m_styleSheetCollectionMap.erase(shadowRoot); |
| 392 m_activeTreeScopes.remove(shadowRoot); | 392 m_activeTreeScopes.erase(shadowRoot); |
| 393 m_dirtyTreeScopes.remove(shadowRoot); | 393 m_dirtyTreeScopes.erase(shadowRoot); |
| 394 resetAuthorStyle(*shadowRoot); | 394 resetAuthorStyle(*shadowRoot); |
| 395 } | 395 } |
| 396 | 396 |
| 397 void StyleEngine::addTreeBoundaryCrossingScope(const TreeScope& treeScope) { | 397 void StyleEngine::addTreeBoundaryCrossingScope(const TreeScope& treeScope) { |
| 398 m_treeBoundaryCrossingScopes.add(&treeScope.rootNode()); | 398 m_treeBoundaryCrossingScopes.add(&treeScope.rootNode()); |
| 399 } | 399 } |
| 400 | 400 |
| 401 void StyleEngine::resetAuthorStyle(TreeScope& treeScope) { | 401 void StyleEngine::resetAuthorStyle(TreeScope& treeScope) { |
| 402 m_treeBoundaryCrossingScopes.remove(&treeScope.rootNode()); | 402 m_treeBoundaryCrossingScopes.remove(&treeScope.rootNode()); |
| 403 | 403 |
| (...skipping 742 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1146 } | 1146 } |
| 1147 | 1147 |
| 1148 DEFINE_TRACE_WRAPPERS(StyleEngine) { | 1148 DEFINE_TRACE_WRAPPERS(StyleEngine) { |
| 1149 for (auto sheet : m_injectedAuthorStyleSheets) { | 1149 for (auto sheet : m_injectedAuthorStyleSheets) { |
| 1150 visitor->traceWrappers(sheet); | 1150 visitor->traceWrappers(sheet); |
| 1151 } | 1151 } |
| 1152 visitor->traceWrappers(m_documentStyleSheetCollection); | 1152 visitor->traceWrappers(m_documentStyleSheetCollection); |
| 1153 } | 1153 } |
| 1154 | 1154 |
| 1155 } // namespace blink | 1155 } // namespace blink |
| OLD | NEW |