Summary: | [LFC][IFC] Line::Run::expand should take a range of runs to merge | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | zalan <zalan> | ||||||
Component: | Layout and Rendering | Assignee: | zalan <zalan> | ||||||
Status: | RESOLVED FIXED | ||||||||
Severity: | Normal | CC: | bfulgham, commit-queue, koivisto, simon.fraser, webkit-bug-importer, zalan | ||||||
Priority: | P2 | Keywords: | InRadar | ||||||
Version: | WebKit Nightly Build | ||||||||
Hardware: | Unspecified | ||||||||
OS: | Unspecified | ||||||||
Attachments: |
|
Description
zalan
2019-11-22 07:05:27 PST
Created attachment 384150 [details]
Patch
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]); (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! Created attachment 384189 [details]
Patch
Comment on attachment 384189 [details] Patch Clearing flags on attachment: 384189 Committed r252807: <https://trac.webkit.org/changeset/252807> All reviewed patches have been landed. Closing bug. |