| OLD | NEW |
| 1 /** | 1 /** |
| 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) |
| 3 * (C) 1999 Antti Koivisto (koivisto@kde.org) | 3 * (C) 1999 Antti Koivisto (koivisto@kde.org) |
| 4 * Copyright (C) 2003, 2004, 2005, 2006, 2010 Apple Inc. All rights reserved. | 4 * Copyright (C) 2003, 2004, 2005, 2006, 2010 Apple Inc. All rights reserved. |
| 5 * Copyright (C) 2006 Andrew Wellington (proton@wiretapped.net) | 5 * Copyright (C) 2006 Andrew Wellington (proton@wiretapped.net) |
| 6 * | 6 * |
| 7 * This library is free software; you can redistribute it and/or | 7 * This library is free software; you can redistribute it and/or |
| 8 * modify it under the terms of the GNU Library General Public | 8 * modify it under the terms of the GNU Library General Public |
| 9 * License as published by the Free Software Foundation; either | 9 * License as published by the Free Software Foundation; either |
| 10 * version 2 of the License, or (at your option) any later version. | 10 * version 2 of the License, or (at your option) any later version. |
| (...skipping 423 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 434 RenderBlockFlow::paint(paintInfo, paintOffset); | 434 RenderBlockFlow::paint(paintInfo, paintOffset); |
| 435 } | 435 } |
| 436 | 436 |
| 437 const String& RenderListItem::markerText() const | 437 const String& RenderListItem::markerText() const |
| 438 { | 438 { |
| 439 if (m_marker) | 439 if (m_marker) |
| 440 return m_marker->text(); | 440 return m_marker->text(); |
| 441 return nullAtom.string(); | 441 return nullAtom.string(); |
| 442 } | 442 } |
| 443 | 443 |
| 444 String RenderListItem::markerTextWithSuffix() const | |
| 445 { | |
| 446 if (!m_marker) | |
| 447 return String(); | |
| 448 | |
| 449 // Append the suffix for the marker in the right place depending | |
| 450 // on the direction of the text (right-to-left or left-to-right). | |
| 451 | |
| 452 const String& markerText = m_marker->text(); | |
| 453 const String markerSuffix = m_marker->suffix(); | |
| 454 StringBuilder result; | |
| 455 | |
| 456 if (!m_marker->style()->isLeftToRightDirection()) | |
| 457 result.append(markerSuffix); | |
| 458 | |
| 459 result.append(markerText); | |
| 460 | |
| 461 if (m_marker->style()->isLeftToRightDirection()) | |
| 462 result.append(markerSuffix); | |
| 463 | |
| 464 return result.toString(); | |
| 465 } | |
| 466 | |
| 467 void RenderListItem::explicitValueChanged() | 444 void RenderListItem::explicitValueChanged() |
| 468 { | 445 { |
| 469 if (m_marker) | 446 if (m_marker) |
| 470 m_marker->setNeedsLayoutAndPrefWidthsRecalc(); | 447 m_marker->setNeedsLayoutAndPrefWidthsRecalc(); |
| 471 Node* listNode = enclosingList(this); | 448 Node* listNode = enclosingList(this); |
| 472 for (RenderListItem* item = this; item; item = nextListItem(listNode, item)) | 449 for (RenderListItem* item = this; item; item = nextListItem(listNode, item)) |
| 473 item->updateValue(); | 450 item->updateValue(); |
| 474 } | 451 } |
| 475 | 452 |
| 476 void RenderListItem::setExplicitValue(int value) | 453 void RenderListItem::setExplicitValue(int value) |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 526 // assume that all the following ones have too. | 503 // assume that all the following ones have too. |
| 527 // This gives us the opportunity to stop here and avoid | 504 // This gives us the opportunity to stop here and avoid |
| 528 // marking the same nodes again. | 505 // marking the same nodes again. |
| 529 break; | 506 break; |
| 530 } | 507 } |
| 531 item->updateValue(); | 508 item->updateValue(); |
| 532 } | 509 } |
| 533 } | 510 } |
| 534 | 511 |
| 535 } // namespace WebCore | 512 } // namespace WebCore |
| OLD | NEW |