| 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 void StyleSheetCollection::dispose() |
| 38 { |
| 39 m_styleSheetsForStyleSheetList.clear(); |
| 40 m_activeAuthorStyleSheets.clear(); |
| 41 } |
| 42 |
| 37 void StyleSheetCollection::swap(StyleSheetCollection& other) | 43 void StyleSheetCollection::swap(StyleSheetCollection& other) |
| 38 { | 44 { |
| 39 m_styleSheetsForStyleSheetList.swap(other.m_styleSheetsForStyleSheetList); | 45 m_styleSheetsForStyleSheetList.swap(other.m_styleSheetsForStyleSheetList); |
| 40 m_activeAuthorStyleSheets.swap(other.m_activeAuthorStyleSheets); | 46 m_activeAuthorStyleSheets.swap(other.m_activeAuthorStyleSheets); |
| 41 } | 47 } |
| 42 | 48 |
| 43 void StyleSheetCollection::swapSheetsForSheetList(HeapVector<Member<StyleSheet>>
& sheets) | 49 void StyleSheetCollection::swapSheetsForSheetList(HeapVector<Member<StyleSheet>>
& sheets) |
| 44 { | 50 { |
| 45 // Only called for collection of HTML Imports that never has active sheets. | 51 // Only called for collection of HTML Imports that never has active sheets. |
| 46 DCHECK(m_activeAuthorStyleSheets.isEmpty()); | 52 DCHECK(m_activeAuthorStyleSheets.isEmpty()); |
| (...skipping 10 matching lines...) Expand all Loading... |
| 57 m_styleSheetsForStyleSheetList.append(sheet); | 63 m_styleSheetsForStyleSheetList.append(sheet); |
| 58 } | 64 } |
| 59 | 65 |
| 60 DEFINE_TRACE(StyleSheetCollection) | 66 DEFINE_TRACE(StyleSheetCollection) |
| 61 { | 67 { |
| 62 visitor->trace(m_activeAuthorStyleSheets); | 68 visitor->trace(m_activeAuthorStyleSheets); |
| 63 visitor->trace(m_styleSheetsForStyleSheetList); | 69 visitor->trace(m_styleSheetsForStyleSheetList); |
| 64 } | 70 } |
| 65 | 71 |
| 66 } // namespace blink | 72 } // namespace blink |
| OLD | NEW |