Skip to content
Permalink
Browse files
Fetch all page loading related URLs from the page load state
https://bugs.webkit.org/show_bug.cgi?id=124732

Reviewed by Dan Bernstein.

* UIProcess/API/C/WKPage.cpp:
(WKPageCopyActiveURL):
(WKPageCopyProvisionalURL):
(WKPageCopyCommittedURL):
* UIProcess/API/mac/WKBrowsingContextController.mm:
(-[WKBrowsingContextController unreachableURL]):
* UIProcess/PageLoadState.h:
(WebKit::PageLoadState::provisionalURL):
(WebKit::PageLoadState::url):
(WebKit::PageLoadState::unreachableURL):
* UIProcess/WebPageProxy.cpp:
* UIProcess/WebPageProxy.h:

Canonical link: https://commits.webkit.org/142895@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@159641 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
Anders Carlsson committed Nov 21, 2013
1 parent 84f7841 commit 592765e5ed92a3a65ecbb00a0877310561fcd4e3
Showing 6 changed files with 28 additions and 37 deletions.
@@ -1,3 +1,23 @@
2013-11-21 Anders Carlsson <andersca@apple.com>

Fetch all page loading related URLs from the page load state
https://bugs.webkit.org/show_bug.cgi?id=124732

Reviewed by Dan Bernstein.

* UIProcess/API/C/WKPage.cpp:
(WKPageCopyActiveURL):
(WKPageCopyProvisionalURL):
(WKPageCopyCommittedURL):
* UIProcess/API/mac/WKBrowsingContextController.mm:
(-[WKBrowsingContextController unreachableURL]):
* UIProcess/PageLoadState.h:
(WebKit::PageLoadState::provisionalURL):
(WebKit::PageLoadState::url):
(WebKit::PageLoadState::unreachableURL):
* UIProcess/WebPageProxy.cpp:
* UIProcess/WebPageProxy.h:

2013-11-20 Brady Eidson <beidson@apple.com>

Hook up WebProcess-side of getOrEstablishIDBDatabaseMetadata
@@ -734,17 +734,17 @@ WK_EXPORT WKURLRef WKPageCopyPendingAPIRequestURL(WKPageRef pageRef)

WKURLRef WKPageCopyActiveURL(WKPageRef pageRef)
{
return toCopiedURLAPI(toImpl(pageRef)->activeURL());
return toCopiedURLAPI(toImpl(pageRef)->pageLoadState().activeURL());
}

WKURLRef WKPageCopyProvisionalURL(WKPageRef pageRef)
{
return toCopiedURLAPI(toImpl(pageRef)->provisionalURL());
return toCopiedURLAPI(toImpl(pageRef)->pageLoadState().provisionalURL());
}

WKURLRef WKPageCopyCommittedURL(WKPageRef pageRef)
{
return toCopiedURLAPI(toImpl(pageRef)->committedURL());
return toCopiedURLAPI(toImpl(pageRef)->pageLoadState().url());
}

WKStringRef WKPageCopyStandardUserAgentWithApplicationName(WKStringRef applicationName)
@@ -335,7 +335,7 @@ - (NSURL *)committedURL

- (NSURL *)unreachableURL
{
return [NSURL _web_URLWithWTFString:toImpl(_data->_pageRef.get())->unreachableURL() relativeToURL:nil];
return [NSURL _web_URLWithWTFString:toImpl(_data->_pageRef.get())->pageLoadState().unreachableURL() relativeToURL:nil];
}

- (double)estimatedProgress
@@ -43,6 +43,10 @@ class PageLoadState {

void reset();

const String& provisionalURL() const { return m_provisionalURL; }
const String& url() const { return m_url; }
const String& unreachableURL() const { return m_unreachableURL; }

String activeURL() const;

const String& pendingAPIRequestURL() const;
@@ -836,34 +836,6 @@ void WebPageProxy::willGoToBackForwardListItem(uint64_t itemID, CoreIPC::Message
m_loaderClient.willGoToBackForwardListItem(this, item, userData.get());
}

String WebPageProxy::activeURL() const
{
return m_pageLoadState.activeURL();
}

String WebPageProxy::provisionalURL() const
{
if (!m_mainFrame)
return String();
return m_mainFrame->provisionalURL();
}

String WebPageProxy::committedURL() const
{
if (!m_mainFrame)
return String();

return m_mainFrame->url();
}

String WebPageProxy::unreachableURL() const
{
if (!m_mainFrame)
return String();

return m_mainFrame->unreachableURL();
}

bool WebPageProxy::canShowMIMEType(const String& mimeType) const
{
if (MIMETypeRegistry::canShowMIMEType(mimeType))
@@ -295,11 +295,6 @@ class WebPageProxy
void shouldGoToBackForwardListItem(uint64_t itemID, bool& shouldGoToBackForwardListItem);
void willGoToBackForwardListItem(uint64_t itemID, CoreIPC::MessageDecoder&);

String activeURL() const;
String provisionalURL() const;
String committedURL() const;
String unreachableURL() const;

bool willHandleHorizontalScrollEvents() const;

bool canShowMIMEType(const String& mimeType) const;

0 comments on commit 592765e

Please sign in to comment.