| 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. All r
ight reserved. | 3 * Copyright (C) 2003, 2004, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All r
ight reserved. |
| 4 * Copyright (C) 2010 Google Inc. All rights reserved. | 4 * Copyright (C) 2010 Google Inc. All rights 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 422 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 433 | 433 |
| 434 const Font& font = layoutText->style(lineInfo.isFirstLine())->font(); | 434 const Font& font = layoutText->style(lineInfo.isFirstLine())->font(); |
| 435 | 435 |
| 436 LayoutUnit hyphenWidth; | 436 LayoutUnit hyphenWidth; |
| 437 if (toInlineTextBox(run->m_box)->hasHyphen()) | 437 if (toInlineTextBox(run->m_box)->hasHyphen()) |
| 438 hyphenWidth = LayoutUnit(layoutText->hyphenWidth(font, run->direction())
); | 438 hyphenWidth = LayoutUnit(layoutText->hyphenWidth(font, run->direction())
); |
| 439 | 439 |
| 440 float measuredWidth = 0; | 440 float measuredWidth = 0; |
| 441 FloatRect glyphBounds; | 441 FloatRect glyphBounds; |
| 442 | 442 |
| 443 bool kerningIsEnabled = font.fontDescription().typesettingFeatures() & Kerni
ng; | 443 bool kerningIsEnabled = font.fontDescription().getTypesettingFeatures() & Ke
rning; |
| 444 | 444 |
| 445 #if OS(MACOSX) | 445 #if OS(MACOSX) |
| 446 // FIXME: Having any font feature settings enabled can lead to selection gap
s on | 446 // FIXME: Having any font feature settings enabled can lead to selection gap
s on |
| 447 // Chromium-mac. https://bugs.webkit.org/show_bug.cgi?id=113418 | 447 // Chromium-mac. https://bugs.webkit.org/show_bug.cgi?id=113418 |
| 448 bool canUseCachedWordMeasurements = font.canShapeWordByWord() && !font.fontD
escription().featureSettings(); | 448 bool canUseCachedWordMeasurements = font.canShapeWordByWord() && !font.fontD
escription().featureSettings(); |
| 449 #else | 449 #else |
| 450 bool canUseCachedWordMeasurements = font.canShapeWordByWord(); | 450 bool canUseCachedWordMeasurements = font.canShapeWordByWord(); |
| 451 #endif | 451 #endif |
| 452 | 452 |
| 453 if (canUseCachedWordMeasurements) { | 453 if (canUseCachedWordMeasurements) { |
| (...skipping 1653 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2107 if (!line || !line->isFirstLineStyle()) | 2107 if (!line || !line->isFirstLineStyle()) |
| 2108 return reason; | 2108 return reason; |
| 2109 // It's the RootInlineBox that paints the ::first-line background. Note that
since it may be | 2109 // It's the RootInlineBox that paints the ::first-line background. Note that
since it may be |
| 2110 // expensive to figure out if the first line is affected by any ::first-line
selectors at all, | 2110 // expensive to figure out if the first line is affected by any ::first-line
selectors at all, |
| 2111 // we just invalidate it unconditionally, since that's typically cheaper. | 2111 // we just invalidate it unconditionally, since that's typically cheaper. |
| 2112 invalidateDisplayItemClient(*line); | 2112 invalidateDisplayItemClient(*line); |
| 2113 return reason; | 2113 return reason; |
| 2114 } | 2114 } |
| 2115 | 2115 |
| 2116 } // namespace blink | 2116 } // namespace blink |
| OLD | NEW |