Bug 214632

Summary: Incorrect baseline calculation for inline-block element with overflow value other than 'visible'
Product: WebKit Reporter: Maksim Ryzhikov <rv.maksim>
Component: Layout and RenderingAssignee: zalan <zalan>
Status: RESOLVED CONFIGURATION CHANGED    
Severity: Normal CC: ahmad.saleem792, bfulgham, mmaxfield, simon.fraser, webkit-bug-importer, zalan
Priority: P2 Keywords: BrowserCompat, InRadar
Version: Safari 13   
Hardware: Unspecified   
OS: macOS 10.15   
Attachments:
Description Flags
How code looks in Safari
none
How problem code looks in Chrome none

Description Maksim Ryzhikov 2020-07-22 02:32:41 PDT
Created attachment 404910 [details]
How code looks in Safari

Specification

https://www.w3.org/TR/CSS2/visudet.html#leading
> The baseline of an 'inline-block' is the baseline of its last line box in the normal flow, unless it has either no in-flow line boxes or if its 'overflow' property has a computed value other than 'visible', in which case the baseline is the bottom margin edge.

Code which reproduce the problem:

```
 <style>
   #foo {
     display: inline-block;
     background-color: magenta;
     overflow: hidden;
   }
 </style>
 <div id="app">
      <span>Hello</span>
      <span id="foo">World</span>
 </div>

```

Link on an example:
https://6w6ib.csb.app/
Comment 1 Maksim Ryzhikov 2020-07-22 02:34:06 PDT
Created attachment 404912 [details]
How problem code looks in Chrome
Comment 2 Radar WebKit Bug Importer 2020-07-23 17:42:40 PDT
<rdar://problem/66023320>
Comment 3 Ahmad Saleem 2022-12-19 18:42:40 PST
It seems it is working fine now in Safari 16.2.

@karlcow - can you double check please? Thanks in advance.
Comment 4 Ahmad Saleem 2023-02-18 16:09:46 PST
@Alan - It seems to match now with Chrome Canary. It seems to be IFC progression IMO.
Comment 5 zalan 2023-02-22 10:17:32 PST
yeah, it may very well be. Thank you!