Bug 204514 - [LFC][IFC] Line::Run::expand should take a range of runs to merge
Summary: [LFC][IFC] Line::Run::expand should take a range of runs to merge
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Layout and Rendering (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: zalan
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2019-11-22 07:05 PST by zalan
Modified: 2019-11-22 15:06 PST (History)
6 users (show)

See Also:


Attachments
Patch (9.49 KB, patch)
2019-11-22 07:19 PST, zalan
no flags Details | Formatted Diff | Diff
Patch (12.87 KB, patch)
2019-11-22 13:06 PST, zalan
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description zalan 2019-11-22 07:05:27 PST
instead of merging one by one
Comment 1 Radar WebKit Bug Importer 2019-11-22 07:06:03 PST
<rdar://problem/57428139>
Comment 2 zalan 2019-11-22 07:19:04 PST
Created attachment 384150 [details]
Patch
Comment 3 Antti Koivisto 2019-11-22 07:36:18 PST
Comment on attachment 384150 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=384150&action=review

> Source/WebCore/layout/inlineformatting/InlineLine.cpp:315
> +            auto& trailingRun = m_inlineItemRuns[i + 1];
> +            if (!ContinousContent::canMergeRuns(*m_inlineItemRuns[i], *trailingRun))
>                  break;
> -            runList.last().expand(*nextRun);
> -            // Skip the merged run.
> -            ++i;
> +            continousContent.append(*trailingRun);

Maybe the canMergeRuns call could be done in ContinousContent too? Like instead of append do something like

continousContent.mergeIfNeeded(*m_inlineItemRuns[i], m_inlineItemRuns[i + 1]);
Comment 4 zalan 2019-11-22 08:08:40 PST
(In reply to Antti Koivisto from comment #3)
> Comment on attachment 384150 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=384150&action=review
> 
> > Source/WebCore/layout/inlineformatting/InlineLine.cpp:315
> > +            auto& trailingRun = m_inlineItemRuns[i + 1];
> > +            if (!ContinousContent::canMergeRuns(*m_inlineItemRuns[i], *trailingRun))
> >                  break;
> > -            runList.last().expand(*nextRun);
> > -            // Skip the merged run.
> > -            ++i;
> > +            continousContent.append(*trailingRun);
> 
> Maybe the canMergeRuns call could be done in ContinousContent too? Like
> instead of append do something like
> 
> continousContent.mergeIfNeeded(*m_inlineItemRuns[i], m_inlineItemRuns[i +
> 1]);
good idea!
Comment 5 zalan 2019-11-22 13:06:37 PST
Created attachment 384189 [details]
Patch
Comment 6 WebKit Commit Bot 2019-11-22 15:06:09 PST
Comment on attachment 384189 [details]
Patch

Clearing flags on attachment: 384189

Committed r252807: <https://trac.webkit.org/changeset/252807>
Comment 7 WebKit Commit Bot 2019-11-22 15:06:11 PST
All reviewed patches have been landed.  Closing bug.