[Webkit-unassigned] [Bug 43449] [chromium] Generate drag images for HTML elements and selections.
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Wed Aug 4 18:56:08 PDT 2010
https://bugs.webkit.org/show_bug.cgi?id=43449
--- Comment #5 from Eric Seidel <eric at webkit.org> 2010-08-04 18:56:09 PST ---
(From update of attachment 63493)
WebCore/page/Frame.h:225
+ DragImageRef dragImageForElement(Node* node);
Generally we don't give arguments names when the names don't add clarity.
WebCore/page/chromium/FrameChromium.cpp:47
+ renderer->updateDragState(true);
I probably would have created saveState/restoreState functions for these.
WebCore/page/chromium/FrameChromium.cpp:67
+ // Restore original state.
Functional devisions ad more clarity than comment blocks. Even if the functions are only called once.
I would actually probably have used a RAII instead of two functions even.WebCore/page/chromium/FrameChromium.cpp:82
+ return result;
Eh, just return 0 here.
WebCore/page/chromium/FrameChromium.cpp:102
+ result = createDragImageFromImage(buffer->image());
And just return directly here. no need for result.
WebCore/page/chromium/FrameChromium.cpp:84
+ IntRect paintingRect = enclosingIntRect(selectionBounds());
Are we intentionally rounding here...
WebCore/page/chromium/FrameChromium.cpp:89
+ buffer->context()->clip(FloatRect(0, 0, paintingRect.right(), paintingRect.bottom()));
Only then to convert back to floats here?
I wish we had some way to test this stuff. DRT ideally should have a way to dump the drag image. Or expose it to javascript so it could be drawn to a canvas.
--
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