| 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 390 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 401 return requiresFullStyleRecalc; | 401 return requiresFullStyleRecalc; |
| 402 } | 402 } |
| 403 | 403 |
| 404 const Vector<RefPtr<StyleSheet> > StyleEngine::activeStyleSheetsForInspector() c
onst | 404 const Vector<RefPtr<StyleSheet> > StyleEngine::activeStyleSheetsForInspector() c
onst |
| 405 { | 405 { |
| 406 if (m_activeTreeScopes.isEmpty()) | 406 if (m_activeTreeScopes.isEmpty()) |
| 407 return m_documentStyleSheetCollection.styleSheetsForStyleSheetList(); | 407 return m_documentStyleSheetCollection.styleSheetsForStyleSheetList(); |
| 408 | 408 |
| 409 Vector<RefPtr<StyleSheet> > activeStyleSheets; | 409 Vector<RefPtr<StyleSheet> > activeStyleSheets; |
| 410 | 410 |
| 411 activeStyleSheets.append(m_documentStyleSheetCollection.styleSheetsForStyleS
heetList()); | 411 activeStyleSheets.appendVector(m_documentStyleSheetCollection.styleSheetsFor
StyleSheetList()); |
| 412 | 412 |
| 413 TreeScopeSet::const_iterator begin = m_activeTreeScopes.begin(); | 413 TreeScopeSet::const_iterator begin = m_activeTreeScopes.begin(); |
| 414 TreeScopeSet::const_iterator end = m_activeTreeScopes.end(); | 414 TreeScopeSet::const_iterator end = m_activeTreeScopes.end(); |
| 415 for (TreeScopeSet::const_iterator it = begin; it != end; ++it) { | 415 for (TreeScopeSet::const_iterator it = begin; it != end; ++it) { |
| 416 if (TreeScopeStyleSheetCollection* collection = m_styleSheetCollectionMa
p.get(*it)) | 416 if (TreeScopeStyleSheetCollection* collection = m_styleSheetCollectionMa
p.get(*it)) |
| 417 activeStyleSheets.append(collection->styleSheetsForStyleSheetList())
; | 417 activeStyleSheets.appendVector(collection->styleSheetsForStyleSheetL
ist()); |
| 418 } | 418 } |
| 419 | 419 |
| 420 // FIXME: Inspector needs a vector which has all active stylesheets. | 420 // FIXME: Inspector needs a vector which has all active stylesheets. |
| 421 // However, creating such a large vector might cause performance regression. | 421 // However, creating such a large vector might cause performance regression. |
| 422 // Need to implement some smarter solution. | 422 // Need to implement some smarter solution. |
| 423 return activeStyleSheets; | 423 return activeStyleSheets; |
| 424 } | 424 } |
| 425 | 425 |
| 426 void StyleEngine::didRemoveShadowRoot(ShadowRoot* shadowRoot) | 426 void StyleEngine::didRemoveShadowRoot(ShadowRoot* shadowRoot) |
| 427 { | 427 { |
| (...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 610 { | 610 { |
| 611 HashMap<StyleSheetContents*, AtomicString>::iterator it = sheetToTextCache()
.find(contents); | 611 HashMap<StyleSheetContents*, AtomicString>::iterator it = sheetToTextCache()
.find(contents); |
| 612 if (it == sheetToTextCache().end()) | 612 if (it == sheetToTextCache().end()) |
| 613 return; | 613 return; |
| 614 | 614 |
| 615 textToSheetCache().remove(it->value); | 615 textToSheetCache().remove(it->value); |
| 616 sheetToTextCache().remove(contents); | 616 sheetToTextCache().remove(contents); |
| 617 } | 617 } |
| 618 | 618 |
| 619 } | 619 } |
| OLD | NEW |