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 327 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
338 if (currentCounter->parent()) | 338 if (currentCounter->parent()) |
339 continue; | 339 continue; |
340 if (stayWithin == parentElement(*currentRenderer) && currentCounter->has
ResetType()) | 340 if (stayWithin == parentElement(*currentRenderer) && currentCounter->has
ResetType()) |
341 break; | 341 break; |
342 newNode->insertAfter(currentCounter, newNode->lastChild(), identifier); | 342 newNode->insertAfter(currentCounter, newNode->lastChild(), identifier); |
343 } | 343 } |
344 return newNode.get(); | 344 return newNode.get(); |
345 } | 345 } |
346 | 346 |
347 LayoutCounter::LayoutCounter(Document* node, const CounterContent& counter) | 347 LayoutCounter::LayoutCounter(Document* node, const CounterContent& counter) |
348 : RenderText(node, StringImpl::empty()) | 348 : LayoutText(node, StringImpl::empty()) |
349 , m_counter(counter) | 349 , m_counter(counter) |
350 , m_counterNode(0) | 350 , m_counterNode(0) |
351 , m_nextForSameCounter(0) | 351 , m_nextForSameCounter(0) |
352 { | 352 { |
353 view()->addLayoutCounter(); | 353 view()->addLayoutCounter(); |
354 } | 354 } |
355 | 355 |
356 LayoutCounter::~LayoutCounter() | 356 LayoutCounter::~LayoutCounter() |
357 { | 357 { |
358 } | 358 } |
359 | 359 |
360 void LayoutCounter::destroy() | 360 void LayoutCounter::destroy() |
361 { | 361 { |
362 if (m_counterNode) { | 362 if (m_counterNode) { |
363 m_counterNode->removeRenderer(this); | 363 m_counterNode->removeRenderer(this); |
364 ASSERT(!m_counterNode); | 364 ASSERT(!m_counterNode); |
365 } | 365 } |
366 RenderText::destroy(); | 366 LayoutText::destroy(); |
367 } | 367 } |
368 | 368 |
369 void LayoutCounter::willBeDestroyed() | 369 void LayoutCounter::willBeDestroyed() |
370 { | 370 { |
371 if (view()) | 371 if (view()) |
372 view()->removeLayoutCounter(); | 372 view()->removeLayoutCounter(); |
373 RenderText::willBeDestroyed(); | 373 LayoutText::willBeDestroyed(); |
374 } | 374 } |
375 | 375 |
376 const char* LayoutCounter::renderName() const | 376 const char* LayoutCounter::renderName() const |
377 { | 377 { |
378 return "LayoutCounter"; | 378 return "LayoutCounter"; |
379 } | 379 } |
380 | 380 |
381 PassRefPtr<StringImpl> LayoutCounter::originalText() const | 381 PassRefPtr<StringImpl> LayoutCounter::originalText() const |
382 { | 382 { |
383 if (!m_counterNode) { | 383 if (!m_counterNode) { |
(...skipping 224 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
608 fprintf(stderr, " "); | 608 fprintf(stderr, " "); |
609 fprintf(stderr, "%p N:%p P:%p PS:%p NS:%p C:%p\n", | 609 fprintf(stderr, "%p N:%p P:%p PS:%p NS:%p C:%p\n", |
610 current, current->node(), current->parent(), current->previousSiblin
g(), | 610 current, current->node(), current->parent(), current->previousSiblin
g(), |
611 current->nextSibling(), current->hasCounterNodeMap() ? | 611 current->nextSibling(), current->hasCounterNodeMap() ? |
612 counterName ? blink::counterMaps().get(current)->get(identifier) : (
blink::CounterNode*)1 : (blink::CounterNode*)0); | 612 counterName ? blink::counterMaps().get(current)->get(identifier) : (
blink::CounterNode*)1 : (blink::CounterNode*)0); |
613 } | 613 } |
614 fflush(stderr); | 614 fflush(stderr); |
615 } | 615 } |
616 | 616 |
617 #endif // NDEBUG | 617 #endif // NDEBUG |
OLD | NEW |