Title: [170611] trunk/Source
Revision
170611
Author
[email protected]
Date
2014-06-30 16:05:45 -0700 (Mon, 30 Jun 2014)

Log Message

Adopt the legacy session decoding inside WebPage::restoreSession for now
https://bugs.webkit.org/show_bug.cgi?id=134465

Reviewed by Sam Weinig.

Source/WebCore:
* WebCore.exp.in:

Source/WebKit2:
* UIProcess/mac/LegacySessionStateCoding.cpp:
(WebKit::decodeLegacySessionHistoryEntryData):
* UIProcess/mac/LegacySessionStateCoding.h:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::restoreSession):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (170610 => 170611)


--- trunk/Source/WebCore/ChangeLog	2014-06-30 22:58:36 UTC (rev 170610)
+++ trunk/Source/WebCore/ChangeLog	2014-06-30 23:05:45 UTC (rev 170611)
@@ -1,3 +1,12 @@
+2014-06-30  Anders Carlsson  <[email protected]>
+
+        Adopt the legacy session decoding inside WebPage::restoreSession for now
+        https://bugs.webkit.org/show_bug.cgi?id=134465
+
+        Reviewed by Sam Weinig.
+
+        * WebCore.exp.in:
+
 2014-06-30  Commit Queue  <[email protected]>
 
         Unreviewed, rolling out r170578.

Modified: trunk/Source/WebCore/WebCore.exp.in (170610 => 170611)


--- trunk/Source/WebCore/WebCore.exp.in	2014-06-30 22:58:36 UTC (rev 170610)
+++ trunk/Source/WebCore/WebCore.exp.in	2014-06-30 23:05:45 UTC (rev 170611)
@@ -150,6 +150,7 @@
 __ZN7WebCore11FrameLoader6reloadEb
 __ZN7WebCore11FrameLoader9setOpenerEPNS_5FrameE
 __ZN7WebCore11HistoryItem10targetItemEv
+__ZN7WebCore11HistoryItem11setFormDataEN3WTF10PassRefPtrINS_8FormDataEEE
 __ZN7WebCore11HistoryItem11setReferrerERKN3WTF6StringE
 __ZN7WebCore11HistoryItem12addChildItemEN3WTF10PassRefPtrIS0_EE
 __ZN7WebCore11HistoryItem12setURLStringERKN3WTF6StringE
@@ -193,6 +194,7 @@
 __ZN7WebCore11startOfLineERKNS_15VisiblePositionE
 __ZN7WebCore11startOfWordERKNS_15VisiblePositionENS_9EWordSideE
 __ZN7WebCore11writeToFileEiPKci
+__ZN7WebCore12BlobDataItem11toEndOfFileE
 __ZN7WebCore12BlobRegistryD2Ev
 __ZN7WebCore12DataTransferD1Ev
 __ZN7WebCore12EditingStyleD1Ev
@@ -594,6 +596,10 @@
 __ZN7WebCore15GraphicsLayerCA8addChildEPNS_13GraphicsLayerE
 __ZN7WebCore15GraphicsLayerCAC2ERNS_19GraphicsLayerClientE
 __ZN7WebCore15GraphicsLayerCAD2Ev
+__ZN7WebCore11HistoryItem14setStateObjectEN3WTF10PassRefPtrINS_21SerializedScriptValueEEE
+__ZN7WebCore11HistoryItem18setFormContentTypeERKN3WTF6StringE
+__ZN7WebCore11HistoryItem18setPageScaleFactorEf
+__ZN7WebCore11HistoryItem9setTargetERKN3WTF6StringE
 __ZN7WebCore15HitTestLocation12rectForPointERKNS_11LayoutPointEjjjj
 __ZN7WebCore15HitTestLocationC1ERKNS_10FloatPointE
 __ZN7WebCore15HitTestLocationD1Ev
@@ -1293,6 +1299,10 @@
 __ZN7WebCore8Document36updateLayoutIgnorePendingStylesheetsENS0_18RunPostLayoutTasksE
 __ZN7WebCore8Document4headEv
 __ZN7WebCore8Document8iconURLsEi
+__ZN7WebCore8FormData10appendBlobERKNS_3URLE
+__ZN7WebCore8FormData10appendDataEPKvm
+__ZN7WebCore8FormData15appendFileRangeERKN3WTF6StringExxdb
+__ZN7WebCore8FormData6createEv
 __ZN7WebCore8FormData6createEPKvm
 __ZN7WebCore8FormData6decodeERN3WTF7DecoderE
 __ZN7WebCore8FormDataD1Ev

Modified: trunk/Source/WebKit2/ChangeLog (170610 => 170611)


