Changeset 251846 in webkit


Ignore:
Timestamp:
Oct 31, 2019 8:16:42 AM (5 years ago)
Author:
Alan Bujtas
Message:

[LFC][IFC] Set setIsCollapsed on the line item when its content is actually collapsed
https://bugs.webkit.org/show_bug.cgi?id=203655
<rdar://problem/56767543>

Reviewed by Antti Koivisto.

Do not set the isCollapsed flag on the line run unless we actually collapsed it (changed its length from greated than 1 to 1).

  • layout/inlineformatting/InlineLine.cpp:

(WebCore::Layout::Line::appendTextContent):

Location:
trunk/Source/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r251845 r251846  
     12019-10-31  Zalan Bujtas  <zalan@apple.com>
     2
     3        [LFC][IFC] Set setIsCollapsed on the line item when its content is actually collapsed
     4        https://bugs.webkit.org/show_bug.cgi?id=203655
     5        <rdar://problem/56767543>
     6
     7        Reviewed by Antti Koivisto.
     8
     9        Do not set the isCollapsed flag on the line run unless we actually collapsed it (changed its length from greated than 1 to 1).
     10
     11        * layout/inlineformatting/InlineLine.cpp:
     12        (WebCore::Layout::Line::appendTextContent):
     13
    1142019-10-31  Zalan Bujtas  <zalan@apple.com>
    215
  • trunk/Source/WebCore/layout/inlineformatting/InlineLine.cpp

    r251845 r251846  
    370370    }
    371371
    372     auto collapseRun = inlineItem.isCollapsible();
     372    auto collapsedRun = inlineItem.isCollapsible() && inlineItem.length() > 1;
    373373    auto contentStart = inlineItem.start();
    374     auto contentLength =  collapseRun ? 1 : inlineItem.length();
     374    auto contentLength =  collapsedRun ? 1 : inlineItem.length();
    375375    auto textContent = inlineItem.layoutBox().textContent().substring(contentStart, contentLength);
    376376    auto lineRun = makeUnique<Run>(inlineItem, Display::Run { inlineItem.style(), logicalRect, Display::Run::TextContext { contentStart, contentLength, textContent } });
     
    379379    if (collapsesToZeroAdvanceWidth)
    380380        lineRun->setCollapsesToZeroAdvanceWidth();
    381     else if (collapseRun)
     381    else if (collapsedRun)
    382382        lineRun->setIsCollapsed();
    383383    if (isTrimmable)
Note: See TracChangeset for help on using the changeset viewer.