Content are drawn onto the bottom border of a container across columns with "box-decoration-break: clone"
Categories
(Core :: Layout: Block and Inline, defect, P3)
Tracking
()
Tracking | Status | |
---|---|---|
firefox99 | --- | fixed |
People
(Reporter: TYLin, Assigned: TYLin)
Details
Attachments
(3 files)
See the attached columns-box-decoration-break.html
. The container
having box-decoration-break:clone
are fragmented into two columns, and its child block
shouldn't being drawn onto the container's bottom border in the first column.
I think the code that leads to this result is in [1] or somewhere in nsBlockFrame::ComputeFinalBSize()
.
Updated•4 years ago
|
Assignee | ||
Comment 1•2 years ago
|
||
Assignee | ||
Comment 2•2 years ago
|
||
If a block container has box-decoration-break:clone, its block-end border and
padding (BP) are usually drawn at the block-end edge in the current
column/page. Thus, when computing the available block-size for its children, we
should subtract its block-end border BP from it.
BlockReflowInput::ContentBSize()
is the correct content-box block-size the
block container precomputed in BlockReflowInput's constructor. See
https://searchfox.org/mozilla-central/rev/c12a59323ee46b29b90c9917a3a7a70ea714ffec/layout/generic/BlockReflowInput.cpp#118-126
The remove hunk was a hack, working only for ColumnSetWrapper with
box-decoration-break:clone
. It's no longer needed.
When I claim the block-end BP are usually drawn at the block-end edge, the
exception is that the block container with a definite block-size runs out of its
block-size in a column/page. In this case, the block-end BP is drawn at the
block-end edge of its content-box. The sub-tests having
box-decoration-break:clone
border in box-decoration-break-bug-1249913.html
is such examples. It may seem strange that the overflowing lime boxes cannot
extend to the block-end edge of the first column, but this is expected as of
this patch because we subtract the block-end BP from the available block-size.
Depends on D138366
Updated•2 years ago
|
Updated•2 years ago
|
Pushed by aethanyc@gmail.com: https://hg.mozilla.org/integration/autoland/rev/51cb3ac09506 Part 1 - Make BlockReflowInput::ComputeBlockAvailSpace return the result rect. r=emilio https://hg.mozilla.org/integration/autoland/rev/aeaea91a4f58 Part 2 - Fix available block-size for block children in block container with box-decoration-break:clone. r=dholbert,emilio
Created web-platform-tests PR https://github.com/web-platform-tests/wpt/pull/32827 for changes under testing/web-platform/tests
Comment 5•2 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/51cb3ac09506
https://hg.mozilla.org/mozilla-central/rev/aeaea91a4f58
Upstream PR merged by moz-wptsync-bot
Description
•