OLD | NEW |
1 /** | 1 /** |
2 * Copyright (C) 2004 Allan Sandfeld Jensen (kde@carewolf.com) | 2 * Copyright (C) 2004 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 367 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
378 continue; | 378 continue; |
379 } | 379 } |
380 } | 380 } |
381 // This function is designed so that the same test is not done twice in
an iteration, except for this one | 381 // This function is designed so that the same test is not done twice in
an iteration, except for this one |
382 // which may be done twice in some cases. Rearranging the decision point
s though, to accommodate this | 382 // which may be done twice in some cases. Rearranging the decision point
s though, to accommodate this |
383 // performance improvement would create more code duplication than is wo
rthwhile in my oppinion and may further | 383 // performance improvement would create more code duplication than is wo
rthwhile in my oppinion and may further |
384 // impede the readability of this already complex algorithm. | 384 // impede the readability of this already complex algorithm. |
385 if (previousSibling) | 385 if (previousSibling) |
386 currentRenderer = previousSiblingOrParent(currentRenderer); | 386 currentRenderer = previousSiblingOrParent(currentRenderer); |
387 else | 387 else |
388 currentRenderer = currentRenderer->previousInPreOrder(); | 388 currentRenderer = previousInPreOrder(currentRenderer); |
389 } | 389 } |
390 return false; | 390 return false; |
391 } | 391 } |
392 | 392 |
393 static CounterNode* makeCounterNode(RenderObject* object, const AtomicString& id
entifier, bool alwaysCreateCounter) | 393 static CounterNode* makeCounterNode(RenderObject* object, const AtomicString& id
entifier, bool alwaysCreateCounter) |
394 { | 394 { |
395 ASSERT(object); | 395 ASSERT(object); |
396 | 396 |
397 if (object->m_hasCounterNodeMap) { | 397 if (object->m_hasCounterNodeMap) { |
398 if (CounterMap* nodeMap = counterMaps().get(object)) { | 398 if (CounterMap* nodeMap = counterMaps().get(object)) { |
(...skipping 281 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
680 for (const WebCore::RenderObject* parent = current; parent && parent !=
root; parent = parent->parent()) | 680 for (const WebCore::RenderObject* parent = current; parent && parent !=
root; parent = parent->parent()) |
681 fprintf(stderr, " "); | 681 fprintf(stderr, " "); |
682 fprintf(stderr, "%p N:%p P:%p PS:%p NS:%p C:%p\n", | 682 fprintf(stderr, "%p N:%p P:%p PS:%p NS:%p C:%p\n", |
683 current, current->node(), current->parent(), current->previousSiblin
g(), | 683 current, current->node(), current->parent(), current->previousSiblin
g(), |
684 current->nextSibling(), current->m_hasCounterNodeMap? | 684 current->nextSibling(), current->m_hasCounterNodeMap? |
685 counterName ? WebCore::counterMaps().get(current)->get(identifier.im
pl()).get() : (WebCore::CounterNode*)1 : (WebCore::CounterNode*)0); | 685 counterName ? WebCore::counterMaps().get(current)->get(identifier.im
pl()).get() : (WebCore::CounterNode*)1 : (WebCore::CounterNode*)0); |
686 } | 686 } |
687 } | 687 } |
688 | 688 |
689 #endif // NDEBUG | 689 #endif // NDEBUG |
OLD | NEW |