Changeset 251973 in webkit


Ignore:
Timestamp:
Nov 3, 2019 7:10:28 AM (4 years ago)
Author:
Alan Bujtas
Message:

[LFC][IFC] Runs collapsed to zero advanced width are not always whitespace collapsed
https://bugs.webkit.org/show_bug.cgi?id=203778
<rdar://problem/56839642>

Reviewed by Antti Koivisto.

Just because a run collapses to zero advanced width, it does not necessarily mean it is a collapsed run (in whitespace collapsing sense)
e.g. trimmed trailing whitespace (m_collapsedToZeroAdvanceWidth should probably be renamed to something other than "collapsed" to avoid confusion).

  • layout/inlineformatting/InlineLine.cpp:

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

  • layout/inlineformatting/InlineLine.h:

(WebCore::Layout::Line::Run::setCollapsesToZeroAdvanceWidth):

Location:
trunk/Source/WebCore
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r251972 r251973  
     12019-11-03  Zalan Bujtas  <zalan@apple.com>
     2
     3        [LFC][IFC] Runs collapsed to zero advanced width are not always whitespace collapsed
     4        https://bugs.webkit.org/show_bug.cgi?id=203778
     5        <rdar://problem/56839642>
     6
     7        Reviewed by Antti Koivisto.
     8
     9        Just because a run collapses to zero advanced width, it does not necessarily mean it is a collapsed run (in whitespace collapsing sense)
     10        e.g. trimmed trailing whitespace (m_collapsedToZeroAdvanceWidth should probably be renamed to something other than "collapsed" to avoid confusion).
     11
     12        * layout/inlineformatting/InlineLine.cpp:
     13        (WebCore::Layout::Line::close):
     14        (WebCore::Layout::Line::appendTextContent):
     15        * layout/inlineformatting/InlineLine.h:
     16        (WebCore::Layout::Line::Run::setCollapsesToZeroAdvanceWidth):
     17
    1182019-11-03  Zalan Bujtas  <zalan@apple.com>
    219
  • trunk/Source/WebCore/layout/inlineformatting/InlineLine.cpp

    r251917 r251973  
    159159                return false;
    160160            // Visually empty runs are ignored.
    161             if (currentRun->isCollapsedToZeroAdvanceWidth())
     161            if (currentRun->isCollapsedToZeroAdvanceWidth() || previousRun->isCollapsedToZeroAdvanceWidth())
    162162                return false;
    163163            return true;
     
    464464    if (collapsesToZeroAdvanceWidth)
    465465        lineRun->setCollapsesToZeroAdvanceWidth();
    466     else if (collapsedRun)
     466    if (collapsedRun)
    467467        lineRun->setIsCollapsed();
    468468    if (isTrimmable)
  • trunk/Source/WebCore/layout/inlineformatting/InlineLine.h

    r251917 r251973  
    183183inline void Line::Run::setCollapsesToZeroAdvanceWidth()
    184184{
    185     setIsCollapsed();
    186185    m_collapsedToZeroAdvanceWidth = true;
    187186    m_displayRun.setLogicalWidth({ });
Note: See TracChangeset for help on using the changeset viewer.