| Summary: | [LFC][IFC] Visually collapse hanging pre-wrap content. | ||||||
|---|---|---|---|---|---|---|---|
| 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
2020-01-11 12:12:31 PST
Created attachment 387441 [details]
Patch
Comment on attachment 387441 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=387441&action=review > Source/WebCore/layout/inlineformatting/InlineLineBuilder.cpp:237 > + visuallyCollapsePreWrapOverflowContent(); Shouldn't this depend on alignment somehow? (In reply to Antti Koivisto from comment #3) > Comment on attachment 387441 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=387441&action=review > > > Source/WebCore/layout/inlineformatting/InlineLineBuilder.cpp:237 > > + visuallyCollapsePreWrapOverflowContent(); > > Shouldn't this depend on alignment somehow? Yup, you are right (In reply to zalan from comment #4) > (In reply to Antti Koivisto from comment #3) > > Comment on attachment 387441 [details] > > Patch > > > > View in context: > > https://bugs.webkit.org/attachment.cgi?id=387441&action=review > > > > > Source/WebCore/layout/inlineformatting/InlineLineBuilder.cpp:237 > > > + visuallyCollapsePreWrapOverflowContent(); > > > > Shouldn't this depend on alignment somehow? > Yup, you are right It is actually the other way around. The unconditionally hanging whitespace should be ignored when it comes to horizontal alignment even if it places the trailing whitespace outside of the line box. -> "As the preserved spaces at the end of lines without a forced break must hang, they are not considered when placing the rest of the line during text alignment. When aligning towards the end, this means any such spaces will overflow, and will not prevent the rest of the line’s content from being flush with the edge of the line." There are some very nice visual examples at https://www.w3.org/TR/css-text-3/#white-space-phase-2 SLL seems to be retrofitting the hanging content width. Committed r254402: <https://trac.webkit.org/changeset/254402> |