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

Unified Diff: Source/core/dom/StyleEngine.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/StyleEngine.h ('k') | Source/core/dom/StyleSheetCandidate.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/dom/StyleEngine.cpp
diff --git a/Source/core/dom/StyleEngine.cpp b/Source/core/dom/StyleEngine.cpp
index 00005d3dd5f769912967767194a2197a9715be18..efcfd1e19459ff00dca7dae09db624d223784309 100644
--- a/Source/core/dom/StyleEngine.cpp
+++ b/Source/core/dom/StyleEngine.cpp
@@ -34,6 +34,7 @@
#include "core/css/CSSStyleSheet.h"
#include "core/css/StyleInvalidationAnalysis.h"
#include "core/css/StyleSheetContents.h"
+#include "core/dom/DocumentStyleSheetCollector.h"
#include "core/dom/Element.h"
#include "core/dom/ProcessingInstruction.h"
#include "core/dom/ShadowTreeStyleSheetCollection.h"
@@ -348,9 +349,13 @@ void StyleEngine::clearMediaQueryRuleSetStyleSheets()
clearMediaQueryRuleSetOnTreeScopeStyleSheets(m_dirtyTreeScopes);
}
-void StyleEngine::collectDocumentStyleSheets(DocumentStyleSheetCollector& collector)
+void StyleEngine::updateStyleSheetsInImport(DocumentStyleSheetCollector& parentCollector)
{
- m_documentStyleSheetCollection.collectStyleSheets(this, collector);
+ ASSERT(!isMaster());
+ Vector<RefPtr<StyleSheet> > sheetsForList;
+ ImportedDocumentStyleSheetCollector subcollector(parentCollector, sheetsForList);
+ m_documentStyleSheetCollection.collectStyleSheets(this, subcollector);
+ m_documentStyleSheetCollection.swapSheetsForSheetList(sheetsForList);
}
bool StyleEngine::updateActiveStyleSheets(StyleResolverUpdateMode updateMode)
« no previous file with comments | « Source/core/dom/StyleEngine.h ('k') | Source/core/dom/StyleSheetCandidate.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698