Bug 249987 - Inapplicable top, bottom style shouldn't affect height calculation
Summary: Inapplicable top, bottom style shouldn't affect height calculation
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: Layout and Rendering (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords: BrowserCompat, InRadar
Depends on:
Blocks:
 
Reported: 2023-01-01 10:35 PST by Ahmad Saleem
Modified: 2023-08-03 17:47 PDT (History)
5 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ahmad Saleem 2023-01-01 10:35:47 PST
Hi Team,

While going through WebKit, I came across another failing test case in Safari 16.2 & Safari Technology Preview 160 while passing in Chrome Canary 111 and Firefox Nightly 110:

Test Case - https://jsfiddle.net/vrsmce24/

Blink Commit - https://chromium.googlesource.com/chromium/blink/+/034a32ac2e53bac07e201ba7cc1d6af6ebfd3dc5

I don't know whether it is possible to merge 1-1 but just wanted to raise so we can track it.

Thanks!
Comment 1 Ahmad Saleem 2023-01-04 01:10:37 PST
Seems we need to update this: https://searchfox.org/wubkat/source/Source/WebCore/rendering/RenderBoxModelObject.cpp#286
Comment 2 Radar WebKit Bug Importer 2023-01-04 16:53:37 PST
<rdar://problem/103893875>
Comment 3 Ahmad Saleem 2023-01-25 09:47:00 PST
NOTE - This issue seems to be something similar to cache related issues, because if I refresh same tab again, it passes. Very strange!
Comment 4 Ahmad Saleem 2023-08-03 17:47:17 PDT
We have this:

https://searchfox.org/wubkat/source/Source/WebCore/rendering/RenderBoxModelObject.cpp#268

 if (isOutOfFlowPositionedWithImplicitHeight(*cb))
        return nullptr;
    

and 'isOutOfFlowPositionedWithImplicitHeight' function is exactly as this patch:

static inline bool isOutOfFlowPositionedWithImplicitHeight(const RenderBoxModelObject& child)
{
    return child.isOutOfFlowPositioned() && !child.style().logicalTop().isAuto() && !child.style().logicalBottom().isAuto();
}