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

Unified Diff: Source/core/dom/DocumentStyleSheetCollector.h

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/DocumentStyleSheetCollector.h
diff --git a/Source/core/dom/DocumentStyleSheetCollector.h b/Source/core/dom/DocumentStyleSheetCollector.h
index e6b3c04094a88eba30501c0ce8d14b1e88b52f13..0e943f29342823ad9d0711e7f7a8fee35f7dc046 100644
--- a/Source/core/dom/DocumentStyleSheetCollector.h
+++ b/Source/core/dom/DocumentStyleSheetCollector.h
@@ -27,31 +27,29 @@
#ifndef DocumentStyleSheetCollector_h
#define DocumentStyleSheetCollector_h
-#include "core/dom/StyleSheetCollection.h"
-#include "wtf/HashSet.h"
+#include "wtf/RefPtr.h"
+#include "wtf/Vector.h"
namespace WebCore {
+class CSSStyleSheet;
+class StyleSheet;
+
+// FIXME: Rename to StyleSheetCollector
class DocumentStyleSheetCollector FINAL {
public:
- DocumentStyleSheetCollector(TreeScope& root)
- : m_root(root)
- { }
+ DocumentStyleSheetCollector(Vector<RefPtr<StyleSheet> >& sheetsForList, Vector<RefPtr<CSSStyleSheet> >& activeList);
+ ~DocumentStyleSheetCollector();
- bool isCollectingForList(TreeScope&) const;
- void setCollectionTo(StyleSheetCollectionBase&);
+ DocumentStyleSheetCollector subcollectorWith(Vector<RefPtr<StyleSheet> >& sheetsForList) const;
- void appendActiveStyleSheets(const Vector<RefPtr<CSSStyleSheet> >& sheets) { m_collection.appendActiveStyleSheets(sheets); }
- void appendActiveStyleSheet(CSSStyleSheet* sheet) { m_collection.appendActiveStyleSheet(sheet); }
- void appendSheetForList(StyleSheet* sheet) { m_collection.appendSheetForList(sheet); }
- StyleSheetCollectionBase& collection() { return m_collection; }
- void markVisited(Document* document) { m_documentsVisited.add(document); }
- bool hasVisited(Document* document) const { return m_documentsVisited.contains(document); }
+ void appendActiveStyleSheets(const Vector<RefPtr<CSSStyleSheet> >&);
+ void appendActiveStyleSheet(CSSStyleSheet*);
+ void appendSheetForList(StyleSheet*);
private:
- TreeScope& m_root;
- StyleSheetCollectionBase m_collection;
- HashSet<Document*> m_documentsVisited;
+ Vector<RefPtr<StyleSheet> >& m_styleSheetsForStyleSheetList;
+ Vector<RefPtr<CSSStyleSheet> >& m_activeAuthorStyleSheets;
};
} // namespace WebCore

Powered by Google App Engine
This is Rietveld 408576698