Open Bug 1491727 Opened 3 years ago Updated 2 years ago

Investigate the correctness of absolute positioning in a containing block that was split by a column-span

Categories

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

enhancement

Tracking

()

People

(Reporter: TYLin, Unassigned)

References

(Depends on 2 open bugs, Blocks 2 open bugs)

Details

Per dbaron's review comment in [1], we should investigate whether we correctly implement absolute positioning in a containing block that was split by a column-span before shipping column-span. See https://github.com/w3c/csswg-drafts/issues/1894

The behavior will be added in bug 1421105 in nsFrameConstructorState::ReparentAbsoluteItems().

[1] https://phabricator.services.mozilla.com/D5209#inline-22577
David, https://github.com/w3c/csswg-drafts/issues/1894 was resolved as "RESOLVED: Behavior already defined in CSS Fragmentation; file any issues there." 

Could you point to me which section of the CSS fragmentation spec defined this behavior?
Flags: needinfo?(dbaron)
I guess it's bits like:

>  Absolute positioning affects layout and thus interacts with fragmentation. Both the coordinate system and absolutely-positioned boxes belonging to a containing block will fragment across fragmentainers in the same fragmentation flow as the containing block. 
from https://drafts.csswg.org/css-break/#transforms

which I guess means that the positioning of the absolutely positioned element is relative to the entire fragmented flow, and it's then fragmented after being placed at that position.  (This is hard to implement for center-relative or bottom-relative positions.)
Depends on: 1158666, 846583
Flags: needinfo?(dbaron)
Summary: Invesigate corretness of absolute positioning in a containing block that was split by a column-span → Invesigate correctness of absolute positioning in a containing block that was split by a column-span

Firefox has long-standing issues such as bug 846583 and bug 1158666 that the absolute positioning elements are always positioned relative to the first fragment. In the multi-column world, they are positioned relative to the first -moz-column-content box in nsColumnSetFrame (i.e. the multicol line).

After introducing column-span, we can have multiple nsColumnSetFrames due to the column-span spit. The absolute positioning elements is moved to the correct nsColumnSetFrame, but their positions are still relative to the first column box in nsColumnSetFrame as before.

One can see how browsers lay out absolute positioning elements with different positions in this example (provided in the spec discussion).

David, do you feel strong about this bug continuing blocking ship-column-span? If not, I'd like to ship coulmn-span without fixing this bug because this doesn't seem easy to fix per comment #2.

Flags: needinfo?(dbaron)
Summary: Invesigate correctness of absolute positioning in a containing block that was split by a column-span → Investigate the correctness of absolute positioning in a containing block that was split by a column-span

Yeah, I'm ok shipping column-span without fixing this. Though it does seem like Chrome does substantially better on Rachel's test than we do, so it probably is worth looking into this set of bugs not too far in the future.

Flags: needinfo?(dbaron)

Thanks! Make this bug unblock bug 1426010.

No longer blocks: ship-column-span
Blocks: 1588623
You need to log in before you can comment on or make changes to this bug.