Transform more clip-path pixel tests to reference tests
authorkrit@webkit.org <krit@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 24 Feb 2014 18:34:51 +0000 (18:34 +0000)
committerkrit@webkit.org <krit@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 24 Feb 2014 18:34:51 +0000 (18:34 +0000)
https://bugs.webkit.org/show_bug.cgi?id=129230

Reviewed by Andreas Kling.

* svg/clip-path/clip-path-content-use-007-expected.svg: Added.
* svg/clip-path/clip-path-content-use-007.svg: Added.
* svg/clip-path/clip-path-css-transform-003-expected.svg: Added.
* svg/clip-path/clip-path-css-transform-003.svg: Added.
* svg/clip-path/clip-path-css-transform-004-expected.svg: Added.
* svg/clip-path/clip-path-css-transform-004.svg: Added.
* svg/clip-path/clip-path-document-change-assert-expected.txt: Renamed from LayoutTests/svg/custom/clip-path-document-change-assert-expected.txt.
* svg/clip-path/clip-path-document-change-assert.html: Renamed from LayoutTests/svg/custom/clip-path-document-change-assert.html.
* svg/clip-path/clip-path-dom-child-changes-expected.svg: Added.
* svg/clip-path/clip-path-dom-child-changes.svg: Added.
* svg/clip-path/clip-path-dom-clippathunits-expected.svg: Added.
* svg/clip-path/clip-path-dom-clippathunits.svg: Added.
* svg/clip-path/clip-path-dom-href-expected.svg: Added.
* svg/clip-path/clip-path-dom-href.svg: Added.
* svg/clip-path/clip-path-dom-id-expected.svg: Added.
* svg/clip-path/clip-path-dom-id.svg: Added.
* svg/clip-path/clip-path-negative-scale-expected.svg: Added.
* svg/clip-path/clip-path-negative-scale.svg: Added.
* svg/clip-path/clip-path-no-content-004-expected.svg: Added.
* svg/clip-path/clip-path-no-content-004.svg: Added.
* svg/clip-path/clip-path-on-marker-001-expected.svg: Added.
* svg/clip-path/clip-path-on-marker-001.svg: Added.
* svg/clip-path/clip-path-on-marker-002-expected.svg: Added.
* svg/clip-path/clip-path-on-marker-002.svg: Added.
* svg/clip-path/clip-path-on-marker-003-expected.svg: Added.
* svg/clip-path/clip-path-on-marker-003.svg: Added.
* svg/clip-path/clip-path-recursion-001-expected.svg: Renamed from LayoutTests/svg/custom/circular-clip-path-references-crash-expected.svg.
* svg/clip-path/clip-path-recursion-001.svg: Renamed from LayoutTests/svg/custom/circular-clip-path-references-crash.svg.
* svg/clip-path/clip-path-recursion-002-expected.svg: Added.
* svg/clip-path/clip-path-recursion-002.svg: Added.
* svg/clip-path/clip-path-shape-stroke-expected.svg:
* svg/clip-path/clip-path-with-transform-expected.svg: Added.
* svg/clip-path/clip-path-with-transform.svg: Added.
* svg/clip-path/mask-nested-clip-path-010-expected.svg: Renamed from LayoutTests/svg/custom/clamped-masking-clipping-expected.svg.
* svg/clip-path/mask-nested-clip-path-010.svg: Renamed from LayoutTests/svg/custom/clamped-masking-clipping.svg.
* svg/custom/clip-mask-negative-scale-expected.txt: Removed.
* svg/custom/clip-mask-negative-scale.svg: Removed.
* svg/custom/clip-path-child-changes-expected.txt: Removed.
* svg/custom/clip-path-child-changes.svg: Removed.
* svg/custom/clip-path-href-changes-expected.txt: Removed.
* svg/custom/clip-path-href-changes.svg: Removed.
* svg/custom/clip-path-id-changes-expected.txt: Removed.
* svg/custom/clip-path-id-changes.svg: Removed.
* svg/custom/clip-path-referencing-use.svg: Removed.
* svg/custom/clip-path-referencing-use2.svg: Removed.
* svg/custom/clip-path-units-changes-expected.txt: Removed.
* svg/custom/clip-path-units-changes.svg: Removed.
* svg/custom/clip-path-with-css-transform-1-expected.txt: Removed.
* svg/custom/clip-path-with-css-transform-1.svg: Removed.
* svg/custom/clip-path-with-css-transform-2-expected.txt: Removed.
* svg/custom/clip-path-with-css-transform-2.svg: Removed.
* svg/custom/clip-path-with-transform-expected.txt: Removed.
* svg/custom/clip-path-with-transform.svg: Removed.
* svg/custom/empty-clip-path.svg: Removed.
* svg/custom/recursive-clippath.svg: Removed.
* svg/masking/mask-negative-scale.svg: Added.
* svg/masking/mast-negative-scale-expected.svg: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@164592 268f45cc-cd09-0410-ab3c-d52691b4dbfc

58 files changed:
LayoutTests/ChangeLog
LayoutTests/svg/clip-path/clip-path-content-use-007-expected.svg [new file with mode: 0644]
LayoutTests/svg/clip-path/clip-path-content-use-007.svg [new file with mode: 0644]
LayoutTests/svg/clip-path/clip-path-css-transform-003-expected.svg [new file with mode: 0644]
LayoutTests/svg/clip-path/clip-path-css-transform-003.svg [new file with mode: 0644]
LayoutTests/svg/clip-path/clip-path-css-transform-004-expected.svg [new file with mode: 0644]
LayoutTests/svg/clip-path/clip-path-css-transform-004.svg [new file with mode: 0644]
LayoutTests/svg/clip-path/clip-path-document-change-assert-expected.txt [moved from LayoutTests/svg/custom/clip-path-document-change-assert-expected.txt with 100% similarity]
LayoutTests/svg/clip-path/clip-path-document-change-assert.html [moved from LayoutTests/svg/custom/clip-path-document-change-assert.html with 100% similarity]
LayoutTests/svg/clip-path/clip-path-dom-child-changes-expected.svg [new file with mode: 0644]
LayoutTests/svg/clip-path/clip-path-dom-child-changes.svg [new file with mode: 0644]
LayoutTests/svg/clip-path/clip-path-dom-clippathunits-expected.svg [new file with mode: 0644]
LayoutTests/svg/clip-path/clip-path-dom-clippathunits.svg [new file with mode: 0644]
LayoutTests/svg/clip-path/clip-path-dom-href-expected.svg [new file with mode: 0644]
LayoutTests/svg/clip-path/clip-path-dom-href.svg [new file with mode: 0644]
LayoutTests/svg/clip-path/clip-path-dom-id-expected.svg [new file with mode: 0644]
LayoutTests/svg/clip-path/clip-path-dom-id.svg [new file with mode: 0644]
LayoutTests/svg/clip-path/clip-path-negative-scale-expected.svg [new file with mode: 0644]
LayoutTests/svg/clip-path/clip-path-negative-scale.svg [new file with mode: 0644]
LayoutTests/svg/clip-path/clip-path-no-content-004-expected.svg [new file with mode: 0644]
LayoutTests/svg/clip-path/clip-path-no-content-004.svg [new file with mode: 0644]
LayoutTests/svg/clip-path/clip-path-on-marker-001-expected.svg [new file with mode: 0644]
LayoutTests/svg/clip-path/clip-path-on-marker-001.svg [new file with mode: 0644]
LayoutTests/svg/clip-path/clip-path-on-marker-002-expected.svg [new file with mode: 0644]
LayoutTests/svg/clip-path/clip-path-on-marker-002.svg [new file with mode: 0644]
LayoutTests/svg/clip-path/clip-path-on-marker-003-expected.svg [new file with mode: 0644]
LayoutTests/svg/clip-path/clip-path-on-marker-003.svg [new file with mode: 0644]
LayoutTests/svg/clip-path/clip-path-recursion-001-expected.svg [moved from LayoutTests/svg/custom/circular-clip-path-references-crash-expected.svg with 100% similarity]
LayoutTests/svg/clip-path/clip-path-recursion-001.svg [moved from LayoutTests/svg/custom/circular-clip-path-references-crash.svg with 100% similarity]
LayoutTests/svg/clip-path/clip-path-recursion-002-expected.svg [new file with mode: 0644]
LayoutTests/svg/clip-path/clip-path-recursion-002.svg [new file with mode: 0644]
LayoutTests/svg/clip-path/clip-path-shape-stroke-expected.svg
LayoutTests/svg/clip-path/clip-path-with-transform-expected.svg [new file with mode: 0644]
LayoutTests/svg/clip-path/clip-path-with-transform.svg [new file with mode: 0644]
LayoutTests/svg/clip-path/mask-nested-clip-path-010-expected.svg [moved from LayoutTests/svg/custom/clamped-masking-clipping-expected.svg with 100% similarity]
LayoutTests/svg/clip-path/mask-nested-clip-path-010.svg [moved from LayoutTests/svg/custom/clamped-masking-clipping.svg with 100% similarity]
LayoutTests/svg/custom/clip-mask-negative-scale-expected.txt [deleted file]
LayoutTests/svg/custom/clip-mask-negative-scale.svg [deleted file]
LayoutTests/svg/custom/clip-path-child-changes-expected.txt [deleted file]
LayoutTests/svg/custom/clip-path-child-changes.svg [deleted file]
LayoutTests/svg/custom/clip-path-href-changes-expected.txt [deleted file]
LayoutTests/svg/custom/clip-path-href-changes.svg [deleted file]
LayoutTests/svg/custom/clip-path-id-changes-expected.txt [deleted file]
LayoutTests/svg/custom/clip-path-id-changes.svg [deleted file]
LayoutTests/svg/custom/clip-path-referencing-use.svg [deleted file]
LayoutTests/svg/custom/clip-path-referencing-use2.svg [deleted file]
LayoutTests/svg/custom/clip-path-units-changes-expected.txt [deleted file]
LayoutTests/svg/custom/clip-path-units-changes.svg [deleted file]
LayoutTests/svg/custom/clip-path-with-css-transform-1-expected.txt [deleted file]
LayoutTests/svg/custom/clip-path-with-css-transform-1.svg [deleted file]
LayoutTests/svg/custom/clip-path-with-css-transform-2-expected.txt [deleted file]
LayoutTests/svg/custom/clip-path-with-css-transform-2.svg [deleted file]
LayoutTests/svg/custom/clip-path-with-transform-expected.txt [deleted file]
LayoutTests/svg/custom/clip-path-with-transform.svg [deleted file]
LayoutTests/svg/custom/empty-clip-path.svg [deleted file]
LayoutTests/svg/custom/recursive-clippath.svg [deleted file]
LayoutTests/svg/masking/mask-negative-scale.svg [new file with mode: 0644]
LayoutTests/svg/masking/mast-negative-scale-expected.svg [new file with mode: 0644]

index e76d022..e958c6c 100644 (file)
@@ -5,6 +5,71 @@
 
         Reviewed by Andreas Kling.
 
+        * svg/clip-path/clip-path-content-use-007-expected.svg: Added.
+        * svg/clip-path/clip-path-content-use-007.svg: Added.
+        * svg/clip-path/clip-path-css-transform-003-expected.svg: Added.
+        * svg/clip-path/clip-path-css-transform-003.svg: Added.
+        * svg/clip-path/clip-path-css-transform-004-expected.svg: Added.
+        * svg/clip-path/clip-path-css-transform-004.svg: Added.
+        * svg/clip-path/clip-path-document-change-assert-expected.txt: Renamed from LayoutTests/svg/custom/clip-path-document-change-assert-expected.txt.
+        * svg/clip-path/clip-path-document-change-assert.html: Renamed from LayoutTests/svg/custom/clip-path-document-change-assert.html.
+        * svg/clip-path/clip-path-dom-child-changes-expected.svg: Added.
+        * svg/clip-path/clip-path-dom-child-changes.svg: Added.
+        * svg/clip-path/clip-path-dom-clippathunits-expected.svg: Added.
+        * svg/clip-path/clip-path-dom-clippathunits.svg: Added.
+        * svg/clip-path/clip-path-dom-href-expected.svg: Added.
+        * svg/clip-path/clip-path-dom-href.svg: Added.
+        * svg/clip-path/clip-path-dom-id-expected.svg: Added.
+        * svg/clip-path/clip-path-dom-id.svg: Added.
+        * svg/clip-path/clip-path-negative-scale-expected.svg: Added.
+        * svg/clip-path/clip-path-negative-scale.svg: Added.
+        * svg/clip-path/clip-path-no-content-004-expected.svg: Added.
+        * svg/clip-path/clip-path-no-content-004.svg: Added.
+        * svg/clip-path/clip-path-on-marker-001-expected.svg: Added.
+        * svg/clip-path/clip-path-on-marker-001.svg: Added.
+        * svg/clip-path/clip-path-on-marker-002-expected.svg: Added.
+        * svg/clip-path/clip-path-on-marker-002.svg: Added.
+        * svg/clip-path/clip-path-on-marker-003-expected.svg: Added.
+        * svg/clip-path/clip-path-on-marker-003.svg: Added.
+        * svg/clip-path/clip-path-recursion-001-expected.svg: Renamed from LayoutTests/svg/custom/circular-clip-path-references-crash-expected.svg.
+        * svg/clip-path/clip-path-recursion-001.svg: Renamed from LayoutTests/svg/custom/circular-clip-path-references-crash.svg.
+        * svg/clip-path/clip-path-recursion-002-expected.svg: Added.
+        * svg/clip-path/clip-path-recursion-002.svg: Added.
+        * svg/clip-path/clip-path-shape-stroke-expected.svg:
+        * svg/clip-path/clip-path-with-transform-expected.svg: Added.
+        * svg/clip-path/clip-path-with-transform.svg: Added.
+        * svg/clip-path/mask-nested-clip-path-010-expected.svg: Renamed from LayoutTests/svg/custom/clamped-masking-clipping-expected.svg.
+        * svg/clip-path/mask-nested-clip-path-010.svg: Renamed from LayoutTests/svg/custom/clamped-masking-clipping.svg.
+        * svg/custom/clip-mask-negative-scale-expected.txt: Removed.
+        * svg/custom/clip-mask-negative-scale.svg: Removed.
+        * svg/custom/clip-path-child-changes-expected.txt: Removed.
+        * svg/custom/clip-path-child-changes.svg: Removed.
+        * svg/custom/clip-path-href-changes-expected.txt: Removed.
+        * svg/custom/clip-path-href-changes.svg: Removed.
+        * svg/custom/clip-path-id-changes-expected.txt: Removed.
+        * svg/custom/clip-path-id-changes.svg: Removed.
+        * svg/custom/clip-path-referencing-use.svg: Removed.
+        * svg/custom/clip-path-referencing-use2.svg: Removed.
+        * svg/custom/clip-path-units-changes-expected.txt: Removed.
+        * svg/custom/clip-path-units-changes.svg: Removed.
+        * svg/custom/clip-path-with-css-transform-1-expected.txt: Removed.
+        * svg/custom/clip-path-with-css-transform-1.svg: Removed.
+        * svg/custom/clip-path-with-css-transform-2-expected.txt: Removed.
+        * svg/custom/clip-path-with-css-transform-2.svg: Removed.
+        * svg/custom/clip-path-with-transform-expected.txt: Removed.
+        * svg/custom/clip-path-with-transform.svg: Removed.
+        * svg/custom/empty-clip-path.svg: Removed.
+        * svg/custom/recursive-clippath.svg: Removed.
+        * svg/masking/mask-negative-scale.svg: Added.
+        * svg/masking/mast-negative-scale-expected.svg: Added.
+
+2014-02-24  Dirk Schulze  <krit@webkit.org>
+
+        Transform more clip-path pixel tests to reference tests
+        https://bugs.webkit.org/show_bug.cgi?id=129230
+
+        Reviewed by Andreas Kling.
+
         Remove unnecessary pixel test results.
 
         * platform/efl/svg/custom/clip-mask-negative-scale-expected.png: Removed.
