New issue
Advanced search Search tips

Issue 855102 link

Starred by 1 user

Issue metadata

Status: Assigned
Owner:
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Android , Windows , Chrome , Mac
Pri: 2
Type: Bug



Sign in to add a comment

Should vertical scroll position of element depending on box sizing and overflow?

Reported by f...@gmx.net, Jun 21 2018

Issue description

UserAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/67.0.3396.87 Safari/537.36

Steps to reproduce the problem:
1. Load test case at https://burningchrome.com/~fnd/_/736c2586-8642-4c08-af95-ac22f3051d7f.html#s2 (same as attached; note the fragment identifier).
2. Observe that the heading element's top border is hidden beneath Chrome's chrome.
3. Change the test case to remove `overflow: hidden` and reload (hard).
4. Observe that the heading element's top border is visible now.

In both Firefox 60.0.2 and Safari 11.1.1, the top border is visible irrespective of `overflow`.

What is the expected behavior?
According to #whatwg on FreeNode, this behavior is undefined per spec.

It would be nice if it was consistent across browsers. However, Chrome appears to be the deviant in this case.

What went wrong?
It appears that Chrome uses content-box to determine vertical scroll position with `overflow: auto`, yet border-box otherwise. This seems inconsistent, also when compared with other browsers.

Did this work before? N/A 

Does this work in other browsers? Yes

Chrome version: 67.0.3396.87  Channel: stable
OS Version: OS X 10.13.5
Flash Version: 

IRC discussion at https://freenode.logbot.info/whatwg/20180621#c1595824 ff.
 
testcase.html
573 bytes View Download
Components: Blink>Scroll
Cc: domfarolino@gmail.com
Summary: Should vertical scroll position of element depending on box sizing and overflow? (was: vertical scroll position for fragment identifier depends on overflow)
Cc: bokan@chromium.org sahel@chromium.org

Comment 4 by bokan@chromium.org, Jun 21 2018

Labels: OS-Android OS-Chrome OS-Linux OS-Windows
Owner: sunyunjia@chromium.org
Status: Assigned (was: Unconfirmed)
Agree this seems unintuitive and sounds like Chrome should change to match others.

sunyunjia@, this should be a small tweak in LayoutBox::ScrollRectToVisibleRecursive, could you take a look?

Sign in to add a comment