Commit b8cae6d0 authored by mjs's avatar mjs
Browse files

- fixed 3102016 - REGRESSION: Command-clicking on a link can open _two_ windows.

        * WebView.subproj/WebDataSourcePrivate.h:
        * WebView.subproj/WebDataSourcePrivate.m:
        (-[WebDataSource _setJustOpenedForTargetedLink:]):
        (-[WebDataSource _justOpenedForTargetedLink]):
        * WebView.subproj/WebFrame.m:
        (-[WebFrame findOrCreateFramedNamed:]):
        * WebView.subproj/WebFramePrivate.h:
        * WebView.subproj/WebFramePrivate.m:
        (-[WebFrame _continueAfterNavigationPolicy:]):
        (-[WebFrame _loadDataSource:withLoadType:]):
        (-[WebFrame _downloadRequest:toPath:]):
        (-[WebFrame _setJustOpenedForTargetedLink:]):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@2694 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent c911ccf5
2002-11-15 Maciej Stachowiak <mjs@apple.com>
- fixed 3102016 - REGRESSION: Command-clicking on a link can open _two_ windows.
* WebView.subproj/WebDataSourcePrivate.h:
* WebView.subproj/WebDataSourcePrivate.m:
(-[WebDataSource _setJustOpenedForTargetedLink:]):
(-[WebDataSource _justOpenedForTargetedLink]):
* WebView.subproj/WebFrame.m:
(-[WebFrame findOrCreateFramedNamed:]):
* WebView.subproj/WebFramePrivate.h:
* WebView.subproj/WebFramePrivate.m:
(-[WebFrame _continueAfterNavigationPolicy:]):
(-[WebFrame _loadDataSource:withLoadType:]):
(-[WebFrame _downloadRequest:toPath:]):
(-[WebFrame _setJustOpenedForTargetedLink:]):
2002-11-15 Darin Adler <darin@apple.com>
 
* WebView.subproj/WebFramePrivate.m:
......
2002-11-15 Maciej Stachowiak <mjs@apple.com>
- fixed 3102016 - REGRESSION: Command-clicking on a link can open _two_ windows.
* WebView.subproj/WebDataSourcePrivate.h:
* WebView.subproj/WebDataSourcePrivate.m:
(-[WebDataSource _setJustOpenedForTargetedLink:]):
(-[WebDataSource _justOpenedForTargetedLink]):
* WebView.subproj/WebFrame.m:
(-[WebFrame findOrCreateFramedNamed:]):
* WebView.subproj/WebFramePrivate.h:
* WebView.subproj/WebFramePrivate.m:
(-[WebFrame _continueAfterNavigationPolicy:]):
(-[WebFrame _loadDataSource:withLoadType:]):
(-[WebFrame _downloadRequest:toPath:]):
(-[WebFrame _setJustOpenedForTargetedLink:]):
2002-11-15 Darin Adler <darin@apple.com>
 
* WebView.subproj/WebFramePrivate.m:
......
......@@ -82,6 +82,8 @@
BOOL isDownloading;
NSString *downloadPath;
BOOL justOpenedForTargetedLink;
}
@end
......@@ -137,5 +139,7 @@
- (void)_setLastCheckedRequest:(WebResourceRequest *)request;
- (void)_setIsDownloading:(BOOL)isDownloading;
- (void)_setDownloadPath:(NSString *)downloadPath;
- (void)_setJustOpenedForTargetedLink:(BOOL)justOpened;
- (BOOL)_justOpenedForTargetedLink;
@end
......@@ -583,6 +583,15 @@ - (void)_setDownloadPath:(NSString *)downloadPath
[downloadPath release];
}
- (void)_setJustOpenedForTargetedLink:(BOOL)justOpened
{
_private->justOpenedForTargetedLink = justOpened;
}
- (BOOL)_justOpenedForTargetedLink
{
return _private->justOpenedForTargetedLink;
}
@end
......@@ -184,6 +184,7 @@ - (WebFrame *)findOrCreateFramedNamed:(NSString *)name
[controller _setTopLevelFrameName:name];
[[controller windowOperationsDelegate] showWindow];
frame = [controller mainFrame];
[frame _setJustOpenedForTargetedLink:YES];
}
ASSERT(frame);
......
......@@ -69,6 +69,7 @@ typedef enum {
WebResourceRequest *policyRequest;
id policyTarget;
SEL policySelector;
BOOL justOpenedForTargetedLink;
}
- (void)setName:(NSString *)name;
......@@ -150,5 +151,6 @@ typedef enum {
- (void)_downloadRequest:(WebResourceRequest *)request toPath:(NSString *)path;
- (void)_setJustOpenedForTargetedLink:(BOOL)justOpened;
@end
......@@ -984,6 +984,11 @@ -(void)_continueAfterNavigationPolicy:(WebPolicyAction)policy
BOOL shouldContinue = NO;
if ([[self provisionalDataSource] _justOpenedForTargetedLink] &&
(policy == WebPolicyOpenNewWindow || policy == WebPolicyOpenNewWindowBehind)) {
policy = WebPolicyUse;
}
switch (policy) {
case WebPolicyIgnore:
break;
......@@ -1352,6 +1357,9 @@ - (void)_loadDataSource:(WebDataSource *)newDataSource withLoadType: (WebFrameLo
[newDataSource _setOverrideEncoding:[[[self parent] dataSource] _overrideEncoding]];
}
[newDataSource _setController:[self controller]];
[newDataSource _setJustOpenedForTargetedLink:_private->justOpenedForTargetedLink];
_private->justOpenedForTargetedLink = NO;
[_private setProvisionalDataSource:newDataSource];
ASSERT([newDataSource webFrame] == self);
......@@ -1370,4 +1378,9 @@ - (void)_downloadRequest:(WebResourceRequest *)request toPath:(NSString *)path
[dataSource release];
}
- (void)_setJustOpenedForTargetedLink:(BOOL)justOpened
{
_private->justOpenedForTargetedLink = justOpened;
}
@end
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