Summary: | [LFC][IFC] Keep the LineBreaker object around until after the line is closed. | ||||||
---|---|---|---|---|---|---|---|
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-12-27 20:21:00 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). Created attachment 386463 [details]
Patch
Comment on attachment 386463 [details] Patch Clearing flags on attachment: 386463 Committed r253924: <https://trac.webkit.org/changeset/253924> All reviewed patches have been landed. Closing bug. |