| Summary: | [leading-trim][IFC] Add support for nested block containers with leading-trim: end | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Product: | WebKit | Reporter: | zalan <zalan> | ||||||||||
| Component: | Layout and Rendering | Assignee: | zalan <zalan> | ||||||||||
| Status: | RESOLVED FIXED | ||||||||||||
| Severity: | Normal | CC: | bfulgham, changseok, esprehn+autocc, ews-watchlist, glenn, koivisto, kondapallykalyan, pdr, simon.fraser, webkit-bug-importer, zalan | ||||||||||
| Priority: | P2 | Keywords: | InRadar | ||||||||||
| Version: | WebKit Nightly Build | ||||||||||||
| Hardware: | Unspecified | ||||||||||||
| OS: | Unspecified | ||||||||||||
| Bug Depends on: | |||||||||||||
| Bug Blocks: | 245599 | ||||||||||||
| Attachments: |
|
||||||||||||
|
Description
zalan
2022-12-06 19:48:33 PST
Created attachment 463913 [details]
Patch
Created attachment 463915 [details]
Patch
Comment on attachment 463915 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=463915&action=review > Source/WebCore/rendering/RenderBlockFlow.cpp:725 > + if (childrenInline()) { > + setLeadingTrimForSubtree(this); > + layoutInlineChildren(relayoutChildren, repaintLogicalTop, repaintLogicalBottom); > + adjustLeadingTrimAfterLayout(); > + return; > + } > + > + // With block children, there's no way to tell what the last formatted line is until after we finished laying out the subtree. > + setLeadingTrimForSubtree(); > + layoutBlockChildren(relayoutChildren, maxFloatLogicalBottom); > + adjustLeadingTrimAfterLayout(); setLeadingTrimForSubtree(this) vs setLeadingTrimForSubtree() is but subtle. Maybe a stack helper (LeadingTrimmer!) could make this bit less intrusive. (In reply to Antti Koivisto from comment #3) > Comment on attachment 463915 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=463915&action=review > > > Source/WebCore/rendering/RenderBlockFlow.cpp:725 > > + if (childrenInline()) { > > + setLeadingTrimForSubtree(this); > > + layoutInlineChildren(relayoutChildren, repaintLogicalTop, repaintLogicalBottom); > > + adjustLeadingTrimAfterLayout(); > > + return; > > + } > > + > > + // With block children, there's no way to tell what the last formatted line is until after we finished laying out the subtree. > > + setLeadingTrimForSubtree(); > > + layoutBlockChildren(relayoutChildren, maxFloatLogicalBottom); > > + adjustLeadingTrimAfterLayout(); > > setLeadingTrimForSubtree(this) vs setLeadingTrimForSubtree() is but subtle. > > Maybe a stack helper (LeadingTrimmer!) could make this bit less intrusive. yeah, good point! Created attachment 463925 [details]
[fast-cq]Patch
Created attachment 463929 [details]
[fast-cq]Patch
Committed 257526@main (be3537314eb4): <https://commits.webkit.org/257526@main> All reviewed patches have been landed. Closing bug and clearing flags on attachment 463929 [details]. |