Bug 113222 - REGRESSION(146272): Flex layout stretches image with max-wigth: 100% strangely
Summary: REGRESSION(146272): Flex layout stretches image with max-wigth: 100% strangely
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: Layout and Rendering (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar, Regression
Depends on:
Blocks: 62048
  Show dependency treegraph
 
Reported: 2013-03-25 10:56 PDT by Timothy Hatcher
Modified: 2017-07-18 08:30 PDT (History)
3 users (show)

See Also:


Attachments
Test Case (616 bytes, text/html)
2013-03-25 10:56 PDT, Timothy Hatcher
no flags Details
Problem as Seen in Safari Web Inspector (1.23 MB, image/png)
2013-03-25 10:58 PDT, Timothy Hatcher
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Timothy Hatcher 2013-03-25 10:56:26 PDT
Created attachment 194888 [details]
Test Case

The image with max-width: 100% extends outside the grounds of a flex container. This recently broke and was noticed in Safari's Web Inspector.

See the reduced test case.
Comment 1 Timothy Hatcher 2013-03-25 10:57:10 PDT
<rdar://problem/13493712>
Comment 2 Timothy Hatcher 2013-03-25 10:58:34 PDT
Created attachment 194889 [details]
Problem as Seen in Safari Web Inspector
Comment 3 Ojan Vafai 2013-03-25 11:46:20 PDT
Pretty sure it regressed in http://trac.webkit.org/changeset/146272 (it works correctly at r145978 for me). This should get fixed when bug 111790 is resolved.
Comment 4 Tony Chang 2013-03-25 11:50:34 PDT
As a work around, you can add min-width: 0 to the image.

The flexbox spec used to have a special min-width: auto that resolved to min-content, but since that resulted in unexpected behaviors most of the time, it got reverted.  See http://lists.w3.org/Archives/Public/www-style/2013Feb/0364.html for the discussion.  Bug 111790 is about going back to min-width: 0 as the default.
Comment 5 Timothy Hatcher 2013-03-25 13:01:04 PDT
Thanks!