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 r
ights reserved. | 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2012 Apple Inc. All r
ights reserved. |
7 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t
orchmobile.com/) | 7 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t
orchmobile.com/) |
8 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies) | 8 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies) |
9 * Copyright (C) 2011 Google Inc. All rights reserved. | 9 * Copyright (C) 2011 Google Inc. All rights reserved. |
10 * | 10 * |
(...skipping 10 matching lines...) Expand all Loading... |
21 * You should have received a copy of the GNU Library General Public License | 21 * You should have received a copy of the GNU Library General Public License |
22 * along with this library; see the file COPYING.LIB. If not, write to | 22 * along with this library; see the file COPYING.LIB. If not, write to |
23 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, | 23 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, |
24 * Boston, MA 02110-1301, USA. | 24 * Boston, MA 02110-1301, USA. |
25 * | 25 * |
26 */ | 26 */ |
27 | 27 |
28 #ifndef StyleSheetCollection_h | 28 #ifndef StyleSheetCollection_h |
29 #define StyleSheetCollection_h | 29 #define StyleSheetCollection_h |
30 | 30 |
| 31 #include "heap/Handle.h" |
31 #include "wtf/FastAllocBase.h" | 32 #include "wtf/FastAllocBase.h" |
32 #include "wtf/RefPtr.h" | 33 #include "wtf/RefPtr.h" |
33 #include "wtf/Vector.h" | 34 #include "wtf/Vector.h" |
34 | 35 |
35 namespace WebCore { | 36 namespace WebCore { |
36 | 37 |
37 class CSSStyleSheet; | 38 class CSSStyleSheet; |
38 class StyleSheet; | 39 class StyleSheet; |
39 | 40 |
40 class StyleSheetCollection { | 41 class StyleSheetCollection { |
41 WTF_MAKE_NONCOPYABLE(StyleSheetCollection); WTF_MAKE_FAST_ALLOCATED; | 42 WTF_MAKE_NONCOPYABLE(StyleSheetCollection); WTF_MAKE_FAST_ALLOCATED; |
42 public: | 43 public: |
43 friend class ActiveDocumentStyleSheetCollector; | 44 friend class ActiveDocumentStyleSheetCollector; |
44 friend class ImportedDocumentStyleSheetCollector; | 45 friend class ImportedDocumentStyleSheetCollector; |
45 | 46 |
46 StyleSheetCollection(); | 47 StyleSheetCollection(); |
47 ~StyleSheetCollection(); | 48 ~StyleSheetCollection(); |
48 | 49 |
49 Vector<RefPtr<CSSStyleSheet> >& activeAuthorStyleSheets() { return m_activeA
uthorStyleSheets; } | 50 WillBeHeapVector<RefPtrWillBeMember<CSSStyleSheet> >& activeAuthorStyleSheet
s() { return m_activeAuthorStyleSheets; } |
50 Vector<RefPtr<StyleSheet> >& styleSheetsForStyleSheetList() { return m_style
SheetsForStyleSheetList; } | 51 WillBeHeapVector<RefPtrWillBeMember<StyleSheet> >& styleSheetsForStyleSheetL
ist() { return m_styleSheetsForStyleSheetList; } |
51 const Vector<RefPtr<CSSStyleSheet> >& activeAuthorStyleSheets() const { retu
rn m_activeAuthorStyleSheets; } | 52 const WillBeHeapVector<RefPtrWillBeMember<CSSStyleSheet> >& activeAuthorStyl
eSheets() const { return m_activeAuthorStyleSheets; } |
52 const Vector<RefPtr<StyleSheet> >& styleSheetsForStyleSheetList() const { re
turn m_styleSheetsForStyleSheetList; } | 53 const WillBeHeapVector<RefPtrWillBeMember<StyleSheet> >& styleSheetsForStyle
SheetList() const { return m_styleSheetsForStyleSheetList; } |
53 | 54 |
54 void swap(StyleSheetCollection&); | 55 void swap(StyleSheetCollection&); |
55 void swapSheetsForSheetList(Vector<RefPtr<StyleSheet> >&); | 56 void swapSheetsForSheetList(WillBeHeapVector<RefPtrWillBeMember<StyleSheet>
>&); |
56 void appendActiveStyleSheets(const Vector<RefPtr<CSSStyleSheet> >&); | 57 void appendActiveStyleSheets(const WillBePersistentHeapVector<RefPtrWillBeMe
mber<CSSStyleSheet> >&); |
57 void appendActiveStyleSheet(CSSStyleSheet*); | 58 void appendActiveStyleSheet(CSSStyleSheet*); |
58 void appendSheetForList(StyleSheet*); | 59 void appendSheetForList(StyleSheet*); |
59 | 60 |
60 protected: | 61 protected: |
61 Vector<RefPtr<StyleSheet> > m_styleSheetsForStyleSheetList; | 62 WillBePersistentHeapVector<RefPtrWillBeMember<StyleSheet> > m_styleSheetsFor
StyleSheetList; |
62 Vector<RefPtr<CSSStyleSheet> > m_activeAuthorStyleSheets; | 63 WillBePersistentHeapVector<RefPtrWillBeMember<CSSStyleSheet> > m_activeAutho
rStyleSheets; |
63 }; | 64 }; |
64 | 65 |
65 } | 66 } |
66 | 67 |
67 #endif | 68 #endif |
68 | 69 |
OLD | NEW |