Clamp some filter functions to one if the values over 100%.

For grayscale, invert, opacity, and sepia, "values of amount over 100%
are allowed but UAs must clamp the values to 1" [1]-[4], so we clamp its value
in the parser.

[1] https://drafts.fxtf.org/filter-effects/#funcdef-filter-grayscale
[2] https://drafts.fxtf.org/filter-effects/#funcdef-filter-invert
[3] https://drafts.fxtf.org/filter-effects/#funcdef-filter-opacity
[4] https://drafts.fxtf.org/filter-effects/#funcdef-filter-sepia
This commit is contained in:
Boris Chiou 2017-09-15 11:38:44 +08:00
parent cad3aff508
commit e719df53c0
4 changed files with 62 additions and 7 deletions

View file

@ -1,3 +0,0 @@
[filter-grayscale-005.htm]
type: reftest
expected: FAIL