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

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: Rebased to ToT 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
Index: Source/core/dom/StyleEngine.cpp
diff --git a/Source/core/dom/StyleEngine.cpp b/Source/core/dom/StyleEngine.cpp
index 00005d3dd5f769912967767194a2197a9715be18..3b0256002d3724fd8a5b695becd68b4cb4c8fbc0 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;
+ DocumentStyleSheetCollector subcollector = parentCollector.subcollectorWith(sheetsForList);
+ m_documentStyleSheetCollection.collectStyleSheets(this, subcollector);
+ m_documentStyleSheetCollection.swapSheetsForSheetList(sheetsForList);
}
bool StyleEngine::updateActiveStyleSheets(StyleResolverUpdateMode updateMode)

Powered by Google App Engine
This is Rietveld 408576698