[Webkit-unassigned] [Bug 180552] [WK2] Expose image via WKBundleHitTestResult API

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Dec 8 13:51:30 PST 2017


https://bugs.webkit.org/show_bug.cgi?id=180552

--- Comment #4 from Zach Li <zacharyli323 at gmail.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

>> Source/WebKit/WebProcess/InjectedBundle/API/c/WKBundleHitTestResult.cpp:114
>> +}
> 
> This should be called WKBundleHitTestResultCopyImage.

Good point, will change.

>> 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.

I will change the conditional to !is<BitmapImage>(image).

>> Source/WebKit/WebProcess/InjectedBundle/InjectedBundleHitTestResult.cpp:184
>> +    IntSize intSize = bitmapImage.sizeRespectingOrientation();
> 
> I think sizeRespectingOrientation would be a clearer name for this variable.

Sure, will change.

>> 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}?

Sure.

-- 
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/ec1ecea8/attachment.html>


More information about the webkit-unassigned mailing list