Bug 146625

Summary: [WK2] Current page's scroll position is lost when transferring sessionState from one view to another
Product: WebKit Reporter: Chris Dumez <cdumez>
Component: WebKit2Assignee: Chris Dumez <cdumez>
Status: RESOLVED FIXED    
Severity: Normal CC: andersca, barraclough, benjamin, commit-queue, japhet, mitz, sam
Priority: P2 Keywords: InRadar
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
See Also: https://bugs.webkit.org/show_bug.cgi?id=146614
Attachments:
Description Flags
Patch none

Description Chris Dumez 2015-07-05 19:56:36 PDT
Current page's scroll position is lost when transferring sessionState from one view to another. This is because we only update the current WebBackForwardListItem after navigating away.
However, when the client swaps WebViews for navigating, we don't detect this as navigating away and the current WebBackForwardListItem is not updated with the current page's state (including the scroll position). This means that the information is not transferred via the sessionState and the scroll position (among other things) ends up being lost when navigating back in the new WebView.
Comment 1 Chris Dumez 2015-07-05 19:57:05 PDT
rdar://problem/21585268
Comment 2 Chris Dumez 2015-07-05 20:10:08 PDT
Created attachment 256186 [details]
Patch
Comment 3 WebKit Commit Bot 2015-07-05 20:11:41 PDT
Attachment 256186 [details] did not pass style-queue:


ERROR: Source/WebKit2/WebProcess/WebPage/WebPage.cpp:300:  More than one command on the same line in if  [whitespace/parens] [4]
Total errors found: 1 in 5 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 4 WebKit Commit Bot 2015-07-05 23:33:06 PDT
Comment on attachment 256186 [details]
Patch

Clearing flags on attachment: 256186

Committed r186304: <http://trac.webkit.org/changeset/186304>
Comment 5 WebKit Commit Bot 2015-07-05 23:33:13 PDT
All reviewed patches have been landed.  Closing bug.