Title: [158775] trunk/Source/WebKit2
Revision
158775
Author
m...@apple.com
Date
2013-11-06 12:48:59 -0800 (Wed, 06 Nov 2013)

Log Message

[Cocoa] Add -[WKBrowsingContextController unreachableURL]
https://bugs.webkit.org/show_bug.cgi?id=123909

Reviewed by Anders Carlsson.

* UIProcess/API/mac/WKBrowsingContextController.h: Declared unreachableURL property.
* UIProcess/API/mac/WKBrowsingContextController.mm:
(-[WKBrowsingContextController unreachableURL]): Added.
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::unreachableURL): Added.
* UIProcess/WebPageProxy.h:

Modified Paths

Diff

Modified: trunk/Source/WebKit2/ChangeLog (158774 => 158775)


--- trunk/Source/WebKit2/ChangeLog	2013-11-06 20:38:37 UTC (rev 158774)
+++ trunk/Source/WebKit2/ChangeLog	2013-11-06 20:48:59 UTC (rev 158775)
@@ -1,3 +1,17 @@
+2013-11-06  Dan Bernstein  <m...@apple.com>
+
+        [Cocoa] Add -[WKBrowsingContextController unreachableURL]
+        https://bugs.webkit.org/show_bug.cgi?id=123909
+
+        Reviewed by Anders Carlsson.
+
+        * UIProcess/API/mac/WKBrowsingContextController.h: Declared unreachableURL property.
+        * UIProcess/API/mac/WKBrowsingContextController.mm:
+        (-[WKBrowsingContextController unreachableURL]): Added.
+        * UIProcess/WebPageProxy.cpp:
+        (WebKit::WebPageProxy::unreachableURL): Added.
+        * UIProcess/WebPageProxy.h:
+
 2013-11-06  Anders Carlsson  <ander...@apple.com>
 
         Encode parameters as objects

Modified: trunk/Source/WebKit2/UIProcess/API/mac/WKBrowsingContextController.h (158774 => 158775)


--- trunk/Source/WebKit2/UIProcess/API/mac/WKBrowsingContextController.h	2013-11-06 20:38:37 UTC (rev 158774)
+++ trunk/Source/WebKit2/UIProcess/API/mac/WKBrowsingContextController.h	2013-11-06 20:48:59 UTC (rev 158775)
@@ -110,12 +110,14 @@
 /* URL for the active load. This is the URL that should be shown in user interface. */
 @property(readonly) NSURL *activeURL;
 
-/* URL for a request that has been sent, but no response has been recieved yet. */
+/* URL for a request that has been sent, but no response has been received yet. */
 @property(readonly) NSURL *provisionalURL;
 
-/* URL for a request that has been recieved, and is now being used. */
+/* URL for a request that has been received, and is now being used. */
 @property(readonly) NSURL *committedURL;
 
+@property(readonly) NSURL *unreachableURL;
+
 @property(readonly) double estimatedProgress;
 
 #pragma mark Active Document Introspection

Modified: trunk/Source/WebKit2/UIProcess/API/mac/WKBrowsingContextController.mm (158774 => 158775)


--- trunk/Source/WebKit2/UIProcess/API/mac/WKBrowsingContextController.mm	2013-11-06 20:38:37 UTC (rev 158774)
+++ trunk/Source/WebKit2/UIProcess/API/mac/WKBrowsingContextController.mm	2013-11-06 20:48:59 UTC (rev 158775)
@@ -324,6 +324,15 @@
     return autoreleased(WKPageCopyCommittedURL(self._pageRef));
 }
 
+- (NSURL *)unreachableURL
+{
+    const String& unreachableURL = toImpl(_data->_pageRef.get())->unreachableURL();
+    if (!unreachableURL)
+        return nil;
+
+    return !unreachableURL ? nil : [NSURL URLWithString:unreachableURL];
+}
+
 - (double)estimatedProgress
 {
     return toImpl(self._pageRef)->estimatedProgress();

Modified: trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp (158774 => 158775)


--- trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp	2013-11-06 20:38:37 UTC (rev 158774)
+++ trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp	2013-11-06 20:48:59 UTC (rev 158775)
@@ -874,6 +874,14 @@
     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))

Modified: trunk/Source/WebKit2/UIProcess/WebPageProxy.h (158774 => 158775)


--- trunk/Source/WebKit2/UIProcess/WebPageProxy.h	2013-11-06 20:38:37 UTC (rev 158774)
+++ trunk/Source/WebKit2/UIProcess/WebPageProxy.h	2013-11-06 20:48:59 UTC (rev 158775)
@@ -297,6 +297,7 @@
     String activeURL() const;
     String provisionalURL() const;
     String committedURL() const;
+    String unreachableURL() const;
 
     bool willHandleHorizontalScrollEvents() const;
 
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to