Closed Bug 1151993 Opened 9 years ago Closed 9 years ago

apply shrink-wrapping to orthogonal block frames

Categories

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

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla40
Tracking Status
firefox40 --- fixed

People

(Reporter: jfkthame, Assigned: jfkthame)

References

(Blocks 1 open bug)

Details

Attachments

(4 files)

Attached file Testcase
See attached testcase. For the vertical <div> between the two horizontal paragraphs, we use the height of the outer containing <div> as its available isize, which is a good start. But when it contains only a small amount of text (right-hand example) we should shrink-wrap it instead of maintaining the containing block's height as a fixed inline-size for the orthogonal block.

(This is what webkit/blink does.)
This seems to make the example behave as desired.
Attachment #8589242 - Flags: review?(smontagu)
Assignee: nobody → jfkthame
Status: NEW → ASSIGNED
Does this match what the spec says to do?
(In reply to David Baron [:dbaron] ⏰UTC-7 from comment #2)
> Does this match what the spec says to do?

I think so, as best I can understand it. In particular, "If a box establishing an orthogonal flow is a block container ... for the case where the box’s inline size is auto: ... if the content neither line-wraps nor fragments ... the used inline size is the max-content inline size of the box’s contents".[1] Which I take to mean that the used height of the "Hello World" block in the example here is simply the length of the "Hello World" text.

[1] http://dev.w3.org/csswg/css-writing-modes/#auto-multicol
Flags: needinfo?(jfkthame)
Turns out the patch here causes an existing test to fail, but in this case that's OK: the corrected behavior makes far more sense, and we should just fix the reference file to reflect the new reality.
Attachment #8589496 - Flags: review?(smontagu)
Attachment #8589242 - Flags: review?(smontagu) → review+
Attachment #8589332 - Flags: review?(smontagu) → review+
Attachment #8589496 - Flags: review?(smontagu) → review+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: