2011-01-29 Maciej Stachowiak <mjs@apple.com>
authormjs@apple.com <mjs@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 30 Jan 2011 08:30:27 +0000 (08:30 +0000)
committermjs@apple.com <mjs@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 30 Jan 2011 08:30:27 +0000 (08:30 +0000)
commit4eb255c1015d839db1aa8b62e2cdf84908130242
treef5d56e297d514bedecf72adaac6adc96e6b1ebf9
parentad167fc1377e1747f9ab963ce69e88b21d43ee28
2011-01-29  Maciej Stachowiak  <mjs@apple.com>

        Reviewed by Geoffrey Garen.

        Add WKPageCopyPendingAPIRequestURL API
        https://bugs.webkit.org/show_bug.cgi?id=53383

        This API returns the last URL requested for load via API, if neither that load nor any
        other load subsequently reaches the provisional state.

        This is useful to be able to track loads initiated via the API

        * UIProcess/API/C/WKPage.cpp:
        (WKPageCopyPendingAPIRequestURL): Retrieve the pending URL.
        * UIProcess/API/C/WKPage.h:
        * UIProcess/WebPageProxy.cpp:
        (WebKit::WebPageProxy::loadURL): Set pending URL.
        (WebKit::WebPageProxy::loadURLRequest): ditto
        (WebKit::WebPageProxy::reload): ditto
        (WebKit::WebPageProxy::goForward): ditto
        (WebKit::WebPageProxy::goBack): ditto
        (WebKit::WebPageProxy::estimatedProgress): Assume the initial
        progress value when there is a pending URL.
        (WebKit::WebPageProxy::didStartProvisionalLoadForFrame): Clear
        pending URL; clients should look at the provisional URL now.
        (WebKit::WebPageProxy::decidePolicyForNavigationAction): Clear
        pending URL if it doesn't match the policy URL; this means we
        were interrupted by another load.
        * UIProcess/WebPageProxy.h:
        (WebKit::WebPageProxy::pendingAPIRequestURL): Helper function.
        (WebKit::WebPageProxy::clearPendingAPIRequestURL): ditto
        (WebKit::WebPageProxy::setPendingAPIRequestURL): ditto

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@77085 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebKit2/ChangeLog
Source/WebKit2/UIProcess/API/C/WKPage.cpp
Source/WebKit2/UIProcess/API/C/WKPage.h
Source/WebKit2/UIProcess/WebPageProxy.cpp
Source/WebKit2/UIProcess/WebPageProxy.h