Closed Bug 1497990 Opened Last year Closed Last year

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


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




Tracking Status
firefox65 --- fixed


(Reporter: TYLin, Assigned: TYLin)



(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 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
Assignee: nobody → aethanyc
Pushed by
Part 1 - Use mIsBalancing instead of comparison between mBalanceColCount with INT32_MAX. r=dbaron
Part 2 - Do not carry block-end margin out of ColumnSetFrame. r=dbaron
Created web-platform-tests PR for changes under testing/web-platform/tests
Upstream web-platform-tests status checks passed, PR will merge once commit reaches central.
Closed: Last year
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.