[SCM] WebKit Debian packaging branch, debian/unstable, updated. debian/1.1.15-1-40151-g37bb677

cblu cblu at 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Sat Sep 26 06:45:42 UTC 2009


The following commit has been merged in the debian/unstable branch:
commit 2c91d6bb44c691260c0bdfe1475bf7d27a3b098e
Author: cblu <cblu at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Sun Sep 29 17:04:00 2002 +0000

    WebKit:
    
    	Fixed: 2978258 - quake3arena.com sends me to the flash=false site
    	The page has a flash plugin that once loaded, requests the flash=true page. If the plugin doesn't load, the meta refresh tag to the flash=false page fires after 3 seconds. This is how this site's flash detection works.
    
    	The reason this doesn't work for us is because the flash movie is at the bottom of the page. Plugins don't start until the initial drawRect. Since the movie is at the bottom of the page and out of site, the plugin never gets the drawRect and thus, never starts. We now start plug-ins when they are added to the window.
    
    	Fixed: 3062224 - context menu includes "Download Item to Disk" for mailto links
    
    	- Fixed click then click and drag causes crash.
    
            * Plugins.subproj/WebPluginView.m:
            (-[WebNetscapePluginView drawRect:]): don't start plug-in here
            (-[WebNetscapePluginView viewDidMoveToWindow]): start it here
            * WebView.subproj/WebDefaultContextMenuDelegate.m:
            (-[WebDefaultContextMenuDelegate contextMenuItemsForElement:defaultMenuItems:]): don't provide "Download Link To Disk" and "Open Link In New Window" items for URLs we cant handle.
            * WebView.subproj/WebHTMLView.m:
            (-[WebHTMLView dragImage:at:offset:event:pasteboard:source:slideBack:]): clean-up
            (-[WebHTMLView mouseDragged:]): Don't allow drag if the frame has a provisional data source because this view may be released and the drag callbacks might reference this released view.
    
    WebBrowser:
    
    	Fixed: 3062224 - context menu includes "Download Item to Disk" for mailto links
    	- Added "Open With QuickTime Player" context menu for URLs ending with .mov.
    	- Only show "Open With*" items for http URLs.
    
            * ContextMenuHandler.m:
            (-[ContextMenuHandler contextMenuItemsForElement:defaultMenuItems:]):
            (-[ContextMenuHandler openWithiTunes:]):
            (-[ContextMenuHandler openWithQuickTime:]):
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@2202 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebKit/ChangeLog b/WebKit/ChangeLog
index 0622673..cc5b5fe 100644
--- a/WebKit/ChangeLog
+++ b/WebKit/ChangeLog
@@ -1,3 +1,23 @@
+2002-09-29  Chris Blumenberg  <cblu at apple.com>
+
+	Fixed: 2978258 - quake3arena.com sends me to the flash=false site
+	The page has a flash plugin that once loaded, requests the flash=true page. If the plugin doesn't load, the meta refresh tag to the flash=false page fires after 3 seconds. This is how this site's flash detection works.
+
+	The reason this doesn't work for us is because the flash movie is at the bottom of the page. Plugins don't start until the initial drawRect. Since the movie is at the bottom of the page and out of site, the plugin never gets the drawRect and thus, never starts. We now start plug-ins when they are added to the window.
+
+	Fixed: 3062224 - context menu includes "Download Item to Disk" for mailto links
+
+	- Fixed click then click and drag causes crash.
+
+        * Plugins.subproj/WebPluginView.m:
+        (-[WebNetscapePluginView drawRect:]): don't start plug-in here
+        (-[WebNetscapePluginView viewDidMoveToWindow]): start it here
+        * WebView.subproj/WebDefaultContextMenuDelegate.m:
+        (-[WebDefaultContextMenuDelegate contextMenuItemsForElement:defaultMenuItems:]): don't provide "Download Link To Disk" and "Open Link In New Window" items for URLs we cant handle.
+        * WebView.subproj/WebHTMLView.m:
+        (-[WebHTMLView dragImage:at:offset:event:pasteboard:source:slideBack:]): clean-up
+        (-[WebHTMLView mouseDragged:]): Don't allow drag if the frame has a provisional data source because this view may be released and the drag callbacks might reference this released view.
+
 2002-09-28  Darin Adler  <darin at apple.com>
 
         * WebView.subproj/WebDataSource.m: (-[WebDataSource initWithRequest:]):
