File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1437,16 +1437,15 @@ class CanvasGraphics {
14371437 }
14381438 const preparedEntry = this . canvasFactory . create ( w , h ) ;
14391439 const pCtx = preparedEntry . context ;
1440- // Pre-assign read: undefined means no canvas filter API (assigning
1441- // would just set a JS property and post-assign read would lie).
14421440 // Post-assign "none"/"" means the URL was rejected (Firefox
14431441 // normalizes accepted url(#id) to an absolute URL).
1444- const filterSupported = pCtx . filter !== undefined ;
14451442 pCtx . filter = filterSpec . url ;
14461443 const filterApplied =
1447- filterSupported && pCtx . filter !== "none" && pCtx . filter !== "" ;
1444+ FeatureTest . isCanvasFilterSupported &&
1445+ pCtx . filter !== "none" &&
1446+ pCtx . filter !== "" ;
14481447 pCtx . drawImage ( srcEntry . canvas , 0 , 0 ) ;
1449- if ( filterSupported ) {
1448+ if ( FeatureTest . isCanvasFilterSupported ) {
14501449 pCtx . filter = "none" ;
14511450 }
14521451 if ( ! filterApplied ) {
You can’t perform that action at this time.
0 commit comments