Find-in-page indicator in Mail viewer is the wrong scale and cut off
authortimothy_horton@apple.com <timothy_horton@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 18 Mar 2016 00:50:46 +0000 (00:50 +0000)
committertimothy_horton@apple.com <timothy_horton@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 18 Mar 2016 00:50:46 +0000 (00:50 +0000)
commitf1ab9b84e5a63c3aa9eb409d7754c6da7c2820bd
tree3fd619f16e42fd6ed3a2b1d061d88d904fbce188
parent4a5ce4e1a3afbc615234100760df74cd62ab6c4c
Find-in-page indicator in Mail viewer is the wrong scale and cut off
https://bugs.webkit.org/show_bug.cgi?id=155605
<rdar://problem/23948165>

Reviewed by Simon Fraser.

Source/WebKit2:

* UIProcess/mac/WKTextFinderClient.mm:
(-[WKTextFinderClient didGetImageForMatchResult:]):
Initialize the NSImage with the correct size, instead of inferring the
size from the bitmap, so that we don't lose information about device pixel ratio.

Tools:

* TestWebKitAPI/Tests/WebKit2Cocoa/FindInPage.mm:
(TEST):
Add a test that ensures that the find result image is correctly @2x.
The NSImage size should be in points.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@198363 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebKit2/ChangeLog
Source/WebKit2/UIProcess/mac/WKTextFinderClient.mm
Tools/ChangeLog
Tools/TestWebKitAPI/Tests/WebKit2Cocoa/FindInPage.mm