[webkit-reviews] review granted: [Bug 89688] Drag image for image elements should be scaled with device scale factor. : [Attachment 153022] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Jul 18 09:38:59 PDT 2012


Adam Barth <abarth at webkit.org> has granted Varun Jain
<varunjain at chromium.org>'s request for review:
Bug 89688: Drag image for image elements should be scaled with device scale
factor.
https://bugs.webkit.org/show_bug.cgi?id=89688

Attachment 153022: Patch
https://bugs.webkit.org/attachment.cgi?id=153022&action=review

------- Additional Comments from Adam Barth <abarth at webkit.org>
View in context: https://bugs.webkit.org/attachment.cgi?id=153022&action=review


Thank you!  This looks much better.

> Source/WebKit/chromium/src/DragClientImpl.cpp:91
> +    // Bring drag image to correct device scale if it is not at it already.

This comment just restates what the code below does.  A more helpful comment
would explain when this can happen.  I might just remove the comment.

> Source/WebKit/chromium/src/DragClientImpl.cpp:92
> +    if (dragImage && dragImage->bitmap && m_webView->deviceScaleFactor() !=
dragImage->resolutionScale) {

Can dragImage ever be null here?

> Source/WebKit/chromium/src/DragClientImpl.cpp:95
> +	 ASSERT(dragImage->resolutionScale > 0);
> +	 float scale = m_webView->deviceScaleFactor() /
dragImage->resolutionScale;
> +	 dragImage = scaleDragImage(dragImage, WebCore::FloatSize(scale,
scale));

Four-space indent pls.


More information about the webkit-reviews mailing list