Title: [220019] branches/safari-604-branch/Source/WebCore
Revision
220019
Author
[email protected]
Date
2017-07-28 15:19:38 -0700 (Fri, 28 Jul 2017)

Log Message

Cherry-pick r219891. rdar://problem/33595436

Modified Paths

Diff

Modified: branches/safari-604-branch/Source/WebCore/ChangeLog (220018 => 220019)


--- branches/safari-604-branch/Source/WebCore/ChangeLog	2017-07-28 22:19:34 UTC (rev 220018)
+++ branches/safari-604-branch/Source/WebCore/ChangeLog	2017-07-28 22:19:38 UTC (rev 220019)
@@ -1,3 +1,24 @@
+2017-07-28  Jason Marcell  <[email protected]>
+
+        Cherry-pick r219891. rdar://problem/33595436
+
+    2017-07-25  Per Arne Vollan  <[email protected]>
+
+            Dragged links are blurry on 1x displays.
+            https://bugs.webkit.org/show_bug.cgi?id=174831
+            <rdar://problem/33519698>
+
+            Reviewed by Simon Fraser.
+
+            When the width and height of the drag image is a multiple of 2, the drag image is not blurry
+            on a 1x display. This is a workaround which should be removed when <rdar://problem/33059739>
+            is fixed.
+
+            No new tests, since this is not straightforward to test with a layout test.
+
+            * platform/mac/DragImageMac.mm:
+            (WebCore::LinkImageLayout::LinkImageLayout):
+
 2017-07-26  Jason Marcell  <[email protected]>
 
         Cherry-pick r219876. rdar://problem/33523847

Modified: branches/safari-604-branch/Source/WebCore/platform/mac/DragImageMac.mm (220018 => 220019)


--- branches/safari-604-branch/Source/WebCore/platform/mac/DragImageMac.mm	2017-07-28 22:19:34 UTC (rev 220018)
+++ branches/safari-604-branch/Source/WebCore/platform/mac/DragImageMac.mm	2017-07-28 22:19:38 UTC (rev 220019)
@@ -287,6 +287,11 @@
     currentY += linkImagePadding;
 
     boundingRect = FloatRect(0, 0, maximumUsedTextWidth + linkImagePadding * 2, currentY);
+
+    // To work around blurry drag images on 1x displays, make the width and height a multiple of 2.
+    // FIXME: remove this workaround when <rdar://problem/33059739> is fixed.
+    boundingRect.setWidth((static_cast<int>(boundingRect.width()) / 2) * 2);
+    boundingRect.setHeight((static_cast<int>(boundingRect.height() / 2) * 2));
 }
 
 DragImageRef createDragImageForLink(Element&, URL& url, const String& title, TextIndicatorData&, FontRenderingMode, float)
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to