Bug 67779

Summary: HiDPI: WebKit2's drag images are blurry
Product: WebKit Reporter: Adam Roben (:aroben) <aroben>
Component: PlatformAssignee: Matthew Delaney <mdelaney7>
Severity: Normal CC: bdakin, mdelaney7
Priority: P2 Keywords: InRadar, PlatformOnly
Version: 528+ (Nightly build)   
Hardware: Mac (Intel)   
OS: OS X 10.7   
Description Flags
Patch bdakin: review+

Description Adam Roben (:aroben) 2011-09-08 07:13:17 PDT
To reproduce:

1. On a display with a >1.0 scale factor, go to http://www.webkit.org/
2. Drag a link

The drag image is blurry.
Comment 1 Adam Roben (:aroben) 2011-09-08 07:13:54 PDT
This affects both WebKit1 and WebKit2. WebKit2 will probably need more fixes, though, since the drag image has to be shipped over to the UI process before it's displayed.
Comment 2 Radar WebKit Bug Importer 2011-09-08 07:14:09 PDT
Comment 3 Adam Roben (:aroben) 2011-09-08 14:16:17 PDT
WebKit1's behavior is somewhat different, so it is now covered by bug 67802.
Comment 4 Matthew Delaney 2012-02-09 10:09:16 PST
Created attachment 126322 [details]
Comment 5 Matthew Delaney 2012-02-09 11:35:23 PST
Committed r107267: <http://trac.webkit.org/changeset/107267>
Comment 6 Adam Roben (:aroben) 2012-02-09 14:39:39 PST
Comment on attachment 126322 [details]

View in context: https://bugs.webkit.org/attachment.cgi?id=126322&action=review

> Source/WebKit2/UIProcess/API/mac/WKView.mm:2566
> +    IntSize size([image size]);
> +    size.scale(1.0 / [self _intrinsicDeviceScaleFactor]);
> +    [image setSize:size];

I think you should be using WebPageProxy::deviceScaleFactor instead of -[WKView _intrinsicDeviceScaleFactor]. Otherwise you'll get incorrect behavior when WKPageSetCustomDeviceScaleFactor has been called.
Comment 7 Matthew Delaney 2012-02-09 16:08:25 PST
Reopening to add in Adam's suggestion.
Comment 8 Matthew Delaney 2012-02-09 16:14:14 PST
Created attachment 126399 [details]
Comment 9 Matthew Delaney 2012-02-09 16:36:16 PST
Committed r107307: <http://trac.webkit.org/changeset/107307>