| 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 487 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 498 } | 498 } |
| 499 | 499 |
| 500 static void destroyCounterNodeWithoutMapRemoval(const AtomicString& identifier, | 500 static void destroyCounterNodeWithoutMapRemoval(const AtomicString& identifier, |
| 501 CounterNode* node) { | 501 CounterNode* node) { |
| 502 CounterNode* previous; | 502 CounterNode* previous; |
| 503 for (RefPtr<CounterNode> child = node->lastDescendant(); | 503 for (RefPtr<CounterNode> child = node->lastDescendant(); |
| 504 child && child != node; child = previous) { | 504 child && child != node; child = previous) { |
| 505 previous = child->previousInPreOrder(); | 505 previous = child->previousInPreOrder(); |
| 506 child->parent()->removeChild(child.get()); | 506 child->parent()->removeChild(child.get()); |
| 507 ASSERT(counterMaps().get(&child->owner())->get(identifier) == child); | 507 ASSERT(counterMaps().get(&child->owner())->get(identifier) == child); |
| 508 counterMaps().get(&child->owner())->remove(identifier); | 508 counterMaps().get(&child->owner())->erase(identifier); |
| 509 } | 509 } |
| 510 if (CounterNode* parent = node->parent()) | 510 if (CounterNode* parent = node->parent()) |
| 511 parent->removeChild(node); | 511 parent->removeChild(node); |
| 512 } | 512 } |
| 513 | 513 |
| 514 void LayoutCounter::destroyCounterNodes(LayoutObject& owner) { | 514 void LayoutCounter::destroyCounterNodes(LayoutObject& owner) { |
| 515 CounterMaps& maps = counterMaps(); | 515 CounterMaps& maps = counterMaps(); |
| 516 CounterMaps::iterator mapsIterator = maps.find(&owner); | 516 CounterMaps::iterator mapsIterator = maps.find(&owner); |
| 517 if (mapsIterator == maps.end()) | 517 if (mapsIterator == maps.end()) |
| 518 return; | 518 return; |
| (...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 705 current->parent(), current->previousSibling(), current->nextSibling(), | 705 current->parent(), current->previousSibling(), current->nextSibling(), |
| 706 current->hasCounterNodeMap() | 706 current->hasCounterNodeMap() |
| 707 ? counterName ? blink::counterMaps().get(current)->get(identifier) | 707 ? counterName ? blink::counterMaps().get(current)->get(identifier) |
| 708 : (blink::CounterNode*)1 | 708 : (blink::CounterNode*)1 |
| 709 : (blink::CounterNode*)0); | 709 : (blink::CounterNode*)0); |
| 710 } | 710 } |
| 711 fflush(stderr); | 711 fflush(stderr); |
| 712 } | 712 } |
| 713 | 713 |
| 714 #endif // NDEBUG | 714 #endif // NDEBUG |
| OLD | NEW |