Bug 205613 - [LFC][IFC] Keep the LineBreaker object around until after the line is closed.
Summary: [LFC][IFC] Keep the LineBreaker object around until after the line is closed.
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-12-27 20:21 PST by zalan
Modified: 2019-12-28 08:08 PST (History)
6 users (show)

See Also:


Attachments
Patch (24.49 KB, patch)
2019-12-27 20:53 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-12-27 20:21:00 PST
This is in preparation for being able to point to an earlier wrapping opportunity.
Comment 1 Radar WebKit Bug Importer 2019-12-27 20:21:22 PST
<rdar://problem/58222870>
Comment 2 zalan 2019-12-27 20:41:11 PST
        In order to be able to point back to an earlier line wrap opportunity on the line e.g.
        <div style="white-space: pre"><span style="white-space: normal">earlier_wrap opportunities</span> <span>can't_wrap_this content</span></div>
        the LineBreaker class needs more context.
        Currently (taking the example above), if the available space runs out somewhere around the second <span> we would just simply
        overflow the line since the overflowing content has a style saying "do not wrap".
        However the line has multiple earlier wrap opportunities inside the first <span>.
        Since we construct a LineBreaker object for each continuous run 

        1. [container start][earlier_wrap]
        2. [ ]
        3. [opportunities][container end]
        4. [ ]
        5. [container start][can't_wrap_this]
        6. [ ]
        7. [content][container end]

        the LineBreaker does not have enough context to point back to the last line wrap opportunity (after run #3).
Comment 3 zalan 2019-12-27 20:53:00 PST
Created attachment 386463 [details]
Patch
Comment 4 WebKit Commit Bot 2019-12-28 08:08:05 PST
Comment on attachment 386463 [details]
Patch

Clearing flags on attachment: 386463

Committed r253924: <https://trac.webkit.org/changeset/253924>
Comment 5 WebKit Commit Bot 2019-12-28 08:08:07 PST
All reviewed patches have been landed.  Closing bug.