It seems that filterRes is deprecated in the spec (http://dev.w3.org/fxtf/filters/). Quote: "... filterRes attribute was removed from the specification. See SVG 1.1 specification for the definition". Finally FF has removed it already.
It makes sense to remove this feature.
I stumbled upon very similar problems with SVG Filters that are rendered in Safari in viewport pixels, disregarding device pixels on 'retina' devices. This was reported in Bug 124914 and in a somewhat related discussion in Bug 93471.
I am also using filterRes to get sharp images on retina images. I have a test-page attached.
The HTML is:
<img src="filtered.svg" width="400">
and filtered.svg has a width of 800px for clients with DPR=2. as soon as a filter is used in the SVG it appears blurry in the browser.
i can fix that by repeating the (desired) dimensions as filterRes in the svg:
<svg .... width="800" height="531" ...>
..
<filter filterRes="800 531" id="noop">
...
I don't know of any other workaround to make filters apply on a canvas regarding the dpr. If there is a better and more compliant way, please let me know.
However, as long as I need this workaround, I would like to discourage you to drop filterRes.
That said, I think that it is a bug in webkit, that the actual canvas size for filters is (presumably) derived from the targeted viewport area. Other browsers (Chrome and Firefox) that have already dropped filterRes support do not show this behavior. Please use the attached test-page svg-filter.tgz to verify it.
Created attachment 350578[details]
Archive of layout-test-results from ews100 for mac-sierra
The attached test failures were seen while running run-webkit-tests on the mac-ews.
Bot: ews100 Port: mac-sierra Platform: Mac OS X 10.12.6
Created attachment 350580[details]
Archive of layout-test-results from ews104 for mac-sierra-wk2
The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews.
Bot: ews104 Port: mac-sierra-wk2 Platform: Mac OS X 10.12.6
Created attachment 350582[details]
Archive of layout-test-results from ews202 for win-future
The attached test failures were seen while running run-webkit-tests on the win-ews.
Bot: ews202 Port: win-future Platform: CYGWIN_NT-6.1-2.10.0-0.325-5-3-x86_64-64bit
Created attachment 350585[details]
Archive of layout-test-results from ews116 for mac-sierra
The attached test failures were seen while running run-webkit-tests on the mac-debug-ews.
Bot: ews116 Port: mac-sierra Platform: Mac OS X 10.12.6
Created attachment 350586[details]
Archive of layout-test-results from ews121 for ios-simulator-wk2
The attached test failures were seen while running run-webkit-tests on the ios-sim-ews.
Bot: ews121 Port: ios-simulator-wk2 Platform: Mac OS X 10.13.6
Created attachment 350589[details]
Archive of layout-test-results from ews113 for mac-sierra
The attached test failures were seen while running run-webkit-tests on the mac-debug-ews.
Bot: ews113 Port: mac-sierra Platform: Mac OS X 10.12.6
Created attachment 350592[details]
Archive of layout-test-results from ews123 for ios-simulator-wk2
The attached test failures were seen while running run-webkit-tests on the ios-sim-ews.
Bot: ews123 Port: ios-simulator-wk2 Platform: Mac OS X 10.13.6
Created attachment 350603[details]
Archive of layout-test-results from ews202 for win-future
The attached test failures were seen while running run-webkit-tests on the win-ews.
Bot: ews202 Port: win-future Platform: CYGWIN_NT-6.1-2.10.0-0.325-5-3-x86_64-64bit
Created attachment 350607[details]
Archive of layout-test-results from ews121 for ios-simulator-wk2
The attached test failures were seen while running run-webkit-tests on the ios-sim-ews.
Bot: ews121 Port: ios-simulator-wk2 Platform: Mac OS X 10.13.6
2015-12-08 09:27 PST, Felix Hassert
2018-09-23 10:47 PDT, Simon Fraser (smfr)
2018-09-23 11:54 PDT, EWS Watchlist
2018-09-23 12:06 PDT, EWS Watchlist
2018-09-23 12:30 PDT, EWS Watchlist
2018-09-23 12:49 PDT, EWS Watchlist
2018-09-23 12:53 PDT, EWS Watchlist
2018-09-23 14:46 PDT, EWS Watchlist
2018-09-23 15:35 PDT, EWS Watchlist
2018-09-23 20:18 PDT, Simon Fraser (smfr)
2018-09-23 22:03 PDT, EWS Watchlist
2018-09-23 22:24 PDT, EWS Watchlist
2018-09-23 22:31 PDT, Simon Fraser (smfr)