WebKit Bugzilla
Attachment 342287 Details for
Bug 186435
: REGRESSION(r230930): Link drag image is very blurry
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch for landing
bug-186435-20180608103332.patch (text/plain), 18.81 KB, created by
Brent Fulgham
on 2018-06-08 10:33:33 PDT
(
hide
)
Description:
Patch for landing
Filename:
MIME Type:
Creator:
Brent Fulgham
Created:
2018-06-08 10:33:33 PDT
Size:
18.81 KB
patch
obsolete
>Subversion Revision: 232585 >diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog >index 2bd09496e890ffc8f8ae05252fee2b33c94b9826..55fa2fd4107aff43ffc39b3ac44d9504d7312d17 100644 >--- a/Source/WebCore/ChangeLog >+++ b/Source/WebCore/ChangeLog >@@ -1,3 +1,29 @@ >+2018-06-08 Brent Fulgham <bfulgham@apple.com> >+ >+ REGRESSION (r230930): Link drag image is very blurry >+ https://bugs.webkit.org/show_bug.cgi?id=186435 >+ <rdar://problem/40797202> >+ >+ Reviewed by Tim Horton. >+ >+ Tell NSImage the proper display scale factor it needs when performing a 'lockFocus' by passing >+ the correct scaling transform as an NSImageHintCTM. >+ >+ I reviewed the other drag operations (selection, image, and attachment) and confirmed through >+ manual testing that these operations already properly scale the images. It appears that links >+ were the only place where we relied on NSImage to determine and use the relevant device scale >+ factor. >+ >+ * SourcesCocoa.txt: Add new WebKitNSImageExtras.mm file. >+ * WebCore.xcodeproj/project.pbxproj: Update for new files. >+ * platform/graphics/mac/WebKitNSImageExtras.h: Added. >+ * platform/graphics/mac/WebKitNSImageExtras.mm: Added. >+ (-[NSImage _web_lockFocusWithTransform:]): Helper method that takes a device scale factor, creates the >+ relevant scaling NSAffineTransform and passes it to the internal NSImage 'lockFocusWithRect' as the >+ NSImageHintCTM hint. >+ * platform/mac/DragImageMac.mm: >+ (WebCore::createDragImageForLink): Use the new helper function. >+ > 2018-06-07 Brent Fulgham <bfulgham@apple.com> > > Handle Storage Access API calls in the absence of an attached frame >diff --git a/Source/WebCore/PAL/ChangeLog b/Source/WebCore/PAL/ChangeLog >index 0b887c06146608357c17e814aa31c7186e795c43..36a60c96f0ba7af504b45d81240983a42e744263 100644 >--- a/Source/WebCore/PAL/ChangeLog >+++ b/Source/WebCore/PAL/ChangeLog >@@ -1,3 +1,16 @@ >+2018-06-08 Brent Fulgham <bfulgham@apple.com> >+ >+ REGRESSION (r230930): Link drag image is very blurry >+ https://bugs.webkit.org/show_bug.cgi?id=186435 >+ <rdar://problem/40797202> >+ >+ Reviewed by Tim Horton. >+ >+ Add the necessary NSImage SPI to our SPI headers. >+ >+ * PAL.xcodeproj/project.pbxproj: >+ * pal/spi/mac/NSImageSPI.h: Added. >+ > 2018-06-06 Simon Fraser <simon.fraser@apple.com> > > Logging macros are sensitive to pal/Logging.h vs Logging.h include order >diff --git a/Source/WebCore/PAL/PAL.xcodeproj/project.pbxproj b/Source/WebCore/PAL/PAL.xcodeproj/project.pbxproj >index e43e1b89e630a212ab863f231cfab97f09a84b89..59e747afedf169c4961105997f435bdadee59d65 100644 >--- a/Source/WebCore/PAL/PAL.xcodeproj/project.pbxproj >+++ b/Source/WebCore/PAL/PAL.xcodeproj/project.pbxproj >@@ -111,6 +111,7 @@ > 570AB8F920AF6E3D00B8BE87 /* NSXPCConnectionSPI.h in Headers */ = {isa = PBXBuildFile; fileRef = 570AB8F820AF6E3D00B8BE87 /* NSXPCConnectionSPI.h */; }; > 57F12518205787D7001AB8A6 /* DeviceIdentitySPI.h in Headers */ = {isa = PBXBuildFile; fileRef = 57F12517205787C8001AB8A6 /* DeviceIdentitySPI.h */; }; > 7A1656441F97B2B900BA3CE4 /* NSKeyedArchiverSPI.h in Headers */ = {isa = PBXBuildFile; fileRef = 7A1656431F97B2B800BA3CE4 /* NSKeyedArchiverSPI.h */; }; >+ 7A3A6A8020CADB4700317AAE /* NSImageSPI.h in Headers */ = {isa = PBXBuildFile; fileRef = 7A3A6A7F20CADB4600317AAE /* NSImageSPI.h */; }; > A10265871F56746100B4C844 /* FoundationSPI.h in Headers */ = {isa = PBXBuildFile; fileRef = A10265861F56746100B4C844 /* FoundationSPI.h */; }; > A10265891F56747A00B4C844 /* HIToolboxSPI.h in Headers */ = {isa = PBXBuildFile; fileRef = A10265881F56747A00B4C844 /* HIToolboxSPI.h */; }; > A102658B1F56748C00B4C844 /* QuickDrawSPI.h in Headers */ = {isa = PBXBuildFile; fileRef = A102658A1F56748C00B4C844 /* QuickDrawSPI.h */; }; >@@ -258,6 +259,7 @@ > 570AB8F820AF6E3D00B8BE87 /* NSXPCConnectionSPI.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = NSXPCConnectionSPI.h; sourceTree = "<group>"; }; > 57F12517205787C8001AB8A6 /* DeviceIdentitySPI.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = DeviceIdentitySPI.h; sourceTree = "<group>"; }; > 7A1656431F97B2B800BA3CE4 /* NSKeyedArchiverSPI.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NSKeyedArchiverSPI.h; sourceTree = "<group>"; }; >+ 7A3A6A7F20CADB4600317AAE /* NSImageSPI.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NSImageSPI.h; sourceTree = "<group>"; }; > 93E5909C1F93BF1E0067F8CF /* UnencodableHandling.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = UnencodableHandling.h; sourceTree = "<group>"; }; > A10265861F56746100B4C844 /* FoundationSPI.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FoundationSPI.h; sourceTree = "<group>"; }; > A10265881F56747A00B4C844 /* HIToolboxSPI.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HIToolboxSPI.h; sourceTree = "<group>"; }; >@@ -429,6 +431,7 @@ > 0C7785761F45130F00F4EBB6 /* NSEventSPI.h */, > 0C7785771F45130F00F4EBB6 /* NSFontSPI.h */, > A10826FD1F58A433004772AC /* NSGraphicsSPI.h */, >+ 7A3A6A7F20CADB4600317AAE /* NSImageSPI.h */, > 0C7785781F45130F00F4EBB6 /* NSImmediateActionGestureRecognizerSPI.h */, > 0C7785791F45130F00F4EBB6 /* NSMenuSPI.h */, > 0C77857A1F45130F00F4EBB6 /* NSPasteboardSPI.h */, >@@ -671,6 +674,7 @@ > F442915E1FA52473002CC93E /* NSFileSizeFormatterSPI.h in Headers */, > 0C7785901F45130F00F4EBB6 /* NSFontSPI.h in Headers */, > A10826FE1F58A433004772AC /* NSGraphicsSPI.h in Headers */, >+ 7A3A6A8020CADB4700317AAE /* NSImageSPI.h in Headers */, > 0C7785911F45130F00F4EBB6 /* NSImmediateActionGestureRecognizerSPI.h in Headers */, > 7A1656441F97B2B900BA3CE4 /* NSKeyedArchiverSPI.h in Headers */, > 0C7785921F45130F00F4EBB6 /* NSMenuSPI.h in Headers */, >diff --git a/Source/WebCore/PAL/pal/spi/mac/NSImageSPI.h b/Source/WebCore/PAL/pal/spi/mac/NSImageSPI.h >new file mode 100644 >index 0000000000000000000000000000000000000000..547c13bed292a84861bdd3e4f3a063cd14a74375 >--- /dev/null >+++ b/Source/WebCore/PAL/pal/spi/mac/NSImageSPI.h >@@ -0,0 +1,42 @@ >+/* >+ * Copyright (C) 2018 Apple Inc. All rights reserved. >+ * >+ * Redistribution and use in source and binary forms, with or without >+ * modification, are permitted provided that the following conditions >+ * are met: >+ * 1. Redistributions of source code must retain the above copyright >+ * notice, this list of conditions and the following disclaimer. >+ * 2. Redistributions in binary form must reproduce the above copyright >+ * notice, this list of conditions and the following disclaimer in the >+ * documentation and/or other materials provided with the distribution. >+ * >+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY >+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE >+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR >+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR >+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, >+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, >+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR >+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY >+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT >+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE >+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. >+ */ >+ >+#import <wtf/Platform.h> >+ >+#if PLATFORM(MAC) >+ >+#if USE(APPLE_INTERNAL_SDK) >+ >+#import <AppKit/NSImage_Private.h> >+ >+#else >+ >+@interface NSImage () >+- (void)lockFocusWithRect:(NSRect)rect context:(NSGraphicsContext *)context hints:(NSDictionary *)hints flipped:(BOOL)flipped; >+@end >+ >+#endif >+ >+#endif >diff --git a/Source/WebCore/SourcesCocoa.txt b/Source/WebCore/SourcesCocoa.txt >index d1d831dce4059535de27e187d7f0179a7cf64c55..97fc9ee9b216548aff5d18f57d1c147eefbafc3f 100644 >--- a/Source/WebCore/SourcesCocoa.txt >+++ b/Source/WebCore/SourcesCocoa.txt >@@ -357,6 +357,7 @@ platform/graphics/mac/IntSizeMac.mm > platform/graphics/mac/PDFDocumentImageMac.mm > platform/graphics/mac/SimpleFontDataCoreText.cpp > platform/graphics/mac/WebLayer.mm >+platform/graphics/mac/WebKitNSImageExtras.mm > > platform/graphics/opengl/Extensions3DOpenGL.cpp > platform/graphics/opengl/Extensions3DOpenGLCommon.cpp >diff --git a/Source/WebCore/WebCore.xcodeproj/project.pbxproj b/Source/WebCore/WebCore.xcodeproj/project.pbxproj >index 1673aa9a530ca3d2e91685fa1c4051a2ee5910db..5f747dfd0a6e996c8ca7eab466b4a3ceb8465063 100644 >--- a/Source/WebCore/WebCore.xcodeproj/project.pbxproj >+++ b/Source/WebCore/WebCore.xcodeproj/project.pbxproj >@@ -2078,6 +2078,8 @@ > 7A0E770F10C00A8800A0276E /* InspectorFrontendHost.h in Headers */ = {isa = PBXBuildFile; fileRef = 7A0E770C10C00A8800A0276E /* InspectorFrontendHost.h */; settings = {ATTRIBUTES = (Private, ); }; }; > 7A0E771F10C00DB100A0276E /* JSInspectorFrontendHost.h in Headers */ = {isa = PBXBuildFile; fileRef = 7A0E771D10C00DB100A0276E /* JSInspectorFrontendHost.h */; }; > 7A1D7FCB18F85F0F00C385AD /* mediaControlsLocalizedStrings.js in Resources */ = {isa = PBXBuildFile; fileRef = 7A1D7FC918F85F0F00C385AD /* mediaControlsLocalizedStrings.js */; }; >+ 7A22732020C9F9DA00DB1DEF /* WebKitNSImageExtras.mm in Sources */ = {isa = PBXBuildFile; fileRef = 7A22731E20C9F9D900DB1DEF /* WebKitNSImageExtras.mm */; }; >+ 7A22732120C9FAFE00DB1DEF /* WebKitNSImageExtras.h in Headers */ = {isa = PBXBuildFile; fileRef = 7A22731F20C9F9DA00DB1DEF /* WebKitNSImageExtras.h */; settings = {ATTRIBUTES = (Private, ); }; }; > 7A29F57218C69514004D0F81 /* OutOfBandTextTrackPrivateAVF.h in Headers */ = {isa = PBXBuildFile; fileRef = 7A29F57118C69514004D0F81 /* OutOfBandTextTrackPrivateAVF.h */; }; > 7A45032F18DB717200377B34 /* BufferedLineReader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7A45032D18DB717200377B34 /* BufferedLineReader.cpp */; }; > 7A45033018DB717200377B34 /* BufferedLineReader.h in Headers */ = {isa = PBXBuildFile; fileRef = 7A45032E18DB717200377B34 /* BufferedLineReader.h */; }; >@@ -9308,6 +9310,8 @@ > 7A0E771D10C00DB100A0276E /* JSInspectorFrontendHost.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSInspectorFrontendHost.h; sourceTree = "<group>"; }; > 7A1D7FCA18F85F0F00C385AD /* English */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.javascript; name = English; path = English.lproj/mediaControlsLocalizedStrings.js; sourceTree = SOURCE_ROOT; }; > 7A1F2B51126C61B20006A7E6 /* InspectorClient.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = InspectorClient.cpp; sourceTree = "<group>"; }; >+ 7A22731E20C9F9D900DB1DEF /* WebKitNSImageExtras.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; path = WebKitNSImageExtras.mm; sourceTree = "<group>"; }; >+ 7A22731F20C9F9DA00DB1DEF /* WebKitNSImageExtras.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = WebKitNSImageExtras.h; sourceTree = "<group>"; }; > 7A29BA67187B732200F29CEB /* TemporaryOpenGLSetting.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TemporaryOpenGLSetting.h; sourceTree = "<group>"; }; > 7A29BA69187B781C00F29CEB /* TemporaryOpenGLSetting.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = TemporaryOpenGLSetting.cpp; sourceTree = "<group>"; }; > 7A29F57118C69514004D0F81 /* OutOfBandTextTrackPrivateAVF.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OutOfBandTextTrackPrivateAVF.h; sourceTree = "<group>"; }; >@@ -23446,6 +23450,8 @@ > B27535510B053814002CE64F /* IntSizeMac.mm */, > 2D6E468217D660F500ECF8BB /* PDFDocumentImageMac.mm */, > 163E88F5118A39D200ED9231 /* SimpleFontDataCoreText.cpp */, >+ 7A22731F20C9F9DA00DB1DEF /* WebKitNSImageExtras.h */, >+ 7A22731E20C9F9D900DB1DEF /* WebKitNSImageExtras.mm */, > 0FCF332B0F2B9A25004B6795 /* WebLayer.h */, > 0FCF332A0F2B9A25004B6795 /* WebLayer.mm */, > ); >@@ -30844,6 +30850,7 @@ > 2D06214E1DA63A8E00A7FB26 /* WebKitMediaKeys.h in Headers */, > 2D0621501DA63A9400A7FB26 /* WebKitMediaKeySession.h in Headers */, > 7C48A6D1191C9D6500026674 /* WebKitNamespace.h in Headers */, >+ 7A22732120C9FAFE00DB1DEF /* WebKitNSImageExtras.h in Headers */, > A5DEBDA416FB908700836FE0 /* WebKitPlaybackTargetAvailabilityEvent.h in Headers */, > 494BD7950F55C8EE00747828 /* WebKitPoint.h in Headers */, > 31C0FF250E4CEB6E007D6FE5 /* WebKitTransitionEvent.h in Headers */, >@@ -32123,6 +32130,7 @@ > 2D06214D1DA63A8B00A7FB26 /* WebKitMediaKeys.cpp in Sources */, > 2D06214F1DA63A9100A7FB26 /* WebKitMediaKeySession.cpp in Sources */, > 7C48A6D0191C9D6500026674 /* WebKitNamespace.cpp in Sources */, >+ 7A22732020C9F9DA00DB1DEF /* WebKitNSImageExtras.mm in Sources */, > 0709D7921AE5557E004E42F8 /* WebMediaSessionManagerMac.cpp in Sources */, > 1CAF34820A6C405200ABE06E /* WebScriptObject.mm in Sources */, > F12171F516A8CED2000053CA /* WebVTTElement.cpp in Sources */, >diff --git a/Source/WebCore/platform/graphics/mac/WebKitNSImageExtras.h b/Source/WebCore/platform/graphics/mac/WebKitNSImageExtras.h >new file mode 100644 >index 0000000000000000000000000000000000000000..2693fd906555c048bbcca6ef389ea038790bcc7a >--- /dev/null >+++ b/Source/WebCore/platform/graphics/mac/WebKitNSImageExtras.h >@@ -0,0 +1,36 @@ >+/* >+ * Copyright (C) 2018 Apple Inc. All rights reserved. >+ * >+ * Redistribution and use in source and binary forms, with or without >+ * modification, are permitted provided that the following conditions >+ * are met: >+ * 1. Redistributions of source code must retain the above copyright >+ * notice, this list of conditions and the following disclaimer. >+ * 2. Redistributions in binary form must reproduce the above copyright >+ * notice, this list of conditions and the following disclaimer in the >+ * documentation and/or other materials provided with the distribution. >+ * >+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY >+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE >+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR >+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR >+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, >+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, >+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR >+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY >+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT >+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE >+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. >+ */ >+ >+#if !PLATFORM(IOS) >+ >+#import <Cocoa/Cocoa.h> >+ >+@interface NSImage (WebKitExtras) >+ >+- (void)_web_lockFocusWithDeviceScaleFactor:(CGFloat)deviceScaleFactor; >+ >+@end >+ >+#endif >diff --git a/Source/WebCore/platform/graphics/mac/WebKitNSImageExtras.mm b/Source/WebCore/platform/graphics/mac/WebKitNSImageExtras.mm >new file mode 100644 >index 0000000000000000000000000000000000000000..532d91d94b878a8e44731c533b156a20509264e6 >--- /dev/null >+++ b/Source/WebCore/platform/graphics/mac/WebKitNSImageExtras.mm >@@ -0,0 +1,52 @@ >+/* >+ * Copyright (C) 2018 Apple Inc. All rights reserved. >+ * >+ * Redistribution and use in source and binary forms, with or without >+ * modification, are permitted provided that the following conditions >+ * are met: >+ * 1. Redistributions of source code must retain the above copyright >+ * notice, this list of conditions and the following disclaimer. >+ * 2. Redistributions in binary form must reproduce the above copyright >+ * notice, this list of conditions and the following disclaimer in the >+ * documentation and/or other materials provided with the distribution. >+ * >+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY >+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE >+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR >+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR >+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, >+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, >+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR >+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY >+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT >+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE >+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. >+ */ >+ >+ >+#if !PLATFORM(IOS) >+#import "config.h" >+#import "WebKitNSImageExtras.h" >+ >+#import <pal/spi/mac/NSImageSPI.h> >+ >+ >+ >+@implementation NSImage (WebKitExtras) >+ >+- (void)_web_lockFocusWithDeviceScaleFactor:(CGFloat)deviceScaleFactor >+{ >+ NSAffineTransform *transform = [NSAffineTransform transform]; >+ [transform scaleBy:deviceScaleFactor]; >+ >+ NSRect bounds = { NSZeroPoint, self.size }; >+#pragma clang diagnostic push >+#pragma clang diagnostic ignored "-Wdeprecated-declarations" >+ BOOL flippedOrientation = self.isFlipped; >+#pragma clang diagnostic pop >+ [self lockFocusWithRect:bounds context:nil hints:@{ NSImageHintCTM : transform } flipped:flippedOrientation]; >+} >+ >+@end >+ >+#endif // !PLATFORM(IOS) >diff --git a/Source/WebCore/platform/mac/DragImageMac.mm b/Source/WebCore/platform/mac/DragImageMac.mm >index 4aaadac4057b8743bb8205dcb333c88fa0deb118..386ed615684d96dbedb952c49c0e045c9d78a851 100644 >--- a/Source/WebCore/platform/mac/DragImageMac.mm >+++ b/Source/WebCore/platform/mac/DragImageMac.mm >@@ -39,6 +39,7 @@ > #import "StringTruncator.h" > #import "TextIndicator.h" > #import "URL.h" >+#import "WebKitNSImageExtras.h" > #import <pal/spi/cg/CoreGraphicsSPI.h> > #import <pal/spi/cocoa/CoreTextSPI.h> > #import <pal/spi/cocoa/URLFormattingSPI.h> >@@ -293,7 +294,7 @@ LinkImageLayout::LinkImageLayout(URL& url, const String& titleString) > boundingRect.setHeight((static_cast<int>(boundingRect.height() / 2) * 2)); > } > >-DragImageRef createDragImageForLink(Element&, URL& url, const String& title, TextIndicatorData&, FontRenderingMode, float) >+DragImageRef createDragImageForLink(Element&, URL& url, const String& title, TextIndicatorData&, FontRenderingMode, float deviceScaleFactor) > { > LinkImageLayout layout(url, title); > >@@ -302,7 +303,7 @@ DragImageRef createDragImageForLink(Element&, URL& url, const String& title, Tex > imageSize.expand(2 * linkImageShadowRadius, 2 * linkImageShadowRadius - linkImageShadowOffsetY); > #endif > RetainPtr<NSImage> dragImage = adoptNS([[NSImage alloc] initWithSize:imageSize]); >- [dragImage lockFocus]; >+ [dragImage _web_lockFocusWithDeviceScaleFactor:deviceScaleFactor]; > > #pragma clang diagnostic push > #pragma clang diagnostic ignored "-Wdeprecated-declarations"
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 186435
:
342283
|
342285
|
342287
|
342290