Commit a8f218e8 authored by andersca@apple.com's avatar andersca@apple.com
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:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@159641 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent e1657751
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 @@ static void releaseNSData(unsigned char*, const void* data)
- (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 @@ public:
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 @@ public:
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;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment