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 401 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
412 { | 412 { |
413 setText(originalText()); | 413 setText(originalText()); |
414 } | 414 } |
415 | 415 |
416 void LayoutCounter::invalidate() | 416 void LayoutCounter::invalidate() |
417 { | 417 { |
418 m_counterNode->removeRenderer(this); | 418 m_counterNode->removeRenderer(this); |
419 ASSERT(!m_counterNode); | 419 ASSERT(!m_counterNode); |
420 if (documentBeingDestroyed()) | 420 if (documentBeingDestroyed()) |
421 return; | 421 return; |
422 setNeedsLayoutAndPrefWidthsRecalcAndFullPaintInvalidation(); | 422 setNeedsLayoutAndPrefWidthsRecalcAndFullPaintInvalidation(LayoutInvalidation
Reason::CountersChanged); |
423 } | 423 } |
424 | 424 |
425 static void destroyCounterNodeWithoutMapRemoval(const AtomicString& identifier,
CounterNode* node) | 425 static void destroyCounterNodeWithoutMapRemoval(const AtomicString& identifier,
CounterNode* node) |
426 { | 426 { |
427 CounterNode* previous; | 427 CounterNode* previous; |
428 for (RefPtr<CounterNode> child = node->lastDescendant(); child && child != n
ode; child = previous) { | 428 for (RefPtr<CounterNode> child = node->lastDescendant(); child && child != n
ode; child = previous) { |
429 previous = child->previousInPreOrder(); | 429 previous = child->previousInPreOrder(); |
430 child->parent()->removeChild(child.get()); | 430 child->parent()->removeChild(child.get()); |
431 ASSERT(counterMaps().get(&child->owner())->get(identifier) == child); | 431 ASSERT(counterMaps().get(&child->owner())->get(identifier) == child); |
432 counterMaps().get(&child->owner())->remove(identifier); | 432 counterMaps().get(&child->owner())->remove(identifier); |
(...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
603 fprintf(stderr, " "); | 603 fprintf(stderr, " "); |
604 fprintf(stderr, "%p N:%p P:%p PS:%p NS:%p C:%p\n", | 604 fprintf(stderr, "%p N:%p P:%p PS:%p NS:%p C:%p\n", |
605 current, current->node(), current->parent(), current->previousSiblin
g(), | 605 current, current->node(), current->parent(), current->previousSiblin
g(), |
606 current->nextSibling(), current->hasCounterNodeMap() ? | 606 current->nextSibling(), current->hasCounterNodeMap() ? |
607 counterName ? blink::counterMaps().get(current)->get(identifier) : (
blink::CounterNode*)1 : (blink::CounterNode*)0); | 607 counterName ? blink::counterMaps().get(current)->get(identifier) : (
blink::CounterNode*)1 : (blink::CounterNode*)0); |
608 } | 608 } |
609 fflush(stderr); | 609 fflush(stderr); |
610 } | 610 } |
611 | 611 |
612 #endif // NDEBUG | 612 #endif // NDEBUG |
OLD | NEW |