| OLD | NEW |
| 1 /* | 1 /* |
| 2 * (C) 1999 Lars Knoll (knoll@kde.org) | 2 * (C) 1999 Lars Knoll (knoll@kde.org) |
| 3 * (C) 2000 Dirk Mueller (mueller@kde.org) | 3 * (C) 2000 Dirk Mueller (mueller@kde.org) |
| 4 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All r
ights reserved. | 4 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All r
ights reserved. |
| 5 * | 5 * |
| 6 * This library is free software; you can redistribute it and/or | 6 * This library is free software; you can redistribute it and/or |
| 7 * modify it under the terms of the GNU Library General Public | 7 * modify it under the terms of the GNU Library General Public |
| 8 * License as published by the Free Software Foundation; either | 8 * License as published by the Free Software Foundation; either |
| 9 * version 2 of the License, or (at your option) any later version. | 9 * version 2 of the License, or (at your option) any later version. |
| 10 * | 10 * |
| (...skipping 259 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 270 foundBox = true; | 270 foundBox = true; |
| 271 return -1; | 271 return -1; |
| 272 } | 272 } |
| 273 | 273 |
| 274 bool ltrEllipsisWithinBox = flowIsLTR && (ellipsisX < logicalRight()); | 274 bool ltrEllipsisWithinBox = flowIsLTR && (ellipsisX < logicalRight()); |
| 275 bool rtlEllipsisWithinBox = !flowIsLTR && (ellipsisX > logicalLeft()); | 275 bool rtlEllipsisWithinBox = !flowIsLTR && (ellipsisX > logicalLeft()); |
| 276 if (ltrEllipsisWithinBox || rtlEllipsisWithinBox) { | 276 if (ltrEllipsisWithinBox || rtlEllipsisWithinBox) { |
| 277 foundBox = true; | 277 foundBox = true; |
| 278 | 278 |
| 279 // The inline box may have different directionality than it's parent. S
ince truncation | 279 // The inline box may have different directionality than it's parent. S
ince truncation |
| 280 // behavior depends both on both the parent and the inline block's direc
tionality, we | 280 // behavior depends both on the parent and the inline block's directiona
lity, we |
| 281 // must keep track of these separately. | 281 // must keep track of these separately. |
| 282 bool ltr = isLeftToRightDirection(); | 282 bool ltr = isLeftToRightDirection(); |
| 283 if (ltr != flowIsLTR) { | 283 if (ltr != flowIsLTR) { |
| 284 // Width in pixels of the visible portion of the box, excluding the
ellipsis. | 284 // Width in pixels of the visible portion of the box, excluding the
ellipsis. |
| 285 int visibleBoxWidth = visibleRightEdge - visibleLeftEdge - ellipsis
Width; | 285 int visibleBoxWidth = visibleRightEdge - visibleLeftEdge - ellipsis
Width; |
| 286 ellipsisX = ltr ? logicalLeft() + visibleBoxWidth : logicalRight() -
visibleBoxWidth; | 286 ellipsisX = ltr ? logicalLeft() + visibleBoxWidth : logicalRight() -
visibleBoxWidth; |
| 287 } | 287 } |
| 288 | 288 |
| 289 int offset = offsetForPosition(ellipsisX, false); | 289 int offset = offsetForPosition(ellipsisX, false); |
| 290 if (offset == 0) { | 290 if (offset == 0) { |
| (...skipping 270 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 561 printedCharacters = fprintf(stderr, "\t%s %p", obj.renderName(), &obj); | 561 printedCharacters = fprintf(stderr, "\t%s %p", obj.renderName(), &obj); |
| 562 const int rendererCharacterOffset = 24; | 562 const int rendererCharacterOffset = 24; |
| 563 for (; printedCharacters < rendererCharacterOffset; printedCharacters++) | 563 for (; printedCharacters < rendererCharacterOffset; printedCharacters++) |
| 564 fputc(' ', stderr); | 564 fputc(' ', stderr); |
| 565 fprintf(stderr, "(%d,%d) \"%s\"\n", start(), start() + len(), value.utf8().d
ata()); | 565 fprintf(stderr, "(%d,%d) \"%s\"\n", start(), start() + len(), value.utf8().d
ata()); |
| 566 } | 566 } |
| 567 | 567 |
| 568 #endif | 568 #endif |
| 569 | 569 |
| 570 } // namespace blink | 570 } // namespace blink |
| OLD | NEW |