| 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, 2010, 2012 Apple Inc. All r
ights reserved. | 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 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) 2010 Nokia Corporation and/or its subsidiary(-ies) | 8 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies) |
| 9 * Copyright (C) 2013 Google Inc. All rights reserved. | 9 * Copyright (C) 2013 Google Inc. All rights reserved. |
| 10 * | 10 * |
| (...skipping 16 matching lines...) Expand all Loading... |
| 27 #include "core/dom/StyleSheetCollection.h" | 27 #include "core/dom/StyleSheetCollection.h" |
| 28 | 28 |
| 29 #include "core/css/CSSStyleSheet.h" | 29 #include "core/css/CSSStyleSheet.h" |
| 30 | 30 |
| 31 namespace blink { | 31 namespace blink { |
| 32 | 32 |
| 33 StyleSheetCollection::StyleSheetCollection() | 33 StyleSheetCollection::StyleSheetCollection() |
| 34 { | 34 { |
| 35 } | 35 } |
| 36 | 36 |
| 37 DEFINE_EMPTY_DESTRUCTOR_WILL_BE_REMOVED(StyleSheetCollection); | |
| 38 | |
| 39 void StyleSheetCollection::swap(StyleSheetCollection& other) | 37 void StyleSheetCollection::swap(StyleSheetCollection& other) |
| 40 { | 38 { |
| 41 m_styleSheetsForStyleSheetList.swap(other.m_styleSheetsForStyleSheetList); | 39 m_styleSheetsForStyleSheetList.swap(other.m_styleSheetsForStyleSheetList); |
| 42 m_activeAuthorStyleSheets.swap(other.m_activeAuthorStyleSheets); | 40 m_activeAuthorStyleSheets.swap(other.m_activeAuthorStyleSheets); |
| 43 } | 41 } |
| 44 | 42 |
| 45 void StyleSheetCollection::swapSheetsForSheetList(WillBeHeapVector<RefPtrWillBeM
ember<StyleSheet>>& sheets) | 43 void StyleSheetCollection::swapSheetsForSheetList(HeapVector<Member<StyleSheet>>
& sheets) |
| 46 { | 44 { |
| 47 // Only called for collection of HTML Imports that never has active sheets. | 45 // Only called for collection of HTML Imports that never has active sheets. |
| 48 ASSERT(m_activeAuthorStyleSheets.isEmpty()); | 46 ASSERT(m_activeAuthorStyleSheets.isEmpty()); |
| 49 m_styleSheetsForStyleSheetList.swap(sheets); | 47 m_styleSheetsForStyleSheetList.swap(sheets); |
| 50 } | 48 } |
| 51 | 49 |
| 52 void StyleSheetCollection::appendActiveStyleSheet(CSSStyleSheet* sheet) | 50 void StyleSheetCollection::appendActiveStyleSheet(CSSStyleSheet* sheet) |
| 53 { | 51 { |
| 54 m_activeAuthorStyleSheets.append(sheet); | 52 m_activeAuthorStyleSheets.append(sheet); |
| 55 } | 53 } |
| 56 | 54 |
| 57 void StyleSheetCollection::appendSheetForList(StyleSheet* sheet) | 55 void StyleSheetCollection::appendSheetForList(StyleSheet* sheet) |
| 58 { | 56 { |
| 59 m_styleSheetsForStyleSheetList.append(sheet); | 57 m_styleSheetsForStyleSheetList.append(sheet); |
| 60 } | 58 } |
| 61 | 59 |
| 62 DEFINE_TRACE(StyleSheetCollection) | 60 DEFINE_TRACE(StyleSheetCollection) |
| 63 { | 61 { |
| 64 visitor->trace(m_activeAuthorStyleSheets); | 62 visitor->trace(m_activeAuthorStyleSheets); |
| 65 visitor->trace(m_styleSheetsForStyleSheetList); | 63 visitor->trace(m_styleSheetsForStyleSheetList); |
| 66 } | 64 } |
| 67 | 65 |
| 68 } // namespace blink | 66 } // namespace blink |
| OLD | NEW |