Changeset 267880 in webkit


Ignore:
Timestamp:
Oct 2, 2020, 8:45:17 AM (5 years ago)
Author:
Alan Bujtas
Message:

[LFC][IFC] Do not use simplified text measuring when soft hyphen is present
https://bugs.webkit.org/show_bug.cgi?id=217224

Reviewed by Antti Koivisto.

Specifically the monospaced fast codepath computes incorrect widht value when soft hyphens are present.

  • layout/layouttree/LayoutTreeBuilder.cpp:

(WebCore::Layout::canUseSimplifiedTextMeasuring):

  • rendering/RenderText.cpp:

(WebCore::RenderText::computeCanUseSimplifiedTextMeasuring const):

Location:
trunk/Source/WebCore
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r267878 r267880  
     12020-10-02  Zalan Bujtas  <zalan@apple.com>
     2
     3        [LFC][IFC] Do not use simplified text measuring when soft hyphen is present
     4        https://bugs.webkit.org/show_bug.cgi?id=217224
     5
     6        Reviewed by Antti Koivisto.
     7
     8        Specifically the monospaced fast codepath computes incorrect widht value when soft hyphens are present.
     9
     10        * layout/layouttree/LayoutTreeBuilder.cpp:
     11        (WebCore::Layout::canUseSimplifiedTextMeasuring):
     12        * rendering/RenderText.cpp:
     13        (WebCore::RenderText::computeCanUseSimplifiedTextMeasuring const):
     14
    1152020-10-02  Andres Gonzalez  <andresg_22@apple.com>
    216
  • trunk/Source/WebCore/layout/layouttree/LayoutTreeBuilder.cpp

    r267648 r267880  
    107107
    108108    for (unsigned i = 0; i < content.length(); ++i) {
    109         if ((!whitespaceIsCollapsed && content[i] == '\t') || content[i] == noBreakSpace || content[i] >= HiraganaLetterSmallA)
     109        if ((!whitespaceIsCollapsed && content[i] == '\t') || content[i] == noBreakSpace || content[i] == softHyphen || content[i] >= HiraganaLetterSmallA)
    110110            return false;
    111111    }
  • trunk/Source/WebCore/rendering/RenderText.cpp

    r267734 r267880  
    12151215    auto whitespaceIsCollapsed = style().collapseWhiteSpace();
    12161216    for (unsigned i = 0; i < text().length(); ++i) {
    1217         if ((!whitespaceIsCollapsed && text()[i] == '\t') || text()[i] == noBreakSpace || text()[i] >= HiraganaLetterSmallA)
     1217        if ((!whitespaceIsCollapsed && text()[i] == '\t') || text()[i] == noBreakSpace || text()[i] == softHyphen || text()[i] >= HiraganaLetterSmallA)
    12181218            return false;
    12191219    }
Note: See TracChangeset for help on using the changeset viewer.