diff --git a/LayoutTests/svg/clip-path/clip-path-content-use-007-expected.svg b/LayoutTests/svg/clip-path/clip-path-content-use-007-expected.svg
new file mode 100644 (file)
index 0000000..23a40fc
--- /dev/null
@@ -0,0 +1,4 @@
+<svg xmlns="http://www.w3.org/2000/svg">
+<rect width="200" height="200" fill="green" />
+</svg>
+
diff --git a/LayoutTests/svg/clip-path/clip-path-content-use-007.svg b/LayoutTests/svg/clip-path/clip-path-content-use-007.svg
new file mode 100644 (file)
index 0000000..dffb768
--- /dev/null
@@ -0,0 +1,13 @@
+<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
+<defs>
+  <rect width="200" height="200" id="rect"/>
+  <use id="use" xlink:href="#rect"/>
+</defs>
+<clipPath id="clip1">
+  <use xlink:href="#use" />
+</clipPath>
+
+<rect width="400" height="400" fill="red" clip-path="url(#clip1)"/>
+<rect width="200" height="200" fill="green" />
+</svg>
+
diff --git a/LayoutTests/svg/clip-path/clip-path-css-transform-003-expected.svg b/LayoutTests/svg/clip-path/clip-path-css-transform-003-expected.svg
new file mode 100644 (file)
index 0000000..02a2139
--- /dev/null
@@ -0,0 +1,4 @@
+<svg xmlns="http://www.w3.org/2000/svg">
+<rect width="200" height="200" fill="green"/>
+</svg>
+
diff --git a/LayoutTests/svg/clip-path/clip-path-css-transform-003.svg b/LayoutTests/svg/clip-path/clip-path-css-transform-003.svg
new file mode 100644 (file)
index 0000000..bbcc865
--- /dev/null
@@ -0,0 +1,8 @@
+<svg xmlns="http://www.w3.org/2000/svg">
+<clipPath id="clip1">
+  <rect width="400" height="400" style="-webkit-transform: scale(.5); transform: scale(.5);"/>
+</clipPath>
+<rect width="400" height="400" fill="red" clip-path="url(#clip1)"/>
+<rect width="200" height="200" fill="green"/>
+</svg>
+
diff --git a/LayoutTests/svg/clip-path/clip-path-css-transform-004-expected.svg b/LayoutTests/svg/clip-path/clip-path-css-transform-004-expected.svg
new file mode 100644 (file)
index 0000000..4827987
--- /dev/null
@@ -0,0 +1,3 @@
+<svg xmlns="http://www.w3.org/2000/svg">
+<rect width="200" height="200" fill="green"/>
+</svg>
\ No newline at end of file
diff --git a/LayoutTests/svg/clip-path/clip-path-css-transform-004.svg b/LayoutTests/svg/clip-path/clip-path-css-transform-004.svg
new file mode 100644 (file)
index 0000000..76c6ce7
--- /dev/null
@@ -0,0 +1,9 @@
+<svg xmlns="http://www.w3.org/2000/svg">
+<clipPath id="clip1">
+  <rect width="400" height="400" style="-webkit-transform: scale(.5); transform: scale(.5)"/>
+  <!-- Second rect may causes masking. -->
+  <rect width="400" height="400" style="-webkit-transform: scale(.5); transform: scale(.5)"/>
+</clipPath>
+<rect width="400" height="400" fill="red" clip-path="url(#clip1)"/>
+<rect width="200" height="200" fill="green"/>
+</svg>
\ No newline at end of file
diff --git a/LayoutTests/svg/clip-path/clip-path-dom-child-changes-expected.svg b/LayoutTests/svg/clip-path/clip-path-dom-child-changes-expected.svg
new file mode 100644 (file)
index 0000000..30e712e
--- /dev/null
@@ -0,0 +1,3 @@
+<svg xmlns="http://www.w3.org/2000/svg">
+<rect width="200" height="200" fill="green"/>
+</svg>
diff --git a/LayoutTests/svg/clip-path/clip-path-dom-child-changes.svg b/LayoutTests/svg/clip-path/clip-path-dom-child-changes.svg
new file mode 100644 (file)
index 0000000..bff181c
--- /dev/null
@@ -0,0 +1,16 @@
+<svg xmlns="http://www.w3.org/2000/svg">
+<clipPath id="clip1">
+  <rect width="400" height="400"/>
+</clipPath>
+
+<g clip-path="url(#clip1)">
+  <rect width="400" height="400" fill="red"/>
+  <rect width="200" height="200" fill="green"/>
+</g>
+
+<script>
+var clip = document.getElementById("clip1");
+var rect = clip.firstChild.nextSibling;
+rect.setAttribute("transform", "scale(0.5)");
+</script>
+</svg>
diff --git a/LayoutTests/svg/clip-path/clip-path-dom-clippathunits-expected.svg b/LayoutTests/svg/clip-path/clip-path-dom-clippathunits-expected.svg
new file mode 100644 (file)
index 0000000..30e712e
--- /dev/null
@@ -0,0 +1,3 @@
+<svg xmlns="http://www.w3.org/2000/svg">
+<rect width="200" height="200" fill="green"/>
+</svg>
diff --git a/LayoutTests/svg/clip-path/clip-path-dom-clippathunits.svg b/LayoutTests/svg/clip-path/clip-path-dom-clippathunits.svg
new file mode 100644 (file)
index 0000000..c0fb37e
--- /dev/null
@@ -0,0 +1,14 @@
+<svg xmlns="http://www.w3.org/2000/svg">
+<clipPath id="clip1" clipPathUnits="objectBoundingBox">
+  <rect width="200" height="200"/>
+</clipPath>
+
+<rect width="400" height="400" fill="red" clip-path="url(#clip1)"/>
+<rect width="200" height="200" fill="green"/>
+
+<script>
+var clip = document.getElementById("clip1");
+var enumeration = clip.clipPathUnits;
+enumeration.baseVal = 1; // Switch to userSpaceOnUse!
+</script>
+</svg>
diff --git a/LayoutTests/svg/clip-path/clip-path-dom-href-expected.svg b/LayoutTests/svg/clip-path/clip-path-dom-href-expected.svg
new file mode 100644 (file)
index 0000000..30e712e
--- /dev/null
@@ -0,0 +1,3 @@
+<svg xmlns="http://www.w3.org/2000/svg">
+<rect width="200" height="200" fill="green"/>
+</svg>
diff --git a/LayoutTests/svg/clip-path/clip-path-dom-href.svg b/LayoutTests/svg/clip-path/clip-path-dom-href.svg
new file mode 100644 (file)
index 0000000..35fe9ed
--- /dev/null
@@ -0,0 +1,14 @@
+<svg xmlns="http://www.w3.org/2000/svg">
+<clipPath id="clip1">
+  <rect width="200" height="200"/>
+</clipPath>
+
+<g clip-path="url(#noclip)">
+  <rect width="400" height="400" fill="red"/>
+  <rect width="200" height="200" fill="green"/>
+</g>
+
+<script>
+document.getElementsByTagName("g")[0].setAttribute("clip-path", "url(#clip1)");
+</script>
+</svg>
diff --git a/LayoutTests/svg/clip-path/clip-path-dom-id-expected.svg b/LayoutTests/svg/clip-path/clip-path-dom-id-expected.svg
new file mode 100644 (file)
index 0000000..30e712e
--- /dev/null
@@ -0,0 +1,3 @@
+<svg xmlns="http://www.w3.org/2000/svg">
+<rect width="200" height="200" fill="green"/>
+</svg>
diff --git a/LayoutTests/svg/clip-path/clip-path-dom-id.svg b/LayoutTests/svg/clip-path/clip-path-dom-id.svg
new file mode 100644 (file)
index 0000000..11b024b
--- /dev/null
@@ -0,0 +1,12 @@
+<svg xmlns="http://www.w3.org/2000/svg">
+<clipPath id="oldclip" clipPathUnits="userSpaceOnUse">
+  <rect width="200" height="200"/>
+</clipPath>
+<g clip-path="url(#newclip)">
+  <rect width="400" height="400" fill="red"/>
+  <rect width="200" height="200" fill="green"/>
+</g>
+<script>
+document.getElementsByTagName("clipPath")[0].setAttribute("id", "newclip");
+</script>
+</svg>
diff --git a/LayoutTests/svg/clip-path/clip-path-negative-scale-expected.svg b/LayoutTests/svg/clip-path/clip-path-negative-scale-expected.svg
new file mode 100644 (file)
index 0000000..1ff5033
--- /dev/null
@@ -0,0 +1,10 @@
+<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
+<rect width="90" height="90" fill="green"/>
+<rect x="40" y="40" width="50" height="50" fill="blue"/>
+<rect x="110" width="90" height="90" fill="green"/>
+<rect x="110" y="40" width="50" height="50" fill="blue"/>
+<rect y="110" width="90" height="90" fill="green"/>
+<rect x="40" y="110" width="50" height="50" fill="blue"/>
+<rect x="110" y="110" width="90" height="90" fill="green"/>
+<rect x="110" y="110" width="50" height="50" fill="blue"/>
+</svg>
diff --git a/LayoutTests/svg/clip-path/clip-path-negative-scale.svg b/LayoutTests/svg/clip-path/clip-path-negative-scale.svg
new file mode 100644 (file)
index 0000000..c461322
--- /dev/null
@@ -0,0 +1,29 @@
+<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
+<!-- Test for https://bugs.webkit.org/show_bug.cgi?id=97409 -->
+<defs>
+<g id="img" transform="translate(10,10)">
+  <rect width="200" height="200" fill="red"/>
+  <rect width="100" height="100" fill="green"/>
+  <rect width="50" height="50" fill="blue"/>
+</g>
+</defs>
+
+<clipPath id="clip">
+  <rect x="10" y="10" height="90" width="90"/>
+</clipPath>
+
+<g transform="translate(200, 200)">
+<g transform="matrix(1 0 0 1 -100 -100)" clip-path="url(#clip)">
+  <use xlink:href="#img"/>
+</g>
+<g transform="matrix(-1 0 0 -1 -100 -100)" clip-path="url(#clip)">
+  <use xlink:href="#img"/>
+</g>
+<g transform="matrix(-1 0 0 1 -100 -100)" clip-path="url(#clip)">
+  <use xlink:href="#img"/>
+</g>
+<g transform="matrix(1 0 0 -1 -100 -100)" clip-path="url(#clip)">
+  <use xlink:href="#img"/>
+</g>
+</g>
+</svg>
diff --git a/LayoutTests/svg/clip-path/clip-path-no-content-004-expected.svg b/LayoutTests/svg/clip-path/clip-path-no-content-004-expected.svg
new file mode 100644 (file)
index 0000000..02a2139
--- /dev/null
@@ -0,0 +1,4 @@
+<svg xmlns="http://www.w3.org/2000/svg">
+<rect width="200" height="200" fill="green"/>
+</svg>
+
diff --git a/LayoutTests/svg/clip-path/clip-path-no-content-004.svg b/LayoutTests/svg/clip-path/clip-path-no-content-004.svg
new file mode 100644 (file)
index 0000000..5f0e7f9
--- /dev/null
@@ -0,0 +1,13 @@
+<svg xmlns="http://www.w3.org/2000/svg">
+<!--It tests that an empty clip path clips the referencing graphic. Bug 15289.-->
+<clipPath id="nothing">
+</clipPath>
+<clipPath id="emptyrect">
+  <rect width="0" height="0"/>
+</clipPath>
+
+<rect width="200" height="200" fill="green"/>
+<rect width="200" height="200" fill="red" clip-path="url(#nothing)"/>
+<rect width="200" height="200" fill="red" clip-path="url(#emptyrect)"/>
+</svg>
+
diff --git a/LayoutTests/svg/clip-path/clip-path-on-marker-001-expected.svg b/LayoutTests/svg/clip-path/clip-path-on-marker-001-expected.svg
new file mode 100644 (file)
index 0000000..dc92765
--- /dev/null
@@ -0,0 +1,4 @@
+<svg xmlns="http://www.w3.org/2000/svg">
+<rect x="50" y="50" width="100" height="100" fill="green"/>
+<rect x="50" y="50" width="50" height="50" fill="blue"/>
+</svg>
diff --git a/LayoutTests/svg/clip-path/clip-path-on-marker-001.svg b/LayoutTests/svg/clip-path/clip-path-on-marker-001.svg
new file mode 100644 (file)
index 0000000..b54f850
--- /dev/null
@@ -0,0 +1,9 @@
+<svg xmlns="http://www.w3.org/2000/svg">
+<clipPath id="clip1" clipPathUnits="objectBoundingBox">
+  <rect width="1" height="1"/>
+</clipPath>
+<marker id="marker1" viewBox="0 0 10 10" refX="5" refY="5" markerWidth="100" markerHeight="100">
+  <rect width="10" height="10" fill="blue"/>
+</marker>
+<path d="M50,50 L150,50 L150,150 L50,150 z" marker-start="url(#marker1)" clip-path="url(#clip1)" fill="green"/>
+</svg>
diff --git a/LayoutTests/svg/clip-path/clip-path-on-marker-002-expected.svg b/LayoutTests/svg/clip-path/clip-path-on-marker-002-expected.svg
new file mode 100644 (file)
index 0000000..f090150
--- /dev/null
@@ -0,0 +1,4 @@
+<svg xmlns="http://www.w3.org/2000/svg">
+<rect x="50" y="50" width="100" height="100" fill="green"/>
+<rect width="100" height="100" fill="blue"/>
+</svg>
diff --git a/LayoutTests/svg/clip-path/clip-path-on-marker-002.svg b/LayoutTests/svg/clip-path/clip-path-on-marker-002.svg
new file mode 100644 (file)
index 0000000..bcc5cc4
--- /dev/null
@@ -0,0 +1,9 @@
+<svg xmlns="http://www.w3.org/2000/svg">
+<clipPath id="clip1" clipPathUnits="userSpaceOnUse">
+  <rect width="100%" height="100%"/>
+</clipPath>
+<marker id="marker1" viewBox="0 0 10 10" refX="5" refY="5" markerWidth="100" markerHeight="100">
+  <rect width="10" height="10" fill="blue"/>
+</marker>
+<path d="M50,50 L150,50 L150,150 L50,150 z" marker-start="url(#marker1)" clip-path="url(#clip1)" fill="green"/>
+</svg>
diff --git a/LayoutTests/svg/clip-path/clip-path-on-marker-003-expected.svg b/LayoutTests/svg/clip-path/clip-path-on-marker-003-expected.svg
new file mode 100644 (file)
index 0000000..dc92765
--- /dev/null
@@ -0,0 +1,4 @@
+<svg xmlns="http://www.w3.org/2000/svg">
+<rect x="50" y="50" width="100" height="100" fill="green"/>
+<rect x="50" y="50" width="50" height="50" fill="blue"/>
+</svg>
diff --git a/LayoutTests/svg/clip-path/clip-path-on-marker-003.svg b/LayoutTests/svg/clip-path/clip-path-on-marker-003.svg
new file mode 100644 (file)
index 0000000..1b45b31
--- /dev/null
@@ -0,0 +1,9 @@
+<svg xmlns="http://www.w3.org/2000/svg">
+<clipPath id="clip1" clipPathUnits="objectBoundingBox">
+  <rect width="1" height="1"/>
+</clipPath>
+<marker id="marker1" viewBox="0 0 10 10" refX="5" refY="5" markerWidth="100" markerHeight="100">
+  <rect width="10" height="10" fill="blue"/>
+</marker>
+<path d="M50,50 L150,50 L150,150 L50,150 z" marker-end="url(#marker1)" clip-path="url(#clip1)" fill="green"/>
+</svg>
diff --git a/LayoutTests/svg/clip-path/clip-path-recursion-002-expected.svg b/LayoutTests/svg/clip-path/clip-path-recursion-002-expected.svg
new file mode 100644 (file)
index 0000000..fbeba53
--- /dev/null
@@ -0,0 +1,6 @@
+<svg xmlns="http://www.w3.org/2000/svg">
+<rect x="50" y="0" width="100" height="100" fill="blue"/>
+<rect x="50" y="0" width="50" height="50" fill="green"/>
+<rect x="50" y="150" width="100" height="100" fill="blue"/>
+<rect x="50" y="150" width="50" height="50" fill="green"/>
+</svg>
diff --git a/LayoutTests/svg/clip-path/clip-path-recursion-002.svg b/LayoutTests/svg/clip-path/clip-path-recursion-002.svg
new file mode 100644 (file)
index 0000000..e06255b
--- /dev/null
@@ -0,0 +1,24 @@
+<svg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink'>
+<defs>
+    <rect x='50' y='150' width='50' height='50' id="rect" fill='none' clip-path='url(#clipPath_1)'/>
+</defs>
+
+<clipPath id='clipPath_0'>
+  <rect x='50' width='50' height='50' clip-path='url(#clipPath_0)'/>
+</clipPath>
+
+<clipPath id='clipPath_1'>
+  <use xlink:href="#rect"/>
+</clipPath>
+
+<!--
+Spec: clip-path: If the IRI reference is not valid (e.g it points to an object that doesn't exist or the object
+                 is not a ‘clipPath’ element) the ‘clip-path’ property must be treated as if it hadn't been specified.
+-->
+
+<rect x='50' width='100' height='100' fill='blue'/>
+<rect x='50' width='100' height='100' fill='green' clip-path='url(#clipPath_0)'/>
+
+<rect x='50' y='150' width='100' height='100' fill='blue'/>
+<rect x='50' y='150' width='100' height='100' fill='green' clip-path='url(#clipPath_1)'/>
+</svg>
index 0c995fc..61ce121 100644 (file)
@@ -1,8 +1,6 @@
 <svg xmlns="http://www.w3.org/2000/svg">
