Title: [218213] tags/Safari-604.1.25.0.2

Diff

Modified: tags/Safari-604.1.25.0.2/Source/WebKit2/ChangeLog (218212 => 218213)


--- tags/Safari-604.1.25.0.2/Source/WebKit2/ChangeLog	2017-06-13 22:17:58 UTC (rev 218212)
+++ tags/Safari-604.1.25.0.2/Source/WebKit2/ChangeLog	2017-06-13 22:21:11 UTC (rev 218213)
@@ -1,3 +1,22 @@
+2017-06-13  Babak Shafiei  <[email protected]>
+
+        Merge r218121.
+
+    2017-06-12  Chris Dumez  <[email protected]>
+
+            Regression(r217867): Legacy SessionHistoryEntryData format should not change
+            https://bugs.webkit.org/show_bug.cgi?id=173267
+            <rdar://problem/32701257>
+
+            Reviewed by Simon Fraser.
+
+            Revert changes to Legacy SessionHistoryEntryData format that were made in r217867,
+            as this apparently breaks compatiblity.
+
+            * UIProcess/mac/LegacySessionStateCoding.cpp:
+            (WebKit::encodeFrameStateNode):
+            (WebKit::decodeBackForwardTreeNode):
+
 2017-06-09  Daewoong Jang  <[email protected]>
 
         Use WTF::getCurrentProcessID() instead of getpid()

Modified: tags/Safari-604.1.25.0.2/Source/WebKit2/UIProcess/mac/LegacySessionStateCoding.cpp (218212 => 218213)


--- tags/Safari-604.1.25.0.2/Source/WebKit2/UIProcess/mac/LegacySessionStateCoding.cpp	2017-06-13 22:17:58 UTC (rev 218212)
+++ tags/Safari-604.1.25.0.2/Source/WebKit2/UIProcess/mac/LegacySessionStateCoding.cpp	2017-06-13 22:21:11 UTC (rev 218213)
@@ -346,7 +346,6 @@
     encoder << frameState.scrollPosition.x();
     encoder << frameState.scrollPosition.y();
 
-    encoder << frameState.shouldRestoreScrollPosition;
     encoder << frameState.pageScaleFactor;
 
     encoder << !!frameState.stateObjectData;
@@ -929,7 +928,6 @@
 
     frameState.scrollPosition = WebCore::IntPoint(scrollPositionX, scrollPositionY);
 
-    decoder >> frameState.shouldRestoreScrollPosition;
     decoder >> frameState.pageScaleFactor;
 
     bool hasStateObject;

Modified: tags/Safari-604.1.25.0.2/Tools/ChangeLog (218212 => 218213)


--- tags/Safari-604.1.25.0.2/Tools/ChangeLog	2017-06-13 22:17:58 UTC (rev 218212)
+++ tags/Safari-604.1.25.0.2/Tools/ChangeLog	2017-06-13 22:21:11 UTC (rev 218213)
@@ -1,3 +1,24 @@
+2017-06-13  Babak Shafiei  <[email protected]>
+
+        Merge r218121.
+
+    2017-06-12  Chris Dumez  <[email protected]>
+
+            Regression(r217867): Legacy SessionHistoryEntryData format should not change
+            https://bugs.webkit.org/show_bug.cgi?id=173267
+            <rdar://problem/32701257>
+
+            Reviewed by Simon Fraser.
+
+            Restrict test to stop covering saving / restore of scrollRestoration via the legacy
+            SessionHistoryEntryData. Maintain coverage for the default value of scrollRestoration
+            though as this covers the crash that r217867 was fixing.
+
+            * TestWebKitAPI/Tests/WebKit2/RestoreSessionState.cpp:
+            (TestWebKitAPI::createSessionStateData):
+            (TestWebKitAPI::TEST):
+            (TestWebKitAPI::createSessionStateDataContainingScrollRestoration): Deleted.
+
 2017-06-09  Zan Dobersek  <[email protected]>
 
         [WPE] Enable ENCRYPTED_MEDIA for build-webkit builds

