WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
Bug 57898
REGRESSION (
r82185
): Scroll position not restored on navigation back to a page in the page cache
https://bugs.webkit.org/show_bug.cgi?id=57898
Summary
REGRESSION (r82185): Scroll position not restored on navigation back to a pag...
Beth Dakin
Reported
2011-04-05 15:57:32 PDT
Regression from
http://trac.webkit.org/changeset/82185/trunk/Source/WebCore
* STEPS TO REPRODUCE 1. Navigate to <
http://en.wikipedia.org/wiki/MathML
> 2. Scroll down 3. In the same tab, navigate to >about:blank> 4. Choose History > Back * RESULTS The Wikipedia page is scrolled to the top. <
rdar://problem/9226652
>
Attachments
Patch
(3.61 KB, patch)
2011-04-18 15:45 PDT
,
Beth Dakin
no flags
Details
Formatted Diff
Diff
Patch that restores scroll position for cached and non-cached pages
(4.35 KB, patch)
2011-04-21 23:21 PDT
,
Beth Dakin
mitz: review+
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Beth Dakin
Comment 1
2011-04-18 15:45:56 PDT
Created
attachment 90106
[details]
Patch
Maciej Stachowiak
Comment 2
2011-04-18 16:53:01 PDT
Comment on
attachment 90106
[details]
Patch r=me
Antonio Gomes
Comment 3
2011-04-18 21:12:58 PDT
Comment on
attachment 90106
[details]
Patch Why no tests? :) It should be very easy to be tested, unless I am missing something ...
Beth Dakin
Comment 4
2011-04-19 13:39:24 PDT
(In reply to
comment #3
)
> (From update of
attachment 90106
[details]
) > Why no tests? :) > > It should be very easy to be tested, unless I am missing something ...
You're right, Antonio! I wrote a test that I will commit with the change.
Antonio Gomes
Comment 5
2011-04-19 13:45:29 PDT
> > > > It should be very easy to be tested, unless I am missing something ... > > You're right, Antonio! I wrote a test that I will commit with the change.
Perfect
Beth Dakin
Comment 6
2011-04-19 14:31:25 PDT
Committed fix and test with revision 84296.
WebKit Review Bot
Comment 7
2011-04-19 15:35:44 PDT
http://trac.webkit.org/changeset/84296
might have broken Qt Linux Release
Csaba Osztrogonác
Comment 8
2011-04-20 04:05:37 PDT
(In reply to
comment #7
)
>
http://trac.webkit.org/changeset/84296
might have broken Qt Linux Release
new bug for it:
https://bugs.webkit.org/show_bug.cgi?id=58977
Yong Li
Comment 9
2011-04-20 07:48:07 PDT
(In reply to
comment #7
)
>
http://trac.webkit.org/changeset/84296
might have broken Qt Linux Release
Probably FrameView::resetScrollbarsAndClearContentsSize() is never called in some cases like when it loads an unreachable URL, then the cached scroll position is always (0, 0) and the real scroll position is lost. I don't think the solution is right. HistoryController and ScrollView shouldn't think that much. Who resets contents size to (0, 0) should be responsible to restore the scroll position when contents size changes back.
Antonio Gomes
Comment 10
2011-04-21 07:14:01 PDT
(In reply to
comment #9
)
> (In reply to
comment #7
) > >
http://trac.webkit.org/changeset/84296
might have broken Qt Linux Release > > Probably FrameView::resetScrollbarsAndClearContentsSize() is never called in some cases like when it loads an unreachable URL, then the cached scroll position is always (0, 0) and the real scroll position is lost. I don't think the solution is right. HistoryController and ScrollView shouldn't think that much. Who resets contents size to (0, 0) should be responsible to restore the scroll position when contents size changes back.
Beth, could you reply to Yong's comment, please? It broke something important for us.
Beth Dakin
Comment 11
2011-04-21 23:07:25 PDT
Hi Yong and Antontio, I discovered that this caused a regression in Safari as well: though my patch made pages in the page cache properly restore scroll position on reload, it regressed pages that do not go into the page cache. This pages no longer restore scroll position. I have a fix and a layout test that I will post shortly. Hopefully it fixes the QT test as well.
Beth Dakin
Comment 12
2011-04-21 23:21:39 PDT
Created
attachment 90672
[details]
Patch that restores scroll position for cached and non-cached pages
mitz
Comment 13
2011-04-21 23:26:25 PDT
Comment on
attachment 90672
[details]
Patch that restores scroll position for cached and non-cached pages View in context:
https://bugs.webkit.org/attachment.cgi?id=90672&action=review
> Source/WebCore/ChangeLog:12 > + *not* in the page cache. This patch fixed both cached and non-cached pages by
“fixed” or “fixes”?
Beth Dakin
Comment 14
2011-04-21 23:30:22 PDT
Thanks Dan! Committed fix with revision 84604.
Nico Weber
Comment 15
2011-05-01 10:08:13 PDT
It looks like this still happens for in-page navigations. I filed
bug 59877
for this.
Mihai Parparita
Comment 16
2011-05-02 14:13:35 PDT
***
Bug 59877
has been marked as a duplicate of this bug. ***
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