Title: [248791] trunk/Source/WebKit
Revision
248791
Author
d...@apple.com
Date
2019-08-16 13:33:06 -0700 (Fri, 16 Aug 2019)

Log Message

Long pressing images with transparent backgrounds in dark mode causes a black background to appear around the image content
https://bugs.webkit.org/show_bug.cgi?id=200827
<rdar://53933379>

Reviewed by Tim Horton.

Set a clear color when there is no provided background.

* UIProcess/ios/WKContentViewInteraction.mm:
(createTargetedPreview):

Modified Paths

Diff

Modified: trunk/Source/WebKit/ChangeLog (248790 => 248791)


--- trunk/Source/WebKit/ChangeLog	2019-08-16 20:24:53 UTC (rev 248790)
+++ trunk/Source/WebKit/ChangeLog	2019-08-16 20:33:06 UTC (rev 248791)
@@ -1,3 +1,16 @@
+2019-08-16  Dean Jackson  <d...@apple.com>
+
+        Long pressing images with transparent backgrounds in dark mode causes a black background to appear around the image content
+        https://bugs.webkit.org/show_bug.cgi?id=200827
+        <rdar://53933379>
+
+        Reviewed by Tim Horton.
+
+        Set a clear color when there is no provided background.
+
+        * UIProcess/ios/WKContentViewInteraction.mm:
+        (createTargetedPreview):
+
 2019-08-16  Ryosuke Niwa  <rn...@webkit.org>
 
         Split tabIndex computation for DOM and the rest of WebCore

Modified: trunk/Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm (248790 => 248791)


--- trunk/Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm	2019-08-16 20:24:53 UTC (rev 248790)
+++ trunk/Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm	2019-08-16 20:33:06 UTC (rev 248791)
@@ -8185,8 +8185,7 @@
     else
         parameters = adoptNS([[UIPreviewParameters alloc] init]);
 
-    if (backgroundColor)
-        [parameters setBackgroundColor:backgroundColor];
+    [parameters setBackgroundColor:(backgroundColor ?: [UIColor clearColor])];
 
     CGPoint centerInContainerCoordinates = { CGRectGetMidX(frameInContainerCoordinates), CGRectGetMidY(frameInContainerCoordinates) };
     auto target = adoptNS([[UIPreviewTarget alloc] initWithContainer:previewContainer center:centerInContainerCoordinates]);
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to