Bug 130910 - width: fit-content fails to adjust for height resizing of content that keeps aspect ratio
Summary: width: fit-content fails to adjust for height resizing of content that keeps ...
Status: RESOLVED CONFIGURATION CHANGED
Alias: None
Product: WebKit
Classification: Unclassified
Component: CSS (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks: 38919
  Show dependency treegraph
 
Reported: 2014-03-28 12:31 PDT by bugmenot
Modified: 2022-07-13 17:11 PDT (History)
1 user (show)

See Also:


Attachments
testcase - red must not be visible to pass the test (2.48 KB, text/html)
2014-03-28 12:31 PDT, bugmenot
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
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.