[webkit-changes] [WebKit/WebKit] 5dd01b: Canvas drawImage should not alter the input source...
Said Abou-Hallawa
noreply at github.com
Wed May 15 08:15:32 PDT 2024
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 5dd01bad437e9caca054e7a6809ccf7281b70f4a
https://github.com/WebKit/WebKit/commit/5dd01bad437e9caca054e7a6809ccf7281b70f4a
Author: Said Abou-Hallawa <said at apple.com>
Date: 2024-05-15 (Wed, 15 May 2024)
Changed paths:
A LayoutTests/fast/canvas/canvas-drawImage-negative-coordinate-expected.html
A LayoutTests/fast/canvas/canvas-drawImage-negative-coordinate.html
A LayoutTests/fast/canvas/canvas-drawImage-out-of-bounds-coordinate-expected.html
A LayoutTests/fast/canvas/canvas-drawImage-out-of-bounds-coordinate.html
M LayoutTests/imported/w3c/web-platform-tests/html/canvas/element/manual/drawing-images-to-the-canvas/drawimage_canvas-expected.txt
M LayoutTests/imported/w3c/web-platform-tests/html/canvas/element/manual/drawing-images-to-the-canvas/drawimage_html_image-expected.txt
R LayoutTests/platform/glib/imported/w3c/web-platform-tests/html/canvas/element/drawing-images-to-the-canvas/drawimage_canvas-expected.txt
A LayoutTests/platform/glib/imported/w3c/web-platform-tests/html/canvas/element/manual/drawing-images-to-the-canvas/drawimage_canvas-expected.txt
M Source/WebCore/html/canvas/CanvasRenderingContext2DBase.cpp
Log Message:
-----------
Canvas drawImage should not alter the input source or the destination rectangles
https://bugs.webkit.org/show_bug.cgi?id=202457
rdar://127982607
Reviewed by Kimmo Kinnunen.
The input source rectangle was incorrectly clipped to the image source rectangle.
The specs [1] means copying the pixels from the image should be limited to the
image source rectangle. This clipped is already handled by the drawing SDK.
The input source and the destination rectangles should not be altered because
they are used to scale the image when it is drawn to the canvas.
[1] http://www.whatwg.org/specs/web-apps/current-work/multipage/the-canvas-element.html#dom-context-2d-drawimage
* LayoutTests/fast/canvas/canvas-drawImage-negative-coordinate-expected.html: Added.
* LayoutTests/fast/canvas/canvas-drawImage-negative-coordinate.html: Added.
* LayoutTests/fast/canvas/canvas-drawImage-out-of-bounds-coordinate-expected.html: Added.
* LayoutTests/fast/canvas/canvas-drawImage-out-of-bounds-coordinate.html: Added.
* LayoutTests/imported/w3c/web-platform-tests/html/canvas/element/manual/drawing-images-to-the-canvas/drawimage_canvas-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/html/canvas/element/manual/drawing-images-to-the-canvas/drawimage_html_image-expected.txt:
* LayoutTests/platform/glib/imported/w3c/web-platform-tests/html/canvas/element/manual/drawing-images-to-the-canvas/drawimage_canvas-expected.txt: Renamed from LayoutTests/platform/glib/imported/w3c/web-platform-tests/html/canvas/element/drawing-images-to-the-canvas/drawimage_canvas-expected.txt.
* Source/WebCore/html/canvas/CanvasRenderingContext2DBase.cpp:
(WebCore::CanvasRenderingContext2DBase::drawImage):
(WebCore::normalizeSourceAndDestination): Deleted.
Canonical link: https://commits.webkit.org/278807@main
To unsubscribe from these emails, change your notification settings at https://github.com/WebKit/WebKit/settings/notifications
More information about the webkit-changes
mailing list