| 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 551 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 562 // Destroying old counters that do not exist in the new counterDirec
tive map. | 562 // Destroying old counters that do not exist in the new counterDirec
tive map. |
| 563 for (CounterDirectiveMap::const_iterator it = oldCounterDirectives->
begin(); it !=oldMapEnd; ++it) { | 563 for (CounterDirectiveMap::const_iterator it = oldCounterDirectives->
begin(); it !=oldMapEnd; ++it) { |
| 564 if (!newCounterDirectives->contains(it->key)) | 564 if (!newCounterDirectives->contains(it->key)) |
| 565 LayoutCounter::destroyCounterNode(layoutObject, it->key); | 565 LayoutCounter::destroyCounterNode(layoutObject, it->key); |
| 566 } | 566 } |
| 567 } else { | 567 } else { |
| 568 if (layoutObject.hasCounterNodeMap()) | 568 if (layoutObject.hasCounterNodeMap()) |
| 569 LayoutCounter::destroyCounterNodes(layoutObject); | 569 LayoutCounter::destroyCounterNodes(layoutObject); |
| 570 } | 570 } |
| 571 } else if (newCounterDirectives) { | 571 } else if (newCounterDirectives) { |
| 572 if (layoutObject.hasCounterNodeMap()) |
| 573 LayoutCounter::destroyCounterNodes(layoutObject); |
| 572 CounterDirectiveMap::const_iterator newMapEnd = newCounterDirectives->en
d(); | 574 CounterDirectiveMap::const_iterator newMapEnd = newCounterDirectives->en
d(); |
| 573 for (CounterDirectiveMap::const_iterator it = newCounterDirectives->begi
n(); it != newMapEnd; ++it) { | 575 for (CounterDirectiveMap::const_iterator it = newCounterDirectives->begi
n(); it != newMapEnd; ++it) { |
| 574 // We must create this node here, because the added node may be a no
de with no display such as | 576 // We must create this node here, because the added node may be a no
de with no display such as |
| 575 // as those created by the increment or reset directives and the re-
layout that will happen will | 577 // as those created by the increment or reset directives and the re-
layout that will happen will |
| 576 // not catch the change if the node had no children. | 578 // not catch the change if the node had no children. |
| 577 makeCounterNode(layoutObject, it->key, false); | 579 makeCounterNode(layoutObject, it->key, false); |
| 578 } | 580 } |
| 579 } | 581 } |
| 580 } | 582 } |
| 581 | 583 |
| (...skipping 16 matching lines...) Expand all Loading... |
| 598 fprintf(stderr, " "); | 600 fprintf(stderr, " "); |
| 599 fprintf(stderr, "%p N:%p P:%p PS:%p NS:%p C:%p\n", | 601 fprintf(stderr, "%p N:%p P:%p PS:%p NS:%p C:%p\n", |
| 600 current, current->node(), current->parent(), current->previousSiblin
g(), | 602 current, current->node(), current->parent(), current->previousSiblin
g(), |
| 601 current->nextSibling(), current->hasCounterNodeMap() ? | 603 current->nextSibling(), current->hasCounterNodeMap() ? |
| 602 counterName ? blink::counterMaps().get(current)->get(identifier) : (
blink::CounterNode*)1 : (blink::CounterNode*)0); | 604 counterName ? blink::counterMaps().get(current)->get(identifier) : (
blink::CounterNode*)1 : (blink::CounterNode*)0); |
| 603 } | 605 } |
| 604 fflush(stderr); | 606 fflush(stderr); |
| 605 } | 607 } |
| 606 | 608 |
| 607 #endif // NDEBUG | 609 #endif // NDEBUG |
| OLD | NEW |