incorrect inline-size used for line breaking within nested block frames

RESOLVED FIXED in mozilla36

Status

()

Core
Layout: Block and Inline
RESOLVED FIXED
4 years ago
4 years ago

People

(Reporter: jfkthame, Assigned: smontagu)

Tracking

(Blocks: 1 bug)

unspecified
mozilla36
Points:
---
Bug Flags:
in-testsuite +

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(3 attachments)

(Reporter)

Description

4 years ago
See attached testcase (with a vertical-enabled build).

The size of the two red-bordered inner <div>s can be varied with the slider; the text within them is expected to re-wrap accordingly. In horizontal mode, all is well.

When writing-mode is set to vertical, note how the right-hand <div>, which contains a <p> rather than simply containing the text directly, does not wrap correctly to its containing <div>; its line-breaking stays unchanged.

Specifically, it looks like the <p> is wrapping its line *height* (inline-size) to the *width* of the green-bordered outer <div>, instead of to the height of its immediate container.
(Reporter)

Comment 1

4 years ago
Created attachment 8506092 [details]
Testcase for line-breaking an embedded <p> within a vertical <div>

And here's the testcase I meant to attach.
(Assignee)

Updated

4 years ago
Blocks: 1079125
No longer blocks: 145503
(Assignee)

Comment 2

4 years ago
Created attachment 8508086 [details] [diff] [review]
Patch: pass inline size, not width, to ComputeSize

The second hunk is the one that fixes the bug, but while I was there I checked other callers of ComputeSize and found the one in the first hunk as well.
Assignee: nobody → smontagu
Attachment #8508086 - Flags: review?(jfkthame)
(Reporter)

Comment 3

4 years ago
Comment on attachment 8508086 [details] [diff] [review]
Patch: pass inline size, not width, to ComputeSize

Review of attachment 8508086 [details] [diff] [review]:
-----------------------------------------------------------------

LGTM, thanks!
Attachment #8508086 - Flags: review?(jfkthame) → review+
(Assignee)

Comment 4

4 years ago
Created attachment 8508935 [details] [diff] [review]
(disabled) reftest
Attachment #8508935 - Flags: review?(jfkthame)
(Reporter)

Updated

4 years ago
Attachment #8508935 - Flags: review?(jfkthame) → review+
https://hg.mozilla.org/mozilla-central/rev/62c88e2cdf48
https://hg.mozilla.org/mozilla-central/rev/335a39df0c79
Status: NEW → RESOLVED
Last Resolved: 4 years ago
Flags: in-testsuite+
Resolution: --- → FIXED
Target Milestone: --- → mozilla36
You need to log in before you can comment on or make changes to this bug.