WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
109317
REGRESSION (
r132422
): Page content and scrollbars are incorrectly offset after restoring a page from the page cache
https://bugs.webkit.org/show_bug.cgi?id=109317
Summary
REGRESSION (r132422): Page content and scrollbars are incorrectly offset afte...
Tim Horton
Reported
2013-02-08 13:08:36 PST
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
>
Attachments
preliminary patch (breaks at least one test, needs a test of its own)
(1.47 KB, patch)
2013-02-08 13:36 PST
,
Tim Horton
no flags
Details
Formatted Diff
Diff
with a test
(11.99 KB, patch)
2013-02-10 01:51 PST
,
Tim Horton
simon.fraser
: review-
Details
Formatted Diff
Diff
patch
(6.42 KB, patch)
2013-02-10 11:59 PST
,
Tim Horton
simon.fraser
: review+
Details
Formatted Diff
Diff
Show Obsolete
(2)
View All
Add attachment
proposed patch, testcase, etc.
Tim Horton
Comment 1
2013-02-08 13:36:16 PST
Created
attachment 187357
[details]
preliminary patch (breaks at least one test, needs a test of its own)
Tim Horton
Comment 2
2013-02-10 01:51:46 PST
Created
attachment 187471
[details]
with a test
Tim Horton
Comment 3
2013-02-10 02:00:27 PST
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.
Simon Fraser (smfr)
Comment 4
2013-02-10 09:49:20 PST
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?
Tim Horton
Comment 5
2013-02-10 10:26:14 PST
(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.
Tim Horton
Comment 6
2013-02-10 11:59:13 PST
Created
attachment 187490
[details]
patch
Tim Horton
Comment 7
2013-02-10 12:13:23 PST
http://trac.webkit.org/changeset/142416
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug