Improve tainting for filter primitives

This makes tainting for many filter primitives less pessimistic, by
implementing the "Tainted Filter Primitives" section [1] from the

For feFlood/feDropShadow:

  A value of 'currentcolor' for 'flood-color' taints.

For feSpecularLighting/feDiffuseLighting:

  A value of 'currentcolor' for 'lighting-color' taints.

For the other primitives (which currently lack any specific logic), i.e:

  feBlend, feComponentTransfer, feComposite, feConvolveMatrix,
  feDisplacementMap, feGaussianBlur, feMorphology, feOffset and feTile

no local tainting is performed (the TaintsOrigin() override is returning

The signature/convention of the TaintsOrigin() is changed by removing
the |inputs_taint_origin| argument, and always taint the
primitive if it (the flag returned by FilterEffect::InputsTaintOrigin)
is true. This saves each primitive to have to relate to this flag. (For
primitives that have no inputs this flag would always be false
regardless.) This means that TaintsOrigin() for each primitive is now
essentially computing the "local" tainting state.


Bug: 792518
Change-Id: Ie2d45eeb1ae8478009b88b8b87b3c4c325ede306
Commit-Queue: Fredrik Söderquist <>
Reviewed-by: Philip Rogers <>
Cr-Commit-Position: refs/heads/master@{#638546}
66 files changed