[webkit-reviews] review granted: [Bug 231063] ImageBitmap should honor EXIF orientation : [Attachment 441561] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Oct 18 14:02:47 PDT 2021

Myles C. Maxfield <mmaxfield at apple.com> has granted Cameron McCormack (:heycam)
<heycam at apple.com>'s request for review:
Bug 231063: ImageBitmap should honor EXIF orientation

Attachment 441561: Patch


--- Comment #8 from Myles C. Maxfield <mmaxfield at apple.com> ---
Comment on attachment 441561
  --> https://bugs.webkit.org/attachment.cgi?id=441561

View in context: https://bugs.webkit.org/attachment.cgi?id=441561&action=review

> Source/WebCore/html/ImageBitmap.cpp:391
> +    auto orientation = imageForRender->orientation();
> +    if (orientation == ImageOrientation::FromImage)
> +	   orientation = ImageOrientation::None;

I've had to write similar code to this elsewhere. I think we should try to push
this complexity somewhere lower level. I'm not sure where, though.

> Source/WebCore/platform/graphics/ImageOrientation.h:111
> +    ImageOrientation flipY() const

Can this be named something like "ImageOrientationWithFlippedY()"? It sounds
like it would be a non-const function.

More information about the webkit-reviews mailing list