WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED DUPLICATE of
bug 83572
85490
Nested CSS flexbox renders flexbox items outside the containing block
https://bugs.webkit.org/show_bug.cgi?id=85490
Summary
Nested CSS flexbox renders flexbox items outside the containing block
Victor Carbune
Reported
2012-05-03 06:28:59 PDT
Created
attachment 139998
[details]
ComparisonScreenshot Context layout, main flexbox container: * Flexbox Item 1 has flex: 1, and is itself a flexbox, with two divs as flexbox items. * Flexbox Item 2 which is just a div with text. Both flexbox containers have direction set to 'column' and alignment set to 'end' Problem: The two divs of are rendered outside the containing block. This only happens with -webkit-flexbox, not with -webkit-box.
Attachments
ComparisonScreenshot
(21.48 KB, image/jpeg)
2012-05-03 06:28 PDT
,
Victor Carbune
no flags
Details
html pages
(1.01 KB, application/zip)
2012-05-03 06:31 PDT
,
Victor Carbune
no flags
Details
View All
Add attachment
proposed patch, testcase, etc.
Victor Carbune
Comment 1
2012-05-03 06:31:01 PDT
Created
attachment 139999
[details]
html pages
Tony Chang
Comment 2
2012-05-03 09:51:20 PDT
Sorry, I was on out the last few weeks. I'll take a look at this today.
Tony Chang
Comment 3
2012-05-03 09:56:13 PDT
Err, I meant to write that on
bug 83572
. This may be the same bug.
Caio Marcelo de Oliveira Filho
Comment 4
2012-05-03 12:37:18 PDT
Looking at the code, it seems strange to me that RenderFlexibleBox::computeAvailableFreeSpace(), when the flexbox have an override height (which I'm guessing was set by the outer flexbox in this case), we don't take in account the preferredMainAxisSize when returning. However, even subtracting the preferredMainAxisSize, the content is still not correctly positioned, the bottom margins seems to be not counted here, so the Text Line 2 is too close to the edge. Tony or Ojan, I'm also trying to turn this into a layout test. Is changing the text nodes into divs with predictable size and checking offset{Top,Bottom,Height,Width} be a good approach?
Tony Chang
Comment 5
2012-05-03 13:02:02 PDT
Yup, this is the same bug. (In reply to
comment #4
)
> Looking at the code, it seems strange to me that RenderFlexibleBox::computeAvailableFreeSpace(), when the flexbox have an override height (which I'm guessing was set by the outer flexbox in this case), we don't take in account the preferredMainAxisSize when returning. > > However, even subtracting the preferredMainAxisSize, the content is still not correctly positioned, the bottom margins seems to be not counted here, so the Text Line 2 is too close to the edge.
Right, we need to also subtract the padding, border and scrollbar size. I.e., it's the difference between content height and height.
> > Tony or Ojan, I'm also trying to turn this into a layout test. Is changing the text nodes into divs with predictable size and checking offset{Top,Bottom,Height,Width} be a good approach?
I have a fix for this. I'll include a similar case in my layout test. *** This bug has been marked as a duplicate of
bug 83572
***
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug