NEW 202460
imageSmoothingEnabled = false works with stroke() and createPattern()
https://bugs.webkit.org/show_bug.cgi?id=202460
Summary imageSmoothingEnabled = false works with stroke() and createPattern()
Chris Lord
Reported 2019-10-02 06:40:37 PDT
This test passes on iOS, but fails on Mac, Windows and Linux (WPE and GTK) with: FAIL Test that imageSmoothingEnabled = false (nearest-neighbor interpolation) works with fillRect and createPattern(). assert_array_equals: property 0, expected 0 but got 178 FAIL Test that imageSmoothingEnabled = false (nearest-neighbor interpolation) works with fill() and createPattern(). assert_array_equals: property 0, expected 0 but got 178 FAIL Test that imageSmoothingEnabled = false (nearest-neighbor interpolation) works with stroke() and createPattern(). assert_array_equals: property 0, expected 0 but got 178 Note, the 178 is 176 on Windows/Linux (presumably because they share the Cairo graphics backend?)
Attachments
Radar WebKit Bug Importer
Comment 1 2023-01-16 00:40:11 PST
Ahmad Saleem
Comment 3 2024-05-17 04:32:25 PDT
Web-Spec: If the original image data is a bitmap image, then the value painted at a point in the area of the repetitions is computed by filtering the original image data. When scaling up, if the imageSmoothingEnabled attribute is set to false, then the image must be rendered using nearest-neighbor interpolation. Otherwise, the user agent may use any filtering algorithm (for example bilinear interpolation or nearest-neighbor). User agents which support multiple filtering algorithms may use the value of the imageSmoothingQuality attribute to guide the choice of filtering algorithm. When such a filtering algorithm requires a pixel value from outside the original image data, it must instead use the value from wrapping the pixel's coordinates to the original image's dimensions. (That is, the filter uses 'repeat' behavior, regardless of the value of the pattern's repetition behavior.) https://html.spec.whatwg.org/multipage/canvas.html#dom-canvaspattern-settransform (Bullet 2).
Note You need to log in before you can comment on or make changes to this bug.