Closed Bug 1144501 Opened 10 years ago Closed 10 years ago

Inaccurate margin-right of horizontal rule (with vertical-rl writing-mode) in a horizontal block flow

Categories

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

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla40
Tracking Status
firefox40 --- fixed

People

(Reporter: bugzilla, Assigned: jfkthame)

References

(Blocks 1 open bug)

Details

(Keywords: testcase)

Attachments

(3 files)

Tests (with vendor-prefixes) ---------------------------- http://www.gtalbot.org/BrowserBugsSection/CSS3WritingModes/s71-horizontal-rule-vrl-004.xht http://www.gtalbot.org/BrowserBugsSection/CSS3WritingModes/s71-horizontal-rule-vlr-005.xht Expected results ---------------- http://www.gtalbot.org/BrowserBugsSection/CSS3WritingModes/s71-horizontal-rule-vrl-004-ref.xht Explanation ----------- The margin-right at the righthand side of the green bar should be exactly 8px and *not 18px*. Notes ----- - Those tests (along with 2 other horizontal-rule tests) have been submitted to the test.csswg.org repository http://lists.w3.org/Archives/Public/public-css-testsuite/2015Mar/0003.html but have not yet been reviewed - Chrome 41.0.2272.89 pass these 2 tests. IE11 and Prince 9.0.5 fail these 2 tests. - I am using Firefox 39.0a1 buildID=20150312145815 - I use Linux 3.16.0-31-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 - When vertically resizing the viewport, there is a reflow bug with these 2 tests. I will file another bug report for that issue.
Depends on: writing-mode
Keywords: testcase
Blocks: writing-mode
No longer depends on: writing-mode
FWIW, in a debug build these testcases also hit an assertion (several times): [58682] ###!!! ASSERTION: Shouldn't be incomplete if availableBSize is UNCONSTRAINED.: 'aReflowState.AvailableBSize() != NS_UNCONSTRAINEDSIZE', file /Users/jkew/mozdev/mozilla-inbound/layout/generic/nsBlockFrame.cpp, line 1571
The problem here isn't specific to <hr>; this testcase shows similar behavior with a <div>. What seems to be happening is that when the preceding block element (the <p>) has a bottom (block-end) margin, that is being incorrectly incorporated into the computation of the available block-size (width) for the vertical writing-mode block (the rule). This example includes four tests, with the <p> having a margin only on its top, right, bottom or left side. Note how in the case where it has a bottom margin, the width of the colored bar is reduced by the same amount; the other three cases render correctly.
This fixes the rendering of the testcases here, and gets rid of the assertion we're hitting. It also fixes the reflow error described in bug 1144505.
Attachment #8589109 - Flags: review?(smontagu)
Assignee: nobody → jfkthame
Status: NEW → ASSIGNED
Reftest based on the testcase here: the writing mode of the 'hr' div should not affect rendering.
Attachment #8589147 - Flags: review?(smontagu)
Attachment #8589109 - Flags: review?(smontagu) → review+
Attachment #8589147 - Flags: review?(smontagu) → review+
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Flags: in-testsuite+
Resolution: --- → FIXED
Target Milestone: --- → mozilla40
Depends on: 1243125
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: