OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2005 Allan Sandfeld Jensen (kde@carewolf.com) | 2 * Copyright (C) 2005 Allan Sandfeld Jensen (kde@carewolf.com) |
3 * Copyright (C) 2006, 2007 Apple Inc. All rights reserved. | 3 * Copyright (C) 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 23 matching lines...) Expand all Loading... |
34 , m_countInParent(0) | 34 , m_countInParent(0) |
35 , m_renderer(o) | 35 , m_renderer(o) |
36 , m_parent(0) | 36 , m_parent(0) |
37 , m_previousSibling(0) | 37 , m_previousSibling(0) |
38 , m_nextSibling(0) | 38 , m_nextSibling(0) |
39 , m_firstChild(0) | 39 , m_firstChild(0) |
40 , m_lastChild(0) | 40 , m_lastChild(0) |
41 { | 41 { |
42 } | 42 } |
43 | 43 |
| 44 PassRefPtr<CounterNode> CounterNode::create(RenderObject* renderer, bool hasRese
tType, int value) |
| 45 { |
| 46 return adoptRef(new CounterNode(renderer, hasResetType, value)); |
| 47 } |
| 48 |
44 CounterNode* CounterNode::nextInPreOrderAfterChildren(const CounterNode* stayWit
hin) const | 49 CounterNode* CounterNode::nextInPreOrderAfterChildren(const CounterNode* stayWit
hin) const |
45 { | 50 { |
46 if (this == stayWithin) | 51 if (this == stayWithin) |
47 return 0; | 52 return 0; |
48 | 53 |
49 const CounterNode* current = this; | 54 const CounterNode* current = this; |
50 CounterNode* next; | 55 CounterNode* next; |
51 while (!(next = current->m_nextSibling)) { | 56 while (!(next = current->m_nextSibling)) { |
52 current = current->m_parent; | 57 current = current->m_parent; |
53 if (!current || current == stayWithin) | 58 if (!current || current == stayWithin) |
(...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
258 | 263 |
259 #ifndef NDEBUG | 264 #ifndef NDEBUG |
260 | 265 |
261 void showTree(const WebCore::CounterNode* counter) | 266 void showTree(const WebCore::CounterNode* counter) |
262 { | 267 { |
263 if (counter) | 268 if (counter) |
264 showTreeAndMark(counter); | 269 showTreeAndMark(counter); |
265 } | 270 } |
266 | 271 |
267 #endif | 272 #endif |
OLD | NEW |