[css-grid] [css-overflow] Weird interaction between subgrid and scrollbar (or scrollbar-gutter)
Categories
(Core :: Layout: Scrolling and Overflow, defect)
Tracking
()
Tracking | Status | |
---|---|---|
firefox125 | --- | fixed |
People
(Reporter: emilio, Assigned: TYLin)
References
Details
Attachments
(5 files)
STR:
- Open http://software.hixie.ch/utilities/js/live-dom-viewer/saved/12364
- Type a space in the textarea.
ER:
- Nothing, scrollbar-gutter keeps working.
AR:
- The checkboxes somehow go under the scrollbar-gutter until you resize (?)
Ting-Yu, you've been lucking at both grid and scrollbar-gutter, maybe you can take a look?
Reporter | ||
Comment 1•1 year ago
|
||
Assignee | ||
Comment 2•1 year ago
|
||
This bug doesn't require scrollbar-gutter, and is pre-existing with classic scrollbar. I reduced your testcase, and it can be reproduced with subgrid with overflow: scroll
.
When a grid container resolves the track size, it calls SubgridComputeMarginBorderPadding
[1] if the grid item is a subgrid. The method uses GetActualScrollbarSizes()
[2] if the subgrid is a scroll container. However, this is wrong because the subgrid and its scrollbars are not reflowed yet, which is warned on the doc [3].
This bug is not reproducible with original attached testcese because we'll reflow the frame tree twice at [4]. Testcase 2 uses overflow:scroll
to uncover this bug because we only reflow the entire frame tree once.
[1] https://searchfox.org/mozilla-central/rev/4fe00e0322377316390da6faa2d645cae53d08f4/layout/generic/nsGridContainerFrame.cpp#6575
[2] https://searchfox.org/mozilla-central/rev/4fe00e0322377316390da6faa2d645cae53d08f4/layout/generic/nsGridContainerFrame.cpp#3702-3703
[3] https://searchfox.org/mozilla-central/rev/4fe00e0322377316390da6faa2d645cae53d08f4/layout/generic/nsIScrollableFrame.h#120-121
[4] https://searchfox.org/mozilla-central/rev/4fe00e0322377316390da6faa2d645cae53d08f4/layout/generic/nsGfxScrollFrame.cpp#1048-1049,1081-1082
Assignee | ||
Updated•1 year ago
|
Assignee | ||
Comment 3•1 year ago
|
||
Updated•1 year ago
|
Assignee | ||
Comment 4•1 year ago
|
||
See https://bugzilla.mozilla.org/show_bug.cgi?id=1879770#c2 for an analysis.
Comment 7•1 year ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/8446073fb1d8
https://hg.mozilla.org/mozilla-central/rev/50bdb6f08609
Description
•