Bug 230020

Summary: Empty div does not have correct bounding rect
Product: WebKit Reporter: Brad Andalman <bya>
Component: Layout and RenderingAssignee: Nobody <webkit-unassigned>
Status: RESOLVED DUPLICATE    
Severity: Normal CC: bfulgham, simon.fraser, zalan
Priority: P2    
Version: Safari Technology Preview   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
A simple webpage that illustrates the incorrect bounding rect
none
Correct rect in Safari 14.1.2
none
Incorrect rect in Safari 15.0, WebKit 17612.2.2
none
Rect in Chrome none

Description Brad Andalman 2021-09-07 13:08:59 PDT
Created attachment 437548 [details]
A simple webpage that illustrates the incorrect bounding rect

I use an empty div to indicate a column break. In the attached webpage, this div appears midway through the second column. And, yet, the most recent version of Safari Technology Preview (15.0, WebKit 17612.2.2) reports the bounding client rect as [0, 0, 0, 0]. This is not correct: while it doesn't have a height, it is clearly not positioned at [0,0].

The rect is correctly reported on Safari 14.1.2. I've also checked Chrome, just for fun, and that works as I'd expect too.
Comment 1 Brad Andalman 2021-09-07 13:09:47 PDT
Created attachment 437549 [details]
Correct rect in Safari 14.1.2
Comment 2 Brad Andalman 2021-09-07 13:10:23 PDT
Created attachment 437550 [details]
Incorrect rect in Safari 15.0, WebKit 17612.2.2
Comment 3 Brad Andalman 2021-09-07 13:10:42 PDT
Created attachment 437551 [details]
Rect in Chrome
Comment 4 Simon Fraser (smfr) 2021-09-07 14:14:19 PDT

*** This bug has been marked as a duplicate of bug 229747 ***
Comment 5 Simon Fraser (smfr) 2021-09-07 16:25:48 PDT
I confirmed that was was fixed in r282063.