OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) |
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) | 3 * (C) 1999 Antti Koivisto (koivisto@kde.org) |
4 * (C) 2001 Dirk Mueller (mueller@kde.org) | 4 * (C) 2001 Dirk Mueller (mueller@kde.org) |
5 * (C) 2006 Alexey Proskuryakov (ap@webkit.org) | 5 * (C) 2006 Alexey Proskuryakov (ap@webkit.org) |
6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2012 Apple Inc. All | 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2012 Apple Inc. All |
7 * rights reserved. | 7 * rights reserved. |
8 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. | 8 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. |
9 * (http://www.torchmobile.com/) | 9 * (http://www.torchmobile.com/) |
10 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies) | 10 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies) |
(...skipping 15 matching lines...) Expand all Loading... |
26 * Boston, MA 02110-1301, USA. | 26 * Boston, MA 02110-1301, USA. |
27 * | 27 * |
28 */ | 28 */ |
29 | 29 |
30 #ifndef StyleSheetCollection_h | 30 #ifndef StyleSheetCollection_h |
31 #define StyleSheetCollection_h | 31 #define StyleSheetCollection_h |
32 | 32 |
33 #include "bindings/core/v8/ScriptWrappable.h" | 33 #include "bindings/core/v8/ScriptWrappable.h" |
34 #include "bindings/core/v8/TraceWrapperMember.h" | 34 #include "bindings/core/v8/TraceWrapperMember.h" |
35 #include "core/CoreExport.h" | 35 #include "core/CoreExport.h" |
| 36 #include "core/css/ActiveStyleSheets.h" |
36 #include "platform/heap/Handle.h" | 37 #include "platform/heap/Handle.h" |
37 #include "wtf/Allocator.h" | 38 #include "wtf/Allocator.h" |
38 #include "wtf/Vector.h" | 39 #include "wtf/Vector.h" |
39 | 40 |
40 namespace blink { | 41 namespace blink { |
41 | 42 |
42 class CSSStyleSheet; | |
43 class StyleSheet; | 43 class StyleSheet; |
44 | 44 |
45 class CORE_EXPORT StyleSheetCollection | 45 class CORE_EXPORT StyleSheetCollection |
46 : public GarbageCollected<StyleSheetCollection>, | 46 : public GarbageCollected<StyleSheetCollection>, |
47 public TraceWrapperBase { | 47 public TraceWrapperBase { |
48 WTF_MAKE_NONCOPYABLE(StyleSheetCollection); | 48 WTF_MAKE_NONCOPYABLE(StyleSheetCollection); |
49 | 49 |
50 public: | 50 public: |
51 friend class ActiveDocumentStyleSheetCollector; | 51 friend class ActiveDocumentStyleSheetCollector; |
52 friend class ImportedDocumentStyleSheetCollector; | 52 friend class ImportedDocumentStyleSheetCollector; |
53 | 53 |
54 static StyleSheetCollection* create() { return new StyleSheetCollection; } | 54 static StyleSheetCollection* create() { return new StyleSheetCollection; } |
55 | 55 |
56 const HeapVector<Member<CSSStyleSheet>>& activeAuthorStyleSheets() const { | 56 const ActiveStyleSheetVector& activeAuthorStyleSheets() const { |
57 return m_activeAuthorStyleSheets; | 57 return m_activeAuthorStyleSheets; |
58 } | 58 } |
59 const HeapVector<TraceWrapperMember<StyleSheet>>& | 59 const HeapVector<TraceWrapperMember<StyleSheet>>& |
60 styleSheetsForStyleSheetList() const { | 60 styleSheetsForStyleSheetList() const { |
61 return m_styleSheetsForStyleSheetList; | 61 return m_styleSheetsForStyleSheetList; |
62 } | 62 } |
63 | 63 |
64 void swap(StyleSheetCollection&); | 64 void swap(StyleSheetCollection&); |
65 void swapSheetsForSheetList(HeapVector<Member<StyleSheet>>&); | 65 void swapSheetsForSheetList(HeapVector<Member<StyleSheet>>&); |
66 void appendActiveStyleSheet(CSSStyleSheet*); | 66 void appendActiveStyleSheet(const ActiveStyleSheet&); |
67 void appendActiveStyleSheets(const HeapVector<Member<CSSStyleSheet>>&); | |
68 void appendActiveStyleSheets( | |
69 const HeapVector<TraceWrapperMember<CSSStyleSheet>>&); | |
70 void appendSheetForList(StyleSheet*); | 67 void appendSheetForList(StyleSheet*); |
71 | 68 |
72 DECLARE_VIRTUAL_TRACE(); | 69 DECLARE_VIRTUAL_TRACE(); |
73 DECLARE_VIRTUAL_TRACE_WRAPPERS(); | 70 DECLARE_VIRTUAL_TRACE_WRAPPERS(); |
74 | 71 |
75 void dispose(); | 72 void dispose(); |
76 | 73 |
77 protected: | 74 protected: |
78 StyleSheetCollection(); | 75 StyleSheetCollection(); |
79 | 76 |
80 HeapVector<TraceWrapperMember<StyleSheet>> m_styleSheetsForStyleSheetList; | 77 HeapVector<TraceWrapperMember<StyleSheet>> m_styleSheetsForStyleSheetList; |
81 HeapVector<Member<CSSStyleSheet>> m_activeAuthorStyleSheets; | 78 ActiveStyleSheetVector m_activeAuthorStyleSheets; |
82 }; | 79 }; |
83 | 80 |
84 } // namespace blink | 81 } // namespace blink |
85 | 82 |
86 #endif // StyleSheetCollection_h | 83 #endif // StyleSheetCollection_h |
OLD | NEW |