| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2003, 2004, 2005, 2006, 2007 Apple Inc. All rights reserved. | 2 * Copyright (C) 2003, 2004, 2005, 2006, 2007 Apple Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * This library is free software; you can redistribute it and/or | 4 * This library is free software; you can redistribute it and/or |
| 5 * modify it under the terms of the GNU Library General Public | 5 * modify it under the terms of the GNU Library General Public |
| 6 * License as published by the Free Software Foundation; either | 6 * License as published by the Free Software Foundation; either |
| 7 * version 2 of the License, or (at your option) any later version. | 7 * version 2 of the License, or (at your option) any later version. |
| 8 * | 8 * |
| 9 * This library is distributed in the hope that it will be useful, | 9 * This library is distributed in the hope that it will be useful, |
| 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| (...skipping 290 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 301 } | 301 } |
| 302 | 302 |
| 303 SelectionState InlineBox::getSelectionState() const { | 303 SelectionState InlineBox::getSelectionState() const { |
| 304 return getLineLayoutItem().getSelectionState(); | 304 return getLineLayoutItem().getSelectionState(); |
| 305 } | 305 } |
| 306 | 306 |
| 307 bool InlineBox::canAccommodateEllipsis(bool ltr, | 307 bool InlineBox::canAccommodateEllipsis(bool ltr, |
| 308 int blockEdge, | 308 int blockEdge, |
| 309 int ellipsisWidth) const { | 309 int ellipsisWidth) const { |
| 310 // Non-atomic inline-level elements can always accommodate an ellipsis. | 310 // Non-atomic inline-level elements can always accommodate an ellipsis. |
| 311 if (!getLineLayoutItem().isAtomicInlineLevel()) | 311 // Skip list markers and try the next box. |
| 312 if (!getLineLayoutItem().isAtomicInlineLevel() || |
| 313 getLineLayoutItem().isListMarker()) |
| 312 return true; | 314 return true; |
| 313 | 315 |
| 314 IntRect boxRect(x().toInt(), 0, m_logicalWidth.toInt(), 10); | 316 IntRect boxRect(x().toInt(), 0, m_logicalWidth.toInt(), 10); |
| 315 IntRect ellipsisRect(ltr ? blockEdge - ellipsisWidth : blockEdge, 0, | 317 IntRect ellipsisRect(ltr ? blockEdge - ellipsisWidth : blockEdge, 0, |
| 316 ellipsisWidth, 10); | 318 ellipsisWidth, 10); |
| 317 return !(boxRect.intersects(ellipsisRect)); | 319 return !(boxRect.intersects(ellipsisRect)); |
| 318 } | 320 } |
| 319 | 321 |
| 320 LayoutUnit InlineBox::placeEllipsisBox(bool, | 322 LayoutUnit InlineBox::placeEllipsisBox(bool, |
| 321 LayoutUnit, | 323 LayoutUnit, |
| (...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 398 } | 400 } |
| 399 | 401 |
| 400 void showLineTree(const blink::InlineBox* b) { | 402 void showLineTree(const blink::InlineBox* b) { |
| 401 if (b) | 403 if (b) |
| 402 b->showLineTreeForThis(); | 404 b->showLineTreeForThis(); |
| 403 else | 405 else |
| 404 fprintf(stderr, "Cannot showLineTree for (nil) InlineBox.\n"); | 406 fprintf(stderr, "Cannot showLineTree for (nil) InlineBox.\n"); |
| 405 } | 407 } |
| 406 | 408 |
| 407 #endif | 409 #endif |
| OLD | NEW |