| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2014 Google Inc. All rights reserved. | 2 * Copyright (C) 2014 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Neither the name of Google Inc. nor the names of its | 10 * * Neither the name of Google Inc. nor the names of its |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 52 HeapVector<Member<StyleSheet>>*, | 52 HeapVector<Member<StyleSheet>>*, |
| 53 HeapHashSet<Member<Document>>*); | 53 HeapHashSet<Member<Document>>*); |
| 54 ~DocumentStyleSheetCollector(); | 54 ~DocumentStyleSheetCollector(); |
| 55 | 55 |
| 56 void appendActiveStyleSheet(const ActiveStyleSheet&); | 56 void appendActiveStyleSheet(const ActiveStyleSheet&); |
| 57 void appendSheetForList(StyleSheet*); | 57 void appendSheetForList(StyleSheet*); |
| 58 | 58 |
| 59 bool hasVisited(Document* document) const { | 59 bool hasVisited(Document* document) const { |
| 60 return m_visitedDocuments->contains(document); | 60 return m_visitedDocuments->contains(document); |
| 61 } | 61 } |
| 62 void willVisit(Document* document) { m_visitedDocuments->add(document); } | 62 void willVisit(Document* document) { m_visitedDocuments->insert(document); } |
| 63 | 63 |
| 64 private: | 64 private: |
| 65 Member<StyleSheetCollection> m_collection; | 65 Member<StyleSheetCollection> m_collection; |
| 66 HeapVector<Member<StyleSheet>>* m_styleSheetsForStyleSheetList; | 66 HeapVector<Member<StyleSheet>>* m_styleSheetsForStyleSheetList; |
| 67 HeapHashSet<Member<Document>>* m_visitedDocuments; | 67 HeapHashSet<Member<Document>>* m_visitedDocuments; |
| 68 }; | 68 }; |
| 69 | 69 |
| 70 class ActiveDocumentStyleSheetCollector final | 70 class ActiveDocumentStyleSheetCollector final |
| 71 : public DocumentStyleSheetCollector { | 71 : public DocumentStyleSheetCollector { |
| 72 public: | 72 public: |
| 73 ActiveDocumentStyleSheetCollector(StyleSheetCollection&); | 73 ActiveDocumentStyleSheetCollector(StyleSheetCollection&); |
| 74 | 74 |
| 75 private: | 75 private: |
| 76 HeapHashSet<Member<Document>> m_visitedDocuments; | 76 HeapHashSet<Member<Document>> m_visitedDocuments; |
| 77 }; | 77 }; |
| 78 | 78 |
| 79 class ImportedDocumentStyleSheetCollector final | 79 class ImportedDocumentStyleSheetCollector final |
| 80 : public DocumentStyleSheetCollector { | 80 : public DocumentStyleSheetCollector { |
| 81 public: | 81 public: |
| 82 ImportedDocumentStyleSheetCollector(DocumentStyleSheetCollector&, | 82 ImportedDocumentStyleSheetCollector(DocumentStyleSheetCollector&, |
| 83 HeapVector<Member<StyleSheet>>&); | 83 HeapVector<Member<StyleSheet>>&); |
| 84 }; | 84 }; |
| 85 | 85 |
| 86 } // namespace blink | 86 } // namespace blink |
| 87 | 87 |
| 88 #endif // DocumentStyleSheetCollector_h | 88 #endif // DocumentStyleSheetCollector_h |
| OLD | NEW |