Summary: | Poor setDragImage support on Windows | ||||||
---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Sebastian Markbåge <sebastian> | ||||
Component: | New Bugs | Assignee: | Jessie Berlin <jberlin> | ||||
Status: | RESOLVED FIXED | ||||||
Severity: | Normal | CC: | aroben, jberlin, oliver | ||||
Priority: | P2 | ||||||
Version: | 528+ (Nightly build) | ||||||
Hardware: | PC | ||||||
OS: | Windows Vista | ||||||
Attachments: |
|
Description
Sebastian Markbåge
2009-03-20 20:35:29 PDT
*** Bug 24734 has been marked as a duplicate of this bug. *** Created attachment 31785 [details]
Adds the ability to set an element as the drag image on Windows
Does not fix the case of dragging a link where the default link image
is still used, even when the -webkit-user-drag is set to "element". This
is the same behavior as is found on OS X.
Comment on attachment 31785 [details] Adds the ability to set an element as the drag image on Windows > DragImageRef ClipboardWin::createDragImage(IntPoint& loc) const > { > HBITMAP result = 0; > - //FIXME: Need to be able to draw element <rdar://problem/5015942> > if (m_dragImage) { > result = createDragImageFromImage(m_dragImage->image()); > loc = m_dragLoc; > + } else if (m_dragImageElement) { > + Node* node = dragImageElement(); > + result = node->document()->frame()->nodeImage(node); > + loc = m_dragLoc; > } It's strange to use m_dragImageElement on the first line, then dragImageElement() on the second. I don't really have a preference, but using m_dragImageElement consistently would match the code above more closely. r=me (In reply to comment #4) > (From update of attachment 31785 [details] [review]) > > DragImageRef ClipboardWin::createDragImage(IntPoint& loc) const > > { > > HBITMAP result = 0; > > - //FIXME: Need to be able to draw element <rdar://problem/5015942> > > if (m_dragImage) { > > result = createDragImageFromImage(m_dragImage->image()); > > loc = m_dragLoc; > > + } else if (m_dragImageElement) { > > + Node* node = dragImageElement(); changed to be: Node* node = m_dragImageElement.get(); > > + result = node->document()->frame()->nodeImage(node); > > + loc = m_dragLoc; > > } > > It's strange to use m_dragImageElement on the first line, then > dragImageElement() on the second. I don't really have a preference, but using > m_dragImageElement consistently would match the code above more closely. > > r=me > Does jberlin have commit-bit or does aroben plan to land this with modifications? (In reply to comment #6) > Does jberlin have commit-bit Yes. <http://trac.webkit.org/search?q=jberlin&noquickjump=1&changeset=on> (In reply to comment #6) > Does jberlin have commit-bit or does aroben plan to land this with > modifications? > I did commit, but I didn't mark it as fixed because the bug mentions the desire to see the link tag be able to be given a custom setDragImage and that is currently not supported on either mac or windows. Sorry I didn't respond earlier. For some reason I kept getting an "internal error" message when I navigated to this page. Comment on attachment 31785 [details]
Adds the ability to set an element as the drag image on Windows
committed with revision 45087
Created a new bug for not being able to set the drag image of a link: https://bugs.webkit.org/show_bug.cgi?id=27670 Marking this bug as fixed, since the last committed patch addressed all other concerns. |