OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2007, 2008 Apple Inc. All rights reserved. | 2 * Copyright (C) 2007, 2008 Apple 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 | 5 * modification, are permitted provided that the following conditions |
6 * are met: | 6 * are met: |
7 * | 7 * |
8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. 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 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
(...skipping 16 matching lines...) Expand all Loading... |
27 */ | 27 */ |
28 | 28 |
29 #ifndef StaticNodeList_h | 29 #ifndef StaticNodeList_h |
30 #define StaticNodeList_h | 30 #define StaticNodeList_h |
31 | 31 |
32 #include "core/dom/NodeList.h" | 32 #include "core/dom/NodeList.h" |
33 #include "wtf/Vector.h" | 33 #include "wtf/Vector.h" |
34 | 34 |
35 namespace blink { | 35 namespace blink { |
36 | 36 |
37 class Element; | |
38 class Node; | 37 class Node; |
39 | 38 |
40 template <typename NodeType> | 39 template <typename NodeType> |
41 class StaticNodeTypeList final : public NodeList { | 40 class StaticNodeTypeList final : public NodeList { |
42 public: | 41 public: |
43 static StaticNodeTypeList* adopt(HeapVector<Member<NodeType>>& nodes); | 42 static StaticNodeTypeList* adopt(HeapVector<Member<NodeType>>& nodes); |
44 | 43 |
45 static StaticNodeTypeList* createEmpty() { return new StaticNodeTypeList; } | 44 static StaticNodeTypeList* createEmpty() { return new StaticNodeTypeList; } |
46 | 45 |
47 ~StaticNodeTypeList() override; | 46 ~StaticNodeTypeList() override; |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
93 template <typename VisitorDispatcher> | 92 template <typename VisitorDispatcher> |
94 ALWAYS_INLINE void StaticNodeTypeList<NodeType>::traceImpl( | 93 ALWAYS_INLINE void StaticNodeTypeList<NodeType>::traceImpl( |
95 VisitorDispatcher visitor) { | 94 VisitorDispatcher visitor) { |
96 visitor->trace(m_nodes); | 95 visitor->trace(m_nodes); |
97 NodeList::trace(visitor); | 96 NodeList::trace(visitor); |
98 } | 97 } |
99 | 98 |
100 } // namespace blink | 99 } // namespace blink |
101 | 100 |
102 #endif // StaticNodeList_h | 101 #endif // StaticNodeList_h |
OLD | NEW |