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

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

Issue 179873020: [import] The first <link rel=import> should win in the cascading order computation. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Landing Created 6 years, 10 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/DocumentStyleSheetCollection.cpp ('k') | Source/core/dom/DocumentStyleSheetCollector.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/dom/DocumentStyleSheetCollector.h
diff --git a/Source/core/dom/DocumentStyleSheetCollector.h b/Source/core/dom/DocumentStyleSheetCollector.h
index fef627c12157e94481e0525bd185ad5b5661dabc..fd1ab1bc7382263c317cd1f8e9aecefb456096a2 100644
--- a/Source/core/dom/DocumentStyleSheetCollector.h
+++ b/Source/core/dom/DocumentStyleSheetCollector.h
@@ -27,12 +27,14 @@
#ifndef DocumentStyleSheetCollector_h
#define DocumentStyleSheetCollector_h
+#include "wtf/HashSet.h"
#include "wtf/RefPtr.h"
#include "wtf/Vector.h"
namespace WebCore {
class CSSStyleSheet;
+class Document;
class StyleSheet;
class StyleSheetCollection;
@@ -40,21 +42,27 @@ class DocumentStyleSheetCollector {
public:
friend class ImportedDocumentStyleSheetCollector;
- DocumentStyleSheetCollector(Vector<RefPtr<StyleSheet> >& sheetsForList, Vector<RefPtr<CSSStyleSheet> >& activeList);
+ DocumentStyleSheetCollector(Vector<RefPtr<StyleSheet> >& sheetsForList, Vector<RefPtr<CSSStyleSheet> >& activeList, HashSet<Document*>&);
~DocumentStyleSheetCollector();
void appendActiveStyleSheets(const Vector<RefPtr<CSSStyleSheet> >&);
void appendActiveStyleSheet(CSSStyleSheet*);
void appendSheetForList(StyleSheet*);
+ bool hasVisited(Document* document) const { return m_visitedDocuments.contains(document); }
+ void willVisit(Document* document) { m_visitedDocuments.add(document); }
+
private:
Vector<RefPtr<StyleSheet> >& m_styleSheetsForStyleSheetList;
Vector<RefPtr<CSSStyleSheet> >& m_activeAuthorStyleSheets;
+ HashSet<Document*>& m_visitedDocuments;
};
class ActiveDocumentStyleSheetCollector FINAL : public DocumentStyleSheetCollector {
public:
ActiveDocumentStyleSheetCollector(StyleSheetCollection&);
+private:
+ HashSet<Document*> m_visitedDocuments;
};
class ImportedDocumentStyleSheetCollector FINAL : public DocumentStyleSheetCollector {
« no previous file with comments | « Source/core/dom/DocumentStyleSheetCollection.cpp ('k') | Source/core/dom/DocumentStyleSheetCollector.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698