Closed Bug 1497990 Opened 6 years ago Closed 6 years ago

Block end margin of the last child in a column container sometimes gets carry out

Categories

(Core :: Layout: Columns, defect, P3)

defect

Tracking

()

RESOLVED FIXED
mozilla65
Tracking Status
firefox65 --- fixed

People

(Reporter: TYLin, Assigned: TYLin)

Details

Attachments

(3 files, 1 obsolete file)

Attached file block-end-margin.html (obsolete) —
Steps to reproduce:
Open the attached test case.

Expected result:
One green rectangle.

Actual result:
Two green rectangles.


Note: if changing the column-count to 1 or div:last-child's margin-bottom to 16px, the result is expected. 

So I suspect this is something related to our column balancing code.
Attached file block-end-margin.html
This is the correct test case to reproduce the issue.
Attachment #9016032 - Attachment is obsolete: true
David, is it correct that that no matter how we handle the margin-bottom of the last child (bug 1487927), the margin-bottom of the last child should not collapse with the column container's margin-bottom like this?
Flags: needinfo?(dbaron)
Yes, this margin should not get carried out (and the pass condition in the test looks correct), and I think that follows from the resolution in https://github.com/w3c/csswg-drafts/issues/2582 that column boxes create a block formatting context (BFC).
Flags: needinfo?(dbaron)
Also, if it's a result of column-balancing, it may be related to bug 1487927 and https://github.com/w3c/csswg-drafts/issues/3073
Assignee: nobody → aethanyc
Status: NEW → ASSIGNED
Pushed by aethanyc@gmail.com:
https://hg.mozilla.org/integration/autoland/rev/7ab933887623
Part 1 - Use mIsBalancing instead of comparison between mBalanceColCount with INT32_MAX. r=dbaron
https://hg.mozilla.org/integration/autoland/rev/730a64fdde3e
Part 2 - Do not carry block-end margin out of ColumnSetFrame. r=dbaron
Created web-platform-tests PR https://github.com/web-platform-tests/wpt/pull/14011 for changes under testing/web-platform/tests
Upstream web-platform-tests status checks passed, PR will merge once commit reaches central.
https://hg.mozilla.org/mozilla-central/rev/7ab933887623
https://hg.mozilla.org/mozilla-central/rev/730a64fdde3e
Status: ASSIGNED → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla65
QA Whiteboard: [good first verify]

I have reproduced this bug with Nightly 64.0a1 (2018-10-10) on Windows 7, 64 Bit! This bug's fix is verified with latest Beta 65.0b10!

Build ID : 20190110221328
User Agent : Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:65.0) Gecko/20100101 Firefox/65.0

QA Whiteboard: [good first verify] → [good first verify] [testday20190111]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: