There are a variety of codepaths that cause scrolling during layout, whether temporary or not. These scrolls are all programmatic, but many go through FrameView/ScrollableArea functions that don't have this knowledge. Since there's no chance a user-originated scroll can happen during layout, we should just mark all scrolls during layout as programmatic. This fixes numerous bugs on builds that use ScrollingCoordinator, one of which has these steps to reproduce: 1. Load news.ycombinator.com 2. Scroll to the bottom of the page. 3. Click a link. 4. Click the back button. Expected: The scrollbar is in the right place relative to the content, and hovering over links hovers over the appropriate link (see the status bar). Actual: The scrollbar is at the top, but the content is scrolled. Hovering over links hovers over the wrong links. <rdar://problem/12649131>
Created attachment 187357 [details] preliminary patch (breaks at least one test, needs a test of its own)
Created attachment 187471 [details] with a test
Comment on attachment 187471 [details] with a test View in context: https://bugs.webkit.org/attachment.cgi?id=187471&action=review > LayoutTests/platform/mac-wk2/tiled-drawing/resources/scroll-and-load-page.html:17 > + log += internals.layerTreeAsText(window.document, internals.LAYER_TREE_INCLUDES_VISIBLE_RECTS | internals.LAYER_TREE_INCLUDES_TILE_CACHES); Should check for internals' existence here. > LayoutTests/platform/mac-wk2/tiled-drawing/tiled-drawing-scroll-position-page-cache-restoration.html:14 > + if (window.internals) Don't need this line.
Comment on attachment 187471 [details] with a test View in context: https://bugs.webkit.org/attachment.cgi?id=187471&action=review > LayoutTests/platform/mac-wk2/tiled-drawing/tiled-drawing-scroll-position-page-cache-restoration.html:22 > + window.open("resources/scroll-and-load-page.html"); Do you need to use window.open? Can't you just scroll, load another page that goes back, then finish the test? > Tools/ChangeLog:9 > + WebKitTestRunner should propagate window creation options to subwindows (so that children of tiled-drawing windows use tiled drawing, in this case). This should really be a separate patch. > Tools/WebKitTestRunner/PlatformWebView.h:98 > + WKDictionaryRef options() { return m_options.get(); } const?
(In reply to comment #4) > (From update of attachment 187471 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=187471&action=review > > > LayoutTests/platform/mac-wk2/tiled-drawing/tiled-drawing-scroll-position-page-cache-restoration.html:22 > > + window.open("resources/scroll-and-load-page.html"); > > Do you need to use window.open? Can't you just scroll, load another page that goes back, then finish the test? I'm not sure why that didn't work; it looked like the first page (the one that turns on the page cache) wasn't getting put *into* the page cache. So I followed suit with the other page-cache-testing tests and turned it on, then opened a new window. Maybe Brady knows. > > Tools/ChangeLog:9 > > + WebKitTestRunner should propagate window creation options to subwindows (so that children of tiled-drawing windows use tiled drawing, in this case). > > This should really be a separate patch. Yerp. > > Tools/WebKitTestRunner/PlatformWebView.h:98 > > + WKDictionaryRef options() { return m_options.get(); } > > const? Sure.
Created attachment 187490 [details] patch
http://trac.webkit.org/changeset/142416