Closed Bug 1122366 Opened 10 years ago Closed 10 years ago

Margin collapsing and vertical writing-mode

Categories

(Core :: Layout: Block and Inline, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla38

People

(Reporter: bugzilla, Assigned: jfkthame)

References

(Blocks 1 open bug)

Details

(Keywords: testcase)

Attachments

(3 files)

4 tests involving collapse-through elements
-------------------------------------------

http://www.gtalbot.org/BrowserBugsSection/CSS3WritingModes/s74-margin-collapse-024.xht

http://www.gtalbot.org/BrowserBugsSection/CSS3WritingModes/s74-margin-collapse-025.xht

http://www.gtalbot.org/BrowserBugsSection/CSS3WritingModes/s74-margin-collapse-030.xht

http://www.gtalbot.org/BrowserBugsSection/CSS3WritingModes/s74-margin-collapse-031.xht

Expected result
---------------

http://www.gtalbot.org/BrowserBugsSection/CSS3WritingModes/ref-filled-green-100px-square.xht

Notes
-----

- Chrome 39.0.2171.99 and IE11 pass those 4 tests
- I am using Firefox 37.0a1 buildID=20150109145718
- I use Linux 3.16.0-29-generic x86_64, Qt: 4.8.6, KDE 4.14.1; Kubuntu (utopic) 14.10
- I've searched for duplicates and did not find any.

Gérard
Blocks: writing-mode
Keywords: testcase
Flags: needinfo?(smontagu)
Flags: needinfo?(jfkthame)
This happens because nsBlockFrame::IsSelfEmpty is not vertical-aware, and so it doesn't realize the zero-width <div>s here are empty and margins can collapse through them. With the attached patch, the testcases all work as expected.
Attachment #8550256 - Flags: review?(dbaron)
Assignee: nobody → jfkthame
Status: NEW → ASSIGNED
Inspection of the code suggests that nsInlineFrame::IsSelfEmpty also needs similar vertical-mode love. I'll add a patch for that after some additional testing.
Flags: needinfo?(smontagu)
Flags: needinfo?(jfkthame)
The comparable fix for nsInlineFrame.
Attachment #8550293 - Flags: review?(dbaron)
And here's a simple reftest based on the testcase here.
Attachment #8550294 - Flags: review?(dbaron)
Comment on attachment 8550293 [details] [diff] [review]
pt 2 - Also make nsInlineFrame::IsSelfEmpty aware of vertical writing modes

r=dbaron, although it seems like there should be a simpler way to write things like this
Attachment #8550293 - Flags: review?(dbaron) → review+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: