New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 157855 link

Starred by 132 users

Comments by non-members will not trigger notification emails to users who starred this issue.

Issue metadata

Status: Fixed
Owner:
Closed: Jun 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: All
Pri: 2
Type: Launch-OWP
Launch-Accessibility: ----
Launch-Exp-Leadership: ----
Launch-Leadership: ----
Launch-Legal: ----
Launch-M-Approved: 61-Dev , 61-Beta , 61-Stable
Launch-M-Target: 61-Dev , 61-Beta , 61-Stable
Launch-Privacy: ----
Launch-Security: ----
Launch-Test: ----
Launch-UI: ----
Rollout-Type: ----


Sign in to add a comment

document.documentElement.scrollTop/Left is always zero (body is the scrollingElement even in strict mode)

Reported by maisqi...@gmail.com, Oct 25 2012

Issue description

UserAgent: Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.4 (KHTML, like Gecko) Chrome/22.0.1229.94 Safari/537.4

Steps to reproduce the problem:
1. Get scrollTop/Left on a page bigger then the viewport;

What is the expected behavior?
It should not return zero (unless we're at the top of the page, obviously). Also, nothing changes if we change these properties. The scrolling doesn't change and it keeps returning zero.

What went wrong?
Webkit puts the scrolling positions on document.body, when all others browsers put it on document.documentElement.

Example URL:
http://maisqi.com/outros/bugs/chrome/CHN6

Does it occur on multiple sites: Yes

Is it a problem playing media? No

Is it a problem with a plugin? No 

Did this work before? No 

Does this work in other browsers? Yes IE8, Opera 11, Firefox 16

Chrome version: 22.0.1229.94  Channel: stable
OS Version: 6.1 (Windows 7, Windows Server 2008 R2)

There's already a bug on Webkit -- https://bugs.webkit.org/show_bug.cgi?id=9248. I hope you can get around it.
 
Showing comments 57 - 156 of 156 Older
Owner: rbyers@chromium.org
Mike: If it's OK with you, let's assign this to me for now while I try to get consensus on our path forward.  The only actual code change required is to flip the RuntimeEnabledFeatures when we decide it's OK (and eventually remove the flag / old code entirely).  If you prefer to have that honor it's fine with me - but I'll commit to at least doing the crappy part ;-) 
@rbyers (re: comment #56):

are you saying there is no way to change document and body scroll offsets with scrollLeftTopInterop disabled, or is it also problematic with it enabled?

Comment 59 by zcorpan@gmail.com, Feb 9 2015

> +simonp who is going to point us to the recommendation for developers

See https://github.com/operasoftware/devopera/issues/242 - an article will eventually appear on dev.opera.com
Labels: -Pri-1 -M-42 M-43 MovedFrom-42 Pri-2
[AUTO] This issue is Pri-1 but has already been moved once, therefore lowering to Pri-2 and moving to next milesone.
Labels: -M-43 -Pri-2 M-44 Pri-1
Can we plan on just making this change (early) in M44 - regardless of whether we've convinced Facebook to change yet or not?  I suspect they'll have no trouble changing once our fix hits beta (or stable).

Independently I'm trying to reach out to facebook now  issue 342307 .
The fix suggested in https://github.com/operasoftware/devopera/issues/242 (which compares the `scrollHeight` of `documentElement` and `body`) does not seem to work in Chrome with experimental Web Platform features enabled.

Has anyone come up with any newer recommendations since February that works for existing browser versions as well as Chrome M44?
Blockedon: chromium:469835
Cc: majidvp@chromium.org
It's the suggestion here you're following, right?  https://gist.github.com/dperini/ac3d921d6a08f10fd10e

Ah, damn - looks like we have a bug in scrollHeight when experimental web platform features is enabled.  Filed  issue 469835 .

We'll get that bug fixed ASAP so that body.scrollHeight will return 0 in the common case  (outside quirks mode), as per spec.  

In the meantime, is there another good approach for detection?  There are other possible tests (eg. you can set the body scrollTop to non-zero and then test it), but I'm not sure how brittle they'd be.  Looking at scrollHeight seems most rational to me...

Comment 66 Deleted

Looks like the scrollHeight detection does not work after all.

> In Firefox, it returns the body if the body has `height: 100%` (tested on google.com).

CORRECTION: It works in Firefox, but this feature detection only works if the viewport is scrollable. (I guess this is a reasonable limitation. I'll try to think of a use case where the element responsible for scrolling the viewport must be known without having enough content to scroll the viewport.)

It also returns the body in IE 8-11 (tested on facebook.com).

Comment 68 Deleted

Yeah it's not clear what behavior you'd want when the document isn't scrollable at all (technically neither element is the scroll element, so probably either would suffice).  You can probably change the '>' to '>=' to get the documentElement in that case.

Regarding IE, I see that it's returning the document height for body.scrollHeight, and so also has the bug described in  issue 469835  (perhaps to be compatible with us).  I'll reach out to an engineer there for comment.
Blockedon: chromium:426181
Blockedon: chromium:475531
Note that I'm adding an explicit API (document.scrollingElement) to make migration of existing code trivial:  issue 475531 .

Comment 72 Deleted

Comment 73 Deleted

Comment 74 Deleted

Comment 75 Deleted

Comment 76 Deleted

Comment 77 Deleted

 Issue 2891  has been merged into this issue.
Blockedon: chromium:304768
Looks like this issue goes back 10 years, sigh.... https://bugs.webkit.org/show_bug.cgi?id=5991
Project Member

Comment 81 by bugdroid1@chromium.org, May 7 2015

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/3f362dc40ef117a8265e3a6126dd6252fd2ef1c5

commit 3f362dc40ef117a8265e3a6126dd6252fd2ef1c5
Author: rbyers <rbyers@chromium.org>
Date: Thu May 07 16:20:31 2015

Add entry to about:flags for scrollTopLeftInterop

This adds easy UI for developers to test Chrome's new standard-compliant
scrollTop behavior before we make it the default (and for people to
easily check whether turning it off resolves issues shortly after it
becomes the default behavior).

BUG= 157855 

Review URL: https://codereview.chromium.org/1130073002

Cr-Commit-Position: refs/heads/master@{#328772}

[modify] http://crrev.com/3f362dc40ef117a8265e3a6126dd6252fd2ef1c5/chrome/app/generated_resources.grd
[modify] http://crrev.com/3f362dc40ef117a8265e3a6126dd6252fd2ef1c5/chrome/browser/about_flags.cc
[modify] http://crrev.com/3f362dc40ef117a8265e3a6126dd6252fd2ef1c5/tools/metrics/histograms/histograms.xml

Summary: document.documentElement.scrollTop/Left is always zero (body is the scrollingElement even in strict mode) (was: document.documentElement.scrollTop/Left is zero)
Labels: TE-Verified-M44 TE-Verified-44.0.2389.0
rbyers@ : Verified the issue on Win 7, Mac 10.9.5 and Ubuntu 14.04 on M 44.0.2398.0  by enabling the flag #scroll-top-left-interop, and then ran the document.documentElement.scrollLeft and document.documentElement.scrollTop in the console of http://maisqi.com/outros/bugs/chrome/CHN6 and now its returning values.
Please find the screen cast for the same.

Hence added the TE-Verified labels for the same.
157855_May_12.mp4
538 KB Download
Labels: -M-44 M-45
Blockedon: chromium:441582
Project Member

Comment 86 by bugdroid1@chromium.org, May 20 2015

The following revision refers to this bug:
  http://src.chromium.org/viewvc/blink?view=rev&rev=195624

------------------------------------------------------------------
r195624 | rbyers@chromium.org | 2015-05-20T17:07:48.714062Z

Changed paths:
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/fast/events/autoscroll-should-not-stop-on-keypress.html?r1=195624&r2=195623&pathrev=195624
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/fast/events/drag-and-drop-autoscroll-frameset-expected.txt?r1=195624&r2=195623&pathrev=195624
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/fast/events/scroll-to-anchor-in-overflow-hidden.html?r1=195624&r2=195623&pathrev=195624
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/fast/events/frame-scroll-fake-mouse-move.html?r1=195624&r2=195623&pathrev=195624
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/fast/scroll-behavior/main-frame-element-scrollTo.html?r1=195624&r2=195623&pathrev=195624
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/fast/autoresize/autoresize-with-iframe.html?r1=195624&r2=195623&pathrev=195624
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/platform/win/fast/events/platform-wheelevent-paging-xy-in-scrolling-page-expected.txt?r1=195624&r2=195623&pathrev=195624
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/fast/events/autoscroll-with-non-scrollable-parent.html?r1=195624&r2=195623&pathrev=195624
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/fast/css/zoom-body-scroll.html?r1=195624&r2=195623&pathrev=195624
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/compositing/rtl/rtl-fixed-overflow-scrolled.html?r1=195624&r2=195623&pathrev=195624
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/fast/events/fire-scroll-event.html?r1=195624&r2=195623&pathrev=195624
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/platform/win/fast/events/platform-wheelevent-paging-x-in-scrolling-page-expected.txt?r1=195624&r2=195623&pathrev=195624
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/fast/events/touch/gesture/touch-gesture-scroll-page-zoomed-expected.txt?r1=195624&r2=195623&pathrev=195624
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/fast/events/touch/gesture/touch-gesture-fully-scrolled-iframe-propagates-expected.txt?r1=195624&r2=195623&pathrev=195624
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/fast/events/touch/gesture/touch-gesture-noscroll-body-xhidden-expected.txt?r1=195624&r2=195623&pathrev=195624
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/http/tests/navigation/anchor-frames-expected.txt?r1=195624&r2=195623&pathrev=195624
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/http/tests/fouc/scroll-left-while-loading.html?r1=195624&r2=195623&pathrev=195624
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/http/tests/navigation/anchor-frames-same-origin-expected.txt?r1=195624&r2=195623&pathrev=195624
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/fast/events/autoscroll.html?r1=195624&r2=195623&pathrev=195624
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/editing/input/reveal-selection-having-stored-scroll-position.html?r1=195624&r2=195623&pathrev=195624
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/fast/autoresize/turn-off-autoresize-expected.txt?r1=195624&r2=195623&pathrev=195624
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/fast/scroll-behavior/subframe-scrollTo.html?r1=195624&r2=195623&pathrev=195624
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/fast/events/touch/gesture/touch-gesture-scroll-page-zoomed.html?r1=195624&r2=195623&pathrev=195624
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/fast/events/touch/gesture/touch-gesture-fully-scrolled-iframe-propagates.html?r1=195624&r2=195623&pathrev=195624
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/fast/events/touch/gesture/touch-gesture-noscroll-iframe-expected.txt?r1=195624&r2=195623&pathrev=195624
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/fast/events/touch/gesture/touch-gesture-noscroll-body-xhidden.html?r1=195624&r2=195623&pathrev=195624
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/fast/loader/scroll-position-restored-on-back-at-load-event-expected.txt?r1=195624&r2=195623&pathrev=195624
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/fast/scroll-behavior/subframe-element-scrollBy.html?r1=195624&r2=195623&pathrev=195624
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/fast/scroll-behavior/main-frame-scrollLeft.html?r1=195624&r2=195623&pathrev=195624
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/fast/events/resources/drag-and-drop-autoscroll-frame.js?r1=195624&r2=195623&pathrev=195624
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/fast/autoresize/turn-off-autoresize.html?r1=195624&r2=195623&pathrev=195624
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/fast/events/scroll-in-scaled-page-with-overflow-hidden-expected.txt?r1=195624&r2=195623&pathrev=195624
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/fast/scroll-behavior/subframe-scroll.html?r1=195624&r2=195623&pathrev=195624
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/fast/events/touch/gesture/touch-gesture-noscroll-iframe.html?r1=195624&r2=195623&pathrev=195624
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/fast/scroll-behavior/subframe-interrupted-scroll.html?r1=195624&r2=195623&pathrev=195624
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/fast/frames/transparent-scrollbar.html?r1=195624&r2=195623&pathrev=195624
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/fast/loader/scroll-position-restored-on-back-at-load-event.html?r1=195624&r2=195623&pathrev=195624
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/platform/mac/fast/events/platform-wheelevent-paging-y-in-scrolling-page-expected.txt?r1=195624&r2=195623&pathrev=195624
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/fast/events/scroll-in-scaled-page-with-overflow-hidden.html?r1=195624&r2=195623&pathrev=195624
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/fast/scroll-behavior/subframe-scrollTop.html?r1=195624&r2=195623&pathrev=195624
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/compositing/rtl/rtl-absolute-overflow-scrolled.html?r1=195624&r2=195623&pathrev=195624
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/fast/forms/input-readonly-autoscroll.html?r1=195624&r2=195623&pathrev=195624
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/fast/scroll-behavior/main-frame-element-scroll.html?r1=195624&r2=195623&pathrev=195624
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/fast/events/scale-and-scroll-body-expected.txt?r1=195624&r2=195623&pathrev=195624
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/fast/spatial-navigation/snav-unit-overflow-and-scroll-in-direction.html?r1=195624&r2=195623&pathrev=195624
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/fast/events/scale-and-scroll-iframe-body-expected.txt?r1=195624&r2=195623&pathrev=195624
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/fast/scroll-behavior/main-frame-scrollBy.html?r1=195624&r2=195623&pathrev=195624
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/fast/css/resize-corner-tracking-touch.html?r1=195624&r2=195623&pathrev=195624
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/fast/events/touch/resources/compositor-touch-hit-rects-iframe-nested.html?r1=195624&r2=195623&pathrev=195624
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/fast/forms/resources/common.js?r1=195624&r2=195623&pathrev=195624
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/fast/events/tab-focus-link-with-scroll-expected.txt?r1=195624&r2=195623&pathrev=195624
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/platform/mac/fast/events/platform-wheelevent-paging-x-in-scrolling-page-expected.txt?r1=195624&r2=195623&pathrev=195624
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/fast/repaint/resources/iframe-scroll-repaint-iframe.html?r1=195624&r2=195623&pathrev=195624
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/fast/events/platform-wheelevent-paging-x-in-non-scrolling-page-expected.txt?r1=195624&r2=195623&pathrev=195624
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/fast/events/drag-and-drop-autoscroll-mainframe-expected.txt?r1=195624&r2=195623&pathrev=195624
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/fast/loader/scroll-position-restoration-for-history-api-expected.txt?r1=195624&r2=195623&pathrev=195624
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/fast/events/touch/gesture/touch-gesture-noscroll-body-yhidden-expected.txt?r1=195624&r2=195623&pathrev=195624
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/fast/events/touch/gesture/touch-gesture-scroll-page-expected.txt?r1=195624&r2=195623&pathrev=195624
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/fast/events/scale-and-scroll-body.html?r1=195624&r2=195623&pathrev=195624
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/fast/events/scale-and-scroll-iframe-body.html?r1=195624&r2=195623&pathrev=195624
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/fast/events/drag-and-drop-autoscroll-inner-frame-expected.txt?r1=195624&r2=195623&pathrev=195624
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/fast/multicol/scrolling-overflow.html?r1=195624&r2=195623&pathrev=195624
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/fast/scroll-behavior/subframe-element-scrollTo.html?r1=195624&r2=195623&pathrev=195624
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/fast/events/tab-focus-link-with-scroll.html?r1=195624&r2=195623&pathrev=195624
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/fast/forms/select/listbox-scroll-to-selection-expected.txt?r1=195624&r2=195623&pathrev=195624
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/fast/events/platform-wheelevent-paging-x-in-non-scrolling-page.html?r1=195624&r2=195623&pathrev=195624
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/fast/events/scale-and-scroll-window-expected.txt?r1=195624&r2=195623&pathrev=195624
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/fast/loader/scroll-position-restoration-for-history-api.html?r1=195624&r2=195623&pathrev=195624
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/fast/events/touch/gesture/touch-gesture-scroll-page.html?r1=195624&r2=195623&pathrev=195624
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/fast/events/touch/gesture/touch-gesture-noscroll-body-yhidden.html?r1=195624&r2=195623&pathrev=195624
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/fast/events/drag-and-drop-autoscroll-inner-frame.html?r1=195624&r2=195623&pathrev=195624
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/fast/events/touch/gesture/touch-gesture-scroll-iframe-expected.txt?r1=195624&r2=195623&pathrev=195624
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/fast/events/touch/resources/compositor-touch-hit-rects-iframe-fixed.html?r1=195624&r2=195623&pathrev=195624
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/fast/events/touch/gesture/touch-gesture-scroll-iframe-editable-expected.txt?r1=195624&r2=195623&pathrev=195624
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/fast/loader/scroll-position-restored-on-reload-at-load-event-expected.txt?r1=195624&r2=195623&pathrev=195624
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/fast/scrolling/fractional-scroll-offset-document-expected.txt?r1=195624&r2=195623&pathrev=195624
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/fast/multicol/scrolling-overflow-expected.html?r1=195624&r2=195623&pathrev=195624
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/scrollbars/scrollbar-large-overflow-rectangle.html?r1=195624&r2=195623&pathrev=195624
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/fast/forms/select/listbox-scroll-to-selection.html?r1=195624&r2=195623&pathrev=195624
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/fast/events/autoscroll-in-overflow-hidden-html.html?r1=195624&r2=195623&pathrev=195624
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/fast/events/scale-and-scroll-window.html?r1=195624&r2=195623&pathrev=195624
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/fast/events/touch/gesture/touch-gesture-scroll-iframe.html?r1=195624&r2=195623&pathrev=195624
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/fast/forms/autofocus-opera-003.html?r1=195624&r2=195623&pathrev=195624
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/fast/dom/anchor-without-content.html?r1=195624&r2=195623&pathrev=195624
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/fast/events/platform-wheelevent-paging-xy-in-scrolling-page.html?r1=195624&r2=195623&pathrev=195624
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/fast/scroll-behavior/main-frame-scrollTo.html?r1=195624&r2=195623&pathrev=195624
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/fast/scroll-behavior/subframe-scrollLeft.html?r1=195624&r2=195623&pathrev=195624
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/fast/events/touch/gesture/touch-gesture-scroll-iframe-editable.html?r1=195624&r2=195623&pathrev=195624
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/fast/loader/scroll-position-restored-on-reload-at-load-event.html?r1=195624&r2=195623&pathrev=195624
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/http/tests/navigation/resources/frame-with-anchor.html?r1=195624&r2=195623&pathrev=195624
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/fast/scrolling/fractional-scroll-offset-document.html?r1=195624&r2=195623&pathrev=195624
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/fast/scrolling/hover-during-scroll-expected.txt?r1=195624&r2=195623&pathrev=195624
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/fast/harness/archived-results-dashboard.html?r1=195624&r2=195623&pathrev=195624
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/fast/events/platform-wheelevent-paging-y-in-scrolling-page.html?r1=195624&r2=195623&pathrev=195624
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/http/tests/navigation/resources/frame-with-anchor-same-origin.html?r1=195624&r2=195623&pathrev=195624
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/fast/events/scroll-after-click-on-tab-index-expected.txt?r1=195624&r2=195623&pathrev=195624
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/fast/frames/iframe-scroll-page-up-down.html-disabled?r1=195624&r2=195623&pathrev=195624
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/fast/scroll-behavior/main-frame-scroll-in-standards-mode-expected.txt?r1=195624&r2=195623&pathrev=195624
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/fast/scroll-behavior/main-frame-element-scrollBy.html?r1=195624&r2=195623&pathrev=195624
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/fast/events/touch/gesture/touch-gesture-scroll-iframe-not-propagated-expected.txt?r1=195624&r2=195623&pathrev=195624
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/fast/scrolling/hover-during-scroll.html?r1=195624&r2=195623&pathrev=195624
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/fast/scroll-behavior/main-frame-scroll.html?r1=195624&r2=195623&pathrev=195624
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/platform/mac/fast/events/platform-wheelevent-paging-xy-in-scrolling-page-expected.txt?r1=195624&r2=195623&pathrev=195624
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/fast/events/touch/gesture/touch-gesture-scroll-page-propagated-expected.txt?r1=195624&r2=195623&pathrev=195624
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/fast/scroll-behavior/main-frame-interrupted-scroll.html?r1=195624&r2=195623&pathrev=195624
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/fast/events/scroll-after-click-on-tab-index.html?r1=195624&r2=195623&pathrev=195624
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/fast/events/scale-and-scroll-iframe-window-expected.txt?r1=195624&r2=195623&pathrev=195624
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/fast/transforms/selection-bounds-in-transformed-view.html?r1=195624&r2=195623&pathrev=195624
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/fast/scroll-behavior/main-frame-scroll-in-standards-mode.html?r1=195624&r2=195623&pathrev=195624
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/fast/events/platform-wheelevent-paging-x-in-scrolling-page.html?r1=195624&r2=195623&pathrev=195624
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/fast/html/empty-fragment-id-goto-top-expected.txt?r1=195624&r2=195623&pathrev=195624
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/fast/events/platform-wheelevent-paging-y-in-non-scrolling-page-expected.txt?r1=195624&r2=195623&pathrev=195624
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/fast/events/touch/resources/compositor-touch-hit-rects-iframe.html?r1=195624&r2=195623&pathrev=195624
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/fast/events/touch/gesture/touch-gesture-scroll-iframe-not-propagated.html?r1=195624&r2=195623&pathrev=195624
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/fast/scroll-behavior/subframe-element-scroll.html?r1=195624&r2=195623&pathrev=195624
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/editing/pasteboard/copy-crash.html?r1=195624&r2=195623&pathrev=195624
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/fast/autoresize/basic-expected.txt?r1=195624&r2=195623&pathrev=195624
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/fast/scroll-behavior/subframe-scrollBy.html?r1=195624&r2=195623&pathrev=195624
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/fast/scroll-behavior/main-frame-scrollTop.html?r1=195624&r2=195623&pathrev=195624
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/fast/dom/scroll-position-for-new-loads.html?r1=195624&r2=195623&pathrev=195624
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/fast/overflow/overflow-dirty-relayout-boundary-no-crash.html?r1=195624&r2=195623&pathrev=195624
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/fast/events/touch/gesture/touch-gesture-scroll-page-propagated.html?r1=195624&r2=195623&pathrev=195624
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/dialog/modal-dialog-scroll-height.html?r1=195624&r2=195623&pathrev=195624
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/fast/events/scale-and-scroll-iframe-window.html?r1=195624&r2=195623&pathrev=195624
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/fast/events/autoscroll-should-not-stop-on-keypress-expected.txt?r1=195624&r2=195623&pathrev=195624
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/fast/html/empty-fragment-id-goto-top.html?r1=195624&r2=195623&pathrev=195624
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/fast/events/platform-wheelevent-paging-y-in-non-scrolling-page.html?r1=195624&r2=195623&pathrev=195624
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/TestExpectations?r1=195624&r2=195623&pathrev=195624
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/compositing/scissor-out-of-viewport.html?r1=195624&r2=195623&pathrev=195624
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/platform/win/fast/events/platform-wheelevent-paging-y-in-scrolling-page-expected.txt?r1=195624&r2=195623&pathrev=195624
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/fast/autoresize/autoresize-with-iframe-expected.txt?r1=195624&r2=195623&pathrev=195624
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/fast/autoresize/basic.html?r1=195624&r2=195623&pathrev=195624
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/fast/css/zoom-body-scroll-expected.txt?r1=195624&r2=195623&pathrev=195624
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/fast/images/imagemap-scroll.html?r1=195624&r2=195623&pathrev=195624

Update most LayoutTests to be agnostic to scrollTopLeftInterop mode

Replace most uses of body.scrollTop/Left with scrollingElement so that
we can experiment with turning the ScrollTopLeftInterop feature on and
off without too much pain.

BUG= 157855 

Review URL: https://codereview.chromium.org/1133693002
-----------------------------------------------------------------
Project Member

Comment 87 by bugdroid1@chromium.org, May 20 2015

The following revision refers to this bug:
  http://src.chromium.org/viewvc/blink?view=rev&rev=195636

------------------------------------------------------------------
r195636 | wangxianzhu@google.com | 2015-05-20T20:04:56.205572Z

Changed paths:
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/platform/win/fast/events/scale-and-scroll-body-expected.png?r1=195636&r2=195635&pathrev=195636
   A http://src.chromium.org/viewvc/blink/trunk/LayoutTests/platform/win/virtual/slimmingpaint/fast/events/scale-and-scroll-body-expected.png?r1=195636&r2=195635&pathrev=195636
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/platform/linux/fast/events/scale-and-scroll-body-expected.png?r1=195636&r2=195635&pathrev=195636
   A http://src.chromium.org/viewvc/blink/trunk/LayoutTests/platform/android/fast/events/scale-and-scroll-body-expected.png?r1=195636&r2=195635&pathrev=195636
   A http://src.chromium.org/viewvc/blink/trunk/LayoutTests/platform/linux/virtual/slimmingpaint/fast/events/scale-and-scroll-body-expected.png?r1=195636&r2=195635&pathrev=195636
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/platform/mac/fast/events/scale-and-scroll-body-expected.png?r1=195636&r2=195635&pathrev=195636
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/TestExpectations?r1=195636&r2=195635&pathrev=195636
   A http://src.chromium.org/viewvc/blink/trunk/LayoutTests/platform/android/virtual/slimmingpaint/fast/events/scale-and-scroll-body-expected.png?r1=195636&r2=195635&pathrev=195636
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/platform/mac/virtual/slimmingpaint/fast/events/scale-and-scroll-body-expected.png?r1=195636&r2=195635&pathrev=195636
   A http://src.chromium.org/viewvc/blink/trunk/LayoutTests/platform/win-xp/virtual/slimmingpaint/fast/events/scale-and-scroll-body-expected.png?r1=195636&r2=195635&pathrev=195636
   A http://src.chromium.org/viewvc/blink/trunk/LayoutTests/platform/win/virtual/pointerevent/fast/events/scale-and-scroll-body-expected.png?r1=195636&r2=195635&pathrev=195636
   A http://src.chromium.org/viewvc/blink/trunk/LayoutTests/platform/linux/virtual/pointerevent/fast/events/scale-and-scroll-body-expected.png?r1=195636&r2=195635&pathrev=195636
   A http://src.chromium.org/viewvc/blink/trunk/LayoutTests/platform/android/virtual/pointerevent/fast/events/scale-and-scroll-body-expected.png?r1=195636&r2=195635&pathrev=195636
   A http://src.chromium.org/viewvc/blink/trunk/LayoutTests/platform/mac/virtual/pointerevent/fast/events/scale-and-scroll-body-expected.png?r1=195636&r2=195635&pathrev=195636

Auto-rebaseline for r195624

http://src.chromium.org/viewvc/blink?view=revision&revision=195624

BUG= 157855 
TBR=rbyers@chromium.org

Review URL: https://codereview.chromium.org/1143343002
-----------------------------------------------------------------
Blockedon: chromium:305099
Good article / guidance around this issue: https://dev.opera.com/articles/fixing-the-scrolltop-bug/
Labels: -Type-Bug Type-Launch-OWP OWP-Standards-OfficialSpec OWP-Type-ChangeBehavior
Labels: Hotlist-Interop
Labels: -M-45 M-46
Labels: -Cr-Blink
Project Member

Comment 95 by bugdroid1@chromium.org, Aug 13 2015

The following revision refers to this bug:
  http://src.chromium.org/viewvc/blink?view=rev&rev=200474

------------------------------------------------------------------
r200474 | rbyers@chromium.org | 2015-08-13T11:19:22.098589Z

Changed paths:
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/fast/history/scroll-restoration/scroll-restoration-push-replace.html?r1=200474&r2=200473&pathrev=200474

Fix scroll-restoration-push-replace.html test to support scrollTopLeftInterop mode

BUG= 157855 

Review URL: https://codereview.chromium.org/1288693003
-----------------------------------------------------------------
Project Member

Comment 96 by bugdroid1@chromium.org, Aug 14 2015

The following revision refers to this bug:
  http://src.chromium.org/viewvc/blink?view=rev&rev=200540

------------------------------------------------------------------
r200540 | rbyers@chromium.org | 2015-08-14T14:15:01.862464Z

Changed paths:
   M http://src.chromium.org/viewvc/blink/trunk/Source/web/WebViewImpl.cpp?r1=200540&r2=200539&pathrev=200540

Update WebViewImpl::contentsPreferredMinimumSize to be agnostic to the scrolling element

When the scrollingElement is the documentElement, documentElement.scrollHeight behaves
differently (and in unit tests may return 0).  So make sure that
contentsPreferredMinimumSize always uses the document element's layout box directly.

This is a no-op today, but will ensure the behavior of this API doesn't change
when we enable the scrollTopLeftInterop feature.

BUG= 157855 

Review URL: https://codereview.chromium.org/1291723005
-----------------------------------------------------------------
Blockedon: chromium:501568
Project Member

Comment 98 by bugdroid1@chromium.org, Aug 15 2015

The following revision refers to this bug:
  http://src.chromium.org/viewvc/blink?view=rev&rev=200602

------------------------------------------------------------------
r200602 | rbyers@chromium.org | 2015-08-15T06:43:54.581014Z

Changed paths:
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/fast/dom/Element/scrollTop-scrollLeft-frameset-expected.txt?r1=200602&r2=200601&pathrev=200602
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/fast/dom/Element/scrollTop-scrollLeft-strict-quirks-modes-expected.txt?r1=200602&r2=200601&pathrev=200602
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/fast/dom/Element/scrollTop-scrollLeft-frameset.html?r1=200602&r2=200601&pathrev=200602
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/fast/scroll-behavior/main-frame-scroll-in-standards-mode-expected.txt?r1=200602&r2=200601&pathrev=200602
   M http://src.chromium.org/viewvc/blink/trunk/Source/platform/RuntimeEnabledFeatures.in?r1=200602&r2=200601&pathrev=200602
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/fast/dom/Document/scrollingElement-noLayout-quirks.html?r1=200602&r2=200601&pathrev=200602
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/fast/dom/Document/scrollingElement-noStyleUpdate-strict.html?r1=200602&r2=200601&pathrev=200602
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/fast/dom/Element/scrollTop-scrollLeft-strict-quirks-modes.html?r1=200602&r2=200601&pathrev=200602
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/fast/dom/Element/scrollingElement-null-body-documentElement.html?r1=200602&r2=200601&pathrev=200602
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/fast/scroll-behavior/main-frame-scroll-in-standards-mode.html?r1=200602&r2=200601&pathrev=200602
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/fast/dom/Element/scrollTop-scrollLeft-body.html?r1=200602&r2=200601&pathrev=200602

Promote scrollTopLeftInterop mode to experimental

We're about ready to try making this behavior 'stable'.  To help flush out
issues in advance of that, promote it to 'experimental'.

BUG= 157855 

Review URL: https://codereview.chromium.org/1216953003
-----------------------------------------------------------------
Labels: -M-46 M-48
Going to have to push shipping this back a little - see https://code.google.com/p/chromium/issues/detail?id=501568#c11

Blockedon: chromium:521953
Talking with a Google web developer (dvoytenko@) it seems this problem is particularly bad on iOS in conjunction with this known issue with iframe scrolling: https://css-tricks.com/forums/topic/scrolling-iframe-on-ipad/.  Basically they end up having to do some very hacky things to monitor/change scroll position of a scrollable body element because scrollTop doesn't work.  

Further evidence that getting to the spec'd behavior is really worth the compat pain of getting there...
Project Member

Comment 102 by bugdroid1@chromium.org, Sep 23 2015

Labels: merge-merged-2490
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/58ff9cb5e826996ebf6ff44a45216ef990670fb0

commit 58ff9cb5e826996ebf6ff44a45216ef990670fb0
Author: rbyers@chromium.org <rbyers@chromium.org>
Date: Thu Aug 13 11:19:22 2015

Fix scroll-restoration-push-replace.html test to support scrollTopLeftInterop mode

BUG= 157855 

Review URL: https://codereview.chromium.org/1288693003

git-svn-id: svn://svn.chromium.org/blink/trunk@200474 bbb929c8-8fbe-4397-9dbb-9b2b20218538

[modify] http://crrev.com/58ff9cb5e826996ebf6ff44a45216ef990670fb0/third_party/WebKit/LayoutTests/fast/history/scroll-restoration/scroll-restoration-push-replace.html

Project Member

Comment 103 by bugdroid1@chromium.org, Sep 23 2015

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/21dd5ada97317f0bdea503420881ded8ffe85e35

commit 21dd5ada97317f0bdea503420881ded8ffe85e35
Author: rbyers@chromium.org <rbyers@chromium.org>
Date: Fri Aug 14 14:15:01 2015

Update WebViewImpl::contentsPreferredMinimumSize to be agnostic to the scrolling element

When the scrollingElement is the documentElement, documentElement.scrollHeight behaves
differently (and in unit tests may return 0).  So make sure that
contentsPreferredMinimumSize always uses the document element's layout box directly.

This is a no-op today, but will ensure the behavior of this API doesn't change
when we enable the scrollTopLeftInterop feature.

BUG= 157855 

Review URL: https://codereview.chromium.org/1291723005

git-svn-id: svn://svn.chromium.org/blink/trunk@200540 bbb929c8-8fbe-4397-9dbb-9b2b20218538

[modify] http://crrev.com/21dd5ada97317f0bdea503420881ded8ffe85e35/third_party/WebKit/Source/web/WebViewImpl.cpp

Project Member

Comment 104 by bugdroid1@chromium.org, Sep 23 2015

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/f01c00ef2f5b853589cf9d97b5dd3bcf6286a9a6

commit f01c00ef2f5b853589cf9d97b5dd3bcf6286a9a6
Author: rbyers@chromium.org <rbyers@chromium.org>
Date: Sat Aug 15 06:43:54 2015

Promote scrollTopLeftInterop mode to experimental

We're about ready to try making this behavior 'stable'.  To help flush out
issues in advance of that, promote it to 'experimental'.

BUG= 157855 

Review URL: https://codereview.chromium.org/1216953003

git-svn-id: svn://svn.chromium.org/blink/trunk@200602 bbb929c8-8fbe-4397-9dbb-9b2b20218538

[modify] http://crrev.com/f01c00ef2f5b853589cf9d97b5dd3bcf6286a9a6/third_party/WebKit/LayoutTests/fast/dom/Document/scrollingElement-noLayout-quirks.html
[modify] http://crrev.com/f01c00ef2f5b853589cf9d97b5dd3bcf6286a9a6/third_party/WebKit/LayoutTests/fast/dom/Document/scrollingElement-noStyleUpdate-strict.html
[modify] http://crrev.com/f01c00ef2f5b853589cf9d97b5dd3bcf6286a9a6/third_party/WebKit/LayoutTests/fast/dom/Element/scrollTop-scrollLeft-body.html
[modify] http://crrev.com/f01c00ef2f5b853589cf9d97b5dd3bcf6286a9a6/third_party/WebKit/LayoutTests/fast/dom/Element/scrollTop-scrollLeft-frameset-expected.txt
[modify] http://crrev.com/f01c00ef2f5b853589cf9d97b5dd3bcf6286a9a6/third_party/WebKit/LayoutTests/fast/dom/Element/scrollTop-scrollLeft-frameset.html
[modify] http://crrev.com/f01c00ef2f5b853589cf9d97b5dd3bcf6286a9a6/third_party/WebKit/LayoutTests/fast/dom/Element/scrollTop-scrollLeft-strict-quirks-modes-expected.txt
[modify] http://crrev.com/f01c00ef2f5b853589cf9d97b5dd3bcf6286a9a6/third_party/WebKit/LayoutTests/fast/dom/Element/scrollTop-scrollLeft-strict-quirks-modes.html
[modify] http://crrev.com/f01c00ef2f5b853589cf9d97b5dd3bcf6286a9a6/third_party/WebKit/LayoutTests/fast/dom/Element/scrollingElement-null-body-documentElement.html
[modify] http://crrev.com/f01c00ef2f5b853589cf9d97b5dd3bcf6286a9a6/third_party/WebKit/LayoutTests/fast/scroll-behavior/main-frame-scroll-in-standards-mode-expected.txt
[modify] http://crrev.com/f01c00ef2f5b853589cf9d97b5dd3bcf6286a9a6/third_party/WebKit/LayoutTests/fast/scroll-behavior/main-frame-scroll-in-standards-mode.html
[modify] http://crrev.com/f01c00ef2f5b853589cf9d97b5dd3bcf6286a9a6/third_party/WebKit/Source/platform/RuntimeEnabledFeatures.in

Project Member

Comment 105 by bugdroid1@chromium.org, Oct 29 2015

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/a9b90544c07f7e54781c91856d0019e1f3a1567a

commit a9b90544c07f7e54781c91856d0019e1f3a1567a
Author: rbyers <rbyers@chromium.org>
Date: Thu Oct 29 21:11:00 2015

Update telemetry tests to be agnostic to ScrollTopLeftInterop mode

See https://dev.opera.com/articles/fixing-the-scrolltop-bug/
for details of the issue.  It should be possible to run telemetry
with --enable-experimental-web-platform-features.

BUG= 157855 
CQ_EXTRA_TRYBOTS=tryserver.chromium.perf:linux_perf_bisect;tryserver.chromium.perf:mac_10_10_perf_bisect;tryserver.chromium.perf:win_perf_bisect;tryserver.chromium.perf:android_nexus5_perf_bisect

Review URL: https://codereview.chromium.org/1428733002

Cr-Commit-Position: refs/heads/master@{#356947}

[modify] http://crrev.com/a9b90544c07f7e54781c91856d0019e1f3a1567a/tools/telemetry/telemetry/internal/actions/action_runner_unittest.py
[modify] http://crrev.com/a9b90544c07f7e54781c91856d0019e1f3a1567a/tools/telemetry/telemetry/internal/actions/scroll.js
[modify] http://crrev.com/a9b90544c07f7e54781c91856d0019e1f3a1567a/tools/telemetry/telemetry/internal/actions/scroll.py
[modify] http://crrev.com/a9b90544c07f7e54781c91856d0019e1f3a1567a/tools/telemetry/telemetry/internal/actions/scroll_bounce.py
[modify] http://crrev.com/a9b90544c07f7e54781c91856d0019e1f3a1567a/tools/telemetry/telemetry/internal/actions/swipe.py

Blockedon: chromium:553699
Labels: -M-48 M-50
Blockedon: chromium:551942
Blockedon: chromium:580570
Labels: -Pri-1 -M-50 Pri-2
This is blocked by  issue 501568 , and hence down-prioritized temporarily. Blink rendering leads agree this is still worth continuing to push on long term (in the top 10 starred rendering/input issues, ongoing if small source of interop pain).
Owner: ----
Status: Available (was: Started)
scrollTopLeftInterop is proving very difficult to achieve due to web compat - mainly smoothscroll.js.  We're explicitly putting work on hold for another quarter or two.  The hope is that usage will decline now that Chrome has built-in smooth-scroll, then it'll make sense to do another push to try to get scrollTopLeftInterop shipped and working everywhere.
Cc: tdres...@chromium.org skobes@chromium.org
 Issue 485718  has been merged into this issue.
Blockedon: 586378
Blocking: 423935
Cc: -eseidel@chromium.org -jchaffraix@chromium.org
Components: -Blink>DOM Blink>CSS Blink>Layout
Cc: bokan@chromium.org
 Issue 34224  has been merged into this issue.
Cc: -toniki...@gmail.com
Labels: Update-Quarterly
Cc: suzyh@chromium.org
I'm reviewing bugs that are filed against Blink>CSS and one or more other components simultaneously. What is required from the Style team for this issue now? Is this a Layout project that just needs the Style team to be kept in the loop, or is this a larger project that needs work from both teams?
scrollTop is defined by cssom-view spec.  I'm not sure who owns cssom-view implementation, and probably it's Blink>CSS or Blink>Layout.

Chatting to people here, it sounds like this should actually probably be moved over to Blink>Scroll.

rbyers: WDYT?
Components: -Blink>CSS -Blink>Layout Blink>Scroll
Yep, this is definitely owned by input-dev, so Blink>Scroll is probably best.  Sorry for the confusion.
Cc: dtapu...@chromium.org
dtapuska: The predictability program is reviewing the top 1% of starred developer-facing bugs this quarter, and this is #14 on that list.  We’re hoping that for each we can either close it, set an owner and target milestone, or set a NextAction date so that we know when to check back in.

Of course I have a long history with this one.  I think we have two main options:

1) Add a web compat hack to the platform that ignores calls to addEventListener('mousewheel', handler) when handler.name=='ssc_wheel'.

This is ugly, but maybe it's not terrible.  It would improve scroll performance and applies only to a non-standard API "mousewheel".  Even esprehn@ seemed to think it wasn't crazy, so maybe we should stop being chickens and do it.  Of course there's not guarantee that's the only issue preventing ship, but we'll never find out unless we try.

2) Give up and just define 'body' as the scrollingElement (presumably except when in Firefox mode - there's something in the HTML spec for this already IIRC).

If we're going to resort to this then I think we should still submit spec pull-requests and try to get consensus from the other vendors on the point rather than leaving things in limbo indefinitely.

Dave, WDYT?

zcorpan or anyone else, thoughts?
What about 3) expose scrollLeft/scrollTop on both body and documentElement?

Then we can have scrollingElement === documentElement, but code that uses body (smoothscroll.js) still works.

Still some compat risk, but maybe an acceptable level?
some legacy code does

let scrollTop = document.documentElement.scrollTop + document.body.scrollTop; // assuming that one of them is zero.
This effects jQuery UI when body has overflow scroll, and has for years.
It may be worth measuring how widespread that pattern is.  If it's very rare, I'd rather break it than add "ssc_wheel" hacks.

Also note that the failure mode there (website thinks scrollTop is 2x true value) is likely less severe than the failure mode of smoothscroll.js w/ ScrollTopLeftInterop (user can't scroll at all).
Failure mode for jQueryUI draggable/sortable is when scrolling down a page and dragging, the dragged element disappears because it is now positioned outside the viewport. 

Comment 129 by sim...@opera.com, Jun 1 2017

I can live with the hack. If we're successful with (1) then we can reach interop, if other vendors can also live with implementing that hack.

(2) seems less likely to reach interop.
I had a thought last night and gave it a go this morning and it seems to work..

What about treating the event listener as a passive event listener? ie. If (eventType == "mousewheel" && target == window && function.name == "ssc_wheel" && no event listener options) default EventListenerOptions.passive to true?

This seems to make scrolling work for those pages. Thoughts?
I love it!  Let's discuss the specific details here in  issue 501568 .
Owner: dtapu...@chromium.org
Status: Assigned (was: Available)
New intent to ship: https://groups.google.com/a/chromium.org/d/msg/blink-dev/X64Sg16RhT4/6ZiW7Dt8CAAJ

Should be blocked on the test failure in  issue 665927 
Project Member

Comment 133 by bugdroid1@chromium.org, Jun 9 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/fc202b2b1174f5732f7b9e63a6c46fd01ac2be02

commit fc202b2b1174f5732f7b9e63a6c46fd01ac2be02
Author: Dave Tapuska <dtapuska@chromium.org>
Date: Fri Jun 09 13:45:06 2017

Change FirstBodyElement to check the document is a HTML Document.

The CSS spec specifies that the document must be a HTML Document.

Layout test asserts this:
http://w3c-test.org/cssom-view/scrollingElement.html

There is one other user of FirstBodyElement since it was first
added. The background style propagation from the HTML body
element to the HTML element. It appears before it was rewritten
it was checking that the document was a HTML document as well.
So I think this is safe to make the API match the spec.

BUG= 157855 , 665927 

Change-Id: Iafbe7c25011cdde2c89b3d839dcfb08e5bc12c3e
Reviewed-on: https://chromium-review.googlesource.com/527462
Reviewed-by: Rick Byers <rbyers@chromium.org>
Commit-Queue: Dave Tapuska <dtapuska@chromium.org>
Cr-Commit-Position: refs/heads/master@{#478262}
[modify] https://crrev.com/fc202b2b1174f5732f7b9e63a6c46fd01ac2be02/third_party/WebKit/Source/core/dom/Document.cpp

Cc: -suzyh@chromium.org
Project Member

Comment 135 by bugdroid1@chromium.org, Jun 21 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/f3fef0310ea8695b0f89be171f5c4d612a54bf22

commit f3fef0310ea8695b0f89be171f5c4d612a54bf22
Author: Dave Tapuska <dtapuska@chromium.org>
Date: Wed Jun 21 13:47:44 2017

Make testAutoScroll independent of the scrolling element.

Under fully interoperable CSSOM view mode the scrolling element isn't
the body but the document element. Update the unit test to use
the scrollingElement property so that it works under either mode.

BUG= 157855 

Change-Id: I2ab3070b37d148754d4e6b70157b34d72ced1a45
Reviewed-on: https://chromium-review.googlesource.com/541518
Reviewed-by: Finnur Thorarinsson <finnur@chromium.org>
Commit-Queue: Dave Tapuska <dtapuska@chromium.org>
Cr-Commit-Position: refs/heads/master@{#481192}
[modify] https://crrev.com/f3fef0310ea8695b0f89be171f5c4d612a54bf22/chrome/browser/ui/webui/extensions/extension_settings_browsertest.js

Project Member

Comment 136 by bugdroid1@chromium.org, Jun 21 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/4cef659a8009c5cb4f5708336ae37654d23653b3

commit 4cef659a8009c5cb4f5708336ae37654d23653b3
Author: Dave Tapuska <dtapuska@chromium.org>
Date: Wed Jun 21 15:16:45 2017

Enable scrollTopLeftInterop by default.

Approved intent to ship: https://groups.google.com/a/chromium.org/d/msg/blink-dev/X64Sg16RhT4/6ZiW7Dt8CAAJ

BUG= 157855 

Change-Id: I71f4beae0aa12e4bd0b39d0c78371510d7bedbb3
Reviewed-on: https://chromium-review.googlesource.com/527917
Reviewed-by: Jeremy Roman <jbroman@chromium.org>
Commit-Queue: Dave Tapuska <dtapuska@chromium.org>
Cr-Commit-Position: refs/heads/master@{#481208}
[modify] https://crrev.com/4cef659a8009c5cb4f5708336ae37654d23653b3/third_party/WebKit/Source/platform/RuntimeEnabledFeatures.json5

Labels: -MovedFrom-41 -MovedFrom-42 -MovedFrom-40 Launch-M-Approved-61-Dev Launch-M-Approved-61-Beta Launch-M-Approved-61-Stable Launch-M-Target-61-Dev Launch-M-Target-61-Beta Launch-M-Target-61-Stable
Status: Fixed (was: Assigned)
 Issue 633573  has been merged into this issue.
Have a scrolling extension which allows multiple elements to be scrolled. Got users across different versions of Chrome. 

Is there any kind of indicator which can be used to know which one of the elements (body/documentElement) is used to scroll the page? (without using window.scrollBy())

Take a look at document.scrollingElement (https://developer.mozilla.org/en/docs/Web/API/document/scrollingElement).

When available, it makes this problem easy.
Blocking: 740844
See https://bugs.chromium.org/p/chromium/issues/detail?id=740844#c9 for an example of some short-term pain caused by this change that is actually good for the openness of the web long-term.

This is partly what we're making this change to achieve (sites just working the same across browsers) - thanks Dave!
Blockedon: 751965
Blockedon: 749489
Blockedon: 740020
Blockedon: 752069
Blocking: 753286
Blocking: -753286
Blockedon: 753286
Blockedon: 753757
Blockedon: 745928
Blockedon: 755915
Blockedon: 754915
 Issue 766938  has been merged into this issue.
Blockedon: 771184
Blockedon: 785348
Showing comments 57 - 156 of 156 Older

Sign in to add a comment