| 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 519 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 530 while (CounterNode* parent = child->parent()) { | 530 while (CounterNode* parent = child->parent()) { |
| 531 text = listMarkerText(m_counter.listStyle(), child->countInParent()) | 531 text = listMarkerText(m_counter.listStyle(), child->countInParent()) |
| 532 + m_counter.separator() + text; | 532 + m_counter.separator() + text; |
| 533 child = parent; | 533 child = parent; |
| 534 } | 534 } |
| 535 } | 535 } |
| 536 | 536 |
| 537 return text.impl(); | 537 return text.impl(); |
| 538 } | 538 } |
| 539 | 539 |
| 540 void RenderCounter::updateText() |
| 541 { |
| 542 computePreferredLogicalWidths(0); |
| 543 } |
| 544 |
| 540 void RenderCounter::computePreferredLogicalWidths(float lead) | 545 void RenderCounter::computePreferredLogicalWidths(float lead) |
| 541 { | 546 { |
| 542 setTextInternal(originalText()); | 547 setTextInternal(originalText()); |
| 543 RenderText::computePreferredLogicalWidths(lead); | 548 RenderText::computePreferredLogicalWidths(lead); |
| 544 } | 549 } |
| 545 | 550 |
| 546 void RenderCounter::invalidate() | 551 void RenderCounter::invalidate() |
| 547 { | 552 { |
| 548 m_counterNode->removeRenderer(this); | 553 m_counterNode->removeRenderer(this); |
| 549 ASSERT(!m_counterNode); | 554 ASSERT(!m_counterNode); |
| (...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 734 fprintf(stderr, " "); | 739 fprintf(stderr, " "); |
| 735 fprintf(stderr, "%p N:%p P:%p PS:%p NS:%p C:%p\n", | 740 fprintf(stderr, "%p N:%p P:%p PS:%p NS:%p C:%p\n", |
| 736 current, current->node(), current->parent(), current->previousSiblin
g(), | 741 current, current->node(), current->parent(), current->previousSiblin
g(), |
| 737 current->nextSibling(), current->hasCounterNodeMap() ? | 742 current->nextSibling(), current->hasCounterNodeMap() ? |
| 738 counterName ? WebCore::counterMaps().get(current)->get(identifier.im
pl()).get() : (WebCore::CounterNode*)1 : (WebCore::CounterNode*)0); | 743 counterName ? WebCore::counterMaps().get(current)->get(identifier.im
pl()).get() : (WebCore::CounterNode*)1 : (WebCore::CounterNode*)0); |
| 739 } | 744 } |
| 740 fflush(stderr); | 745 fflush(stderr); |
| 741 } | 746 } |
| 742 | 747 |
| 743 #endif // NDEBUG | 748 #endif // NDEBUG |
| OLD | NEW |