Skip to content
Permalink
Browse files
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_zhang@apple.com> on 2013-07-04
Reviewed by Dan Bernstein.

* WebView/WebFrame.mm:
(-[WebFrame _unreachableURL]):
* WebView/WebFramePrivate.h:

Canonical link: https://commits.webkit.org/136399@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@152405 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
Yongjun Zhang authored and webkit-commit-queue committed Jul 4, 2013
1 parent 3678d2f commit 370345814d2b83d2ceb99bb3020e9fbe9efe7e25
Showing with 21 additions and 0 deletions.
  1. +15 −0 Source/WebKit/mac/ChangeLog
  2. +5 −0 Source/WebKit/mac/WebView/WebFrame.mm
  3. +1 −0 Source/WebKit/mac/WebView/WebFramePrivate.h
@@ -1,3 +1,18 @@
2013-07-04 Yongjun Zhang <yongjun_zhang@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 <zalan@apple.com>

H&R Block 2010 Help window can not be reopened.
@@ -1241,6 +1241,11 @@ - (NSDictionary *)elementAtPoint:(NSPoint)point
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
@@ -137,4 +137,5 @@ typedef enum {

- (NSDictionary *)elementAtPoint:(NSPoint)point;

- (NSURL *)_unreachableURL;
@end

0 comments on commit 3703458

Please sign in to comment.