Bug 186435

Summary: REGRESSION(r230930): Link drag image is very blurry
Product: WebKit Reporter: Brent Fulgham <bfulgham>
Component: WebKit Misc.Assignee: Brent Fulgham <bfulgham>
Status: RESOLVED FIXED    
Severity: Normal CC: bfulgham, commit-queue, thorton, webkit-bug-importer, wenson_hsieh
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch for landing
none
Patch for landing
none
Patch for landing none

Description Brent Fulgham 2018-06-08 09:56:43 PDT
When dragging a link, the link drag image is super blurry.
Comment 1 Brent Fulgham 2018-06-08 09:59:15 PDT
This is more fallout from disconnecting the WebContent process from the WindowServer. The NSImage logic wants to ask the screen for its display scale, but can't and so it defaults to a scale factor of 1.

This causes us to get a 1x image, which is scaled to the actual screen resolution resulting in the blurriness.

I checked the code paths for selection drag, attachment drag, and image drag and all properly address scale factor. It looks like links were the only thing not grabbing scale factor from the device already.
Comment 2 Brent Fulgham 2018-06-08 09:59:56 PDT
We need to help NSImage know the proper scale factor without talking to NSScreen.
Comment 3 Brent Fulgham 2018-06-08 10:20:30 PDT
Created attachment 342283 [details]
Patch
Comment 4 Tim Horton 2018-06-08 10:23:29 PDT
Comment on attachment 342283 [details]
Patch

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

> Source/WebCore/platform/graphics/mac/WebKitNSImageExtras.mm:13
> + * 3.  Neither the name of Apple Inc. ("Apple") nor the names of

This is not the correct license.

> Source/WebCore/platform/graphics/mac/WebKitNSImageExtras.mm:36
> +

Extra newlines?

> Source/WebCore/platform/graphics/mac/WebKitNSImageExtras.mm:38
> +@implementation NSImage (WebKitExtras)

No need for the category to have a name.
Comment 5 Brent Fulgham 2018-06-08 10:27:36 PDT
(In reply to Tim Horton from comment #4)
> Comment on attachment 342283 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=342283&action=review
> 
> > Source/WebCore/platform/graphics/mac/WebKitNSImageExtras.mm:13
> > + * 3.  Neither the name of Apple Inc. ("Apple") nor the names of
> 
> This is not the correct license.
> 
> > Source/WebCore/platform/graphics/mac/WebKitNSImageExtras.mm:36
> > +
> 
> Extra newlines?
> 
> > Source/WebCore/platform/graphics/mac/WebKitNSImageExtras.mm:38
> > +@implementation NSImage (WebKitExtras)
> 
> No need for the category to have a name.

Uh oh! And lots of build failures. More work needed!
Comment 6 Brent Fulgham 2018-06-08 10:30:16 PDT
Comment on attachment 342283 [details]
Patch

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

> Source/WebCore/WebCore.xcodeproj/project.pbxproj:9315
>  		7A29BA67187B732200F29CEB /* TemporaryOpenGLSetting.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TemporaryOpenGLSetting.h; sourceTree = "<group>"; };

Doh! Stupid Xcode.
Comment 7 Brent Fulgham 2018-06-08 10:31:27 PDT
Created attachment 342285 [details]
Patch for landing
Comment 8 Brent Fulgham 2018-06-08 10:33:33 PDT
Created attachment 342287 [details]
Patch for landing
Comment 9 Brent Fulgham 2018-06-08 10:39:55 PDT
Created attachment 342290 [details]
Patch for landing
Comment 10 WebKit Commit Bot 2018-06-08 11:20:50 PDT
Comment on attachment 342290 [details]
Patch for landing

Clearing flags on attachment: 342290

Committed r232628: <https://trac.webkit.org/changeset/232628>
Comment 11 WebKit Commit Bot 2018-06-08 11:20:52 PDT
All reviewed patches have been landed.  Closing bug.
Comment 12 Radar WebKit Bug Importer 2018-06-08 11:21:26 PDT
<rdar://problem/40944079>
Comment 13 Brent Fulgham 2018-06-08 11:48:20 PDT
This was actually:
<rdar://problem/40797202>