OLD | NEW |
1 /* | 1 /* |
2 * (C) 1999-2003 Lars Knoll (knoll@kde.org) | 2 * (C) 1999-2003 Lars Knoll (knoll@kde.org) |
3 * Copyright (C) 2004, 2006, 2007 Apple Inc. All rights reserved. | 3 * Copyright (C) 2004, 2006, 2007 Apple Inc. All rights reserved. |
4 * | 4 * |
5 * This library is free software; you can redistribute it and/or | 5 * This library is free software; you can redistribute it and/or |
6 * modify it under the terms of the GNU Library General Public | 6 * modify it under the terms of the GNU Library General Public |
7 * License as published by the Free Software Foundation; either | 7 * License as published by the Free Software Foundation; either |
8 * version 2 of the License, or (at your option) any later version. | 8 * version 2 of the License, or (at your option) any later version. |
9 * | 9 * |
10 * This library is distributed in the hope that it will be useful, | 10 * This library is distributed in the hope that it will be useful, |
(...skipping 19 matching lines...) Expand all Loading... |
30 #include "wtf/Vector.h" | 30 #include "wtf/Vector.h" |
31 | 31 |
32 namespace blink { | 32 namespace blink { |
33 | 33 |
34 class HTMLStyleElement; | 34 class HTMLStyleElement; |
35 class StyleSheet; | 35 class StyleSheet; |
36 | 36 |
37 class StyleSheetList final : public GarbageCollected<StyleSheetList>, public Scr
iptWrappable { | 37 class StyleSheetList final : public GarbageCollected<StyleSheetList>, public Scr
iptWrappable { |
38 DEFINE_WRAPPERTYPEINFO(); | 38 DEFINE_WRAPPERTYPEINFO(); |
39 public: | 39 public: |
40 static RawPtr<StyleSheetList> create(TreeScope* treeScope) { return new Styl
eSheetList(treeScope); } | 40 static StyleSheetList* create(TreeScope* treeScope) { return new StyleSheetL
ist(treeScope); } |
41 | 41 |
42 unsigned length(); | 42 unsigned length(); |
43 StyleSheet* item(unsigned index); | 43 StyleSheet* item(unsigned index); |
44 | 44 |
45 HTMLStyleElement* getNamedItem(const AtomicString&) const; | 45 HTMLStyleElement* getNamedItem(const AtomicString&) const; |
46 | 46 |
47 Document* document() { return m_treeScope ? &m_treeScope->document() : nullp
tr; } | 47 Document* document() { return m_treeScope ? &m_treeScope->document() : nullp
tr; } |
48 | 48 |
49 #if !ENABLE(OILPAN) | 49 #if !ENABLE(OILPAN) |
50 void detachFromDocument(); | 50 void detachFromDocument(); |
51 #endif | 51 #endif |
52 | 52 |
53 CSSStyleSheet* anonymousNamedGetter(const AtomicString&); | 53 CSSStyleSheet* anonymousNamedGetter(const AtomicString&); |
54 | 54 |
55 DECLARE_TRACE(); | 55 DECLARE_TRACE(); |
56 | 56 |
57 private: | 57 private: |
58 explicit StyleSheetList(TreeScope*); | 58 explicit StyleSheetList(TreeScope*); |
59 const HeapVector<Member<StyleSheet>>& styleSheets(); | 59 const HeapVector<Member<StyleSheet>>& styleSheets(); |
60 | 60 |
61 Member<TreeScope> m_treeScope; | 61 Member<TreeScope> m_treeScope; |
62 #if !ENABLE(OILPAN) | 62 #if !ENABLE(OILPAN) |
63 Vector<RefPtr<StyleSheet>> m_detachedStyleSheets; | 63 Vector<RefPtr<StyleSheet>> m_detachedStyleSheets; |
64 #endif | 64 #endif |
65 }; | 65 }; |
66 | 66 |
67 } // namespace blink | 67 } // namespace blink |
68 | 68 |
69 #endif // StyleSheetList_h | 69 #endif // StyleSheetList_h |
OLD | NEW |