[Webkit-unassigned] [Bug 83276] New: WebKit2 crashes when calling event.dataTransfer.setDragImage with an HTML element

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Apr 5 07:15:28 PDT 2012


https://bugs.webkit.org/show_bug.cgi?id=83276

           Summary: WebKit2 crashes when calling
                    event.dataTransfer.setDragImage with an HTML element
           Product: WebKit
           Version: 528+ (Nightly build)
          Platform: Macintosh Intel
        OS/Version: Mac OS X 10.6
            Status: UNCONFIRMED
          Severity: Normal
          Priority: P2
         Component: WebKit2
        AssignedTo: webkit-unassigned at lists.webkit.org
        ReportedBy: matt.cg at ft.com


Created an attachment (id=135818)
 --> (https://bugs.webkit.org/attachment.cgi?id=135818&action=review)
Crash log

Steps to reproduce:

1) In the dragstart callback for a draggable element, call event.dataTransfer.setDragImage(document.createElement('div'), 0, 0).

What should happen:

In browsers that support passing an HTML element to setDragImage, the element should be painted below the cursor while dragging. WebKit does not seem to support this behaviour, so I would expect the default drag image to be used instead.

What happens instead:

The page reloads immediately and a crash log is saved to ~/Library/Logs/DiagnosticReports on Mac OS.

The Drag and Drop section of the HTML5 spec says[1]:

    If the element argument is an img element, then set the drag
    data store bitmap to the element's image (at its intrinsic size); 
    otherwise, set the drag data store bitmap to an image generated 
    from the given element (the exact mechanism for doing so is 
    not currently specified).

[1] http://www.w3.org/TR/2011/WD-html5-20110405/dnd.html#dom-datatransfer-setdragimage

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list