New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 597082 link

Starred by 1 user

Issue metadata

Status: Duplicate
Merged: issue 517265
Owner:
Closed: Mar 2016
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug



Sign in to add a comment

flexbox layout differs from firefox

Project Member Reported by ojan@chromium.org, Mar 22 2016

Issue description

http://jsbin.com/fimomohixu/edit?html,output

This page causes overflow in Firefox and not in Chrome. I'm not sure which behavior is correct per spec. The Chrome behavior makes a lot more sense to me.
 
Mergedinto: 517265
Status: Duplicate (was: Assigned)
Ah, position:absolute....

Sooo, I think Firefox's rendering is correct per an older version of the spec. I thought we implemented that part the same way as Firefox, but clearly we don't (?!). Basically that version requires absolutely positioned children of a flexbox to have a static position as if they were a 0x0 flex item in that DOM position. So the topleft corner is centered and then the rest follows, which of course leads to poor rendering.

Anyway, I'm not sure why we differ but the real fix is to implement the new version of the spec, which is  bug 517265  (note, in this case that will position the download button over the video, centered)
Hmm then again I'm not sure if that's what Firefox implements actually, Why does that end up so far right?

Comment 3 by dholb...@gmail.com, Mar 23 2016

I believe we (firefox) take the abspos element and...
 - We put its upper-left corner at its placeholder's position (which is around the center of the flex container)
 - We *also* honor its "width: 100%" -- so it sticks off the right side of the container, kind of like this awesome ascii art:

    ------------
   [     (......]......)
   [     (.....b]tn....)
   [     (......]......)
    ------------

As you can see there, the abspos child has ~100% width, and it's positioned at a static position which is the center of the flex container (in only one dimension in my diagram, for simplicity).  And the button is centered inside that abspos child.

Anyway -- I think this is correct *per and older spec version*, and the current-spec way to do things would be to position the absos thing as if it were the only flex item -- i.e. actually center the whole abspos thing inside of the flex container.

That would actually place it directly on top of the <video> -- this is what Edge does, and I think they're correct.

So, in short, neither Firefox nor Chrome are correct here. :)  Chrome is at least correct on the x-position of the button, but it's wrong on the y-position.

Comment 4 by gw...@microsoft.com, Mar 23 2016

I've attached a screenshot that shows FF/Edge/Chrome. For anyone that doesn't have the context reading this thread, Edge does have the static positioning change and renders how I would expect it to per spec text.
chrome-ff-edge.PNG
306 KB View Download

Sign in to add a comment