| 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 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 137 } while (it != begin); | 137 } while (it != begin); |
| 138 | 138 |
| 139 treeScopes.insertBefore(followingTreeScope, treeScope); | 139 treeScopes.insertBefore(followingTreeScope, treeScope); |
| 140 } | 140 } |
| 141 | 141 |
| 142 TreeScopeStyleSheetCollection* StyleEngine::ensureStyleSheetCollectionFor(TreeSc
ope& treeScope) | 142 TreeScopeStyleSheetCollection* StyleEngine::ensureStyleSheetCollectionFor(TreeSc
ope& treeScope) |
| 143 { | 143 { |
| 144 if (treeScope == m_document) | 144 if (treeScope == m_document) |
| 145 return &m_documentStyleSheetCollection; | 145 return &m_documentStyleSheetCollection; |
| 146 | 146 |
| 147 WillBeHeapHashMap<TreeScope*, OwnPtrWillBeMember<ShadowTreeStyleSheetCollect
ion> >::AddResult result = m_styleSheetCollectionMap.add(&treeScope, nullptr); | 147 StyleSheetCollectionMap::AddResult result = m_styleSheetCollectionMap.add(&t
reeScope, nullptr); |
| 148 if (result.isNewEntry) | 148 if (result.isNewEntry) |
| 149 result.storedValue->value = adoptPtrWillBeNoop(new ShadowTreeStyleSheetC
ollection(toShadowRoot(treeScope))); | 149 result.storedValue->value = adoptPtrWillBeNoop(new ShadowTreeStyleSheetC
ollection(toShadowRoot(treeScope))); |
| 150 return result.storedValue->value.get(); | 150 return result.storedValue->value.get(); |
| 151 } | 151 } |
| 152 | 152 |
| 153 TreeScopeStyleSheetCollection* StyleEngine::styleSheetCollectionFor(TreeScope& t
reeScope) | 153 TreeScopeStyleSheetCollection* StyleEngine::styleSheetCollectionFor(TreeScope& t
reeScope) |
| 154 { | 154 { |
| 155 if (treeScope == m_document) | 155 if (treeScope == m_document) |
| 156 return &m_documentStyleSheetCollection; | 156 return &m_documentStyleSheetCollection; |
| 157 | 157 |
| 158 WillBeHeapHashMap<TreeScope*, OwnPtrWillBeMember<ShadowTreeStyleSheetCollect
ion> >::iterator it = m_styleSheetCollectionMap.find(&treeScope); | 158 StyleSheetCollectionMap::iterator it = m_styleSheetCollectionMap.find(&treeS
cope); |
| 159 if (it == m_styleSheetCollectionMap.end()) | 159 if (it == m_styleSheetCollectionMap.end()) |
| 160 return 0; | 160 return 0; |
| 161 return it->value.get(); | 161 return it->value.get(); |
| 162 } | 162 } |
| 163 | 163 |
| 164 const WillBeHeapVector<RefPtrWillBeMember<StyleSheet> >& StyleEngine::styleSheet
sForStyleSheetList(TreeScope& treeScope) | 164 const WillBeHeapVector<RefPtrWillBeMember<StyleSheet> >& StyleEngine::styleSheet
sForStyleSheetList(TreeScope& treeScope) |
| 165 { | 165 { |
| 166 if (treeScope == m_document) | 166 if (treeScope == m_document) |
| 167 return m_documentStyleSheetCollection.styleSheetsForStyleSheetList(); | 167 return m_documentStyleSheetCollection.styleSheetsForStyleSheetList(); |
| 168 | 168 |
| (...skipping 468 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 637 visitor->trace(m_authorStyleSheets); | 637 visitor->trace(m_authorStyleSheets); |
| 638 visitor->trace(m_documentStyleSheetCollection); | 638 visitor->trace(m_documentStyleSheetCollection); |
| 639 visitor->trace(m_styleSheetCollectionMap); | 639 visitor->trace(m_styleSheetCollectionMap); |
| 640 visitor->trace(m_resolver); | 640 visitor->trace(m_resolver); |
| 641 visitor->trace(m_fontSelector); | 641 visitor->trace(m_fontSelector); |
| 642 visitor->trace(m_textToSheetCache); | 642 visitor->trace(m_textToSheetCache); |
| 643 visitor->trace(m_sheetToTextCache); | 643 visitor->trace(m_sheetToTextCache); |
| 644 } | 644 } |
| 645 | 645 |
| 646 } | 646 } |
| OLD | NEW |