WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
114940
<button> ignores child element's margin-bottom
https://bugs.webkit.org/show_bug.cgi?id=114940
Summary
<button> ignores child element's margin-bottom
zalan
Reported
2013-04-22 01:51:02 PDT
Created
attachment 199004
[details]
test reduction in the following code: <style> div { width:100px; border: 1px solid; margin-top: 100px; margin-bottom: 100px; } </style> <button><div></div></button> <div>'s margin-bottom is ignored and the button is rendered as if margin-bottom was 0px. We create a very simple subtree for <button> as follows: RenderButton 0x7fd81a033cb8 BUTTON RenderBlock (anonymous) 0x7fd81a051038 RenderBlock 0x7fd81a050e08 DIV
http://trac.webkit.org/changeset/143643
changed RenderButton's parent from RenderDeprecatedFlexibleBox to RenderFlexibleBox. Before
r143643
, both top and bottom margins were ignored. After
r143643
, now that RenderButton is a flexbox (isFlexibleBox()), the margin collapse code at RenderBlock::collapseMargins() prevents the <div>'s margin to be collapsed and it gets added to the height of the anonymous box. Firefox, Opera and IE10 respect the div's margin-bottom.
Attachments
test reduction
(188 bytes, text/html)
2013-04-22 01:51 PDT
,
zalan
no flags
Details
Patch
(1.39 KB, patch)
2013-04-30 12:23 PDT
,
Dave Hyatt
no flags
Details
Formatted Diff
Diff
Patch
(4.82 KB, patch)
2013-04-30 13:16 PDT
,
Dave Hyatt
bdakin
: review+
Details
Formatted Diff
Diff
Patch
(3.99 KB, patch)
2013-04-30 13:46 PDT
,
Dave Hyatt
bdakin
: review+
Details
Formatted Diff
Diff
Patch
(6.08 KB, patch)
2013-04-30 14:30 PDT
,
Dave Hyatt
bdakin
: review+
Details
Formatted Diff
Diff
Show Obsolete
(3)
View All
Add attachment
proposed patch, testcase, etc.
zalan
Comment 1
2013-04-22 02:17:12 PDT
<
rdar://problem/13704194
>
Dave Hyatt
Comment 2
2013-04-30 12:23:22 PDT
Created
attachment 200140
[details]
Patch
Dave Hyatt
Comment 3
2013-04-30 13:16:32 PDT
Created
attachment 200145
[details]
Patch
Dave Hyatt
Comment 4
2013-04-30 13:46:19 PDT
Created
attachment 200146
[details]
Patch
Dave Hyatt
Comment 5
2013-04-30 14:16:07 PDT
We start failing fast/block/margin-collapse/block-inside-inline/025.html with this change, so let me study it and see how to fix it.
Dave Hyatt
Comment 6
2013-04-30 14:30:45 PDT
Created
attachment 200149
[details]
Patch
Dave Hyatt
Comment 7
2013-04-30 15:39:18 PDT
Fixed in
r149407
.
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