Open Bug 1419142 Opened 7 years ago Updated 2 years ago

Scrollbars being created when not required

Categories

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

defect

Tracking

()

People

(Reporter: apalmer, Unassigned)

References

(Blocks 2 open bugs)

Details

(Keywords: testcase)

Attachments

(1 file)

User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:57.0) Gecko/20100101 Firefox/57.0
Build ID: 20171112125346

Steps to reproduce:

Look at this post on reddit.  The code section of the original post has two virtical scrollbars.  When you view this in Chrome it has none.
The scrollbars also do nothing when you try to use them.

https://www.reddit.com/r/PowerShell/comments/7e8tkt/help_with_a_script_to_copy_to_a_local_folder_and/


Actual results:

Scrollbars are being rendered that are not required.


Expected results:

No scrollbars
Component: Untriaged → Layout
Product: Firefox → Core
Attached file Testcase
https://drafts.csswg.org/css-overflow/#scrolling-direction
"Due to Web-compatibility constraints (caused by authors exploiting legacy bugs to surreptitiously hide content from visual readers but not search engines and/or speech output), UAs must clip the scrollable overflow region of scroll containers on the block-start and inline-start sides of the box (thereby behaving as if they had no scrollable overflow on that side)."

I read that as specifying the behavior in Firefox, not Chrome.

David, since you're listed as an editor of that spec, can you clarify please?
Flags: needinfo?(dbaron)
Keywords: testcase
OS: Unspecified → All
Hardware: Unspecified → All
So my understanding is that the difference you're talking about is that Gecko does what the spec text in comment 2 says, whereas what Chromium does is that if a box is entirely above the scrollport or entirely to the right of the scrollport, then that box does not contribute to scrollable overflow in either dimension.

I recall raising that issue at some point, but I can't find it.

The text you cite was added in https://hg.csswg.org/drafts/rev/01821f08744d524d6d532462444f3ef7912198e6 so it doesn't necessarily imply that it was intended to take a position on one versus the other.

Did you check what any browsers other than Chrome and Gecko did?
Flags: needinfo?(mats)
Edge has two scrollbars like Firefox, Safari has none like Chrome.
Flags: needinfo?(mats)
Priority: -- → P3
https://github.com/w3c/csswg-drafts/issues/2006#issuecomment-353124462
"RESOLVED: Specify the webkit/blink behavior for issue #2006"

The discussion mentions that Blink/WebKit are inconsistent in some
cases though, so I think we need to wait for the updated spec text
before attempting to implement this.
Status: UNCONFIRMED → NEW
Ever confirmed: true
Blocks: 1769060
See Also: → 1769060
See Also: → 1517287

Canceling the ni from comment 2, since it was answered via a spec update that makes a scrollport exclude boxes "wholly outside its block-start or inline-start padding edges" from contributing scrollable overlow.
https://drafts.csswg.org/css-overflow-3/#scrollable

Flags: needinfo?(dbaron)
Severity: normal → S3
Duplicate of this bug: 1803693
Blocks: 1764321
Component: Layout → Layout: Scrolling and Overflow
Version: 57 Branch → Trunk

ni=me to come up with some testcases and/or spec analysis to see if this is just direct children vs. nested descendants of partially-in-scrollport children.

Flags: needinfo?(dholbert)

Aha, looks like I came up with a testcase of this sort in bug 1770516 already (see bug 1770516 comment 3 - 4).

Testcase: https://bug1770516.bmoattachments.org/attachment.cgi?id=9279349

Based on the first part there (which is expected to create a scrollbar & does do so in all browsers), It looks like we're OK to keep doing our "union the descendants" approach, and we only need to consider whether the overflow-rect is wholly outside the scrollport at the topmost level.

Flags: needinfo?(dholbert)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: