Fix <clipPath> descendant check for filter effects on SVG elements

Don't advance past the inner-most resource container and don't consider
a resource container itself to be a <clipPath> descendant.

Bug: 109224, 1131088
Change-Id: I87e766f6247e868b31eefba90ca35bf8b1a7bdac
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2425055
Reviewed-by: Philip Rogers <pdr@chromium.org>
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#809837}
diff --git a/svg/shapes/reftests/polygon-with-filtered-marker.html b/svg/shapes/reftests/polygon-with-filtered-marker.html
new file mode 100644
index 0000000..def8adc
--- /dev/null
+++ b/svg/shapes/reftests/polygon-with-filtered-marker.html
@@ -0,0 +1,10 @@
+<!doctype html>
+<title>Filtered &lt;marker> with &lt;clipPath> ancestor on &lt;polygon></title>
+<link rel="match" href="../../struct/reftests/reference/green-100x100.html">
+<svg>
+  <clipPath>
+    <marker id="m" filter="url(#f)"/>
+    <filter id="f"/>
+  </clipPath>
+  <polygon points="0,0 100,0 100,100 0,100" fill="green" marker-start="url(#m)"/>
+</svg>