Changeset 133199 in webkit


Ignore:
Timestamp:
Nov 1, 2012 11:37:23 AM (11 years ago)
Author:
commit-queue@webkit.org
Message:

[BlackBerry] Web page view state should be preserved for pages loaded from page cache
https://bugs.webkit.org/show_bug.cgi?id=100694
Internal PR: 220488

Internally reviewed by Lianghui Chen, Joe Mason
Patch by Michael Matovsky <mmatovsky@rim.com> on 2012-11-01
Reviewed by Rob Buis.

The web page view specific metadata should be preserved for web pages loaded from page cache (by using back/forward).
This requires web page view state to be saved in and restored from the corresponding page cache history item.

Source/WebCore:

No new tests for platform specific internal change.

  • history/blackberry/HistoryItemViewState.h:

(HistoryItemViewState):

Source/WebKit/blackberry:

  • Api/WebPageClient.h:
  • WebCoreSupport/FrameLoaderClientBlackBerry.cpp:

(WebCore::FrameLoaderClientBlackBerry::saveViewStateToItem):
(WebCore::FrameLoaderClientBlackBerry::restoreViewState):

Location:
trunk/Source
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r133195 r133199  
     12012-11-01  Michael Matovsky  <mmatovsky@rim.com>
     2
     3        [BlackBerry] Web page view state should be preserved for pages loaded from page cache
     4        https://bugs.webkit.org/show_bug.cgi?id=100694
     5        Internal PR: 220488
     6
     7        Internally reviewed by Lianghui Chen, Joe Mason
     8        Reviewed by Rob Buis.
     9
     10        The web page view specific metadata should be preserved for web pages loaded from page cache (by using back/forward).
     11        This requires web page view state to be saved in and restored from the corresponding page cache history item.
     12
     13        No new tests for platform specific internal change.
     14
     15        * history/blackberry/HistoryItemViewState.h:
     16        (HistoryItemViewState):
     17
    1182012-11-01  Alec Flett  <alecflett@chromium.org>
    219
  • trunk/Source/WebCore/history/blackberry/HistoryItemViewState.h

    r127757 r133199  
    2020#define HistoryItemViewState_h
    2121
     22#include <BlackBerryPlatformString.h>
    2223#include <wtf/text/WTFString.h>
    2324
     
    4748    bool shouldSaveViewState;
    4849    String networkToken;
     50    BlackBerry::Platform::String webPageClientState;
    4951};
    5052
  • trunk/Source/WebKit/blackberry/Api/WebPageClient.h

    r132440 r133199  
    114114    virtual int showAlertDialog(AlertType) = 0;
    115115
     116    virtual BlackBerry::Platform::String serializePageCacheState() const = 0;
     117    virtual void deserializePageCacheState(const BlackBerry::Platform::String& state) = 0;
     118
    116119    virtual void runJavaScriptAlert(const unsigned short* message, unsigned messageLength, const char* origin, unsigned originLength) = 0;
    117120    virtual bool runJavaScriptConfirm(const unsigned short* message, unsigned messageLength, const char* origin, unsigned originLength) = 0;
  • trunk/Source/WebKit/blackberry/ChangeLog

    r133184 r133199  
     12012-11-01  Michael Matovsky  <mmatovsky@rim.com>
     2
     3        [BlackBerry] Web page view state should be preserved for pages loaded from page cache
     4        https://bugs.webkit.org/show_bug.cgi?id=100694
     5        Internal PR: 220488
     6
     7        Internally reviewed by Lianghui Chen, Joe Mason
     8        Reviewed by Rob Buis.
     9
     10        The web page view specific metadata should be preserved for web pages loaded from page cache (by using back/forward).
     11        This requires web page view state to be saved in and restored from the corresponding page cache history item.
     12
     13        * Api/WebPageClient.h:
     14        * WebCoreSupport/FrameLoaderClientBlackBerry.cpp:
     15        (WebCore::FrameLoaderClientBlackBerry::saveViewStateToItem):
     16        (WebCore::FrameLoaderClientBlackBerry::restoreViewState):
     17
    1182012-11-01  Leo Yang  <leoyang@rim.com>
    219
  • trunk/Source/WebKit/blackberry/WebCoreSupport/FrameLoaderClientBlackBerry.cpp

    r133094 r133199  
    10441044        viewState.maximumScale = m_webPagePrivate->m_maximumScale;
    10451045        viewState.isUserScalable = m_webPagePrivate->m_userScalable;
     1046        viewState.webPageClientState = m_webPagePrivate->m_client->serializePageCacheState();
    10461047    }
    10471048}
     
    10611062    if (!viewState.shouldSaveViewState)
    10621063        return;
     1064
     1065    m_webPagePrivate->m_client->deserializePageCacheState(viewState.webPageClientState);
     1066
    10631067    // WebPagePrivate is messing up FrameView::wasScrolledByUser() by sending
    10641068    // scroll events that look like they were user generated all the time.
Note: See TracChangeset for help on using the changeset viewer.