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

trey trey at 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Sat Sep 26 08:51:40 UTC 2009


The following commit has been merged in the debian/unstable branch:
commit 5a00de191458018194efffc59bffbc9a8db975a8
Author: trey <trey at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Tue Jul 20 19:05:41 2004 +0000

    	3733698	REGRESSION: sometimes dragging photos on homepage.mac.com leads to an assertion
    
    	Relax an assertion, as we ran into a valid case where it's not true.
    
            Reviewed by Chris.
    
            * WebView.subproj/WebHTMLView.m:
            (-[WebHTMLView _startDraggingImage:at:operation:event:sourceIsDHTML:DHTMLWroteData:]):
    	Removing this assert allows for the oddball case of a drag gesture that
    	starts on one element, but then the element is no longer there when
    	the drag is about to start.
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@7064 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebKit/ChangeLog b/WebKit/ChangeLog
index f26514b..b5f2eb5 100644
--- a/WebKit/ChangeLog
+++ b/WebKit/ChangeLog
@@ -1,3 +1,17 @@
+2004-07-20  Trey Matteson  <trey at apple.com>
+
+	3733698	REGRESSION: sometimes dragging photos on homepage.mac.com leads to an assertion
+
+	Relax an assertion, as we ran into a valid case where it's not true.
+
+        Reviewed by Chris.
+
+        * WebView.subproj/WebHTMLView.m:
+        (-[WebHTMLView _startDraggingImage:at:operation:event:sourceIsDHTML:DHTMLWroteData:]):
+	Removing this assert allows for the oddball case of a drag gesture that
+	starts on one element, but then the element is no longer there when
+	the drag is about to start.
+
 2004-07-20  Ken Kocienda  <kocienda at apple.com>
 
         Reviewed by Hyatt
diff --git a/WebKit/WebView.subproj/WebHTMLView.m b/WebKit/WebView.subproj/WebHTMLView.m
index 423b0f4..4532eeb 100644
--- a/WebKit/WebView.subproj/WebHTMLView.m
+++ b/WebKit/WebView.subproj/WebHTMLView.m
@@ -811,7 +811,8 @@ static WebHTMLView *lastHitView = nil;
     
     WebView *webView = [self _webView];
     NSPasteboard *pasteboard = [NSPasteboard pasteboardWithName:NSDragPboard];
-    
+    BOOL startedDrag = YES;  // optimism - we almost always manage to start the drag
+
     // note per kwebster, the offset arg below is always ignored in positioning the image
     if (imageURL && (_private->dragSourceActionMask & WebDragSourceActionImage)) {
         id source = self;
@@ -883,8 +884,7 @@ static WebHTMLView *lastHitView = nil;
              pasteboard:pasteboard
                  source:self
               slideBack:YES];
-    } else {
-        ASSERT(srcIsDHTML);
+    } else if (srcIsDHTML) {
         ASSERT(_private->dragSourceActionMask & WebDragSourceActionDHTML);
         [[webView _UIDelegateForwarder] webView:webView willPerformDragSourceAction:WebDragSourceActionDHTML fromPoint:mouseDownPoint withPasteboard:pasteboard];
         if (dragImage == nil) {
@@ -903,8 +903,12 @@ static WebHTMLView *lastHitView = nil;
              pasteboard:pasteboard
                  source:self
               slideBack:YES];
+    } else {
+        // Only way I know if to get here is if the original element clicked on in the mousedown is no longer
+        // under the mousedown point, so linkURL, imageURL and isSelected are all false/nil.
+        startedDrag = NO;
     }
-    return YES;
+    return startedDrag;
 }
 
 - (void)_handleAutoscrollForMouseDragged:(NSEvent *)event

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list