[Webkit-unassigned] [Bug 180552] [WK2] Expose image via WKBundleHitTestResult API
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Thu Dec 7 17:03:21 PST 2017
https://bugs.webkit.org/show_bug.cgi?id=180552
--- Comment #2 from Wenson Hsieh <wenson_hsieh at apple.com> ---
Comment on attachment 328753
--> https://bugs.webkit.org/attachment.cgi?id=328753
Patch
View in context: https://bugs.webkit.org/attachment.cgi?id=328753&action=review
I think you should be able to write an API test for this. I would look for other tests in Tools/TestWebKitAPI for an example.
> Source/WebKit/WebProcess/InjectedBundle/InjectedBundleHitTestResult.cpp:180
> + if (!is<BitmapImage>(*image))
You can remove the nullptr check above if you make this conditional !is<BitmapImage>(image) instead, since is() will return false for nullptr.
> Source/WebKit/WebProcess/InjectedBundle/InjectedBundleHitTestResult.cpp:184
> + IntSize intSize = bitmapImage.sizeRespectingOrientation();
I think sizeRespectingOrientation would be a clearer name for this variable.
> Source/WebKit/WebProcess/InjectedBundle/InjectedBundleHitTestResult.cpp:189
> + graphicsContext->drawImage(bitmapImage, floatRect);
I don't think the temp variable floatRect adds much. Can we inline this rect here as {{ }, intSize}?
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20171208/fd75e4ce/attachment.html>
More information about the webkit-unassigned
mailing list