--- trunk/Source/WebKit2/ChangeLog	2014-06-30 22:58:36 UTC (rev 170610)
+++ trunk/Source/WebKit2/ChangeLog	2014-06-30 23:05:45 UTC (rev 170611)
@@ -1,3 +1,16 @@
+2014-06-30  Anders Carlsson  <[email protected]>
+
+        Adopt the legacy session decoding inside WebPage::restoreSession for now
+        https://bugs.webkit.org/show_bug.cgi?id=134465
+
+        Reviewed by Sam Weinig.
+
+        * UIProcess/mac/LegacySessionStateCoding.cpp:
+        (WebKit::decodeLegacySessionHistoryEntryData):
+        * UIProcess/mac/LegacySessionStateCoding.h:
+        * WebProcess/WebPage/WebPage.cpp:
+        (WebKit::WebPage::restoreSession):
+
 2014-06-30  Simon Fraser  <[email protected]>
 
         [iOS WK2] Don't crash on status bar tap with overflow scroll views

Modified: trunk/Source/WebKit2/UIProcess/mac/LegacySessionStateCoding.cpp (170610 => 170611)


--- trunk/Source/WebKit2/UIProcess/mac/LegacySessionStateCoding.cpp	2014-06-30 22:58:36 UTC (rev 170610)
+++ trunk/Source/WebKit2/UIProcess/mac/LegacySessionStateCoding.cpp	2014-06-30 23:05:45 UTC (rev 170611)
@@ -977,9 +977,9 @@
     return true;
 }
 
-bool decodeLegacySessionHistoryEntryData(const API::Data& historyEntryData, FrameState& mainFrameState)
+bool decodeLegacySessionHistoryEntryData(const uint8_t* data, size_t size, FrameState& mainFrameState)
 {
-    return decodeSessionHistoryEntryData(historyEntryData.bytes(), historyEntryData.size(), mainFrameState);
+    return decodeSessionHistoryEntryData(data, size, mainFrameState);
 }
 
 } // namespace WebKit

Modified: trunk/Source/WebKit2/UIProcess/mac/LegacySessionStateCoding.h (170610 => 170611)


--- trunk/Source/WebKit2/UIProcess/mac/LegacySessionStateCoding.h	2014-06-30 22:58:36 UTC (rev 170610)
+++ trunk/Source/WebKit2/UIProcess/mac/LegacySessionStateCoding.h	2014-06-30 23:05:45 UTC (rev 170611)
@@ -40,7 +40,7 @@
 RefPtr<API::Data> encodeLegacySessionHistoryEntryData(const FrameState&);
 
 bool decodeLegacySessionState(const API::Data&, SessionState&);
-bool decodeLegacySessionHistoryEntryData(const API::Data&, FrameState&);
+bool decodeLegacySessionHistoryEntryData(const uint8_t* data, size_t, FrameState&);
 
 } // namespace WebKit
 

Modified: trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp (170610 => 170611)


--- trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp	2014-06-30 22:58:36 UTC (rev 170610)
+++ trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp	2014-06-30 23:05:45 UTC (rev 170611)
@@ -42,6 +42,7 @@
 #include "InjectedBundleUserMessageCoders.h"
 #include "LayerTreeHost.h"
 #include "LegacySessionState.h"
+#include "LegacySessionStateCoding.h"
 #include "Logging.h"
 #include "NetscapePlugin.h"
 #include "NotificationPermissionRequestManager.h"
@@ -51,6 +52,8 @@
 #include "PluginView.h"
 #include "PrintInfo.h"
 #include "SelectionOverlayController.h"
+#include "SessionState.h"
+#include "SessionStateConversion.h"
 #include "SessionTracker.h"
 #include "ShareableBitmap.h"
 #include "TelephoneNumberOverlayController.h"
@@ -1962,14 +1965,19 @@
     uint64_t currentItemID = 0;
     for (size_t i = 0; i < size; ++i) {
         WebBackForwardListItem* webItem = list[i].get();
-        DecoderAdapter decoder(webItem->backForwardData().data(), webItem->backForwardData().size());
-        
-        RefPtr<HistoryItem> item = HistoryItem::decodeBackForwardTree(webItem->url(), webItem->title(), webItem->originalURL(), decoder);
-        if (!item) {
-            LOG_ERROR("Failed to decode a HistoryItem from session state data.");
+
+        PageState pageState;
+        pageState.title = webItem->title();
+        pageState.mainFrameState.urlString = webItem->url();
+        pageState.mainFrameState.originalURLString = webItem->originalURL();
+
+        if (!decodeLegacySessionHistoryEntryData(webItem->backForwardData().data(), webItem->backForwardData().size(), pageState.mainFrameState)) {
+            LOG_ERROR("Failed to decode page state.");
             return 0;
         }
-        
+
+        RefPtr<HistoryItem> item = toHistoryItem(pageState);
+
         if (i == sessionState.currentIndex())
             currentItemID = webItem->itemID();
         
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to