[Webkit-unassigned] [Bug 221005] Incorrect sizing of uploaded images when using background-size:cover

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon May 3 19:10:39 PDT 2021


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

Cameron McCormack (:heycam) <heycam at apple.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |ASSIGNED
                 CC|                            |heycam at apple.com
           Assignee|webkit-unassigned at lists.web |heycam at apple.com
                   |kit.org                     |

--- Comment #10 from Cameron McCormack (:heycam) <heycam at apple.com> ---
(In reply to Simon Fraser (smfr) from comment #7)
> I take that back. The floor.jpg image has an EXIF rotation, so we get to
> GraphicsContext::drawPlatformImage() and hit this branch:
> 
>             if (options.orientation() != ImageOrientation::None) {
>                 if (auto transform =
> options.orientation().transformFromDefault(imageSize).inverse())
>                     subimageRect = transform.value().mapRect(subimageRect);
>             }

I think this part's right.

> which is where I think things go wrong. We also hit the subsequent assertion:
>     ASSERT(CGImageGetHeight(subImage.get()) == currHeight -
> CGRectIntegral(srcRect).origin.y);

But this is wrong.  We need to be getting the oriented height of the image, since currHeight and srcRect are in "logical" space, and subImage deals with unoriented coordinates.  Same for the following line, which I think is causing the height to be wrongly adjusted.

-- 
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/20210504/638eeaf6/attachment.htm>


More information about the webkit-unassigned mailing list