Bug 67779 - HiDPI: WebKit2's drag images are blurry
Summary: HiDPI: WebKit2's drag images are blurry
Alias: None
Product: WebKit
Classification: Unclassified
Component: Platform (show other bugs)
Version: 528+ (Nightly build)
Hardware: Mac (Intel) OS X 10.7
: P2 Normal
Assignee: Matthew Delaney
Keywords: InRadar, PlatformOnly
Depends on:
Reported: 2011-09-08 07:13 PDT by Adam Roben (:aroben)
Modified: 2012-02-09 16:36 PST (History)
2 users (show)

See Also:

Patch (3.35 KB, patch)
2012-02-09 10:09 PST, Matthew Delaney
no flags Details | Formatted Diff | Diff
Patch (1.26 KB, patch)
2012-02-09 16:14 PST, Matthew Delaney
bdakin: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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>