| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2000 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 2000 Lars Knoll (knoll@kde.org) |
| 3 * Copyright (C) 2003, 2004, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. | 3 * Copyright (C) 2003, 2004, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. |
| 4 * All right reserved. | 4 * All right reserved. |
| 5 * Copyright (C) 2010 Google Inc. All rights reserved. | 5 * Copyright (C) 2010 Google Inc. All rights reserved. |
| 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 2402 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2413 (!ltr && lineBoxEdge < blockLeftEdge)) { | 2413 (!ltr && lineBoxEdge < blockLeftEdge)) { |
| 2414 // This line spills out of our box in the appropriate direction. Now we | 2414 // This line spills out of our box in the appropriate direction. Now we |
| 2415 // need to see if the line can be truncated. In order for truncation to | 2415 // need to see if the line can be truncated. In order for truncation to |
| 2416 // be possible, the line must have sufficient space to accommodate our | 2416 // be possible, the line must have sufficient space to accommodate our |
| 2417 // truncation string, and no replaced elements (images, tables) can | 2417 // truncation string, and no replaced elements (images, tables) can |
| 2418 // overlap the ellipsis space. | 2418 // overlap the ellipsis space. |
| 2419 | 2419 |
| 2420 LayoutUnit width(indentText == IndentText ? firstLineEllipsisWidth | 2420 LayoutUnit width(indentText == IndentText ? firstLineEllipsisWidth |
| 2421 : ellipsisWidth); | 2421 : ellipsisWidth); |
| 2422 LayoutUnit blockEdge = ltr ? blockRightEdge : blockLeftEdge; | 2422 LayoutUnit blockEdge = ltr ? blockRightEdge : blockLeftEdge; |
| 2423 if (curr->lineCanAccommodateEllipsis( | 2423 if (curr->lineCanAccommodateEllipsis(ltr, blockEdge, lineBoxEdge, |
| 2424 ltr, blockEdge.toInt(), lineBoxEdge.toInt(), width.toInt())) { | 2424 width)) { |
| 2425 LayoutUnit totalLogicalWidth = curr->placeEllipsis( | 2425 LayoutUnit totalLogicalWidth = curr->placeEllipsis( |
| 2426 selectedEllipsisStr, ltr, blockLeftEdge, blockRightEdge, width); | 2426 selectedEllipsisStr, ltr, blockLeftEdge, blockRightEdge, width); |
| 2427 LayoutUnit logicalLeft; // We are only interested in the delta from the | 2427 LayoutUnit logicalLeft; // We are only interested in the delta from the |
| 2428 // base position. | 2428 // base position. |
| 2429 LayoutUnit availableLogicalWidth = blockRightEdge - blockLeftEdge; | 2429 LayoutUnit availableLogicalWidth = blockRightEdge - blockLeftEdge; |
| 2430 updateLogicalWidthForAlignment(textAlign, curr, 0, logicalLeft, | 2430 updateLogicalWidthForAlignment(textAlign, curr, 0, logicalLeft, |
| 2431 totalLogicalWidth, availableLogicalWidth, | 2431 totalLogicalWidth, availableLogicalWidth, |
| 2432 0); | 2432 0); |
| 2433 if (ltr) | 2433 if (ltr) |
| 2434 curr->moveInInlineDirection(logicalLeft); | 2434 curr->moveInInlineDirection(logicalLeft); |
| (...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2512 | 2512 |
| 2513 bool LayoutBlockFlow::paintedOutputOfObjectHasNoEffectRegardlessOfSize() const { | 2513 bool LayoutBlockFlow::paintedOutputOfObjectHasNoEffectRegardlessOfSize() const { |
| 2514 // LayoutBlockFlow is in charge of paint invalidation of the first line. | 2514 // LayoutBlockFlow is in charge of paint invalidation of the first line. |
| 2515 if (firstLineBox()) | 2515 if (firstLineBox()) |
| 2516 return false; | 2516 return false; |
| 2517 | 2517 |
| 2518 return LayoutBlock::paintedOutputOfObjectHasNoEffectRegardlessOfSize(); | 2518 return LayoutBlock::paintedOutputOfObjectHasNoEffectRegardlessOfSize(); |
| 2519 } | 2519 } |
| 2520 | 2520 |
| 2521 } // namespace blink | 2521 } // namespace blink |
| OLD | NEW |