RESOLVED FIXED308087
REGRESSION (305325@main): Layout of columns is incorrect for some fonts
https://bugs.webkit.org/show_bug.cgi?id=308087
Summary REGRESSION (305325@main): Layout of columns is incorrect for some fonts
Brad Andalman
Reported 2026-02-17 15:53:41 PST
Created attachment 478392 [details] HTML using Fanwood that has a third column that's too low In our multi-column layouts, we expect that the baselines of each line match across the columns. In Safari Technology Preview 237 (and therefore in Tahoe 26.4 b1), this is no longer true. For some fonts, certain columns suddenly start much lower than they should. This bug seems dependent upon the font, font size, and text. However, I was able to reproduce this easily using Fanwood Text and Noto Sans, both used via Google Fonts. I will attach HTML and screenshots that illustrate this bug. (Note that in these attachments, the issue arises in the third column. I've set it up like this to avoid https://bugs.webkit.org/show_bug.cgi?id=284677, which affects the baselines across columns one and two.
Attachments
HTML using Fanwood that has a third column that's too low (2.03 KB, text/html)
2026-02-17 15:53 PST, Brad Andalman
no flags
HTML using Noto Sans that has a too-low third column (2.11 KB, text/html)
2026-02-17 15:54 PST, Brad Andalman
no flags
Screenshots of both Safari and STP 237 illustrating the bug using Fanwood (958.92 KB, image/png)
2026-02-17 15:55 PST, Brad Andalman
no flags
Screenshots of both Safari and STP 237 illustrating the bug using Noto Sans (818.37 KB, image/png)
2026-02-17 15:55 PST, Brad Andalman
no flags
Test reduction (399 bytes, text/html)
2026-02-20 11:26 PST, alan
no flags
Brad Andalman
Comment 1 2026-02-17 15:54:06 PST
Created attachment 478393 [details] HTML using Noto Sans that has a too-low third column
Brad Andalman
Comment 2 2026-02-17 15:55:00 PST
Created attachment 478394 [details] Screenshots of both Safari and STP 237 illustrating the bug using Fanwood
Brad Andalman
Comment 3 2026-02-17 15:55:27 PST
Created attachment 478395 [details] Screenshots of both Safari and STP 237 illustrating the bug using Noto Sans
Radar WebKit Bug Importer
Comment 4 2026-02-17 16:47:12 PST
Ahmad Saleem
Comment 5 2026-02-17 16:58:30 PST
It is broken on ToT (Minibrowser - 307727@main) as well. https://jsfiddle.net/92Lj0tas/ (without -webkit- prefixes), it works on both Firefox Nightly 149 and Chrome Canary 147 and don't have issue on third column.
Brad Andalman
Comment 6 2026-02-18 18:57:40 PST
I believe this changed in this commit: https://commits.webkit.org/305325@main (I downloaded the WebKit Build Archives for 305324@main and 305325@main, and the bug only appears in the latter.)
alan
Comment 7 2026-02-18 19:22:55 PST
Yeah, that's correct. I managed to trace it back to that commit too.
Tim Nguyen (:ntim)
Comment 8 2026-02-19 16:55:07 PST
alan
Comment 9 2026-02-20 11:26:10 PST
Created attachment 478429 [details] Test reduction
alan
Comment 10 2026-02-20 12:13:13 PST
Looks like ink overflow coming specifically from glyph overflow pushes content down. Ink overflow should have zero impact on line geometry.
EWS
Comment 11 2026-02-20 13:52:50 PST
Committed 307942@main (280cd6f5cdbb): <https://commits.webkit.org/307942@main> Reviewed commits have been landed. Closing PR #59040 and removing active labels.
alan
Comment 12 2026-02-20 18:44:21 PST
(In reply to alan from comment #10) > Looks like ink overflow coming specifically from glyph overflow pushes > content down. Ink overflow should have zero impact on line geometry. I misspoke. This is some pagination specific hack: // FIXME: For now we paginate using line overflow. This ensures that lines don't overlap at all when we // put a strut between them for pagination purposes. However, this really isn't the desired rendering, since // the line on the top of the next page will appear too far down relative to the same kind of line at the top // of the first column. ^^ comment from 2013. and that's exactly what's happening here: 305325@main introduced improved glyph overflow handling, and this font reports relatively large glyph overflow, and turning it to ink overflow causes the lines to be pushed downward.
alan
Comment 13 2026-02-21 06:38:42 PST
while ^^ is all correct, we slightly over-inflate glyph overflow and it causes paginated lines to shift. bug 308389 fixes the over-inflation and makes the attached test case pass.
EWS
Comment 14 2026-02-25 12:15:15 PST
Committed 305413.361@safari-7624-branch (3feee966809f): <https://commits.webkit.org/305413.361@safari-7624-branch> Reviewed commits have been landed. Closing PR #4551 and removing active labels.
Note You need to log in before you can comment on or make changes to this bug.