Closed Bug 1770516 Opened 2 years ago Closed 2 years ago

Firefox creates unnecessary scrollbar for content that overflows in one axis but is unreachable (off the "start" side) in the other axis

Categories

(Core :: Layout: Scrolling and Overflow, defect)

defect

Tracking

()

RESOLVED DUPLICATE of bug 1419142

People

(Reporter: dholbert, Unassigned)

Details

Attachments

(3 files)

STR:

  1. Load attached testcase.

ACTUAL RESULTS:
There's a usable scrollbar (the scrollframe has some non-trivial scrollable area)

EXPECTED RESULTS:
There should be no usable scrollbars. There is content that overflows off the end side in one axis, but it's positioned off the "start" edge of another axis, which makes it unreachable. It's not useful for this content to contribute to the scrollable area, since it doesn't intersect with the reachable portion of the scrollport.

Chrome gives EXPECTED RESULTS.

(I suspect this is a long-standing bug & perhaps a duplicate, but I can't find a matching report at the moment, so I'm just filing as new.)

Attachment #9277559 - Attachment description: testcase 1 → testcase 1 (shows a useless vertical scrollbar in Firefox)

It looks like we may need to fix this, in order to fix bug 1769060, to bring us back into interoperability about how to handle a certain category of hacked-together custom scrollbars.

(dshin, this might be a good one for you to look at when you have cycles.)

See also https://bugs.chromium.org/p/chromium/issues/detail?id=1327794#c11 where IanK gave a summary of Chromium's behavior on a related testcase. (In particular, they accumulate scrollable-overflow via rect union operations, just like we do. They don't e.g. track individual descendant rects and specifically exclude distant-descendants that happen to be outside the scrollport.)

Blocks: 1769060

(In reply to Daniel Holbert [:dholbert] from comment #2)

(In particular, they accumulate scrollable-overflow via rect union operations, just like we do. They don't e.g. track individual descendant rects and specifically exclude distant-descendants that happen to be outside the scrollport.)

Here's a testcase to illustrate this. Chrome matches the expectations expressed as text in this testcase; they show a tall scrollbar on the first scrollport but no scrollbar on the second one. In both of them, the actual tall thing is off the left side of the scrollport, but they differ RE whether that tall thing is parented by something (tiny) that's inside vs. outside the scrollport.

The relevant spec text here is (emphasis added by me):

The border boxes of all boxes for which it is the containing block and whose border boxes are positioned not wholly outside its block-start or inline-start padding edges, [...]

https://drafts.csswg.org/css-overflow-3/#scrollable

This spec text was added in https://github.com/w3c/csswg-drafts/commit/e90de20c82d412480a5f9e713763d37e6194e1fb
with a reference to https://github.com/w3c/csswg-drafts/issues/2006
which in turn points to bug 1419142, which I guess this one is a duplicate of.

I'll dupe this to that bug and transfer the bug relationships over there.

Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: