Closed Bug 1523582 Opened 1 year ago Closed 5 months ago

The border of box that is split by a column-span shouldn't have border on all sides

Categories

(Core :: Layout: Columns, defect, P3)

defect

Tracking

()

RESOLVED FIXED
mozilla71
Tracking Status
firefox67 --- wontfix
firefox71 --- fixed

People

(Reporter: mats, Assigned: TYLin)

References

(Blocks 1 open bug)

Details

(Keywords: testcase)

Attachments

(6 files)

STR

  1. set "layout.css.column-span.enabled" to true in about:config
  2. load the attached testcase

ACTUAL RESULTS
The two parts of the block with the blue border
render a border on all sides.

EXPECTED RESULTS
The first part should have suppressed its bottom border.
The second part should have suppressed its top border.

Duplicate of this bug: 1504063
Blocks: column-span

Bulk moving bugs that have been triaged P4 to P3 (P4 is reserved for WPT bugs).

Priority: P4 → P3
Depends on: 1506293
Assignee: nobody → aethanyc
Status: NEW → ASSIGNED

nsBlockDebugFlags.h defines NOISY_BLOCK_DIR_MARGINS, which is used in
nsBlockFrame. Include it in nsBlockReflowContext.cpp so that when
NOISY_BLOCK_DIR_MARGINS is defined, the log is printed in
nsBlockReflowContext.cpp as well.

Remove unused NOISY_MAX_ELEMENT_SIZE and REALLY_NOISY_MAX_ELEMENT_SIZE.

Frames split by column-span are linked together by non-fluid
continuations. We want GetLogicalSkipSides() to recognize that. The
documentation in nsIFrame::GetLogicalSkipSides() already
uses continuation rather than in-flow, so no need to adjust the
wording.

However, after patching GetLogicalSkipSides(), the first column-content
after a column-span split starts to skip the block-start side because it
has a previous continuation. We want the content in the first column to
consider applying its block-start margin. Hence the modification in
BlockReflowInput's constructor. (Note that the first column-content is
always a block-start margin-root, which is fixed in the previous part.)
This is necessary to avoid breaking
testing/web-platform/tests/css/css-multicol/multicol-span-all-margin-bottom-001.xht

In multicol-span-all-children-height-006.html, add "margin-top: 1em;" to
the container to expose the bug if we still check GetPrevInFlow() rather
than GetPrevContinuation() when computing applyBStartMargin in
nsBlockFrame::ReflowBlockFrame().

Depends on D43904

NS_BLOCK_FORMATTING_CONTEXT_STATE_BITS is set on column-contents when
creating a column container on elements like <fieldset> or <button>, or
when a column container has a float style or absolute position. (See
nsCSSFrameConstructor::ConstructNonScrollableBlockWithConstructor()).

To compute block-start and block-end margin root correctly for
column-contents, we remove the bit for column-contents. This is needed
after applying the next part to avoid breaking
layout/reftests/columns/fieldset-columns-001.html

An alternative idea is that we can always compute aBStartMarginRoot or
aBEndMarginRoot for column-contents regardless NS_BLOCK_MARGIN_ROOT bit,
but it seems nicer to be consistent that NS_BLOCK_MARGIN_ROOT is not set
on all column-contents.

Depends on D44028

Attachment #9088966 - Attachment description: Bug 1523582 Part 2 - Unset NS_BLOCK_MARGIN_ROOT bit for -moz-column-content to make the margin root computation correct. → Bug 1523582 Part 2 - Make -moz-column-content a BFC when column-span is enabled.
Attachment #9089168 - Attachment description: Bug 1523582 Part 4 - Modify failures.list and regenerate reftest.list. → Bug 1523582 Part 4 - Support comment at the end of line in failures.list, and regenerate reftest.list.
Blocks: 1579565
Pushed by aethanyc@gmail.com:
https://hg.mozilla.org/integration/autoland/rev/1533c2919c7c
Part 1 - Use NOISY_BLOCK_DIR_MARGINS to control log print in nsBlockReflowContext. r=dbaron
https://hg.mozilla.org/integration/autoland/rev/1e447195b68c
Part 2 - Make -moz-column-content a BFC when column-span is enabled. r=dbaron
https://hg.mozilla.org/integration/autoland/rev/be8883d72832
Part 3 - Adjust GetLogicalSkipSides() to check non-fluid continuations. r=dbaron
https://hg.mozilla.org/integration/autoland/rev/edaa11a26547
Part 4 - Support comment at the end of line in failures.list, and regenerate reftest.list. r=dbaron
https://hg.mozilla.org/integration/autoland/rev/c4b6564e69a2
Part 5 - Update test expectations. r=dbaron
Created web-platform-tests PR https://github.com/web-platform-tests/wpt/pull/18944 for changes under testing/web-platform/tests
Upstream web-platform-tests status checks passed, PR will merge once commit reaches central.
Upstream PR merged by moz-wptsync-bot
You need to log in before you can comment on or make changes to this bug.