diff --git a/WebKit/ChangeLog-2002-12-03 b/WebKit/ChangeLog-2002-12-03
index 0622673..cc5b5fe 100644
--- a/WebKit/ChangeLog-2002-12-03
+++ b/WebKit/ChangeLog-2002-12-03
@@ -1,3 +1,23 @@
+2002-09-29  Chris Blumenberg  <cblu at apple.com>
+
+	Fixed: 2978258 - quake3arena.com sends me to the flash=false site
+	The page has a flash plugin that once loaded, requests the flash=true page. If the plugin doesn't load, the meta refresh tag to the flash=false page fires after 3 seconds. This is how this site's flash detection works.
+
+	The reason this doesn't work for us is because the flash movie is at the bottom of the page. Plugins don't start until the initial drawRect. Since the movie is at the bottom of the page and out of site, the plugin never gets the drawRect and thus, never starts. We now start plug-ins when they are added to the window.
+
+	Fixed: 3062224 - context menu includes "Download Item to Disk" for mailto links
+
+	- Fixed click then click and drag causes crash.
+
+        * Plugins.subproj/WebPluginView.m:
+        (-[WebNetscapePluginView drawRect:]): don't start plug-in here
+        (-[WebNetscapePluginView viewDidMoveToWindow]): start it here
+        * WebView.subproj/WebDefaultContextMenuDelegate.m:
+        (-[WebDefaultContextMenuDelegate contextMenuItemsForElement:defaultMenuItems:]): don't provide "Download Link To Disk" and "Open Link In New Window" items for URLs we cant handle.
+        * WebView.subproj/WebHTMLView.m:
+        (-[WebHTMLView dragImage:at:offset:event:pasteboard:source:slideBack:]): clean-up
+        (-[WebHTMLView mouseDragged:]): Don't allow drag if the frame has a provisional data source because this view may be released and the drag callbacks might reference this released view.
+
 2002-09-28  Darin Adler  <darin at apple.com>
 
         * WebView.subproj/WebDataSource.m: (-[WebDataSource initWithRequest:]):
diff --git a/WebKit/Plugins.subproj/WebPluginView.m b/WebKit/Plugins.subproj/WebPluginView.m
index 716e840..3a9c5f8 100644
--- a/WebKit/Plugins.subproj/WebPluginView.m
+++ b/WebKit/Plugins.subproj/WebPluginView.m
@@ -713,10 +713,6 @@
         [self layout];
     }
 
-    if(!isStarted){
-        [self start];
-    }
-
     if(isStarted){
         [self sendUpdateEvent];
     }
@@ -737,10 +733,13 @@
 
 - (void)viewDidMoveToWindow
 {
-    if (![self window])
+    if (![self window]){
         [self stop];
+    }else{
+        [self start];
+    }
+    
     [self resetTrackingRect];
-    [super viewDidMoveToWindow];
 }
 
 #pragma mark NOTIFICATIONS
diff --git a/WebKit/WebView.subproj/WebDefaultContextMenuDelegate.m b/WebKit/WebView.subproj/WebDefaultContextMenuDelegate.m
index afe74cc..3d7860b 100644
--- a/WebKit/WebView.subproj/WebDefaultContextMenuDelegate.m
+++ b/WebKit/WebView.subproj/WebDefaultContextMenuDelegate.m
@@ -14,6 +14,8 @@
 #import <WebKit/WebNSPasteboardExtras.h>
 #import <WebKit/WebWindowOperationsDelegate.h>
 
+#import <WebFoundation/WebFoundation.h>
+
 @implementation WebDefaultContextMenuDelegate
 
 - (void)dealloc
@@ -41,16 +43,17 @@
     linkURL = [element objectForKey:WebElementLinkURLKey];
 
     if(linkURL){
-    
-        [[self class] addMenuItemWithTitle:NSLocalizedString(@"Open Link in New Window", @"Open in New Window context menu item") 				                    action:@selector(openLinkInNewWindow:)
-                                    target:self
-                                   toArray:menuItems];
-        
-        [[self class] addMenuItemWithTitle:NSLocalizedString(@"Download Link to Disk", @"Download Link to Disk context menu item") 				                    action:@selector(downloadLinkToDisk:)
-                                    target:self
-                                   toArray:menuItems];
+        if([WebResourceHandle canInitWithRequest:[WebResourceRequest requestWithURL:linkURL]]){
+            [[self class] addMenuItemWithTitle:NSLocalizedString(@"Open Link in New Window", @"Open in New Window context menu item") 				                	    action:@selector(openLinkInNewWindow:)
+                                        target:self
+                                       toArray:menuItems];
+
+            [[self class] addMenuItemWithTitle:NSLocalizedString(@"Download Link to Disk", @"Download Link to Disk context menu item") 				                	    action:@selector(downloadLinkToDisk:)
+                                        target:self
+                                       toArray:menuItems];
+        }
 
-        [[self class] addMenuItemWithTitle:NSLocalizedString(@"Copy Link to Clipboard", @"Copy Link to Clipboard context menu item") 				                    action:@selector(copyLinkToClipboard:)
+        [[self class] addMenuItemWithTitle:NSLocalizedString(@"Copy Link to Clipboard", @"Copy Link to Clipboard context menu item") 				                 	   action:@selector(copyLinkToClipboard:)
                                     target:self
                                    toArray:menuItems];
     }
@@ -68,11 +71,11 @@
                                     target:self
                                    toArray:menuItems];
 
