Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(863)

Unified Diff: Source/core/dom/StyleSheetCollection.cpp

Issue 143463011: [import] support document.stylesheets in imported documents. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Landing Created 6 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/dom/StyleSheetCollection.h ('k') | Source/core/html/HTMLLinkElement.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/dom/StyleSheetCollection.cpp
diff --git a/Source/core/dom/StyleSheetCollection.cpp b/Source/core/dom/StyleSheetCollection.cpp
index 853a300bbf5f77d90d41fad246f678bfb4cf53e5..c655945b8618e2e59788fe7e67c34874da844c18 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)
+{
+ // 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,7 +75,6 @@ void StyleSheetCollectionBase::appendSheetForList(StyleSheet* sheet)
m_styleSheetsForStyleSheetList.append(sheet);
}
-
StyleSheetCollection::StyleSheetCollection(TreeScope& treeScope)
: m_treeScope(treeScope)
, m_hadActiveLoadingStylesheet(false)
« no previous file with comments | « Source/core/dom/StyleSheetCollection.h ('k') | Source/core/html/HTMLLinkElement.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698