This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* MIT License - Copyright (c) 2021 Kaiido | |
* | |
* A monkey-patch for Safari's drawImage. | |
* | |
* This browser doesn't handle well using the cropping abilities of drawImage | |
* with out-of-bounds values. | |
* (see https://stackoverflow.com/questions/35500999/cropping-with-drawimage-not-working-in-safari) | |
* This script takes care of detecting when the monkey-patch is needed, | |
* and does redefine the cropping parameters so they fall inside the source's boundaries. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* MIT License - Copyright (c) 2021 Kaiido | |
* | |
* A method that returns a Set of all the SVG filters | |
* that are supported as CanvasFilter by the current UA. | |
* See https://github.com/whatwg/html/pull/6763#discussion_r691322778 | |
* | |
**/ | |
function getSupportedCanvasFilters() { |