Bug 220576 - REGRESSION(r262893): feComponentTransfer is not rendered correctly on Retina display
Summary: REGRESSION(r262893): feComponentTransfer is not rendered correctly on Retina ...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: SVG (show other bugs)
Version: Safari Technology Preview
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Said Abou-Hallawa
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2021-01-12 20:20 PST by Xidorn Quan
Modified: 2021-01-29 06:53 PST (History)
7 users (show)

See Also:


Attachments
testcase (646 bytes, text/html)
2021-01-12 20:20 PST, Xidorn Quan
no flags Details
reduced test case (327 bytes, text/html)
2021-01-26 09:12 PST, Said Abou-Hallawa
no flags Details
more reduced test case (324 bytes, text/html)
2021-01-28 15:05 PST, Said Abou-Hallawa
no flags Details
Patch (4.97 KB, patch)
2021-01-28 18:19 PST, Said Abou-Hallawa
simon.fraser: review+
Details | Formatted Diff | Diff
Patch (4.94 KB, patch)
2021-01-28 19:36 PST, Said Abou-Hallawa
no flags Details | Formatted Diff | Diff
Patch (4.94 KB, patch)
2021-01-28 19:37 PST, Said Abou-Hallawa
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Xidorn Quan 2021-01-12 20:20:24 PST
Created attachment 417504 [details]
testcase

Steps to reproduce:
1. open the testcase
2. click the "Set filter" button

Expected result:
The image becomes blurred.

Actual result:
The image is blurred, but also stretched a bit.

(I've observed even worse distortion when more complicated filters are added.)

I've tested Firefox and Chrome, and neither of them has this problem.

After some diagnose, I think this is because `feComponentTransfer` doesn't work correctly when the SVG is not somehow rendered. This behavior can be easily reproduced if the SVG element is `display: none`. (Note that Firefox shows nothing when SVG element is `display: none` though, not sure whose behavior is correct here.)

That makes me think that the distorted state being persisted is probably related to bug 99996 that even if the SVG element is correctly rendered, the filter result is not updated accordingly.
Comment 1 Simon Fraser (smfr) 2021-01-13 11:55:08 PST
The stretching seems to be related to Retina scaling (but only vertically?)
Comment 2 Radar WebKit Bug Importer 2021-01-13 11:55:18 PST
<rdar://problem/73160574>
Comment 3 Said Abou-Hallawa 2021-01-26 09:12:48 PST
Created attachment 418428 [details]
reduced test case

The stretching bug can occur with just static pages, i.e. no DOM change is needed to reproduce the bug.
Comment 4 Said Abou-Hallawa 2021-01-28 14:59:12 PST
This is a regression of r262893.
Comment 5 Said Abou-Hallawa 2021-01-28 15:05:24 PST
Created attachment 418673 [details]
more reduced test case
Comment 6 Said Abou-Hallawa 2021-01-28 18:19:02 PST
Created attachment 418688 [details]
Patch
Comment 7 Simon Fraser (smfr) 2021-01-28 18:58:35 PST
Comment on attachment 418688 [details]
Patch

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

> LayoutTests/fast/hidpi/filters-component-transfer-expected.html:7
> +        filter: url("#a");

You can remove this here.
Comment 8 Said Abou-Hallawa 2021-01-28 19:36:02 PST
Created attachment 418699 [details]
Patch
Comment 9 Said Abou-Hallawa 2021-01-28 19:37:24 PST
Created attachment 418700 [details]
Patch
Comment 10 EWS 2021-01-29 06:53:37 PST
Committed r272059: <https://trac.webkit.org/changeset/272059>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 418700 [details].