-        [[self class] addMenuItemWithTitle:NSLocalizedString(@"Download Image To Disk", @"Download Image To Disk context menu item") 				                    action:@selector(downloadImageToDisk:)
+        [[self class] addMenuItemWithTitle:NSLocalizedString(@"Download Image To Disk", @"Download Image To Disk context menu item") 				                 	   action:@selector(downloadImageToDisk:)
                                     target:self
                                    toArray:menuItems];
 
-        [[self class] addMenuItemWithTitle:NSLocalizedString(@"Copy Image to Clipboard", @"Copy Image to Clipboard context menu item") 				                    action:@selector(copyImageToClipboard:)
+        [[self class] addMenuItemWithTitle:NSLocalizedString(@"Copy Image to Clipboard", @"Copy Image to Clipboard context menu item") 				              	      action:@selector(copyImageToClipboard:)
                                     target:self
                                    toArray:menuItems];
     }
@@ -82,7 +85,7 @@
         WebFrame *webFrame = [element objectForKey:WebElementFrameKey];
 
         if(webFrame != [[webFrame controller] mainFrame]){
-            [[self class] addMenuItemWithTitle:NSLocalizedString(@"Open Frame in New Window", @"Open Frame in New Window context menu item") 				                action:@selector(openFrameInNewWindow:)
+            [[self class] addMenuItemWithTitle:NSLocalizedString(@"Open Frame in New Window", @"Open Frame in New Window context menu item") 				            	    action:@selector(openFrameInNewWindow:)
                                         target:self
                                        toArray:menuItems];
         }
diff --git a/WebKit/WebView.subproj/WebHTMLView.m b/WebKit/WebView.subproj/WebHTMLView.m
index 4c4d1cb..c651f33 100644
--- a/WebKit/WebView.subproj/WebHTMLView.m
+++ b/WebKit/WebView.subproj/WebHTMLView.m
@@ -40,7 +40,7 @@
 #define MIN_DRAG_LABEL_WIDTH_BEFORE_CLIP	120.0
 
 #define DragImageAlpha    		0.75
-#define MaxDragSize 			NSMakeSize(400, 400)
+#define MaxDragImageSize 		NSMakeSize(400, 400)
 
 #import <CoreGraphics/CGStyle.h>
 #import <CoreGraphics/CGSTypes.h>
@@ -469,7 +469,7 @@
         anImage = [[originalImage copy] autorelease];
         
         NSSize originalSize = [anImage size];
-        [anImage _web_scaleToMaxSize:MaxDragSize];
+        [anImage _web_scaleToMaxSize:MaxDragImageSize];
         NSSize newSize = [anImage size];
 
         [anImage _web_dissolveToFraction:DragImageAlpha];
@@ -477,7 +477,7 @@
         NSPoint mouseDownPoint = [self convertPoint:[theEvent locationInWindow] fromView:nil];
         NSPoint currentPoint = [self convertPoint:[[_window currentEvent] locationInWindow] fromView:nil];
 
-        // Properly orient the drag image if it's smaller than the original
+        // Properly orient the drag image and orient it differently if it's smaller than the original
         imageLoc = [[_private->draggingImageElement objectForKey:WebElementImageLocationKey] pointValue];
         imageLoc.x = mouseDownPoint.x - (((mouseDownPoint.x - imageLoc.x) / originalSize.width) * newSize.width);
         imageLoc.y = imageLoc.y + originalSize.height;
@@ -500,6 +500,12 @@
 
 - (void)mouseDragged:(NSEvent *)event
 {
+    // If the frame has a provisional data source, this view may be released.
+    // Don't allow drag because drag callbacks will reference this released view.
+    if([[self _frame] provisionalDataSource]){
+        return;
+    }
+    
     // Ensure that we're visible wrt the event location.
     BOOL didScroll = [self autoscroll:event];
     
@@ -526,7 +532,7 @@
             if (imageURL){
                 _private->draggingImageElement = [element retain];
 
-                // FIXME: This getting the file type this way doesn't always work
+                // FIXME: Getting the file type this way doesn't always work
                 [self dragPromisedFilesOfTypes:[NSArray arrayWithObject:[[imageURL path] pathExtension]]
                                       fromRect:NSZeroRect
                                         source:self

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list