[Webkit-unassigned] [Bug 180552] [WK2] Expose image via WKBundleHitTestResult API
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Fri Dec 8 14:05:16 PST 2017
https://bugs.webkit.org/show_bug.cgi?id=180552
--- Comment #5 from Zach Li <zacharyli323 at gmail.com> ---
(In reply to Wenson Hsieh from comment #2)
> Comment on attachment 328753 [details]
> 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.
Per discussion with Wenson, I will add tests as a follow-up patch, which is tracked by
https://bugs.webkit.org/show_bug.cgi?id=180605.
>
> > 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/5d3139e3/attachment.html>
More information about the webkit-unassigned
mailing list