OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) |
3 * Copyright (C) 2000 Frederik Holljen (frederik.holljen@hig.no) | 3 * Copyright (C) 2000 Frederik Holljen (frederik.holljen@hig.no) |
4 * Copyright (C) 2001 Peter Kelly (pmk@post.com) | 4 * Copyright (C) 2001 Peter Kelly (pmk@post.com) |
5 * Copyright (C) 2006 Samuel Weinig (sam.weinig@gmail.com) | 5 * Copyright (C) 2006 Samuel Weinig (sam.weinig@gmail.com) |
6 * Copyright (C) 2004, 2008 Apple Inc. All rights reserved. | 6 * Copyright (C) 2004, 2008 Apple Inc. All rights reserved. |
7 * | 7 * |
8 * This library is free software; you can redistribute it and/or | 8 * This library is free software; you can redistribute it and/or |
9 * modify it under the terms of the GNU Library General Public | 9 * modify it under the terms of the GNU Library General Public |
10 * License as published by the Free Software Foundation; either | 10 * License as published by the Free Software Foundation; either |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
68 return true; | 68 return true; |
69 } | 69 } |
70 node = NodeTraversal::previous(*node, root); | 70 node = NodeTraversal::previous(*node, root); |
71 return node; | 71 return node; |
72 } | 72 } |
73 | 73 |
74 NodeIterator::NodeIterator(PassRefPtrWillBeRawPtr<Node> rootNode, unsigned whatT
oShow, PassRefPtrWillBeRawPtr<NodeFilter> filter) | 74 NodeIterator::NodeIterator(PassRefPtrWillBeRawPtr<Node> rootNode, unsigned whatT
oShow, PassRefPtrWillBeRawPtr<NodeFilter> filter) |
75 : NodeIteratorBase(rootNode, whatToShow, filter) | 75 : NodeIteratorBase(rootNode, whatToShow, filter) |
76 , m_referenceNode(root(), true) | 76 , m_referenceNode(root(), true) |
77 { | 77 { |
78 ScriptWrappable::init(this); | |
79 root()->document().attachNodeIterator(this); | 78 root()->document().attachNodeIterator(this); |
80 } | 79 } |
81 | 80 |
82 #if !ENABLE(OILPAN) | 81 #if !ENABLE(OILPAN) |
83 NodeIterator::~NodeIterator() | 82 NodeIterator::~NodeIterator() |
84 { | 83 { |
85 root()->document().detachNodeIterator(this); | 84 root()->document().detachNodeIterator(this); |
86 } | 85 } |
87 #endif | 86 #endif |
88 | 87 |
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
212 } | 211 } |
213 | 212 |
214 void NodeIterator::trace(Visitor* visitor) | 213 void NodeIterator::trace(Visitor* visitor) |
215 { | 214 { |
216 visitor->trace(m_referenceNode); | 215 visitor->trace(m_referenceNode); |
217 visitor->trace(m_candidateNode); | 216 visitor->trace(m_candidateNode); |
218 NodeIteratorBase::trace(visitor); | 217 NodeIteratorBase::trace(visitor); |
219 } | 218 } |
220 | 219 |
221 } // namespace blink | 220 } // namespace blink |
OLD | NEW |