Chromium Code Reviews| Index: Source/core/dom/StyleSheetCollection.cpp |
| diff --git a/Source/core/dom/StyleSheetCollection.cpp b/Source/core/dom/StyleSheetCollection.cpp |
| index 853a300bbf5f77d90d41fad246f678bfb4cf53e5..c1254fdd0f373f8a0287eaf51e552f7547cb1a1b 100644 |
| --- a/Source/core/dom/StyleSheetCollection.cpp |
| +++ b/Source/core/dom/StyleSheetCollection.cpp |
| @@ -53,6 +53,13 @@ void StyleSheetCollectionBase::swap(StyleSheetCollectionBase& other) |
| m_activeAuthorStyleSheets.swap(other.m_activeAuthorStyleSheets); |
| } |
| +void StyleSheetCollectionBase::swapSheetsForSheetList(Vector<RefPtr<StyleSheet> >& sheets) |
|
esprehn
2014/01/24 09:30:10
We should rename this something like StyleSheetCol
|
| +{ |
| + // Only called for collection of HTML Imports that never has active sheets. |
| + ASSERT(m_activeAuthorStyleSheets.isEmpty()); |
| + m_styleSheetsForStyleSheetList.swap(sheets); |
| +} |
| + |
| void StyleSheetCollectionBase::appendActiveStyleSheets(const Vector<RefPtr<CSSStyleSheet> >& sheets) |
| { |
| m_activeAuthorStyleSheets.append(sheets); |
| @@ -68,6 +75,12 @@ void StyleSheetCollectionBase::appendSheetForList(StyleSheet* sheet) |
| m_styleSheetsForStyleSheetList.append(sheet); |
| } |
| +DocumentStyleSheetCollector StyleSheetCollectionBase::collector() |
|
esprehn
2014/01/24 09:30:10
More copying, why not just create the DocumentStyl
|
| +{ |
| + return DocumentStyleSheetCollector(m_styleSheetsForStyleSheetList, m_activeAuthorStyleSheets); |
| +} |
| + |
| + |
| StyleSheetCollection::StyleSheetCollection(TreeScope& treeScope) |
| : m_treeScope(treeScope) |