[SCM] WebKit Debian packaging branch, debian/unstable, updated. debian/1.1.15-1-40151-g37bb677
mjs
mjs at 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Sat Sep 26 06:57:43 UTC 2009
The following commit has been merged in the debian/unstable branch:
commit 364cea1126978223aa0b82b8d36e20a8c64ae687
Author: mjs <mjs at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Thu Nov 7 14:33:54 2002 +0000
WebKit:
Changed things so that creating a window takes a request rather
than a URL and referrer.
* WebCoreSupport.subproj/WebBridge.m:
(-[WebBridge createWindowWithURL:frameName:]):
* WebView.subproj/WebControllerPrivate.h:
* WebView.subproj/WebControllerPrivate.m:
(-[WebController _openNewWindowWithRequest:behind:]):
* WebView.subproj/WebDataSourcePrivate.h:
* WebView.subproj/WebDataSourcePrivate.m:
(-[WebDataSourcePrivate dealloc]):
(-[WebDataSource _setTriggeringEvent:]):
(-[WebDataSource _triggeringEvent]):
* WebView.subproj/WebDefaultContextMenuDelegate.m:
(-[WebDefaultContextMenuDelegate openNewWindowWithURL:]):
* WebView.subproj/WebFrame.m:
(-[WebFrame setProvisionalDataSource:]):
(-[WebFrame findOrCreateFramedNamed:]):
* WebView.subproj/WebFramePrivate.m:
(-[WebFrame _continueAfterClickPolicyForEvent:request:]):
* WebView.subproj/WebWindowOperationsDelegate.h:
WebBrowser:
Changed things so that creating a window takes a request rather
than a URL and referrer.
* BrowserWebController.m:
(-[BrowserWebController createWindowWithRequest:]):
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@2585 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebKit/ChangeLog b/WebKit/ChangeLog
index 74a1134..6c3f26f 100644
--- a/WebKit/ChangeLog
+++ b/WebKit/ChangeLog
@@ -1,3 +1,27 @@
+2002-11-07 Maciej Stachowiak <mjs at apple.com>
+
+ Changed things so that creating a window takes a request rather
+ than a URL and referrer.
+
+ * WebCoreSupport.subproj/WebBridge.m:
+ (-[WebBridge createWindowWithURL:frameName:]):
+ * WebView.subproj/WebControllerPrivate.h:
+ * WebView.subproj/WebControllerPrivate.m:
+ (-[WebController _openNewWindowWithRequest:behind:]):
+ * WebView.subproj/WebDataSourcePrivate.h:
+ * WebView.subproj/WebDataSourcePrivate.m:
+ (-[WebDataSourcePrivate dealloc]):
+ (-[WebDataSource _setTriggeringEvent:]):
+ (-[WebDataSource _triggeringEvent]):
+ * WebView.subproj/WebDefaultContextMenuDelegate.m:
+ (-[WebDefaultContextMenuDelegate openNewWindowWithURL:]):
+ * WebView.subproj/WebFrame.m:
+ (-[WebFrame setProvisionalDataSource:]):
+ (-[WebFrame findOrCreateFramedNamed:]):
+ * WebView.subproj/WebFramePrivate.m:
+ (-[WebFrame _continueAfterClickPolicyForEvent:request:]):
+ * WebView.subproj/WebWindowOperationsDelegate.h:
+
2002-11-06 Darin Adler <darin at apple.com>
- fixed problem where files small enough to fit entirely in the buffer
diff --git a/WebKit/ChangeLog-2002-12-03 b/WebKit/ChangeLog-2002-12-03
index 74a1134..6c3f26f 100644
--- a/WebKit/ChangeLog-2002-12-03
+++ b/WebKit/ChangeLog-2002-12-03
@@ -1,3 +1,27 @@
+2002-11-07 Maciej Stachowiak <mjs at apple.com>
+
+ Changed things so that creating a window takes a request rather
+ than a URL and referrer.
+
+ * WebCoreSupport.subproj/WebBridge.m:
+ (-[WebBridge createWindowWithURL:frameName:]):
+ * WebView.subproj/WebControllerPrivate.h:
+ * WebView.subproj/WebControllerPrivate.m:
+ (-[WebController _openNewWindowWithRequest:behind:]):
+ * WebView.subproj/WebDataSourcePrivate.h:
+ * WebView.subproj/WebDataSourcePrivate.m:
+ (-[WebDataSourcePrivate dealloc]):
+ (-[WebDataSource _setTriggeringEvent:]):
+ (-[WebDataSource _triggeringEvent]):
+ * WebView.subproj/WebDefaultContextMenuDelegate.m:
+ (-[WebDefaultContextMenuDelegate openNewWindowWithURL:]):
+ * WebView.subproj/WebFrame.m:
+ (-[WebFrame setProvisionalDataSource:]):
+ (-[WebFrame findOrCreateFramedNamed:]):
+ * WebView.subproj/WebFramePrivate.m:
+ (-[WebFrame _continueAfterClickPolicyForEvent:request:]):
+ * WebView.subproj/WebWindowOperationsDelegate.h:
+
2002-11-06 Darin Adler <darin at apple.com>
- fixed problem where files small enough to fit entirely in the buffer
diff --git a/WebKit/WebCoreSupport.subproj/WebBridge.m b/WebKit/WebCoreSupport.subproj/WebBridge.m
index 5ae437a..274337c 100644
--- a/WebKit/WebCoreSupport.subproj/WebBridge.m
+++ b/WebKit/WebCoreSupport.subproj/WebBridge.m
@@ -99,7 +99,7 @@
{
ASSERT(frame != nil);
- WebController *newController = [[[frame controller] windowOperationsDelegate] createWindowWithURL:URL referrer:[self referrer]];
+ WebController *newController = [[[frame controller] windowOperationsDelegate] createWindowWithRequest:[WebResourceRequest requestWithURL:URL]];
[newController _setTopLevelFrameName:name];
return [[newController mainFrame] _bridge];
}
diff --git a/WebKit/WebView.subproj/WebControllerPrivate.h b/WebKit/WebView.subproj/WebControllerPrivate.h
index 994e821..e4227c7 100644
--- a/WebKit/WebView.subproj/WebControllerPrivate.h
+++ b/WebKit/WebView.subproj/WebControllerPrivate.h
@@ -58,7 +58,7 @@
- (WebFrame *)_findFrameInThisWindowNamed: (NSString *)name;
- (WebFrame *)_findFrameNamed: (NSString *)name;
-- (WebController *)_openNewWindowWithURL:(NSURL *)URL referrer:(NSString *)referrer behind:(BOOL)behind;
+- (WebController *)_openNewWindowWithRequest:(WebResourceRequest *)request behind:(BOOL)behind;
- (NSMenu *)_menuForElement:(NSDictionary *)element;
@end
diff --git a/WebKit/WebView.subproj/WebControllerPrivate.m b/WebKit/WebView.subproj/WebControllerPrivate.m
index ed436e4..e3fa515 100644
--- a/WebKit/WebView.subproj/WebControllerPrivate.m
+++ b/WebKit/WebView.subproj/WebControllerPrivate.m
@@ -252,9 +252,9 @@
return frame;
}
-- (WebController *)_openNewWindowWithURL:(NSURL *)URL referrer:(NSString *)referrer behind:(BOOL)behind
+- (WebController *)_openNewWindowWithRequest:(WebResourceRequest *)request behind:(BOOL)behind
{
- WebController *newWindowController = [[self windowOperationsDelegate] createWindowWithURL:URL referrer:referrer];
+ WebController *newWindowController = [[self windowOperationsDelegate] createWindowWithRequest:request];
if (behind) {
[[newWindowController windowOperationsDelegate] showWindowBehindFrontmost];
} else {
diff --git a/WebKit/WebView.subproj/WebDataSourcePrivate.h b/WebKit/WebView.subproj/WebDataSourcePrivate.h
index 856e4a8..6e401f5 100644
--- a/WebKit/WebView.subproj/WebDataSourcePrivate.h
+++ b/WebKit/WebView.subproj/WebDataSourcePrivate.h
@@ -77,6 +77,11 @@
WebHistoryItem *previousBackForwardItem;
// BF items that reference what we loaded - we must keep their titles up to date
NSMutableArray *ourBackForwardItems;
+
+ // The event that triggered loading of this data source, if any -
+ // we keep this around for the benefit of the various policy
+ // handlers.
+ NSEvent *triggeringEvent;
}
@end
@@ -134,4 +139,7 @@
- (void)_defersCallbacksChanged;
- (WebResourceRequest *)_originalRequest;
+- (void)_setTriggeringEvent:(NSEvent *)event;
+- (NSEvent *)_triggeringEvent;
+
@end
diff --git a/WebKit/WebView.subproj/WebDataSourcePrivate.m b/WebKit/WebView.subproj/WebDataSourcePrivate.m
index 82f3d33..094f2ee 100644
--- a/WebKit/WebView.subproj/WebDataSourcePrivate.m
+++ b/WebKit/WebView.subproj/WebDataSourcePrivate.m
@@ -60,6 +60,7 @@
[provisionalBackForwardItem release];
[previousBackForwardItem release];
[ourBackForwardItems release];
+ [triggeringEvent release];
[super dealloc];
}
@@ -579,4 +580,17 @@
return _private->originalRequest;
}
+- (void)_setTriggeringEvent:(NSEvent *)event
+{
+ [event retain];
+ [_private->triggeringEvent release];
+ _private->triggeringEvent = event;
+}
+
+- (NSEvent *)_triggeringEvent
+{
+ return [[_private->triggeringEvent retain] autorelease];
+}
+
@end
+
diff --git a/WebKit/WebView.subproj/WebDefaultContextMenuDelegate.m b/WebKit/WebView.subproj/WebDefaultContextMenuDelegate.m
index 0124b58..239d7ef 100644
--- a/WebKit/WebView.subproj/WebDefaultContextMenuDelegate.m
+++ b/WebKit/WebView.subproj/WebDefaultContextMenuDelegate.m
@@ -12,6 +12,7 @@
#import <WebKit/WebNSPasteboardExtras.h>
#import <WebKit/WebWindowOperationsDelegate.h>
+#import <WebFoundation/WebHTTPResourceRequest.h>
#import <WebFoundation/WebLocalizableStrings.h>
#import <WebFoundation/WebResourceHandle.h>
#import <WebFoundation/WebResourceRequest.h>
@@ -98,7 +99,14 @@
{
WebFrame *webFrame = [element objectForKey:WebElementFrameKey];
WebController *controller = [webFrame controller];
- [controller _openNewWindowWithURL:URL referrer:[[webFrame _bridge] referrer] behind:NO];
+
+ WebResourceRequest *request = [WebResourceRequest requestWithURL:URL];
+ NSString *referrer = [[webFrame _bridge] referrer];
+ if (referrer) {
+ [request setReferrer:referrer];
+ }
+
+ [controller _openNewWindowWithRequest:request behind:NO];
}
- (void)downloadURL:(NSURL *)URL
diff --git a/WebKit/WebView.subproj/WebFrame.m b/WebKit/WebView.subproj/WebFrame.m
index 255c046..f5c6920 100644
--- a/WebKit/WebView.subproj/WebFrame.m
+++ b/WebKit/WebView.subproj/WebFrame.m
@@ -138,8 +138,9 @@
[self _setLoadType: WebFrameLoadTypeStandard];
- // _shouldShowURL asks the client for the URL policies and reports errors if there are any
+ // _shouldShowRequest asks the client for the URL policies and reports errors if there are any
// returns YES if we should show the data source
+
if (![self _shouldShowRequest:[newDataSource request]]) {
return NO;
}
@@ -238,7 +239,7 @@
if(!frame){
WebController *controller = [[[self controller] windowOperationsDelegate]
- createWindowWithURL:nil referrer:[[self _bridge] referrer]];
+ createWindowWithRequest:nil];
[controller _setTopLevelFrameName:name];
[[controller windowOperationsDelegate] showWindow];
diff --git a/WebKit/WebView.subproj/WebFramePrivate.m b/WebKit/WebView.subproj/WebFramePrivate.m
index 7c3d2c0..7250c58 100644
--- a/WebKit/WebView.subproj/WebFramePrivate.m
+++ b/WebKit/WebView.subproj/WebFramePrivate.m
@@ -831,10 +831,10 @@ static const char * const stateNames[] = {
}
break;
case WebClickPolicyOpenNewWindow:
- [controller _openNewWindowWithURL:[request URL] referrer:[[self _bridge] referrer] behind:NO];
+ [controller _openNewWindowWithRequest:request behind:NO];
break;
case WebClickPolicyOpenNewWindowBehind:
- [controller _openNewWindowWithURL:[request URL] referrer:[[self _bridge] referrer] behind:YES];
+ [controller _openNewWindowWithRequest:request behind:YES];
break;
case WebClickPolicySave:
case WebClickPolicySaveAndOpenExternally:
diff --git a/WebKit/WebView.subproj/WebUIDelegate.h b/WebKit/WebView.subproj/WebUIDelegate.h
index 17ba572..e18027b 100644
--- a/WebKit/WebView.subproj/WebUIDelegate.h
+++ b/WebKit/WebView.subproj/WebUIDelegate.h
@@ -19,15 +19,14 @@
@protocol WebWindowOperationsDelegate <NSObject>
/*!
- @method createWindowWithURL:referrer:
- @abstract Create a new window and begin to load the specified URL.
+ @method createWindowWithRequest:
+ @abstract Create a new window and begin to load the specified request.
@discussion The newly created window is hidden, and the window operations delegate on the
new controllers will get a showWindow or showWindowBehindFrontmost call.
- @param URL The URL to load, may be nil.
- @param referrer The referrer to use when loading the URL.
+ @param request The request to load.
@result The WebController for the WebView in the new window.
*/
-- (WebController *)createWindowWithURL:(NSURL *)URL referrer:(NSString *)referrer;
+- (WebController *)createWindowWithRequest:(WebResourceRequest *)request;
/*!
@method showWindow
diff --git a/WebKit/WebView.subproj/WebViewPrivate.h b/WebKit/WebView.subproj/WebViewPrivate.h
index 994e821..e4227c7 100644
--- a/WebKit/WebView.subproj/WebViewPrivate.h
+++ b/WebKit/WebView.subproj/WebViewPrivate.h
@@ -58,7 +58,7 @@
- (WebFrame *)_findFrameInThisWindowNamed: (NSString *)name;
- (WebFrame *)_findFrameNamed: (NSString *)name;
-- (WebController *)_openNewWindowWithURL:(NSURL *)URL referrer:(NSString *)referrer behind:(BOOL)behind;
+- (WebController *)_openNewWindowWithRequest:(WebResourceRequest *)request behind:(BOOL)behind;
- (NSMenu *)_menuForElement:(NSDictionary *)element;
@end
diff --git a/WebKit/WebView.subproj/WebViewPrivate.m b/WebKit/WebView.subproj/WebViewPrivate.m
index ed436e4..e3fa515 100644
--- a/WebKit/WebView.subproj/WebViewPrivate.m
+++ b/WebKit/WebView.subproj/WebViewPrivate.m
@@ -252,9 +252,9 @@
return frame;
}
-- (WebController *)_openNewWindowWithURL:(NSURL *)URL referrer:(NSString *)referrer behind:(BOOL)behind
+- (WebController *)_openNewWindowWithRequest:(WebResourceRequest *)request behind:(BOOL)behind
{
- WebController *newWindowController = [[self windowOperationsDelegate] createWindowWithURL:URL referrer:referrer];
+ WebController *newWindowController = [[self windowOperationsDelegate] createWindowWithRequest:request];
if (behind) {
[[newWindowController windowOperationsDelegate] showWindowBehindFrontmost];
} else {
diff --git a/WebKit/WebView.subproj/WebWindowOperationsDelegate.h b/WebKit/WebView.subproj/WebWindowOperationsDelegate.h
index 17ba572..e18027b 100644
--- a/WebKit/WebView.subproj/WebWindowOperationsDelegate.h
+++ b/WebKit/WebView.subproj/WebWindowOperationsDelegate.h
@@ -19,15 +19,14 @@
@protocol WebWindowOperationsDelegate <NSObject>
/*!
- @method createWindowWithURL:referrer:
- @abstract Create a new window and begin to load the specified URL.
+ @method createWindowWithRequest:
+ @abstract Create a new window and begin to load the specified request.
@discussion The newly created window is hidden, and the window operations delegate on the
new controllers will get a showWindow or showWindowBehindFrontmost call.
- @param URL The URL to load, may be nil.
- @param referrer The referrer to use when loading the URL.
+ @param request The request to load.
@result The WebController for the WebView in the new window.
*/
-- (WebController *)createWindowWithURL:(NSURL *)URL referrer:(NSString *)referrer;
+- (WebController *)createWindowWithRequest:(WebResourceRequest *)request;
/*!
@method showWindow
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list