| 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 360 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 371 if (view()) | 371 if (view()) |
| 372 view()->removeRenderCounter(); | 372 view()->removeRenderCounter(); |
| 373 RenderText::willBeDestroyed(); | 373 RenderText::willBeDestroyed(); |
| 374 } | 374 } |
| 375 | 375 |
| 376 const char* RenderCounter::renderName() const | 376 const char* RenderCounter::renderName() const |
| 377 { | 377 { |
| 378 return "RenderCounter"; | 378 return "RenderCounter"; |
| 379 } | 379 } |
| 380 | 380 |
| 381 bool RenderCounter::isCounter() const | |
| 382 { | |
| 383 return true; | |
| 384 } | |
| 385 | |
| 386 PassRefPtr<StringImpl> RenderCounter::originalText() const | 381 PassRefPtr<StringImpl> RenderCounter::originalText() const |
| 387 { | 382 { |
| 388 if (!m_counterNode) { | 383 if (!m_counterNode) { |
| 389 RenderObject* beforeAfterContainer = parent(); | 384 RenderObject* beforeAfterContainer = parent(); |
| 390 while (true) { | 385 while (true) { |
| 391 if (!beforeAfterContainer) | 386 if (!beforeAfterContainer) |
| 392 return nullptr; | 387 return nullptr; |
| 393 if (!beforeAfterContainer->isAnonymous() && !beforeAfterContainer->i
sPseudoElement()) | 388 if (!beforeAfterContainer->isAnonymous() && !beforeAfterContainer->i
sPseudoElement()) |
| 394 return nullptr; // RenderCounters are restricted to before and a
fter pseudo elements | 389 return nullptr; // RenderCounters are restricted to before and a
fter pseudo elements |
| 395 PseudoId containerStyle = beforeAfterContainer->style()->styleType()
; | 390 PseudoId containerStyle = beforeAfterContainer->style()->styleType()
; |
| (...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 613 fprintf(stderr, " "); | 608 fprintf(stderr, " "); |
| 614 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", |
| 615 current, current->node(), current->parent(), current->previousSiblin
g(), | 610 current, current->node(), current->parent(), current->previousSiblin
g(), |
| 616 current->nextSibling(), current->hasCounterNodeMap() ? | 611 current->nextSibling(), current->hasCounterNodeMap() ? |
| 617 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); |
| 618 } | 613 } |
| 619 fflush(stderr); | 614 fflush(stderr); |
| 620 } | 615 } |
| 621 | 616 |
| 622 #endif // NDEBUG | 617 #endif // NDEBUG |
| OLD | NEW |