Modified: tags/Safari-604.1.25.0.2/Tools/TestWebKitAPI/Tests/WebKit2/RestoreSessionState.cpp (218212 => 218213)


--- tags/Safari-604.1.25.0.2/Tools/TestWebKitAPI/Tests/WebKit2/RestoreSessionState.cpp	2017-06-13 22:17:58 UTC (rev 218212)
+++ tags/Safari-604.1.25.0.2/Tools/TestWebKitAPI/Tests/WebKit2/RestoreSessionState.cpp	2017-06-13 22:21:11 UTC (rev 218213)
@@ -53,7 +53,7 @@
     WKPageSetPageLoaderClient(page, &loaderClient.base);
 }
 
-static WKRetainPtr<WKDataRef> createSessionStateDataContainingScrollRestoration(WKContextRef context, std::function<void(WKPageRef)> apply)
+static WKRetainPtr<WKDataRef> createSessionStateData(WKContextRef context)
 {
     PlatformWebView webView(context);
     setPageLoaderClient(webView.page());
@@ -62,52 +62,10 @@
     Util::run(&didFinishLoad);
     didFinishLoad = false;
 
-    apply(webView.page());
-
     auto sessionState = adoptWK(static_cast<WKSessionStateRef>(WKPageCopySessionState(webView.page(), reinterpret_cast<void*>(1), nullptr)));
     return adoptWK(WKSessionStateCopyData(sessionState.get()));
 }
 
-TEST(WebKit2, RestoreSessionStateContainingScrollRestorationManual)
-{
-    WKRetainPtr<WKContextRef> context(AdoptWK, WKContextCreate());
-
-    PlatformWebView webView(context.get());
-    setPageLoaderClient(webView.page());
-
-    WKRetainPtr<WKDataRef> data = "" [](WKPageRef page) {
-        EXPECT_JS_EQ(page, "history.scrollRestoration = 'manual'", "manual");
-    });
-    EXPECT_NOT_NULL(data);
-
-    auto sessionState = adoptWK(WKSessionStateCreateFromData(data.get()));
-    WKPageRestoreFromSessionState(webView.page(), sessionState.get());
-
-    Util::run(&didFinishLoad);
-
-    EXPECT_JS_EQ(webView.page(), "history.scrollRestoration", "manual");
-}
-
-TEST(WebKit2, RestoreSessionStateContainingScrollRestorationAuto)
-{
-    WKRetainPtr<WKContextRef> context(AdoptWK, WKContextCreate());
-
-    PlatformWebView webView(context.get());
-    setPageLoaderClient(webView.page());
-
-    WKRetainPtr<WKDataRef> data = "" [](WKPageRef page) {
-        EXPECT_JS_EQ(page, "history.scrollRestoration = 'auto'", "auto");
-    });
-    EXPECT_NOT_NULL(data);
-
-    auto sessionState = adoptWK(WKSessionStateCreateFromData(data.get()));
-    WKPageRestoreFromSessionState(webView.page(), sessionState.get());
-
-    Util::run(&didFinishLoad);
-
-    EXPECT_JS_EQ(webView.page(), "history.scrollRestoration", "auto");
-}
-
 TEST(WebKit2, RestoreSessionStateContainingScrollRestorationDefault)
 {
     WKRetainPtr<WKContextRef> context(AdoptWK, WKContextCreate());
@@ -115,8 +73,7 @@
     PlatformWebView webView(context.get());
     setPageLoaderClient(webView.page());
 
-    WKRetainPtr<WKDataRef> data = "" [](WKPageRef) {
-    });
+    WKRetainPtr<WKDataRef> data = ""
     EXPECT_NOT_NULL(data);
 
     auto sessionState = adoptWK(WKSessionStateCreateFromData(data.get()));
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to