RESOLVED FIXED323287
REGRESSION (Safari 27): line-height quirk not applied inside inline-block
https://bugs.webkit.org/show_bug.cgi?id=323287
Summary REGRESSION (Safari 27): line-height quirk not applied inside inline-block
Kanta Ebihara
Reported 2026-09-03 00:38:39 PDT
Created attachment 481281 [details] test case for reproduction Overview: In quirks/limited-quirks mode documents, the CSS line-height quirks (https://quirks.spec.whatwg.org/) require that an ancestor's line-height not be used as a strut for line boxes that contain glyphs. Safari 27 does not consistently apply this quirk when the line boxes are inside a nested display: inline-block element that has no line-height of its own, making the inline-block render taller than expected. Steps to Reproduce: 1. Save the attached repro.html. It uses a legacy DOCTYPE (XHTML 1.0 Transitional with a system identifier) that triggers limited-quirks mode. 2. Open it in Safari. 3. Read the .box offsetHeight printed on the page, or compare its visible (shaded) height. Actual Results: .box measures 54px tall in Safari 27 (read via .box.offsetHeight, also printed on the page by the test page itself), rather than the expected 36px. This is consistent with the inherited 38px line-height from .outer being applied as a strut to only one of the two inner lines (38 + 16 = 54), rather than being ignored for both as the quirk requires. Expected Results: .box should be 36px tall (20 + 16), per the line-height quirks referenced above. Additional info: - Reproduces in Safari Technology Preview Release 251. - Does not reproduce in Safari 26, which render the expected 36px. - Does not reproduce with <!DOCTYPE html> (no-quirks/standards mode); these quirks only apply in quirks/limited-quirks mode documents. - Build/OS: Safari Technology Preview Release 251, Safari 26.6.2 on macOS Tahoe 26.6.2
Attachments
test case for reproduction (1.01 KB, text/html)
2026-09-03 00:38 PDT, Kanta Ebihara
no flags
Screenshot after 320514@main (60.16 KB, image/png)
2026-09-04 09:24 PDT, alan
no flags
Radar WebKit Bug Importer
Comment 1 2026-09-03 16:40:59 PDT
alan
Comment 2 2026-09-03 19:50:44 PDT
EWS
Comment 3 2026-09-04 08:19:39 PDT
Committed 320514@main (5204a1a34fa4): <https://commits.webkit.org/320514@main> Reviewed commits have been landed. Closing PR #73217 and removing active labels.
alan
Comment 4 2026-09-04 08:21:02 PDT
Thank you for filing this bug report and for the great test case! This is fixed on trunk now.
alan
Comment 5 2026-09-04 09:24:18 PDT
Created attachment 481300 [details] Screenshot after 320514@main
Anne van Kesteren
Comment 6 2026-10-17 07:32:12 PDT
Submitted web-platform-tests pull request: https://github.com/web-platform-tests/wpt/pull/63832
Note You need to log in before you can comment on or make changes to this bug.