⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 268821 in webkit


Ignore:
Timestamp:
Oct 21, 2020, 1:40:40 PM (6 years ago)
Author:
Alan Bujtas
Message:

[LFC][IFC] Line may be able to fit some more content when the current candidate is trimmable
https://bugs.webkit.org/show_bug.cgi?id=218044

Reviewed by Antti Koivisto.

This patch addresses the cases when the candidate content is partially/fully trimmable and
after putting the content on the line, there's still enough room to accommodate some more content.

  • layout/inlineformatting/InlineContentBreaker.cpp:

(WebCore::Layout::InlineContentBreaker::processOverflowingContent const):

Location:
trunk/Source/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r268820 r268821  
     12020-10-21  Zalan Bujtas  <zalan@apple.com>
     2
     3        [LFC][IFC] Line may be able to fit some more content when the current candidate is trimmable
     4        https://bugs.webkit.org/show_bug.cgi?id=218044
     5
     6        Reviewed by Antti Koivisto.
     7
     8        This patch addresses the cases when the candidate content is partially/fully trimmable and
     9        after putting the content on the line, there's still enough room to accommodate some more content. 
     10
     11        * layout/inlineformatting/InlineContentBreaker.cpp:
     12        (WebCore::Layout::InlineContentBreaker::processOverflowingContent const):
     13
    1142020-10-21  Chris Dumez  <cdumez@apple.com>
    215
  • trunk/Source/WebCore/layout/inlineformatting/InlineContentBreaker.cpp

    r267946 r268821  
    196196    if (continuousContent.hasTrailingCollapsibleContent()) {
    197197        ASSERT(isTextContent(continuousContent));
    198         auto IsEndOfLine = isContentWrappingAllowed(continuousContent) ? IsEndOfLine::Yes : IsEndOfLine::No;
    199198        // First check if the content fits without the trailing collapsible part.
    200199        if (continuousContent.nonCollapsibleLogicalWidth() <= lineStatus.availableWidth)
    201             return { Result::Action::Keep, IsEndOfLine };
     200            return { Result::Action::Keep, IsEndOfLine::No };
    202201        // Now check if we can trim the line too.
    203202        if (lineStatus.hasFullyCollapsibleTrailingRun && continuousContent.isFullyCollapsible()) {
    204203            // If this new content is fully collapsible, it should surely fit.
    205             return { Result::Action::Keep, IsEndOfLine };
     204            return { Result::Action::Keep, IsEndOfLine::No };
    206205        }
    207206    } else if (lineStatus.collapsibleWidth && isNonContentRunsOnly(continuousContent)) {
Note: See TracChangeset for help on using the changeset viewer.