-<defs>
-    <clipPath id="clip">
-        <circle cx="100" cy="100" r="100"/>
-    </clipPath>
-</defs>
-<rect x="10" y="10" width="180" height="180" fill="green" stroke="green" stroke-width="20" style="-webkit-clip-path: circle() stroke;"/>
+<clipPath id="clip">
+  <circle cx="100" cy="100" r="100"/>
+</clipPath>
+<rect x="10" y="10" width="180" height="180" fill="green" stroke="green" stroke-width="20" clip-path="url(#clip)"/>
 </svg>
\ No newline at end of file
diff --git a/LayoutTests/svg/clip-path/clip-path-with-transform-expected.svg b/LayoutTests/svg/clip-path/clip-path-with-transform-expected.svg
new file mode 100644 (file)
index 0000000..02a2139
--- /dev/null
@@ -0,0 +1,4 @@
+<svg xmlns="http://www.w3.org/2000/svg">
+<rect width="200" height="200" fill="green"/>
+</svg>
+
diff --git a/LayoutTests/svg/clip-path/clip-path-with-transform.svg b/LayoutTests/svg/clip-path/clip-path-with-transform.svg
new file mode 100644 (file)
index 0000000..f016264
--- /dev/null
@@ -0,0 +1,8 @@
+<svg xmlns="http://www.w3.org/2000/svg">
+<clipPath id="clip1">
+  <rect width="200" height="200" transform="scale(.5)"/>
+</clipPath>
+<rect width="400" height="400" fill="red" clip-path="url(#clip1)"/>
+<rect width="200" height="200" fill="green"/>
+</svg>
+
diff --git a/LayoutTests/svg/custom/clip-mask-negative-scale-expected.txt b/LayoutTests/svg/custom/clip-mask-negative-scale-expected.txt
deleted file mode 100644 (file)
index 3cd48ca..0000000
+++ /dev/null
@@ -1,46 +0,0 @@
-layer at (0,0) size 800x600
-  RenderView at (0,0) size 800x600
-layer at (0,0) size 800x600
-  RenderSVGRoot {svg} at (0,0) size 667x404
-    RenderSVGHiddenContainer {defs} at (0,0) size 0x0
-      RenderSVGResourceClipper {clipPath} [id="clip"] [clipPathUnits=userSpaceOnUse]
-        RenderSVGPath {path} at (280,280) size 120x120 [fill={[type=SOLID] [color=#000000]}] [data="M 10 10 L 100 10 L 100 100 L 10 100 Z"]
-      RenderSVGResourceMasker {mask} [id="mask"] [maskUnits=objectBoundingBox] [maskContentUnits=userSpaceOnUse]
-        RenderSVGRect {rect} at (280,280) size 120x120 [fill={[type=SOLID] [color=#FFFFFF]}] [x=10.00] [y=10.00] [width=90.00] [height=90.00]
-      RenderSVGImage {image} at (280,280) size 267x267
-    RenderSVGContainer {g} at (146,146) size 121x121 [transform={m=((1.00,0.00)(0.00,1.00)) t=(-100.00,-100.00)}]
-      [masker="mask"] RenderSVGResourceMasker {mask} at (10,10) size 90x90
-      RenderSVGContainer {use} at (146,146) size 268x268
-        RenderSVGImage {image} at (146,146) size 268x268
-    RenderSVGContainer {g} at (0,0) size 120x120 [transform={m=((-1.00,0.00)(0.00,-1.00)) t=(-100.00,-100.00)}]
-      [masker="mask"] RenderSVGResourceMasker {mask} at (10,10) size 90x90
-      RenderSVGContainer {use} at (0,0) size 121x121
-        RenderSVGImage {image} at (0,0) size 121x121
-    RenderSVGContainer {g} at (0,146) size 120x121 [transform={m=((-1.00,0.00)(0.00,1.00)) t=(-100.00,-100.00)}]
-      [masker="mask"] RenderSVGResourceMasker {mask} at (10,10) size 90x90
-      RenderSVGContainer {use} at (0,146) size 121x268
-        RenderSVGImage {image} at (0,146) size 121x268
-    RenderSVGContainer {g} at (146,0) size 121x120 [transform={m=((1.00,0.00)(0.00,-1.00)) t=(-100.00,-100.00)}]
-      [masker="mask"] RenderSVGResourceMasker {mask} at (10,10) size 90x90
-      RenderSVGContainer {use} at (146,0) size 268x121
-        RenderSVGImage {image} at (146,0) size 268x121
-    RenderSVGContainer {g} at (400,0) size 267x267 [transform={m=((1.00,0.00)(0.00,1.00)) t=(300.00,0.00)}]
-      RenderSVGContainer {g} at (546,146) size 121x121 [transform={m=((1.00,0.00)(0.00,1.00)) t=(-100.00,-100.00)}]
-        [clipPath="clip"] RenderSVGResourceClipper {clipPath} at (10,10) size 90x90
-        RenderSVGContainer {use} at (546,146) size 254x268
-          RenderSVGImage {image} at (546,146) size 254x268
-      RenderSVGContainer {g} at (400,0) size 120x120 [transform={m=((-1.00,0.00)(0.00,-1.00)) t=(-100.00,-100.00)}]
-        [clipPath="clip"] RenderSVGResourceClipper {clipPath} at (10,10) size 90x90
-        RenderSVGContainer {use} at (253,0) size 267x121
-          RenderSVGImage {image} at (253,0) size 267x121
-      RenderSVGContainer {g} at (400,146) size 120x121 [transform={m=((-1.00,0.00)(0.00,1.00)) t=(-100.00,-100.00)}]
-        [clipPath="clip"] RenderSVGResourceClipper {clipPath} at (10,10) size 90x90
-        RenderSVGContainer {use} at (253,146) size 267x268
-          RenderSVGImage {image} at (253,146) size 267x268
-      RenderSVGContainer {g} at (546,0) size 121x120 [transform={m=((1.00,0.00)(0.00,-1.00)) t=(-100.00,-100.00)}]
-        [clipPath="clip"] RenderSVGResourceClipper {clipPath} at (10,10) size 90x90
-        RenderSVGContainer {use} at (546,0) size 254x121
-          RenderSVGImage {image} at (546,0) size 254x121
-    RenderSVGText {text} at (-200,91) size 484x12 contains 1 chunk(s)
-      RenderSVGInlineText {#text} at (0,0) size 484x12
-        chunk 1 text run 1 at (-200.00,100.00) startOffset 0 endOffset 120 width 483.75: "This test passes when it displays two four-square groups, all green and with arrows pointing away from the group center."
diff --git a/LayoutTests/svg/custom/clip-mask-negative-scale.svg b/LayoutTests/svg/custom/clip-mask-negative-scale.svg
deleted file mode 100644 (file)
index ad21a18..0000000
+++ /dev/null
@@ -1,64 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!-- Test for https://bugs.webkit.org/show_bug.cgi?id=97409 -->
-<svg width="800" height="600" viewBox="-200 -200 600 450" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
-  <defs>
-    <clipPath id="clip">
-      <path d="M 10 10 h 90 v 90 h -90 z"/>
-    </clipPath>
-    <mask id="mask">
-      <rect x="10" y="10" width="90" height="90" fill="white"/>
-    </mask>
-    <!--
-      This is a 200x200 image, with a green 100x100 rect in the top-left corner and
-      a red 100x100 rect in the bottom-right corner, both with arrows pointing right & down.
-      The clip/mask above should isolate the green rect, and negative scaling should flip the arrows.
-    -->
-    <image id="img" x="10" y="10" width="200" height="200" xlink:href="data:image/png;base64,
-      iVBORw0KGgoAAAANSUhEUgAAAMgAAADICAYAAACtWK6eAAAAAXNSR0IArs4c6QAAAAZiS0dEAP8A
-      /wD/oL2nkwAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB9wJFxAgAOBU/HEAAAAZdEVYdENv
-      bW1lbnQAQ3JlYXRlZCB3aXRoIEdJTVBXgQ4XAAACCklEQVR42u3cSw6DMAxAQbvi/ld2T1AEUiEf
-      z+xgg5TkKdmQjIoKpmE65vIxBCAQEAgIBAQCAgGBgEBAICAQQCAgEBAICAQEAgIBgbwmTSACEQkC
-      EQkzOrZZrBnhd27mDyReXKg54Js4Yi1HHAhEHAhEHAgEBAICAYGAQACBgEBAICAQEAgIBAQCAgGB
-      AAIBgYBAQCAgEBAICAQEAhv7z82KefLsah7a7yB18z20O2KVOBDItUjEgUAcqxAICAQQCAgEBAIC
-      AYGAQEAgIBAQCCAQEAgIBAQCAgGBgEBAICAQEAggEBAICAQEAgIBgYBAQCAgEEAgIBAQCAgEBAIC
-      AYGAQEAgIBBAICAQEAgIBAQCAgGBgECgi6OijMJMMo2BHQQEAgIBgYBAAIGAQEAgIBAQCAgEBAIC
-      AYEAAgGBgEAYLQUCvSIRCCI5cZhOi/Wp75ZAWEENiHGXq0AcsVg2SIEgDoEgDoGAQEAgIBBAICAQ
-      EAgIBAQCAgGBgEBAICAQQCAgEBAICAQEAgIBgYBAoAs3K24oT57L8NhBuqub7xFI+0jEIRB+RCEO
-      geBYJRAQCAgEBAICAYGAQACBgEBAICAQEAgIBAQCAgGBAAIBgYBAQCAgEBAICAQEAgIBgQACAYGA
-      QEAgIBAQCAgEBAICAYEAAgGBgEBAICAQEAgIBAQCAgEEAgIBgcCDvlPeI47W7oF7AAAAAElFTkSu
-      QmCC
-    "/>
-  </defs>
-
-  <g transform="matrix(1 0 0 1 -100 -100)" mask="url(#mask)">
-    <use xlink:href="#img"/>
-  </g>
-  <g transform="matrix(-1 0 0 -1 -100 -100)" mask="url(#mask)">
-    <use xlink:href="#img"/>
-  </g>
-  <g transform="matrix(-1 0 0 1 -100 -100)" mask="url(#mask)">
-    <use xlink:href="#img"/>
-  </g>
-  <g transform="matrix(1 0 0 -1 -100 -100)" mask="url(#mask)">
-    <use xlink:href="#img"/>
-  </g>
-
-  <g transform="translate(300, 0)">
-    <g transform="matrix(1 0 0 1 -100 -100)" clip-path="url(#clip)">
-      <use xlink:href="#img"/>
-    </g>
-    <g transform="matrix(-1 0 0 -1 -100 -100)" clip-path="url(#clip)">
-      <use xlink:href="#img"/>
-    </g>
-    <g transform="matrix(-1 0 0 1 -100 -100)" clip-path="url(#clip)">
-      <use xlink:href="#img"/>
-    </g>
-    <g transform="matrix(1 0 0 -1 -100 -100)" clip-path="url(#clip)">
-      <use xlink:href="#img"/>
-    </g>
-  </g>
-
-  <text x="-200" y="100" font-size="10px">
-    This test passes when it displays two four-square groups, all green and with arrows pointing away from the group center.
-  </text>
-</svg>
diff --git a/LayoutTests/svg/custom/clip-path-child-changes-expected.txt b/LayoutTests/svg/custom/clip-path-child-changes-expected.txt
deleted file mode 100644 (file)
index 712588b..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-layer at (0,0) size 800x600
-  RenderView at (0,0) size 800x600
-layer at (0,0) size 800x600
-  RenderSVGRoot {svg} at (0,0) size 100x100
-    RenderSVGHiddenContainer {defs} at (0,0) size 0x0
-      RenderSVGResourceClipper {clipPath} [id="myclip"] [clipPathUnits=userSpaceOnUse]
-        RenderSVGPath {path} at (0,0) size 100x100 [transform={m=((0.50,0.00)(0.00,0.50)) t=(0.00,0.00)}] [fill={[type=SOLID] [color=#000000]}] [data="M 0 0 L 200 0 L 200 200 L 0 200 Z"]
-    RenderSVGContainer {g} at (0,0) size 100x100
-      [clipPath="myclip"] RenderSVGResourceClipper {clipPath} at (0,0) size 100x100
-      RenderSVGRect {rect} at (0,0) size 200x200 [fill={[type=SOLID] [color=#FF0000]}] [x=0.00] [y=0.00] [width=200.00] [height=200.00]
-      RenderSVGRect {rect} at (0,0) size 100x100 [fill={[type=SOLID] [color=#008000]}] [x=0.00] [y=0.00] [width=100.00] [height=100.00]
diff --git a/LayoutTests/svg/custom/clip-path-child-changes.svg b/LayoutTests/svg/custom/clip-path-child-changes.svg
deleted file mode 100644 (file)
index 6882b18..0000000
+++ /dev/null
@@ -1,22 +0,0 @@
-<svg width="800" height="600" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" onload="runRepaintTest()">
-<script xlink:href="../../fast/repaint/resources/repaint.js"/>
-<defs>
-    <clipPath id="myclip" clipPathUnits="userSpaceOnUse">
-        <path transform="scale(1.0)" d="M 0 0 l 200 0 l 0 200 l -200 0 Z"/>
-    </clipPath>
-</defs>
-
-<script>
-function repaintTest() {
-    var clip = document.getElementById("myclip");
-    var path = clip.firstChild.nextSibling;
-    path.setAttribute("transform", "scale(0.5)");
-}
-</script>
-
-<g clip-path="url(#myclip)">
-<rect x="0" y="0" width="200" height="200" fill="red"/>
-<rect x="0" y="0" width="100" height="100" fill="green"/>
-</g>
-
-</svg>
diff --git a/LayoutTests/svg/custom/clip-path-href-changes-expected.txt b/LayoutTests/svg/custom/clip-path-href-changes-expected.txt
deleted file mode 100644 (file)
index 712588b..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-layer at (0,0) size 800x600
-  RenderView at (0,0) size 800x600
-layer at (0,0) size 800x600
-  RenderSVGRoot {svg} at (0,0) size 100x100
-    RenderSVGHiddenContainer {defs} at (0,0) size 0x0
-      RenderSVGResourceClipper {clipPath} [id="myclip"] [clipPathUnits=userSpaceOnUse]
-        RenderSVGPath {path} at (0,0) size 100x100 [transform={m=((0.50,0.00)(0.00,0.50)) t=(0.00,0.00)}] [fill={[type=SOLID] [color=#000000]}] [data="M 0 0 L 200 0 L 200 200 L 0 200 Z"]
-    RenderSVGContainer {g} at (0,0) size 100x100
-      [clipPath="myclip"] RenderSVGResourceClipper {clipPath} at (0,0) size 100x100
-      RenderSVGRect {rect} at (0,0) size 200x200 [fill={[type=SOLID] [color=#FF0000]}] [x=0.00] [y=0.00] [width=200.00] [height=200.00]
-      RenderSVGRect {rect} at (0,0) size 100x100 [fill={[type=SOLID] [color=#008000]}] [x=0.00] [y=0.00] [width=100.00] [height=100.00]
diff --git a/LayoutTests/svg/custom/clip-path-href-changes.svg b/LayoutTests/svg/custom/clip-path-href-changes.svg
deleted file mode 100644 (file)
index 53cafbf..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-<svg width="800" height="600" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" onload="runRepaintTest()">
-<script xlink:href="../../fast/repaint/resources/repaint.js"/>
-<defs>
-    <clipPath id="myclip" clipPathUnits="userSpaceOnUse">
-        <path transform="scale(.5)" d="M 0 0 l 200 0 l 0 200 l -200 0 Z"/>
-    </clipPath>
-</defs>
-
-<script>
-function repaintTest() {
-    document.getElementsByTagName("g")[0].setAttribute("clip-path", "url(#myclip)");
-}
-</script>
-
-<g clip-path="url(#noclip)">
-<rect x="0" y="0" width="200" height="200" fill="red"/>
-<rect x="0" y="0" width="100" height="100" fill="green"/>
-</g>
-
-</svg>
diff --git a/LayoutTests/svg/custom/clip-path-id-changes-expected.txt b/LayoutTests/svg/custom/clip-path-id-changes-expected.txt
deleted file mode 100644 (file)
index 013260d..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-layer at (0,0) size 800x600
-  RenderView at (0,0) size 800x600
-layer at (0,0) size 800x600
-  RenderSVGRoot {svg} at (0,0) size 100x100
-    RenderSVGHiddenContainer {defs} at (0,0) size 0x0
-      RenderSVGResourceClipper {clipPath} [id="newclip"] [clipPathUnits=userSpaceOnUse]
-        RenderSVGPath {path} at (0,0) size 100x100 [transform={m=((0.50,0.00)(0.00,0.50)) t=(0.00,0.00)}] [fill={[type=SOLID] [color=#000000]}] [data="M 0 0 L 200 0 L 200 200 L 0 200 Z"]
-    RenderSVGContainer {g} at (0,0) size 100x100
-      [clipPath="newclip"] RenderSVGResourceClipper {clipPath} at (0,0) size 100x100
-      RenderSVGRect {rect} at (0,0) size 200x200 [fill={[type=SOLID] [color=#FF0000]}] [x=0.00] [y=0.00] [width=200.00] [height=200.00]
-      RenderSVGRect {rect} at (0,0) size 100x100 [fill={[type=SOLID] [color=#008000]}] [x=0.00] [y=0.00] [width=100.00] [height=100.00]
diff --git a/LayoutTests/svg/custom/clip-path-id-changes.svg b/LayoutTests/svg/custom/clip-path-id-changes.svg
deleted file mode 100644 (file)
index 7d489bf..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-<svg width="800" height="600" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" onload="runRepaintTest()">
-<script xlink:href="../../fast/repaint/resources/repaint.js"/>
-<defs>
-    <clipPath id="oldclip" clipPathUnits="userSpaceOnUse">
-        <path transform="scale(.5)" d="M 0 0 l 200 0 l 0 200 l -200 0 Z"/>
-    </clipPath>
-</defs>
-
-<script>
-function repaintTest() {
-    document.getElementsByTagName("clipPath")[0].setAttribute("id", "newclip");
-}
-</script>
-
-<g clip-path="url(#newclip)">
-<rect x="0" y="0" width="200" height="200" fill="red"/>
-<rect x="0" y="0" width="100" height="100" fill="green"/>
-</g>
-
-</svg>
diff --git a/LayoutTests/svg/custom/clip-path-referencing-use.svg b/LayoutTests/svg/custom/clip-path-referencing-use.svg
deleted file mode 100644 (file)
index 8d5c3dc..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
-  <defs>
-    <rect id="rect" width="100" height="100" />
-    <clipPath id="clip">
-      <use xlink:href="#rect" />
-    </clipPath>
-  </defs>
-
-  <g clip-path="url(#clip)">
-    <rect width="200" height="200" fill="red" />
-    <rect width="100" height="100" fill="green" />
-  </g>
-
-  <text x="10" y="120">The graphic above uses a 100x100 clipPath referencing a rectangle using use.</text>
-   <text x="10" y="140">It should clip the 200x200 red rectangle out and leave a 100x100 green rectangle. Bug 16557. </text>
-</svg>
-
diff --git a/LayoutTests/svg/custom/clip-path-referencing-use2.svg b/LayoutTests/svg/custom/clip-path-referencing-use2.svg
deleted file mode 100644 (file)
index 505df21..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
-  <defs>
-    <rect width="50" height="50" id="rect"/>
-    <use id="use" xlink:href="#rect"/>
-    <clipPath id="clip">
-      <use xlink:href="#use" />
-    </clipPath>
-  </defs>
-
-  <rect width="100" height="100" fill="green" />
-  <g clip-path="url(#clip)">
-    <rect width="100" height="100" fill="red" />
-  </g>
-
-  <text x="10" y="120">The graphic above should show a 100x100 green rectangle.</text>
-   <text x="10" y="140">The red rectangle should not show since it uses a clipping path that uses an indirect reference.</text>
-</svg>
-
diff --git a/LayoutTests/svg/custom/clip-path-units-changes-expected.txt b/LayoutTests/svg/custom/clip-path-units-changes-expected.txt
deleted file mode 100644 (file)
index 712588b..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-layer at (0,0) size 800x600
-  RenderView at (0,0) size 800x600
-layer at (0,0) size 800x600
-  RenderSVGRoot {svg} at (0,0) size 100x100
-    RenderSVGHiddenContainer {defs} at (0,0) size 0x0
-      RenderSVGResourceClipper {clipPath} [id="myclip"] [clipPathUnits=userSpaceOnUse]
-        RenderSVGPath {path} at (0,0) size 100x100 [transform={m=((0.50,0.00)(0.00,0.50)) t=(0.00,0.00)}] [fill={[type=SOLID] [color=#000000]}] [data="M 0 0 L 200 0 L 200 200 L 0 200 Z"]
-    RenderSVGContainer {g} at (0,0) size 100x100
-      [clipPath="myclip"] RenderSVGResourceClipper {clipPath} at (0,0) size 100x100
-      RenderSVGRect {rect} at (0,0) size 200x200 [fill={[type=SOLID] [color=#FF0000]}] [x=0.00] [y=0.00] [width=200.00] [height=200.00]
-      RenderSVGRect {rect} at (0,0) size 100x100 [fill={[type=SOLID] [color=#008000]}] [x=0.00] [y=0.00] [width=100.00] [height=100.00]
diff --git a/LayoutTests/svg/custom/clip-path-units-changes.svg b/LayoutTests/svg/custom/clip-path-units-changes.svg
deleted file mode 100644 (file)
index b4dbf4b..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-<svg width="800" height="600" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" onload="runRepaintTest()">
-<script xlink:href="../../fast/repaint/resources/repaint.js"/>
-<defs>
-    <clipPath id="myclip" clipPathUnits="objectBoundingBox">
-        <path transform="scale(.5)" d="M 0 0 l 200 0 l 0 200 l -200 0 Z"/>
-    </clipPath>
-</defs>
-
-<script>
-function repaintTest() {
-    var clip = document.getElementById("myclip");
-
-    var enumeration = clip.clipPathUnits;
-    enumeration.baseVal = 1; // Switch to userSpaceOnUse!
-}
-</script>
-
-<g clip-path="url(#myclip)">
-<rect x="0" y="0" width="200" height="200" fill="red"/>
-<rect x="0" y="0" width="100" height="100" fill="green"/>
-</g>
-
-</svg>
diff --git a/LayoutTests/svg/custom/clip-path-with-css-transform-1-expected.txt b/LayoutTests/svg/custom/clip-path-with-css-transform-1-expected.txt
deleted file mode 100644 (file)
index 712588b..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-layer at (0,0) size 800x600
-  RenderView at (0,0) size 800x600
-layer at (0,0) size 800x600
-  RenderSVGRoot {svg} at (0,0) size 100x100
-    RenderSVGHiddenContainer {defs} at (0,0) size 0x0
-      RenderSVGResourceClipper {clipPath} [id="myclip"] [clipPathUnits=userSpaceOnUse]
-        RenderSVGPath {path} at (0,0) size 100x100 [transform={m=((0.50,0.00)(0.00,0.50)) t=(0.00,0.00)}] [fill={[type=SOLID] [color=#000000]}] [data="M 0 0 L 200 0 L 200 200 L 0 200 Z"]
-    RenderSVGContainer {g} at (0,0) size 100x100
-      [clipPath="myclip"] RenderSVGResourceClipper {clipPath} at (0,0) size 100x100
-      RenderSVGRect {rect} at (0,0) size 200x200 [fill={[type=SOLID] [color=#FF0000]}] [x=0.00] [y=0.00] [width=200.00] [height=200.00]
-      RenderSVGRect {rect} at (0,0) size 100x100 [fill={[type=SOLID] [color=#008000]}] [x=0.00] [y=0.00] [width=100.00] [height=100.00]
diff --git a/LayoutTests/svg/custom/clip-path-with-css-transform-1.svg b/LayoutTests/svg/custom/clip-path-with-css-transform-1.svg
deleted file mode 100644 (file)
index 71cc803..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-<svg xmlns="http://www.w3.org/2000/svg"
-     xmlns:xlink="http://www.w3.org/1999/xlink">
-<defs>
-    <clipPath id="myclip">
-        <path style="-webkit-transform: scale(.5)" d="M 0 0 l 200 0 l 0 200 l -200 0 Z"/>
-    </clipPath>
-</defs>
-<g  clip-path="url(#myclip)">
-<rect x="0" y="0" width="200" height="200" fill="red"/>
-<rect x="0" y="0" width="100" height="100" fill="green"/>
-</g>
-</svg>
-
diff --git a/LayoutTests/svg/custom/clip-path-with-css-transform-2-expected.txt b/LayoutTests/svg/custom/clip-path-with-css-transform-2-expected.txt
deleted file mode 100644 (file)
index 2c2e350..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-layer at (0,0) size 800x600
-  RenderView at (0,0) size 800x600
-layer at (0,0) size 800x600
-  RenderSVGRoot {svg} at (0,0) size 100x100
-    RenderSVGHiddenContainer {defs} at (0,0) size 0x0
-      RenderSVGResourceClipper {clipPath} [id="myclip"] [clipPathUnits=userSpaceOnUse]
-        RenderSVGRect {rect} at (0,0) size 100x100 [transform={m=((0.50,0.00)(0.00,0.50)) t=(0.00,0.00)}] [fill={[type=SOLID] [color=#000000]}] [x=0.00] [y=0.00] [width=200.00] [height=200.00]
-        RenderSVGRect {rect} at (0,0) size 100x100 [transform={m=((0.50,0.00)(0.00,0.50)) t=(0.00,0.00)}] [fill={[type=SOLID] [color=#000000]}] [x=0.00] [y=0.00] [width=200.00] [height=200.00]
-    RenderSVGContainer {g} at (0,0) size 100x100
-      [clipPath="myclip"] RenderSVGResourceClipper {clipPath} at (0,0) size 100x100
-      RenderSVGRect {rect} at (0,0) size 200x200 [fill={[type=SOLID] [color=#FF0000]}] [x=0.00] [y=0.00] [width=200.00] [height=200.00]
-      RenderSVGRect {rect} at (0,0) size 100x100 [fill={[type=SOLID] [color=#008000]}] [x=0.00] [y=0.00] [width=100.00] [height=100.00]
diff --git a/LayoutTests/svg/custom/clip-path-with-css-transform-2.svg b/LayoutTests/svg/custom/clip-path-with-css-transform-2.svg
deleted file mode 100644 (file)
index 1d33e5b..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-<svg xmlns="http://www.w3.org/2000/svg" 
-     xmlns:xlink="http://www.w3.org/1999/xlink">
-<defs>
-  <clipPath id="myclip">
-    <rect x="0" y="0" width="200" height="200" style="-webkit-transform: scale(.5)"/>
-    <!-- second rect causes masking -->
-    <rect x="0" y="0" width="200" height="200" style="-webkit-transform: scale(.5)"/>
-  </clipPath>
-</defs>
-<g  clip-path="url(#myclip)">
-  <rect x="0" y="0" width="200" height="200" fill="red"/>
-  <rect x="0" y="0" width="100" height="100" fill="green"/>
-</g>
-</svg>
\ No newline at end of file
diff --git a/LayoutTests/svg/custom/clip-path-with-transform-expected.txt b/LayoutTests/svg/custom/clip-path-with-transform-expected.txt
deleted file mode 100644 (file)
index 712588b..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-layer at (0,0) size 800x600
-  RenderView at (0,0) size 800x600
-layer at (0,0) size 800x600
-  RenderSVGRoot {svg} at (0,0) size 100x100
-    RenderSVGHiddenContainer {defs} at (0,0) size 0x0
-      RenderSVGResourceClipper {clipPath} [id="myclip"] [clipPathUnits=userSpaceOnUse]
-        RenderSVGPath {path} at (0,0) size 100x100 [transform={m=((0.50,0.00)(0.00,0.50)) t=(0.00,0.00)}] [fill={[type=SOLID] [color=#000000]}] [data="M 0 0 L 200 0 L 200 200 L 0 200 Z"]
-    RenderSVGContainer {g} at (0,0) size 100x100
-      [clipPath="myclip"] RenderSVGResourceClipper {clipPath} at (0,0) size 100x100
-      RenderSVGRect {rect} at (0,0) size 200x200 [fill={[type=SOLID] [color=#FF0000]}] [x=0.00] [y=0.00] [width=200.00] [height=200.00]
-      RenderSVGRect {rect} at (0,0) size 100x100 [fill={[type=SOLID] [color=#008000]}] [x=0.00] [y=0.00] [width=100.00] [height=100.00]
diff --git a/LayoutTests/svg/custom/clip-path-with-transform.svg b/LayoutTests/svg/custom/clip-path-with-transform.svg
deleted file mode 100644 (file)
index 441163d..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-<?xml version="1.0"?>
-<svg xmlns="http://www.w3.org/2000/svg"
-     xmlns:xlink="http://www.w3.org/1999/xlink">
-<defs>
-    <clipPath id="myclip">
-        <path transform="scale(.5)" d="M 0 0 l 200 0 l 0 200 l -200 0 Z"/>
-    </clipPath>
-</defs>
-<g  clip-path="url(#myclip)">
-<rect x="0" y="0" width="200" height="200" fill="red"/>
-<rect x="0" y="0" width="100" height="100" fill="green"/>
-</g>
-</svg>
-
diff --git a/LayoutTests/svg/custom/empty-clip-path.svg b/LayoutTests/svg/custom/empty-clip-path.svg
deleted file mode 100644 (file)
index 4f6e692..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-<svg xmlns="http://www.w3.org/2000/svg">
-  <defs>
-    <clipPath id="nothing">
-    </clipPath>
-    <clipPath id="emptyrect">
-      <rect width="0" height="0"/>
-    </clipPath>
-  </defs>
-
-  <rect fill="green" width="100" height="100"/>
-  <g clip-path="url(#nothing)" >
-    <rect width="100" height="100" fill="red"/>
-  </g>
-  <g clip-path="url(#emptyrect)" >
-    <rect width="100" height="100" fill="red"/>
-  </g>
-
-  <g>
-    <text y="130">Above a green rectangle should be displayed.</text>
-    <text y="150">It tests that an empty clip path clips the referencing graphic. Bug 15289.</text>
-  </g>
-</svg>
-
diff --git a/LayoutTests/svg/custom/recursive-clippath.svg b/LayoutTests/svg/custom/recursive-clippath.svg
deleted file mode 100644 (file)
index 9a6642d..0000000
+++ /dev/null
@@ -1,34 +0,0 @@
-<svg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink'>
-<defs>
-    <clipPath id='clipPath_0'>
-        <rect x='50' y='0' width='50' height='50' fill='none' clip-path='url(#clipPath_0)'/>
-    </clipPath>
-
-    <rect x='50' y='150' width='50' height='50' id="rect" fill='none' clip-path='url(#clipPath_1)'/>
-    <clipPath id='clipPath_1'>
-        <use xlink:href="#rect"/>
-    </clipPath>
-</defs>
-
-<!--
-Spec: clip-path: If the IRI reference is not valid (e.g it points to an object that doesn't exist or the object
-                 is not a ‘clipPath’ element) the ‘clip-path’ property must be treated as if it hadn't been specified.
--->
-
-<rect x='50' y='0' width='100' height='100' fill='blue'/>
-<rect x='50' y='0' width='100' height='100' fill='green' clip-path='url(#clipPath_0)'/>
-
-<rect x='50' y='150' width='100' height='100' fill='blue'/>
-<rect x='50' y='150' width='100' height='100' fill='green' clip-path='url(#clipPath_1)'/>
-
-<line x1="175" x2="175" y1="0" y2="250" stroke="red"/>
-<text text-anchor="middle" x="175" y="300">Both sides of the red line should look identical</text>
-
-<!-- This is the reference rendering -->
-<g transform="translate(150,0)">
-    <rect x="50" y="0" width="100" height="100" fill="blue"/>
-    <rect x="50" y="0" width="50" height="50" fill="green"/>
-    <rect x="50" y="150" width="100" height="100" fill="blue"/>
-    <rect x="50" y="150" width="50" height="50" fill="green"/>
-</g>
-</svg>
diff --git a/LayoutTests/svg/masking/mask-negative-scale.svg b/LayoutTests/svg/masking/mask-negative-scale.svg
new file mode 100644 (file)
index 0000000..3746fc5
--- /dev/null
@@ -0,0 +1,29 @@
+<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
+<!-- Test for https://bugs.webkit.org/show_bug.cgi?id=97409 -->
+<defs>
+<g id="img" transform="translate(10,10)">
+  <rect width="200" height="200" fill="red"/>
+  <rect width="100" height="100" fill="green"/>
+  <rect width="50" height="50" fill="blue"/>
+</g>
+</defs>
+
+<mask id="mask">
+  <rect x="10" y="10" width="90" height="90" fill="white"/>
+</mask>
+
+<g transform="translate(200, 200)">
+<g transform="matrix(1 0 0 1 -100 -100)" clip-path="url(#mask)">
+  <use xlink:href="#img"/>
+</g>
+<g transform="matrix(-1 0 0 -1 -100 -100)" clip-path="url(#mask)">
+  <use xlink:href="#img"/>
+</g>
+<g transform="matrix(-1 0 0 1 -100 -100)" clip-path="url(#mask)">
+  <use xlink:href="#img"/>
+</g>
+<g transform="matrix(1 0 0 -1 -100 -100)" clip-path="url(#mask)">
+  <use xlink:href="#img"/>
+</g>
+</g>
+</svg>
diff --git a/LayoutTests/svg/masking/mast-negative-scale-expected.svg b/LayoutTests/svg/masking/mast-negative-scale-expected.svg
new file mode 100644 (file)
index 0000000..1ff5033
--- /dev/null
@@ -0,0 +1,10 @@
+<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
+<rect width="90" height="90" fill="green"/>
+<rect x="40" y="40" width="50" height="50" fill="blue"/>
+<rect x="110" width="90" height="90" fill="green"/>
+<rect x="110" y="40" width="50" height="50" fill="blue"/>
+<rect y="110" width="90" height="90" fill="green"/>
+<rect x="40" y="110" width="50" height="50" fill="blue"/>
+<rect x="110" y="110" width="90" height="90" fill="green"/>
+<rect x="110" y="110" width="50" height="50" fill="blue"/>
+</svg>