Title: [186451] releases/WebKitGTK/webkit-2.8/Source/WebCore
Revision
186451
Author
[email protected]
Date
2015-07-07 05:17:28 -0700 (Tue, 07 Jul 2015)

Log Message

Merge r186287 - [WK2] WebBackForwardListItems' pageState is not kept up-to-date
https://bugs.webkit.org/show_bug.cgi?id=146614
<rdar://problem/21585268>

Reviewed by Gavin Barraclough.

WebBackForwardListItems' pageState on UIProcess-side were not kept
up-to-date when it was updated on WebContent process side. This meant
that we were losing the scroll position (among other things) when
transferring the session state over from one view to another.

We now call notifyHistoryItemChanged(item) after saving the scroll
position and the view state on the HistoryItem. As a result, the
WebBackForwardListProxy will send the updated pageState to the
UIProcess.

* history/HistoryItem.cpp:
(WebCore::HistoryItem::notifyChanged):
* history/HistoryItem.h:
* loader/HistoryController.cpp:
(WebCore::HistoryController::saveScrollPositionAndViewStateToItem):

Modified Paths

Diff

Modified: releases/WebKitGTK/webkit-2.8/Source/WebCore/ChangeLog (186450 => 186451)


--- releases/WebKitGTK/webkit-2.8/Source/WebCore/ChangeLog	2015-07-07 12:15:10 UTC (rev 186450)
+++ releases/WebKitGTK/webkit-2.8/Source/WebCore/ChangeLog	2015-07-07 12:17:28 UTC (rev 186451)
@@ -1,3 +1,27 @@
+2015-07-05  Chris Dumez  <[email protected]>
+
+        [WK2] WebBackForwardListItems' pageState is not kept up-to-date
+        https://bugs.webkit.org/show_bug.cgi?id=146614
+        <rdar://problem/21585268>
+
+        Reviewed by Gavin Barraclough.
+
+        WebBackForwardListItems' pageState on UIProcess-side were not kept
+        up-to-date when it was updated on WebContent process side. This meant
+        that we were losing the scroll position (among other things) when
+        transferring the session state over from one view to another.
+
+        We now call notifyHistoryItemChanged(item) after saving the scroll
+        position and the view state on the HistoryItem. As a result, the
+        WebBackForwardListProxy will send the updated pageState to the
+        UIProcess.
+
+        * history/HistoryItem.cpp:
+        (WebCore::HistoryItem::notifyChanged):
+        * history/HistoryItem.h:
+        * loader/HistoryController.cpp:
+        (WebCore::HistoryController::saveScrollPositionAndViewStateToItem):
+
 2015-07-03  Chris Dumez  <[email protected]>
 
         REGRESSION (r178097): HTMLSelectElement.add(option, undefined) prepends option to the list of options; should append to the end of the list of options

Modified: releases/WebKitGTK/webkit-2.8/Source/WebCore/history/HistoryItem.cpp (186450 => 186451)


--- releases/WebKitGTK/webkit-2.8/Source/WebCore/history/HistoryItem.cpp	2015-07-07 12:15:10 UTC (rev 186450)
+++ releases/WebKitGTK/webkit-2.8/Source/WebCore/history/HistoryItem.cpp	2015-07-07 12:17:28 UTC (rev 186451)
@@ -571,6 +571,11 @@
     m_redirectURLs = WTF::move(redirectURLs);
 }
 
+void HistoryItem::notifyChanged()
+{
+    notifyHistoryItemChanged(this);
+}
+
 #ifndef NDEBUG
 
 int HistoryItem::showTree() const

Modified: releases/WebKitGTK/webkit-2.8/Source/WebCore/history/HistoryItem.h (186450 => 186451)


--- releases/WebKitGTK/webkit-2.8/Source/WebCore/history/HistoryItem.h	2015-07-07 12:15:10 UTC (rev 186450)
+++ releases/WebKitGTK/webkit-2.8/Source/WebCore/history/HistoryItem.h	2015-07-07 12:17:28 UTC (rev 186451)
@@ -206,6 +206,8 @@
     void setSharedLinkUniqueIdentifier(const String& sharedLinkUniqueidentifier) { m_sharedLinkUniqueIdentifier = sharedLinkUniqueidentifier; }
 #endif
 
+    void notifyChanged();
+
 private:
     WEBCORE_EXPORT HistoryItem();
     WEBCORE_EXPORT HistoryItem(const String& urlString, const String& title);

Modified: releases/WebKitGTK/webkit-2.8/Source/WebCore/loader/HistoryController.cpp (186450 => 186451)


--- releases/WebKitGTK/webkit-2.8/Source/WebCore/loader/HistoryController.cpp	2015-07-07 12:15:10 UTC (rev 186450)
+++ releases/WebKitGTK/webkit-2.8/Source/WebCore/loader/HistoryController.cpp	2015-07-07 12:17:28 UTC (rev 186451)
@@ -90,6 +90,9 @@
 
     // FIXME: It would be great to work out a way to put this code in WebCore instead of calling through to the client.
     m_frame.loader().client().saveViewStateToItem(item);
+
+    // Notify clients that the HistoryItem has changed.
+    item->notifyChanged();
 }
 
 void HistoryController::clearScrollPositionAndViewState()
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to