| 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 Apple Inc. All rights reserved. | 4 * Copyright (C) 2004, 2005, 2006, 2007 Apple Inc. All rights reserved. |
| 5 * Copyright (C) 2006 Andrew Wellington (proton@wiretapped.net) | 5 * Copyright (C) 2006 Andrew Wellington (proton@wiretapped.net) |
| 6 * Copyright (C) 2006 Graham Dennis (graham.dennis@gmail.com) | 6 * Copyright (C) 2006 Graham Dennis (graham.dennis@gmail.com) |
| 7 * | 7 * |
| 8 * This library is free software; you can redistribute it and/or | 8 * This library is free software; you can redistribute it and/or |
| 9 * modify it under the terms of the GNU Library General Public | 9 * modify it under the terms of the GNU Library General Public |
| 10 * License as published by the Free Software Foundation; either | 10 * License as published by the Free Software Foundation; either |
| (...skipping 988 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 999 // Terminate word boundary at bidi run boundary. | 999 // Terminate word boundary at bidi run boundary. |
| 1000 if (run) | 1000 if (run) |
| 1001 j = std::min(j, run->stop() + 1); | 1001 j = std::min(j, run->stop() + 1); |
| 1002 int wordLen = j - i; | 1002 int wordLen = j - i; |
| 1003 if (wordLen) { | 1003 if (wordLen) { |
| 1004 bool isSpace = (j < len) && c == spaceCharacter; | 1004 bool isSpace = (j < len) && c == spaceCharacter; |
| 1005 | 1005 |
| 1006 // Non-zero only when kerning is enabled, in which case we measure w
ords with their trailing | 1006 // Non-zero only when kerning is enabled, in which case we measure w
ords with their trailing |
| 1007 // space, then subtract its width. | 1007 // space, then subtract its width. |
| 1008 float wordTrailingSpaceWidth = 0; | 1008 float wordTrailingSpaceWidth = 0; |
| 1009 if (isSpace && (f.fontDescription().typesettingFeatures() & Kerning)
) { | 1009 if (isSpace && (f.fontDescription().getTypesettingFeatures() & Kerni
ng)) { |
| 1010 ASSERT(textDirection >=0 && textDirection <= 1); | 1010 ASSERT(textDirection >=0 && textDirection <= 1); |
| 1011 if (!cachedWordTrailingSpaceWidth[textDirection]) | 1011 if (!cachedWordTrailingSpaceWidth[textDirection]) |
| 1012 cachedWordTrailingSpaceWidth[textDirection] = f.width(constr
uctTextRun(f, &spaceCharacter, 1, styleToUse, textDirection)) + wordSpacing; | 1012 cachedWordTrailingSpaceWidth[textDirection] = f.width(constr
uctTextRun(f, &spaceCharacter, 1, styleToUse, textDirection)) + wordSpacing; |
| 1013 wordTrailingSpaceWidth = cachedWordTrailingSpaceWidth[textDirect
ion]; | 1013 wordTrailingSpaceWidth = cachedWordTrailingSpaceWidth[textDirect
ion]; |
| 1014 } | 1014 } |
| 1015 | 1015 |
| 1016 float w; | 1016 float w; |
| 1017 if (wordTrailingSpaceWidth && isSpace) { | 1017 if (wordTrailingSpaceWidth && isSpace) { |
| 1018 w = widthFromFont(f, i, wordLen + 1, leadWidth, currMaxWidth, te
xtDirection, &fallbackFonts, &glyphBounds) - wordTrailingSpaceWidth; | 1018 w = widthFromFont(f, i, wordLen + 1, leadWidth, currMaxWidth, te
xtDirection, &fallbackFonts, &glyphBounds) - wordTrailingSpaceWidth; |
| 1019 } else { | 1019 } else { |
| (...skipping 731 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1751 for (InlineTextBox* box = firstTextBox(); box; box = box->nextTextBox()) { | 1751 for (InlineTextBox* box = firstTextBox(); box; box = box->nextTextBox()) { |
| 1752 paintInvalidationContainer.invalidateDisplayItemClientOnBacking(*box, in
validationReason); | 1752 paintInvalidationContainer.invalidateDisplayItemClientOnBacking(*box, in
validationReason); |
| 1753 if (box->truncation() != cNoTruncation) { | 1753 if (box->truncation() != cNoTruncation) { |
| 1754 if (EllipsisBox* ellipsisBox = box->root().ellipsisBox()) | 1754 if (EllipsisBox* ellipsisBox = box->root().ellipsisBox()) |
| 1755 paintInvalidationContainer.invalidateDisplayItemClientOnBacking(
*ellipsisBox, invalidationReason); | 1755 paintInvalidationContainer.invalidateDisplayItemClientOnBacking(
*ellipsisBox, invalidationReason); |
| 1756 } | 1756 } |
| 1757 } | 1757 } |
| 1758 } | 1758 } |
| 1759 | 1759 |
| 1760 } // namespace blink | 1760 } // namespace blink |
| OLD | NEW |