Bug 130910

Summary: width: fit-content fails to adjust for height resizing of content that keeps aspect ratio
Product: WebKit Reporter: bugmenot
Component: CSSAssignee: Nobody <webkit-unassigned>
Status: RESOLVED CONFIGURATION CHANGED    
Severity: Normal CC: bfulgham
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on:    
Bug Blocks: 38919    
Attachments:
Description Flags
testcase - red must not be visible to pass the test none

Description bugmenot 2014-03-28 12:31:53 PDT
Created attachment 228078 [details]
testcase - red must not be visible to pass the test

When the aspect ratio of content such as an image is preserved and the height is changed via CSS animations, transitions or drag resizing, -webkit-fit-content on the parent element doesn't update to widen or narrow the width of the parent to match the new content width.

In the attached testcase the red background becomes visible in the top circle with preserved aspect ratio. The bottom circle without aspect ratio kept behaves as expected.
I've run the testcase in Gecko browsers and both circles behave correctly.

I tested width: intrinsic instead but that also failed in webkit similarly to fit-content
Comment 1 Brent Fulgham 2022-07-13 17:11:58 PDT
Safari, Chrome, and Firefox all agree on rendering for this test case. I don't believe there is any remaining compatibility issue.