| 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 193 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 204 | 204 |
| 205 RenderText* textObj = textRenderer(); | 205 RenderText* textObj = textRenderer(); |
| 206 LayoutUnit selTop = selectionTop(); | 206 LayoutUnit selTop = selectionTop(); |
| 207 LayoutUnit selHeight = selectionHeight(); | 207 LayoutUnit selHeight = selectionHeight(); |
| 208 RenderStyle* styleToUse = textObj->style(isFirstLineStyle()); | 208 RenderStyle* styleToUse = textObj->style(isFirstLineStyle()); |
| 209 const Font& font = styleToUse->font(); | 209 const Font& font = styleToUse->font(); |
| 210 | 210 |
| 211 StringBuilder charactersWithHyphen; | 211 StringBuilder charactersWithHyphen; |
| 212 bool respectHyphen = ePos == m_len && hasHyphen(); | 212 bool respectHyphen = ePos == m_len && hasHyphen(); |
| 213 TextRun textRun = constructTextRun(styleToUse, font, respectHyphen ? &charac
tersWithHyphen : 0); | 213 TextRun textRun = constructTextRun(styleToUse, font, respectHyphen ? &charac
tersWithHyphen : 0); |
| 214 if (respectHyphen) | |
| 215 endPos = textRun.length(); | |
| 216 | 214 |
| 217 FloatPoint startingPoint = FloatPoint(logicalLeft(), selTop); | 215 FloatPoint startingPoint = FloatPoint(logicalLeft(), selTop); |
| 218 LayoutRect r; | 216 LayoutRect r; |
| 219 if (sPos || ePos != static_cast<int>(m_len)) | 217 if (sPos || ePos != static_cast<int>(m_len)) |
| 220 r = enclosingIntRect(font.selectionRectForText(textRun, startingPoint, s
elHeight, sPos, ePos)); | 218 r = enclosingIntRect(font.selectionRectForText(textRun, startingPoint, s
elHeight, sPos, ePos)); |
| 221 else // Avoid computing the font width when the entire line box is selected
as an optimization. | 219 else // Avoid computing the font width when the entire line box is selected
as an optimization. |
| 222 r = enclosingIntRect(FloatRect(startingPoint, FloatSize(m_logicalWidth,
selHeight))); | 220 r = enclosingIntRect(FloatRect(startingPoint, FloatSize(m_logicalWidth,
selHeight))); |
| 223 | 221 |
| 224 LayoutUnit logicalWidth = r.width(); | 222 LayoutUnit logicalWidth = r.width(); |
| 225 if (r.x() > logicalRight()) | 223 if (r.x() > logicalRight()) |
| (...skipping 1331 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1557 printedCharacters = fprintf(stderr, "\t%s %p", obj->renderName(), obj); | 1555 printedCharacters = fprintf(stderr, "\t%s %p", obj->renderName(), obj); |
| 1558 const int rendererCharacterOffset = 24; | 1556 const int rendererCharacterOffset = 24; |
| 1559 for (; printedCharacters < rendererCharacterOffset; printedCharacters++) | 1557 for (; printedCharacters < rendererCharacterOffset; printedCharacters++) |
| 1560 fputc(' ', stderr); | 1558 fputc(' ', stderr); |
| 1561 fprintf(stderr, "(%d,%d) \"%s\"\n", start(), start() + len(), value.utf8().d
ata()); | 1559 fprintf(stderr, "(%d,%d) \"%s\"\n", start(), start() + len(), value.utf8().d
ata()); |
| 1562 } | 1560 } |
| 1563 | 1561 |
| 1564 #endif | 1562 #endif |
| 1565 | 1563 |
| 1566 } // namespace WebCore | 1564 } // namespace WebCore |
| OLD | NEW |