[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:04 UTC 2009
The following commit has been merged in the debian/unstable branch:
commit ccda14fa84e03f99e2c79b9d9dfee4424ddd8ca8
Author: mjs <mjs at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Tue Nov 5 01:02:04 2002 +0000
Changes to send NSEvents all the way through WebCore and then pass
them back out to WebKit, so that click policy can have a
WebResourceRequest added.
* WebCoreSupport.subproj/WebBridge.m:
(-[WebBridge loadURL:reload:triggeringEvent:]):
(-[WebBridge createChildFrameNamed:withURL:renderPart:allowsScrolling:marginWidth:marginHeight:]):
* WebView.subproj/WebFramePrivate.h:
* WebView.subproj/WebFramePrivate.m:
(-[WebFrame _continueAfterClickPolicyForEvent:]):
(-[WebFrame _loadURL:loadType:clientRedirect:triggeringEvent:]):
* WebView.subproj/WebHTMLView.m:
(-[WebHTMLView mouseUp:]):
* WebView.subproj/WebHTMLViewPrivate.h:
* WebView.subproj/WebHTMLViewPrivate.m:
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@2555 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebKit/ChangeLog b/WebKit/ChangeLog
index e935f69..e480f42 100644
--- a/WebKit/ChangeLog
+++ b/WebKit/ChangeLog
@@ -1,3 +1,21 @@
+2002-11-04 Maciej Stachowiak <mjs at apple.com>
+
+ Changes to send NSEvents all the way through WebCore and then pass
+ them back out to WebKit, so that click policy can have a
+ WebResourceRequest added.
+
+ * WebCoreSupport.subproj/WebBridge.m:
+ (-[WebBridge loadURL:reload:triggeringEvent:]):
+ (-[WebBridge createChildFrameNamed:withURL:renderPart:allowsScrolling:marginWidth:marginHeight:]):
+ * WebView.subproj/WebFramePrivate.h:
+ * WebView.subproj/WebFramePrivate.m:
+ (-[WebFrame _continueAfterClickPolicyForEvent:]):
+ (-[WebFrame _loadURL:loadType:clientRedirect:triggeringEvent:]):
+ * WebView.subproj/WebHTMLView.m:
+ (-[WebHTMLView mouseUp:]):
+ * WebView.subproj/WebHTMLViewPrivate.h:
+ * WebView.subproj/WebHTMLViewPrivate.m:
+
2002-11-04 Chris Blumenberg <cblu at apple.com>
Fixed - 3091658: REGRESSION: cmd-left for back doesn't work in plain-text viewer
diff --git a/WebKit/ChangeLog-2002-12-03 b/WebKit/ChangeLog-2002-12-03
index e935f69..e480f42 100644
--- a/WebKit/ChangeLog-2002-12-03
+++ b/WebKit/ChangeLog-2002-12-03
@@ -1,3 +1,21 @@
+2002-11-04 Maciej Stachowiak <mjs at apple.com>
+
+ Changes to send NSEvents all the way through WebCore and then pass
+ them back out to WebKit, so that click policy can have a
+ WebResourceRequest added.
+
+ * WebCoreSupport.subproj/WebBridge.m:
+ (-[WebBridge loadURL:reload:triggeringEvent:]):
+ (-[WebBridge createChildFrameNamed:withURL:renderPart:allowsScrolling:marginWidth:marginHeight:]):
+ * WebView.subproj/WebFramePrivate.h:
+ * WebView.subproj/WebFramePrivate.m:
+ (-[WebFrame _continueAfterClickPolicyForEvent:]):
+ (-[WebFrame _loadURL:loadType:clientRedirect:triggeringEvent:]):
+ * WebView.subproj/WebHTMLView.m:
+ (-[WebHTMLView mouseUp:]):
+ * WebView.subproj/WebHTMLViewPrivate.h:
+ * WebView.subproj/WebHTMLViewPrivate.m:
+
2002-11-04 Chris Blumenberg <cblu at apple.com>
Fixed - 3091658: REGRESSION: cmd-left for back doesn't work in plain-text viewer
diff --git a/WebKit/WebCoreSupport.subproj/WebBridge.m b/WebKit/WebCoreSupport.subproj/WebBridge.m
index dd622c9..fa39f32 100644
--- a/WebKit/WebCoreSupport.subproj/WebBridge.m
+++ b/WebKit/WebCoreSupport.subproj/WebBridge.m
@@ -280,9 +280,9 @@
[[self dataSource] _setIconURL:URL withType:type];
}
-- (void)loadURL:(NSURL *)URL reload:(BOOL)reload
+- (void)loadURL:(NSURL *)URL reload:(BOOL)reload triggeringEvent:(NSEvent *)event
{
- [frame _loadURL:URL loadType:(reload ? WebFrameLoadTypeReload : WebFrameLoadTypeStandard) clientRedirect:_doingClientRedirect];
+ [frame _loadURL:URL loadType:(reload ? WebFrameLoadTypeReload : WebFrameLoadTypeStandard) clientRedirect:_doingClientRedirect triggeringEvent:event];
_doingClientRedirect = NO;
}
@@ -306,7 +306,7 @@
[[newFrame webView] _setMarginWidth:width];
[[newFrame webView] _setMarginHeight:height];
- [newFrame _loadURL:URL loadType:WebFrameLoadTypeInternal clientRedirect:NO];
+ [newFrame _loadURL:URL loadType:WebFrameLoadTypeInternal clientRedirect:NO triggeringEvent:nil];
return [newFrame _bridge];
}
diff --git a/WebKit/WebView.subproj/WebFramePrivate.h b/WebKit/WebView.subproj/WebFramePrivate.h
index 0b77aef..3ae184e 100644
--- a/WebKit/WebView.subproj/WebFramePrivate.h
+++ b/WebKit/WebView.subproj/WebFramePrivate.h
@@ -95,7 +95,9 @@ typedef enum {
- (void)_setLoadType: (WebFrameLoadType)loadType;
- (WebFrameLoadType)_loadType;
- (void)_goToItem: (WebHistoryItem *)item withFrameLoadType: (WebFrameLoadType)type;
-- (void)_loadURL:(NSURL *)URL loadType:(WebFrameLoadType)loadType clientRedirect:(BOOL)clientRedirect;
+
+-(BOOL)_continueAfterClickPolicyForEvent:(NSEvent *)event;
+-(void)_loadURL:(NSURL *)URL loadType:(WebFrameLoadType)loadType clientRedirect:(BOOL)clientRedirect triggeringEvent:(NSEvent *)event;
- (void)_postWithURL:(NSURL *)URL data:(NSData *)data contentType:(NSString *)contentType;
- (void)_restoreScrollPosition;
- (void)_scrollToTop;
diff --git a/WebKit/WebView.subproj/WebFramePrivate.m b/WebKit/WebView.subproj/WebFramePrivate.m
index cd6c417..8d9a9f8 100644
--- a/WebKit/WebView.subproj/WebFramePrivate.m
+++ b/WebKit/WebView.subproj/WebFramePrivate.m
@@ -780,9 +780,49 @@ static const char * const stateNames[] = {
[newDataSource release];
}
+-(BOOL)_continueAfterClickPolicyForEvent:(NSEvent *)event
+{
+ NSPoint point = [[[self webView] documentView] convertPoint:[event locationInWindow] fromView:nil];
+ WebController *controller = [self controller];
+ WebClickPolicy *clickPolicy;
+
+ clickPolicy = [[controller policyDelegate] clickPolicyForElement:[(WebHTMLView *)[[self webView] documentView] _elementAtPoint:point]
+ button:[event type]
+ modifierFlags:[event modifierFlags]];
+
+ WebPolicyAction clickAction = [clickPolicy policyAction];
+ NSURL *URL = [clickPolicy URL];
+
+ switch (clickAction) {
+ case WebClickPolicyShow:
+ return YES;
+ case WebClickPolicyOpenNewWindow:
+ [controller _openNewWindowWithURL:URL referrer:[[self _bridge] referrer] behind:NO];
+ break;
+ case WebClickPolicyOpenNewWindowBehind:
+ [controller _openNewWindowWithURL:URL referrer:[[self _bridge] referrer] behind:YES];
+ break;
+ case WebClickPolicySave:
+ case WebClickPolicySaveAndOpenExternally:
+ [controller _downloadURL:URL
+ withContentPolicy:[WebContentPolicy webPolicyWithContentAction:clickAction andPath:nil]];
+ break;
+ case WebClickPolicyIgnore:
+ break;
+ default:
+ [NSException raise:NSInvalidArgumentException
+ format:@"clickPolicyForElement:button:modifierFlags: returned an invalid WebClickPolicy"];
+ }
+ return NO;
+}
+
// main funnel for navigating via callback from WebCore (e.g., clicking a link, redirect)
-- (void)_loadURL:(NSURL *)URL loadType:(WebFrameLoadType)loadType clientRedirect:(BOOL)clientRedirect
+- (void)_loadURL:(NSURL *)URL loadType:(WebFrameLoadType)loadType clientRedirect:(BOOL)clientRedirect triggeringEvent:(NSEvent *)event
{
+ if (event != nil && ![self _continueAfterClickPolicyForEvent:event]) {
+ return;
+ }
+
// FIXME: This logic doesn't exactly match what KHTML does in openURL, so it's possible
// this will screw up in some cases involving framesets.
if (loadType != WebFrameLoadTypeReload && [[URL _web_URLByRemovingFragment] isEqual:[[_private->bridge URL] _web_URLByRemovingFragment]]) {
diff --git a/WebKit/WebView.subproj/WebHTMLView.m b/WebKit/WebView.subproj/WebHTMLView.m
index 7d5db2b..d8cedb8 100644
--- a/WebKit/WebView.subproj/WebHTMLView.m
+++ b/WebKit/WebView.subproj/WebHTMLView.m
@@ -790,24 +790,7 @@
- (void)mouseUp: (NSEvent *)event
{
- NSEvent *theEvent;
-
- if([self _continueAfterClickPolicyForEvent:event]){
- theEvent = event;
- }else{
- // Send a bogus mouse up event so we don't confuse WebCore
- theEvent = [NSEvent mouseEventWithType: NSLeftMouseUp
- location: NSMakePoint(0,0)
- modifierFlags: [event modifierFlags]
- timestamp: [event timestamp]
- windowNumber: [event windowNumber]
- context: [event context]
- eventNumber: [event eventNumber]
- clickCount: [event clickCount]
- pressure: [event pressure]];
- }
-
- [[self _bridge] mouseUp:theEvent];
+ [[self _bridge] mouseUp:event];
}
- (void)mouseMovedNotification:(NSNotification *)notification
diff --git a/WebKit/WebView.subproj/WebHTMLViewPrivate.h b/WebKit/WebView.subproj/WebHTMLViewPrivate.h
index 0d5de95..25779f8 100644
--- a/WebKit/WebView.subproj/WebHTMLViewPrivate.h
+++ b/WebKit/WebView.subproj/WebHTMLViewPrivate.h
@@ -49,7 +49,6 @@
+ (BOOL)_modifierTrackingEnabled;
+ (void)_postFlagsChangedEvent:(NSEvent *)flagsChangedEvent;
- (NSDictionary *)_elementAtPoint:(NSPoint)point;
-- (BOOL)_continueAfterClickPolicyForEvent: (NSEvent *)event;
- (void)_mouseOverElement:(NSDictionary *)elementInformation modifierFlags:(unsigned)modifierFlags;
- (void)_setAsideSubviews;
diff --git a/WebKit/WebView.subproj/WebHTMLViewPrivate.m b/WebKit/WebView.subproj/WebHTMLViewPrivate.m
index 71d2c97..639c111 100644
--- a/WebKit/WebView.subproj/WebHTMLViewPrivate.m
+++ b/WebKit/WebView.subproj/WebHTMLViewPrivate.m
@@ -158,42 +158,6 @@ BOOL _modifierTrackingEnabled = FALSE;
return elementInfo;
}
-- (BOOL)_continueAfterClickPolicyForEvent:(NSEvent *)event
-{
- NSPoint point = [self convertPoint:[event locationInWindow] fromView:nil];
- WebController *controller = [self _controller];
- WebClickPolicy *clickPolicy;
-
- clickPolicy = [[controller policyDelegate] clickPolicyForElement:[self _elementAtPoint:point]
- button:[event type]
- modifierFlags:[event modifierFlags]];
-
- WebPolicyAction clickAction = [clickPolicy policyAction];
- NSURL *URL = [clickPolicy URL];
-
- switch (clickAction) {
- case WebClickPolicyShow:
- return YES;
- case WebClickPolicyOpenNewWindow:
- [controller _openNewWindowWithURL:URL referrer:[[self _bridge] referrer] behind:NO];
- break;
- case WebClickPolicyOpenNewWindowBehind:
- [controller _openNewWindowWithURL:URL referrer:[[self _bridge] referrer] behind:YES];
- break;
- case WebClickPolicySave:
- case WebClickPolicySaveAndOpenExternally:
- [controller _downloadURL:URL
- withContentPolicy:[WebContentPolicy webPolicyWithContentAction:clickAction andPath:nil]];
- break;
- case WebClickPolicyIgnore:
- break;
- default:
- [NSException raise:NSInvalidArgumentException
- format:@"clickPolicyForElement:button:modifierFlags: returned an invalid WebClickPolicy"];
- }
- return NO;
-}
-
- (void)_setAsideSubviews
{
ASSERT(!_private->subviewsSetAside);
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list