Title: [152405] trunk/Source/WebKit/mac
- Revision
- 152405
- Author
- commit-qu...@webkit.org
- Date
- 2013-07-04 12:53:19 -0700 (Thu, 04 Jul 2013)
Log Message
Add a method to get unreachable URL from WebFrame.
https://bugs.webkit.org/show_bug.cgi?id=118399
Normally we could use [[WebFrame dataSource] unreachableURL] to get the failed URL. However, if the frame has not
loaded (FrameLoader::frameHasLoaded() is false), we will get a nil dataSource and we won't be able to get unreachableURL.
We can add a method to always return the unreachableURL regardless if the frame has loaded or not.
Patch by Yongjun Zhang <yongjun_zh...@apple.com> on 2013-07-04
Reviewed by Dan Bernstein.
* WebView/WebFrame.mm:
(-[WebFrame _unreachableURL]):
* WebView/WebFramePrivate.h:
Modified Paths
Diff
Modified: trunk/Source/WebKit/mac/ChangeLog (152404 => 152405)
--- trunk/Source/WebKit/mac/ChangeLog 2013-07-04 18:48:51 UTC (rev 152404)
+++ trunk/Source/WebKit/mac/ChangeLog 2013-07-04 19:53:19 UTC (rev 152405)
@@ -1,3 +1,18 @@
+2013-07-04 Yongjun Zhang <yongjun_zh...@apple.com>
+
+ Add a method to get unreachable URL from WebFrame.
+ https://bugs.webkit.org/show_bug.cgi?id=118399
+
+ Normally we could use [[WebFrame dataSource] unreachableURL] to get the failed URL. However, if the frame has not
+ loaded (FrameLoader::frameHasLoaded() is false), we will get a nil dataSource and we won't be able to get unreachableURL.
+ We can add a method to always return the unreachableURL regardless if the frame has loaded or not.
+
+ Reviewed by Dan Bernstein.
+
+ * WebView/WebFrame.mm:
+ (-[WebFrame _unreachableURL]):
+ * WebView/WebFramePrivate.h:
+
2013-07-03 Zalan Bujtas <za...@apple.com>
H&R Block 2010 Help window can not be reopened.
Modified: trunk/Source/WebKit/mac/WebView/WebFrame.mm (152404 => 152405)
--- trunk/Source/WebKit/mac/WebView/WebFrame.mm 2013-07-04 18:48:51 UTC (rev 152404)
+++ trunk/Source/WebKit/mac/WebView/WebFrame.mm 2013-07-04 19:53:19 UTC (rev 152405)
@@ -1241,6 +1241,11 @@
return [[[WebElementDictionary alloc] initWithHitTestResult:coreFrame->eventHandler()->hitTestResultAtPoint(IntPoint(point), HitTestRequest::ReadOnly | HitTestRequest::Active | HitTestRequest::IgnoreClipping | HitTestRequest::DisallowShadowContent)] autorelease];
}
+- (NSURL *)_unreachableURL
+{
+ return [[self _dataSource] unreachableURL];
+}
+
@end
@implementation WebFrame
Modified: trunk/Source/WebKit/mac/WebView/WebFramePrivate.h (152404 => 152405)
--- trunk/Source/WebKit/mac/WebView/WebFramePrivate.h 2013-07-04 18:48:51 UTC (rev 152404)
+++ trunk/Source/WebKit/mac/WebView/WebFramePrivate.h 2013-07-04 19:53:19 UTC (rev 152405)
@@ -137,4 +137,5 @@
- (NSDictionary *)elementAtPoint:(NSPoint)point;
+- (NSURL *)_unreachableURL;
@end
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes