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 530 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
541 float measuredWidth = 0; | 541 float measuredWidth = 0; |
542 FloatRect glyphBounds; | 542 FloatRect glyphBounds; |
543 | 543 |
544 bool kerningIsEnabled = | 544 bool kerningIsEnabled = |
545 font.getFontDescription().getTypesettingFeatures() & Kerning; | 545 font.getFontDescription().getTypesettingFeatures() & Kerning; |
546 | 546 |
547 #if OS(MACOSX) | 547 #if OS(MACOSX) |
548 // FIXME: Having any font feature settings enabled can lead to selection gaps | 548 // FIXME: Having any font feature settings enabled can lead to selection gaps |
549 // on Chromium-mac. https://bugs.webkit.org/show_bug.cgi?id=113418 | 549 // on Chromium-mac. https://bugs.webkit.org/show_bug.cgi?id=113418 |
550 bool canUseCachedWordMeasurements = | 550 bool canUseCachedWordMeasurements = |
551 font.canShapeWordByWord() && !font.getFontDescription().featureSettings(); | 551 font.canShapeWordByWord() && |
| 552 !font.getFontDescription().featureSettings() && layoutText.is8Bit(); |
552 #else | 553 #else |
553 bool canUseCachedWordMeasurements = font.canShapeWordByWord(); | 554 bool canUseCachedWordMeasurements = |
| 555 font.canShapeWordByWord() && layoutText.is8Bit(); |
554 #endif | 556 #endif |
555 | 557 |
556 if (canUseCachedWordMeasurements) { | 558 if (canUseCachedWordMeasurements) { |
557 int lastEndOffset = run->m_start; | 559 int lastEndOffset = run->m_start; |
558 size_t i = findWordMeasurement(layoutText, lastEndOffset, wordMeasurements, | 560 size_t i = findWordMeasurement(layoutText, lastEndOffset, wordMeasurements, |
559 wordMeasurementsIndex); | 561 wordMeasurementsIndex); |
560 for (size_t size = wordMeasurements.size(); | 562 for (size_t size = wordMeasurements.size(); |
561 i < size && lastEndOffset < run->m_stop; ++i) { | 563 i < size && lastEndOffset < run->m_stop; ++i) { |
562 const WordMeasurement& wordMeasurement = wordMeasurements[i]; | 564 const WordMeasurement& wordMeasurement = wordMeasurements[i]; |
563 if (wordMeasurement.startOffset == wordMeasurement.endOffset) | 565 if (wordMeasurement.startOffset == wordMeasurement.endOffset) |
(...skipping 2021 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2585 | 2587 |
2586 bool LayoutBlockFlow::paintedOutputOfObjectHasNoEffectRegardlessOfSize() const { | 2588 bool LayoutBlockFlow::paintedOutputOfObjectHasNoEffectRegardlessOfSize() const { |
2587 // LayoutBlockFlow is in charge of paint invalidation of the first line. | 2589 // LayoutBlockFlow is in charge of paint invalidation of the first line. |
2588 if (firstLineBox()) | 2590 if (firstLineBox()) |
2589 return false; | 2591 return false; |
2590 | 2592 |
2591 return LayoutBlock::paintedOutputOfObjectHasNoEffectRegardlessOfSize(); | 2593 return LayoutBlock::paintedOutputOfObjectHasNoEffectRegardlessOfSize(); |
2592 } | 2594 } |
2593 | 2595 |
2594 } // namespace blink | 2596 } // namespace blink |
OLD | NEW |