WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
93411
percentage margins + flex incorrectly overflows the flexbox
https://bugs.webkit.org/show_bug.cgi?id=93411
Summary
percentage margins + flex incorrectly overflows the flexbox
Ojan Vafai
Reported
2012-08-07 16:56:22 PDT
See the test-case in the URL field. The problem is that RenderFlexibleBox::computeMainAxisPreferredSizes incorrectly uses the height for computing percentage margin-top/bottom in column flexboxes. As per CSS2.1 percentage margins and padding should always be computed WRT the containing block's width. When we call layoutIfNeeded in layoutAndPlaceChildren, the margin-top/bottom gets correctly set to the right value, so the flex items size and place correctly, but we compute the wrong preferred child size in RenderFlexibleBox::computeNextFlexLine if there is actually flex on any child.
Attachments
Patch
(6.48 KB, patch)
2012-08-07 18:55 PDT
,
Ojan Vafai
no flags
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Ojan Vafai
Comment 1
2012-08-07 18:55:38 PDT
Created
attachment 157083
[details]
Patch
Tony Chang
Comment 2
2012-08-07 19:08:10 PDT
Comment on
attachment 157083
[details]
Patch Stupid bug. Thanks for fixing.
Tony Chang
Comment 3
2012-08-07 19:44:59 PDT
We probably have the same bug with padding:
http://www.w3.org/TR/CSS21/box.html#padding-properties
WebKit Review Bot
Comment 4
2012-08-07 22:25:50 PDT
Comment on
attachment 157083
[details]
Patch Clearing flags on attachment: 157083 Committed
r124987
: <
http://trac.webkit.org/changeset/124987
>
WebKit Review Bot
Comment 5
2012-08-07 22:25:54 PDT
All reviewed patches have been landed. Closing bug.
Tony Chang
Comment 6
2012-08-13 00:05:57 PDT
(In reply to
comment #3
)
> We probably have the same bug with padding: >
http://www.w3.org/TR/CSS21/box.html#padding-properties
Nevermind. We never interact with style()->padding* directly so this isn't a problem.
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