Bug 98611 - image not displayed in flexbox
Summary: image not displayed in flexbox
Alias: None
Product: WebKit
Classification: Unclassified
Component: Images (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Tony Chang
URL: http://jsbin.com/welcome/31308
: 95366 (view as bug list)
Depends on:
Blocks: 62048
  Show dependency treegraph
Reported: 2012-10-07 01:35 PDT by James Campos
Modified: 2012-10-08 18:52 PDT (History)
5 users (show)

See Also:

test case - image not displaying in flexbox (273 bytes, text/html)
2012-10-07 01:35 PDT, James Campos
no flags Details
with borders (325 bytes, text/html)
2012-10-08 12:08 PDT, Tony Chang
no flags Details
Patch (6.27 KB, patch)
2012-10-08 16:49 PDT, Tony Chang
no flags Details | Formatted Diff | Diff
Patch for landing (7.17 KB, patch)
2012-10-08 16:59 PDT, Tony Chang
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description James Campos 2012-10-07 01:35:50 PDT
Created attachment 167474 [details]
test case - image not displaying in flexbox

An image in a flexbox is not shown until the page is redrawn / repainted, eg by changing the window size.

The bug happens almost randomly - in webkit nightly / chrome 24 canary, the linked url will usually display the image correctly on first page load, and then exhibit the bug on refresh. In the attached file, in canary, the bug always happens; in nightly, the bug appears when the mouse is moved during page loads (?!).

All is fine on chrome 22 stable.
Comment 1 Ojan Vafai 2012-10-08 11:51:51 PDT
Looks like a paint or relayout issue. When I open the inspector, the image paints.
Comment 2 Tony Chang 2012-10-08 12:08:54 PDT
Created attachment 167582 [details]
with borders

Here's the same test case with a border on the flexbox.  You can see that the inner flexbox doesn't size correctly.  I think it's a race in reading the image dimensions, although I'm not sure how that's possible.
Comment 3 Ojan Vafai 2012-10-08 12:12:04 PDT
This sounds a lot like bug 95366.
Comment 4 Tony Chang 2012-10-08 14:44:29 PDT
This is easy to repro with a slow loading image:
Comment 5 Tony Chang 2012-10-08 16:49:12 PDT
Created attachment 167646 [details]
Comment 6 Ojan Vafai 2012-10-08 16:56:38 PDT
Comment on attachment 167646 [details]

Presumably you can remove css3/flexbox/flexitem-stretch-image.html from TestExpectations now?
Comment 7 Tony Chang 2012-10-08 16:59:18 PDT
Created attachment 167649 [details]
Patch for landing
Comment 8 Tony Chang 2012-10-08 17:00:56 PDT
*** Bug 95366 has been marked as a duplicate of this bug. ***
Comment 9 WebKit Review Bot 2012-10-08 18:52:17 PDT
Comment on attachment 167649 [details]
Patch for landing

Clearing flags on attachment: 167649

Committed r130714: <http://trac.webkit.org/changeset/130714>
Comment 10 WebKit Review Bot 2012-10-08 18:52:20 PDT
All reviewed patches have been landed.  Closing bug.