Closed Bug 1711803 Opened 2 years ago Closed 2 years ago

Subgrid's scrollbar size shouldn't affect its grid area and children's position


(Core :: Layout: Grid, defect)






(Reporter: TYLin, Assigned: TYLin)




(1 file, 1 obsolete file)

This is a variant of bug 1709491.

In SubgridComputeMarginBorderPadding, we add the scrollbar sizes to subgrid->mMarginBorderPadding, so the subgrid's grid area can be different depending on whether the scrollbars are presented, or the scrollbars are the overlay scrollbars.

I think we should remove the two lines. Because if the subgrid has children that overflow, the overflow property on subgrid shouldn't affect subgrid children's position.

To figure out whether the scrollbar can affect the subgrid's grid area, I take a step back and write a test for ordinary grid containers. All the browsers agree that the scrollbars do occupy the grid container's content area if the grid area is implicit. However, if the grid area is explicit, the scrollbar doesn't occupy the content space.

So the question is: is subgrid's area implicit or explicit? From the subgrid section in the spec:

a. ... The grid lines thus shared between the subgrid and its parent form the subgrid’s explicit grid, and its track sizes are governed by the parent grid.

f. The subgrid does not have any implicit grid tracks in the subgridded dimension(s). ...

It seems to me that the subgrid's grid area is explicit and its size is defined by the parent grid container. So my proposed patch probably makes sense.

Mats, does above sound reasonable to you?

Flags: needinfo?(mats)
No longer blocks: 1527539

After reading Florian's comment, I can see my proposed patch makes classic scrollbar act like overlay scrollbar on subgrid, which doesn't make sense. Our current behavior is desired. I'm closing this as INVALID.

Closed: 2 years ago
Flags: needinfo?(mats)
Resolution: --- → INVALID
Attachment #9222531 - Attachment is obsolete: true
You need to log in before you can comment on or make changes to this bug.