summaryrefslogtreecommitdiffstats
path: root/layout/reftests/svg/nesting-invalid-01.js
diff options
context:
space:
mode:
authorMatt A. Tobin <mattatobin@localhost.localdomain>2018-02-02 04:16:08 -0500
committerMatt A. Tobin <mattatobin@localhost.localdomain>2018-02-02 04:16:08 -0500
commit5f8de423f190bbb79a62f804151bc24824fa32d8 (patch)
tree10027f336435511475e392454359edea8e25895d /layout/reftests/svg/nesting-invalid-01.js
parent49ee0794b5d912db1f95dce6eb52d781dc210db5 (diff)
downloadUXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar
UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.gz
UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.lz
UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.xz
UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.zip
Add m-esr52 at 52.6.0
Diffstat (limited to 'layout/reftests/svg/nesting-invalid-01.js')
-rw-r--r--layout/reftests/svg/nesting-invalid-01.js35
1 files changed, 35 insertions, 0 deletions
diff --git a/layout/reftests/svg/nesting-invalid-01.js b/layout/reftests/svg/nesting-invalid-01.js
new file mode 100644
index 000000000..da40c1778
--- /dev/null
+++ b/layout/reftests/svg/nesting-invalid-01.js
@@ -0,0 +1,35 @@
+// Any copyright is dedicated to the Public Domain.
+// http://creativecommons.org/publicdomain/zero/1.0/
+
+// These are all of the SVG 1.1 and Filter Effects element names, except for container and deprecated elements,
+// with the addition of an "UNKNOWN" element in the SVG namespace.
+var es = 'animate animateMotion animateTransform circle color-profile cursor desc ellipse feBlend feColorMatrix feComponentTransfer feComposite feConvolveMatrix feDiffuseLighting feDisplacementMap feDistantLight feDropShadow feFlood feFuncA feFuncB feFuncG feFuncR feGaussianBlur feImage feMerge feMergeNode feMorphology feOffset fePointLight feSpecularLighting feSpotLight feTile feTurbulence filter image line linearGradient metadata mpath path polygon polyline radialGradient rect script set stop style text textPath title tspan use view UNKNOWN'.split(' ');
+var colwidth = 200;
+var size = 40;
+var rows = 14;
+
+function makeElement(localName, attrs, children) {
+ var e = document.createElementNS('http://www.w3.org/2000/svg', localName);
+ for (var an in attrs) {
+ e.setAttribute(an, attrs[an]);
+ }
+ if (children) {
+ for (var i = 0; i < children.length; i++) {
+ if (typeof children[i] == 'object') {
+ e.appendChild(children[i]);
+ } else {
+ e.appendChild(document.createTextNode(children[i]));
+ }
+ }
+ }
+ return e;
+}
+
+function makeGroup(i, failing, text) {
+ var x = colwidth * Math.floor(i / rows),
+ y = size * (i % rows);
+ return makeElement('g', { 'fill-opacity': failing ? '1' : '0.25' },
+ [makeElement('rect', { x: x, y: y, width: colwidth, height: size, fill: 'white' }),
+ makeElement('rect', { x: x, y: y, width: size, height: size, fill: failing ? 'red' : 'green' }),
+ makeElement('text', { x: x + size + 10, y: y + size / 2 + 6 }, [text])]);
+}