diff options
Diffstat (limited to 'layout')
63 files changed, 11 insertions, 1589 deletions
diff --git a/layout/base/crashtests/265027-1.html b/layout/base/crashtests/265027-1.html deleted file mode 100644 index 9b455da41..000000000 --- a/layout/base/crashtests/265027-1.html +++ /dev/null @@ -1,19 +0,0 @@ -<HTML> -<HEAD> -<MARQUEE> -<TABLE> -<MARQUEE HEIGHT=100000000> -<MARQUEE HEIGHT=100000000> -<MARQUEE HEIGHT=100000000> -<MARQUEE HEIGHT=100000000> -<MARQUEE HEIGHT=100000000> -<MARQUEE HEIGHT=100000000> -<MARQUEE HEIGHT=100000000> -<MARQUEE HEIGHT=100000000> -<MARQUEE HEIGHT=100000000> -<MARQUEE HEIGHT=100000000> -<MARQUEE HEIGHT=100000000> -<TBODY> -Attack of the marquees! - - diff --git a/layout/base/crashtests/265986-1.html b/layout/base/crashtests/265986-1.html deleted file mode 100644 index 8d4ca290f..000000000 --- a/layout/base/crashtests/265986-1.html +++ /dev/null @@ -1,10 +0,0 @@ -<!DOCTYPE HTML PUBLIC '-//W3C//DTD HTML 4.0 Transitional//EN'>
-<HTML>
-<HEAD>
-</HEAD>
-<BODY>
-<IFRAME STYLE="MARGIN:99999999999px; PADDING:-99999999999px;"></IFRAME>
-<APPLET STYLE="HEIGHT:9999999999pt; float:left; MARGIN:-99999999999px; border:99999999999px solid blue;"></APPLET>
-<MARQUEE STYLE=" WIDTH:9999999999px;">W</MARQUEE>
-</BODY>
-</HTML>
diff --git a/layout/base/crashtests/265999-1.html b/layout/base/crashtests/265999-1.html deleted file mode 100644 index 7e6e3d416..000000000 --- a/layout/base/crashtests/265999-1.html +++ /dev/null @@ -1,8 +0,0 @@ -<!DOCTYPE HTML PUBLIC '-//W3C//DTD HTML 4.0 Transitional//EN'>
-<HTML>
-<HEAD>
-</HEAD>
-<BODY>
-<MARQUEE STYLE="HEIGHT:9999999999px; float:right; border:99999999999px solid blue;"></MARQUEE>
-</BODY>
-</HTML>
diff --git a/layout/base/crashtests/367498-2.html b/layout/base/crashtests/367498-2.html deleted file mode 100644 index 2c85ac0a4..000000000 --- a/layout/base/crashtests/367498-2.html +++ /dev/null @@ -1,14 +0,0 @@ -<html><head> -</head><body> -<marquee> -<div style="border: 1px solid black; -moz-border-radius: 2em;"> -<marquee> -<span style="display: -moz-grid-line;"> -<select></select> -</span> -</marquee> -</div> -</marquee> - -</body> -</html> diff --git a/layout/base/crashtests/404491-1.html b/layout/base/crashtests/404491-1.html deleted file mode 100644 index 540a0f6a1..000000000 --- a/layout/base/crashtests/404491-1.html +++ /dev/null @@ -1,5 +0,0 @@ -<html> -<body> -<marquee><marquee></marquee><img></marquee> -</body> -</html> diff --git a/layout/base/crashtests/580129-1.html b/layout/base/crashtests/580129-1.html deleted file mode 100644 index 228051b5a..000000000 --- a/layout/base/crashtests/580129-1.html +++ /dev/null @@ -1,19 +0,0 @@ -<html> -<head> -<script> - -function boom() -{ - var a = document.documentElement; - var b = document.createElementNS("http://www.w3.org/1999/xhtml", "body"); - b.setAttributeNS(null, "style", "-moz-column-width: 20em;"); - a.innerHTML = "<frameset>"; - b.innerHTML = "<dd><marquee>x"; - document.removeChild(a); - document.appendChild(b); -} - -</script> -</head> -<body onload="boom();"></body> -</html> diff --git a/layout/base/crashtests/580494-1.html b/layout/base/crashtests/580494-1.html deleted file mode 100644 index c76125f74..000000000 --- a/layout/base/crashtests/580494-1.html +++ /dev/null @@ -1 +0,0 @@ -<html><body><marquee><video></video></marquee></body></html>
\ No newline at end of file diff --git a/layout/base/crashtests/597924-1.html b/layout/base/crashtests/597924-1.html deleted file mode 100644 index d855997ee..000000000 --- a/layout/base/crashtests/597924-1.html +++ /dev/null @@ -1,16 +0,0 @@ -<!DOCTYPE html> -<html> -<head> -<script> - -function boom() -{ - document.getElementById("s").appendChild(document.createElement("div")); - var marq = document.getElementById("f").contentDocument.documentElement; - marq.behavior = "alternate"; -} - -</script> -</head> -<body onload="boom();"><span id="s"></span><iframe src="data:text/xml,%3Cmarquee%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxhtml%22%3EX%3C%2Fmarquee%3E" id="f"></iframe></body> -</html> diff --git a/layout/generic/crashtests/265867-1.html b/layout/generic/crashtests/265867-1.html deleted file mode 100644 index e9da8c7f6..000000000 --- a/layout/generic/crashtests/265867-1.html +++ /dev/null @@ -1,11 +0,0 @@ -<HTML> -<HEAD> -</HEAD> -<BODY> -<BODY STYLE="FLOAT:RIGHT;"></BODY> -<MARQUEE STYLE="MARGIN:99999999999px;"></MARQUEE> -<B STYLE="FLOAT:RIGHT; PADDING:99999999999px;"></B> -</BODY> -</HTML> - - diff --git a/layout/generic/crashtests/348510-1.html b/layout/generic/crashtests/348510-1.html deleted file mode 100644 index 6e00e71f1..000000000 --- a/layout/generic/crashtests/348510-1.html +++ /dev/null @@ -1,7 +0,0 @@ -<marquee> -<a> -<object> -<dd> -<form> -</object> -aaaaaaa diff --git a/layout/generic/crashtests/348510-2.html b/layout/generic/crashtests/348510-2.html deleted file mode 100644 index 8f8c998cf..000000000 --- a/layout/generic/crashtests/348510-2.html +++ /dev/null @@ -1,7 +0,0 @@ -<listing> -<marquee> -<aa> -<object> -<fieldset> -</object> -a
\ No newline at end of file diff --git a/layout/generic/crashtests/363722-1.html b/layout/generic/crashtests/363722-1.html deleted file mode 100644 index f83671c5a..000000000 --- a/layout/generic/crashtests/363722-1.html +++ /dev/null @@ -1,9 +0,0 @@ -<html> -<body> - <marquee style="background: yellow;"> - <marquee style="background: lightgreen;"> - I am a double-marquee. - </marquee> - </marquee> -</body> -</html> diff --git a/layout/generic/crashtests/363722-2.html b/layout/generic/crashtests/363722-2.html deleted file mode 100644 index 1a12a227e..000000000 --- a/layout/generic/crashtests/363722-2.html +++ /dev/null @@ -1,10 +0,0 @@ -<html> -<body> - <marquee style="background: yellow;"> - [inside OUTER marquee] - <marquee style="background: lightgreen;"> - [inside INNER marquee] - </marquee> - </marquee> -</body> -</html> diff --git a/layout/generic/crashtests/370866-1.xhtml b/layout/generic/crashtests/370866-1.xhtml deleted file mode 100644 index dbc673cc4..000000000 --- a/layout/generic/crashtests/370866-1.xhtml +++ /dev/null @@ -1,14 +0,0 @@ -<html xmlns="http://www.w3.org/1999/xhtml"> - -<head> -</head> - -<body> - -<table style="display: -moz-deck;"><tbody><tr><td> - <span style="position: relative;"><marquee><marquee><span style="position: absolute;">X</span></marquee></marquee></span> -</td></tr></tbody></table> - -</body> - -</html> diff --git a/layout/generic/crashtests/379917-1.xhtml b/layout/generic/crashtests/379917-1.xhtml deleted file mode 100644 index a99bd7f4a..000000000 --- a/layout/generic/crashtests/379917-1.xhtml +++ /dev/null @@ -1,35 +0,0 @@ -<html xmlns="http://www.w3.org/1999/xhtml" - xmlns:math="http://www.w3.org/1998/Math/MathML" - class="reftest-wait"> -<head> -<script> - -// This testcase uses long timeouts to make sure the marquee has a chance to animate. - -function boom() -{ - var div1 = document.getElementById("div1"); - var marquee = document.getElementById("marquee"); - - div1.parentNode.removeChild(div1); - marquee.width = 4; - - setTimeout(done, 100); -} - -function done() -{ - document.documentElement.removeAttribute("class"); -} - -</script> -</head> - -<body onload="setTimeout(boom, 100);"> - -<math:math><div id="div1"/>xע</math:math> -<marquee id="marquee">m</marquee> -<div/> - -</body> -</html> diff --git a/layout/generic/crashtests/398332-3.html b/layout/generic/crashtests/398332-3.html deleted file mode 100644 index 991aa6d3d..000000000 --- a/layout/generic/crashtests/398332-3.html +++ /dev/null @@ -1,4 +0,0 @@ -<marquee style="position: relative; right: 20%;">"Ë”Öqü®Û;<span style="position: relative; word-spacing: -100px;"><span style="position: absolute;"> -<style>span::before { content:"before textbefore textbefore textbefore textbefore textbefore text"; }</style> - - diff --git a/layout/generic/crashtests/421671.html b/layout/generic/crashtests/421671.html deleted file mode 100644 index e3919e635..000000000 --- a/layout/generic/crashtests/421671.html +++ /dev/null @@ -1,202 +0,0 @@ -<marquee> -<xmp style="-moz-column-count: 99999999"> - -<a> - -<a> - -<a> - -<a> - -<a> - -<a> - -<a> - -<a> - -<a> - -<a> - -<a> - -<a> - -<a> - -<a> - -<a> - -<a> - -<a> - -<a> - -<a> - -<a> - -<a> - -<a> -<a> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -<a> -<a> -<a> -<a> - -<a> -<a> - -<a> -<a>
\ No newline at end of file diff --git a/layout/generic/crashtests/619021.html b/layout/generic/crashtests/619021.html deleted file mode 100644 index 586c0f2db..000000000 --- a/layout/generic/crashtests/619021.html +++ /dev/null @@ -1,5 +0,0 @@ -<foo> <marquee> <marquee> <marquee> <marquee> <marquee> <marquee> -<foo> <marquee> <foo> <marquee> <foo> <object> <marquee> <foo> -<marquee> <marquee> <foo> <foo> <marquee> <marquee> <foo> <marquee> -<marquee> <marquee> <foo> <marquee> <foo> <foo> <marquee> <marquee> -<marquee> </marquee> <foo> <foo> <pre> diff --git a/layout/generic/crashtests/724235.html b/layout/generic/crashtests/724235.html deleted file mode 100644 index 7054a99f5..000000000 --- a/layout/generic/crashtests/724235.html +++ /dev/null @@ -1,28 +0,0 @@ -<!DOCTYPE html> -<html> -<head> -<title>Testcase for bug 724235</title> -</head> - -<body onload="setTimeout(function(){m=document.getElementsByTagName('marquee')[0]; m.style.fontSize='72px'},0)"> - -<a href="#"> - -<center> - -<marquee>This is a marquee ... </marquee> - -<table> - <tr> - <td><a href="#">click me to CRASH!</a></td> - </tr> -</table> - -<iframe></iframe> - -<script>document.body.offsetHeight;</script> - -<a href="#"></a> - - -</body></html> diff --git a/layout/reftests/bidi/logicalmarquee.html b/layout/reftests/bidi/logicalmarquee.html deleted file mode 100644 index cb13827de..000000000 --- a/layout/reftests/bidi/logicalmarquee.html +++ /dev/null @@ -1,11 +0,0 @@ -<!DOCTYPE HTML> -<html> - <head> - <meta http-equiv="Content-type" content="text/html; charset=iso-8859-8-i"> - <title>Marquee in Logical Hebrew</title> - </head> - - <body> - <marquee scrollamount="0" behavior="alternate" direction="right">עד שיפוח היום ונסו הצלילים</marquee> - </body> -</html> diff --git a/layout/reftests/bidi/marquee-ref.html b/layout/reftests/bidi/marquee-ref.html deleted file mode 100644 index d8778dc88..000000000 --- a/layout/reftests/bidi/marquee-ref.html +++ /dev/null @@ -1,11 +0,0 @@ -<!DOCTYPE HTML> -<html> - <head> - <meta http-equiv="Content-type" content="text/html; charset=iso-8859-8-i"> - <title>Marquee in Logical Hebrew</title> - </head> - - <body> - <div dir="rtl" align="left">עד שיפוח היום ונסו הצלילים</div> - </body> -</html> diff --git a/layout/reftests/bidi/reftest-stylo.list b/layout/reftests/bidi/reftest-stylo.list index b6a48f9ca..d0a854e7f 100644 --- a/layout/reftests/bidi/reftest-stylo.list +++ b/layout/reftests/bidi/reftest-stylo.list @@ -21,9 +21,6 @@ skip == bidiSVG-03.svg bidiSVG-03.svg == bidiSVG-04.svg bidiSVG-04.svg == bidiSVG-05.svg bidiSVG-05.svg random-if(/^Windows\x20NT\x205\.1/.test(http.oscpu)) HTTP(..) == bidiMirroring.svg bidiMirroring.svg -fuzzy-if(Android,9,134) random-if(layersGPUAccelerated) == visualmarquee.html visualmarquee.html -fuzzy-if(Android,9,134) random-if(layersGPUAccelerated) == logicalmarquee.html logicalmarquee.html -== visualmarquee.html visualmarquee.html # test for glyph mirroring in right-to-left text == mirroring-01.html mirroring-01.html # quote marks are not supposed to mirror, but Unicode 5.0 said they should, so some systems do it diff --git a/layout/reftests/bidi/reftest.list b/layout/reftests/bidi/reftest.list index eeabd0beb..5044e657f 100644 --- a/layout/reftests/bidi/reftest.list +++ b/layout/reftests/bidi/reftest.list @@ -18,9 +18,6 @@ random-if(cocoaWidget) == bidi-006-j.html bidi-006-ref.html # bug 734313 fuzzy-if(skiaContent,1,1) == bidiSVG-04.svg bidiSVG-04-ref.svg == bidiSVG-05.svg bidiSVG-05-ref.svg random-if(/^Windows\x20NT\x205\.1/.test(http.oscpu)) HTTP(..) == bidiMirroring.svg bidiMirroring-ref.svg -fuzzy-if(Android,9,134) random-if(layersGPUAccelerated) == visualmarquee.html marquee-ref.html -fuzzy-if(Android,9,134) random-if(layersGPUAccelerated) == logicalmarquee.html marquee-ref.html -== visualmarquee.html logicalmarquee.html # test for glyph mirroring in right-to-left text == mirroring-01.html mirroring-01-ref.html # quote marks are not supposed to mirror, but Unicode 5.0 said they should, so some systems do it diff --git a/layout/reftests/bidi/visualmarquee.html b/layout/reftests/bidi/visualmarquee.html deleted file mode 100644 index 932fd775a..000000000 --- a/layout/reftests/bidi/visualmarquee.html +++ /dev/null @@ -1,11 +0,0 @@ -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> -<html> - <head> - <meta http-equiv="Content-type" content="text/html; charset=iso-8859-8"> - <title>Marquee in Visual Hebrew</title> - </head> - - <body> - <marquee scrollamount="0" behavior="alternate" direction="right">םילילצה וסנו םויה חופיש דע</marquee> - </body> -</html> diff --git a/layout/reftests/marquee/1160342-1.html b/layout/reftests/marquee/1160342-1.html deleted file mode 100644 index 85e7215fb..000000000 --- a/layout/reftests/marquee/1160342-1.html +++ /dev/null @@ -1,10 +0,0 @@ -<html>
-<head>
-<title>Bug 1160342 - Implement marquee using mutation observers</title>
-</head>
-<body onload="document.getElementById('a').setAttribute('behavior', 'alternate')">
-<marquee id="a" scrollamount=0 direction=right>
-This text should be visible
-</marquee>
-</body>
-</html>
diff --git a/layout/reftests/marquee/1160342-2.html b/layout/reftests/marquee/1160342-2.html deleted file mode 100644 index 99b288568..000000000 --- a/layout/reftests/marquee/1160342-2.html +++ /dev/null @@ -1,10 +0,0 @@ -<html>
-<head>
-<title>Bug 1160342 - Implement marquee using mutation observers</title>
-</head>
-<body onload="document.getElementById('a').setAttribute('direction', 'right')">
-<marquee id="a" behavior=alternate scrollamount=0>
-This text should be visible
-</marquee>
-</body>
-</html>
diff --git a/layout/reftests/marquee/1160342-ref.html b/layout/reftests/marquee/1160342-ref.html deleted file mode 100644 index d56c90642..000000000 --- a/layout/reftests/marquee/1160342-ref.html +++ /dev/null @@ -1,10 +0,0 @@ -<html>
-<head>
-<title>Bug 1160342 - Implement marquee using mutation observers</title>
-</head>
-<body>
-<marquee id="a" behavior=alternate scrollamount=0 direction=right>
-This text should be visible
-</marquee>
-</body>
-</html>
diff --git a/layout/reftests/marquee/166591-dynamic-1-ref.html b/layout/reftests/marquee/166591-dynamic-1-ref.html deleted file mode 100644 index a9bed7d5f..000000000 --- a/layout/reftests/marquee/166591-dynamic-1-ref.html +++ /dev/null @@ -1,6 +0,0 @@ -<html><head> -</head> -<body> -<div id="test"><marquee behavior="alternate" scrollamount="0">dynamic marquee</marquee></div> -</body> -</html>
\ No newline at end of file diff --git a/layout/reftests/marquee/166591-dynamic-1.html b/layout/reftests/marquee/166591-dynamic-1.html deleted file mode 100644 index 278b2a37b..000000000 --- a/layout/reftests/marquee/166591-dynamic-1.html +++ /dev/null @@ -1,11 +0,0 @@ -<html><head> -<script> -function init() { - document.getElementById('test').innerHTML = '<marquee behavior="alternate" scrollamount="0">dynamic marquee</marquee>'; -} -</script> -</head> -<body onload="init();"> -<div id="test"></div> -</body> -</html>
\ No newline at end of file diff --git a/layout/reftests/marquee/336736-1-ref.html b/layout/reftests/marquee/336736-1-ref.html deleted file mode 100644 index 116e5ade2..000000000 --- a/layout/reftests/marquee/336736-1-ref.html +++ /dev/null @@ -1,5 +0,0 @@ -<html> -<body> -<div style="background: green; width: 50px"> </div> -</body> -</html> diff --git a/layout/reftests/marquee/336736-1a.html b/layout/reftests/marquee/336736-1a.html deleted file mode 100644 index fb54f3060..000000000 --- a/layout/reftests/marquee/336736-1a.html +++ /dev/null @@ -1,13 +0,0 @@ -<html> -<body dir="rtl"> -<!-- The "alternate" behavior is necessary for the - marquee text to start out on the screen. --> -<marquee - direction="right" - scrollamount="0" - behavior="alternate" -> -<div style="background: green; width: 50px"> </div> -</marquee> -</body> -</html> diff --git a/layout/reftests/marquee/336736-1b.html b/layout/reftests/marquee/336736-1b.html deleted file mode 100644 index 85338167c..000000000 --- a/layout/reftests/marquee/336736-1b.html +++ /dev/null @@ -1,13 +0,0 @@ -<html> -<body> -<!-- The "alternate" behavior is necessary for the - marquee text to start out on the screen. --> -<marquee - direction="right" - scrollamount="0" - behavior="alternate" -> -<div style="background: green; width: 50px"> </div> -</marquee> -</body> -</html> diff --git a/layout/reftests/marquee/406073-1-ref.html b/layout/reftests/marquee/406073-1-ref.html deleted file mode 100644 index 751bb5db7..000000000 --- a/layout/reftests/marquee/406073-1-ref.html +++ /dev/null @@ -1,11 +0,0 @@ -<html class="reftest-wait"> -<body style="border:3px solid;" onload="setTimeout(doe, 0)"> -<marquee behavior="alternate" scrollamount="100"><span style="background-color: lime;">marquee</span></marquee> - <script> - function doe() { - document.getElementsByTagName('marquee')[0].stop(); - document.documentElement.className = ""; - } - </script> -</body> -</html> diff --git a/layout/reftests/marquee/406073-1.html b/layout/reftests/marquee/406073-1.html deleted file mode 100644 index 01787afda..000000000 --- a/layout/reftests/marquee/406073-1.html +++ /dev/null @@ -1,23 +0,0 @@ -<html class="reftest-wait"> -<body style="border:3px solid;" onload="setTimeout(doe, 0)"> -<marquee behavior="alternate" scrollamount="100"><span style="background-color: lime;">marquee</span></marquee> - <script> - function doe() { - document.getElementsByTagName('marquee')[0].stop(); - document.getElementsByTagName('marquee')[0].start(); - document.getElementsByTagName('marquee')[0].stop(); - document.getElementsByTagName('marquee')[0].start(); - document.getElementsByTagName('marquee')[0].stop(); - document.getElementsByTagName('marquee')[0].start(); - document.getElementsByTagName('marquee')[0].stop(); - document.getElementsByTagName('marquee')[0].start(); - document.getElementsByTagName('marquee')[0].stop(); - document.getElementsByTagName('marquee')[0].start(); - document.getElementsByTagName('marquee')[0].stop(); - document.getElementsByTagName('marquee')[0].start(); - document.getElementsByTagName('marquee')[0].stop(); - document.documentElement.className = ""; - } - </script> -</body> -</html> diff --git a/layout/reftests/marquee/407016-2-ref.html b/layout/reftests/marquee/407016-2-ref.html deleted file mode 100644 index 25fee1b7d..000000000 --- a/layout/reftests/marquee/407016-2-ref.html +++ /dev/null @@ -1,5 +0,0 @@ -<html> -<body> -<div style="background-color: lime; height: 50px;"></div> -</body> -</html> diff --git a/layout/reftests/marquee/407016-2.html b/layout/reftests/marquee/407016-2.html deleted file mode 100644 index 65e1273b9..000000000 --- a/layout/reftests/marquee/407016-2.html +++ /dev/null @@ -1,7 +0,0 @@ -<html> -<body> -<marquee scrollamount="0" style="height: 50px; background-color: lime;"> -<div style="width: 9999px;"> </div> -</marquee> -</body> -</html> diff --git a/layout/reftests/marquee/413027-4-ref.html b/layout/reftests/marquee/413027-4-ref.html deleted file mode 100644 index 22fdd42e6..000000000 --- a/layout/reftests/marquee/413027-4-ref.html +++ /dev/null @@ -1,10 +0,0 @@ -<html><head> -<title>Testcase for bug 413027 - Marquee height is sized too small, clipping text vertically</title> -</head> -<body> - -<div style="background-color: lime; width: 600px; float:left;"> - <div style="margin: 100px 0px; padding-left: 2px;">text</div> -</div> - -</body></html> diff --git a/layout/reftests/marquee/413027-4.html b/layout/reftests/marquee/413027-4.html deleted file mode 100644 index d57f2f121..000000000 --- a/layout/reftests/marquee/413027-4.html +++ /dev/null @@ -1,15 +0,0 @@ -<html><head> -<title>Testcase for bug 413027 - Marquee height is sized too small, clipping text vertically</title> -</head> -<body> - -<marquee scrollamount="0" behavior="alternate" direction="right" style="background-color: lime; width: 600px;"> -<div> -<!-- padding-left used to avoid risk of an antialiasing pixel that may - project to the left of the origin, causing a spurious test failure - (see bugs 476927, 475968) --> - <div style="margin: 100px 0px; padding-left: 2px;">text</div> -</div> -</marquee> - -</body></html> diff --git a/layout/reftests/marquee/425247-1-ref.html b/layout/reftests/marquee/425247-1-ref.html deleted file mode 100644 index 3b3a84d41..000000000 --- a/layout/reftests/marquee/425247-1-ref.html +++ /dev/null @@ -1,9 +0,0 @@ -<html><head> -<title>Bug 425247 – Marquee with uppercase UP or DOWN as direction doesn't work properly</title> -</head> -<body> -<marquee direction="up" bgcolor="magenta" behavior="alternate" scrollamount="0"> -<marquee bgcolor="yellow" behavior="alternate" scrollamount="0">marquee up</marquee> -</marquee> -</body> -</html>
\ No newline at end of file diff --git a/layout/reftests/marquee/425247-1.html b/layout/reftests/marquee/425247-1.html deleted file mode 100644 index dfa5021c4..000000000 --- a/layout/reftests/marquee/425247-1.html +++ /dev/null @@ -1,9 +0,0 @@ -<html><head> -<title>Bug 425247 – Marquee with uppercase UP or DOWN as direction doesn't work properly</title> -</head> -<body> -<MARQUEE DIRECTION=UP BGCOLOR=MAGENTA BEHAVIOR=ALTERNATE SCROLLAMOUNT=0> -<MARQUEE BGCOLOR=YELLOW BEHAVIOR=ALTERNATE SCROLLAMOUNT=0>marquee up</MARQUEE> -</MARQUEE> -</body> -</html>
\ No newline at end of file diff --git a/layout/reftests/marquee/425247-2-ref.html b/layout/reftests/marquee/425247-2-ref.html deleted file mode 100644 index 564d74979..000000000 --- a/layout/reftests/marquee/425247-2-ref.html +++ /dev/null @@ -1,9 +0,0 @@ -<html><head> -<title>Bug 425247 – Marquee with uppercase UP or DOWN as direction doesn't work properly</title> -</head> -<body> -<marquee direction="down" bgcolor="magenta" behavior="alternate" scrollamount="0"> -<marquee bgcolor="yellow" behavior="alternate" scrollamount="0">marquee down</marquee> -</marquee> -</body> -</html>
\ No newline at end of file diff --git a/layout/reftests/marquee/425247-2.html b/layout/reftests/marquee/425247-2.html deleted file mode 100644 index 4cb66b901..000000000 --- a/layout/reftests/marquee/425247-2.html +++ /dev/null @@ -1,9 +0,0 @@ -<html><head> -<title>Bug 425247 – Marquee with uppercase UP or DOWN as direction doesn't work properly</title> -</head> -<body> -<MARQUEE DIRECTION=DOWN BGCOLOR=MAGENTA BEHAVIOR=ALTERNATE SCROLLAMOUNT=0> -<MARQUEE BGCOLOR=YELLOW BEHAVIOR=ALTERNATE SCROLLAMOUNT=0>marquee down</MARQUEE> -</MARQUEE> -</body> -</html>
\ No newline at end of file diff --git a/layout/reftests/marquee/429849-1-ref.html b/layout/reftests/marquee/429849-1-ref.html deleted file mode 100644 index 3b9c3166e..000000000 --- a/layout/reftests/marquee/429849-1-ref.html +++ /dev/null @@ -1,10 +0,0 @@ -<html>
-<head>
-<title>Bug 429849 – marquee text not on one line , part of this line on top and second part on bottom</title>
-</head>
-<body>
-<marquee behavior=alternate scrollamount=0 direction=right>
-This text should be on one line
-</marquee>
-</body>
-</html>
diff --git a/layout/reftests/marquee/429849-1.html b/layout/reftests/marquee/429849-1.html deleted file mode 100644 index 6b1757fd0..000000000 --- a/layout/reftests/marquee/429849-1.html +++ /dev/null @@ -1,10 +0,0 @@ -<html>
-<head>
-<title>Bug 429849 – marquee text not on one line , part of this line on top and second part on bottom</title>
-</head>
-<body>
-<marquee behavior=alternate scrollamount=0 direction=right>
-This text <script>document.body.offsetHeight;</script>should be on one line
-</marquee>
-</body>
-</html>
diff --git a/layout/reftests/marquee/reftest-stylo.list b/layout/reftests/marquee/reftest-stylo.list deleted file mode 100644 index 26c77acf9..000000000 --- a/layout/reftests/marquee/reftest-stylo.list +++ /dev/null @@ -1,16 +0,0 @@ -# DO NOT EDIT! This is a auto-generated temporary list for Stylo testing -random-if((B2G&&browserIsRemote)||Mulet) == 166591-dynamic-1.html 166591-dynamic-1.html -# Initial mulet triage: parity with B2G/B2G Desktop -skip-if(B2G) fuzzy-if(Android,8,50) == 336736-1a.html 336736-1a.html -# Bug 1168747 for random b2g timeouts -skip-if(B2G) fuzzy-if(Android,8,50) == 336736-1b.html 336736-1b.html -# Bug 1168747 for random b2g timeouts -== 406073-1.html 406073-1.html -== 407016-2.html 407016-2.html -fuzzy-if(Android,8,220) == 413027-4.html 413027-4.html -fuzzy-if(Android,8,30) == 425247-1.html 425247-1.html -fuzzy-if(Android,8,30) == 425247-2.html 425247-2.html -random == 429849-1.html 429849-1.html -# bug 432288 -== 1160342-1.html 1160342-1.html -== 1160342-2.html 1160342-2.html diff --git a/layout/reftests/marquee/reftest.list b/layout/reftests/marquee/reftest.list deleted file mode 100644 index f033b4634..000000000 --- a/layout/reftests/marquee/reftest.list +++ /dev/null @@ -1,11 +0,0 @@ -== 166591-dynamic-1.html 166591-dynamic-1-ref.html -fuzzy-if(Android,8,50) == 336736-1a.html 336736-1-ref.html -fuzzy-if(Android,8,50) == 336736-1b.html 336736-1-ref.html -== 406073-1.html 406073-1-ref.html -== 407016-2.html 407016-2-ref.html -fuzzy-if(Android,8,220) == 413027-4.html 413027-4-ref.html -fuzzy-if(Android,8,30) == 425247-1.html 425247-1-ref.html -fuzzy-if(Android,8,30) == 425247-2.html 425247-2-ref.html -random == 429849-1.html 429849-1-ref.html # bug 432288 -== 1160342-1.html 1160342-ref.html -== 1160342-2.html 1160342-ref.html diff --git a/layout/reftests/moz.build b/layout/reftests/moz.build index d486e5639..3ab3d4246 100644 --- a/layout/reftests/moz.build +++ b/layout/reftests/moz.build @@ -201,8 +201,6 @@ with Files('list-item/**'): BUG_COMPONENT = ('Core', 'Layout: Block and Inline') with Files('margin-collapsing/**'): BUG_COMPONENT = ('Core', 'Layout: Block and Inline') -with Files('marquee/**'): - BUG_COMPONENT = ('Core', 'CSS Parsing and Computation') with Files('mathml/**'): BUG_COMPONENT = ('Core', 'MathML') with Files('native-theme/**'): diff --git a/layout/reftests/reftest-stylo.list b/layout/reftests/reftest-stylo.list index 7d4078f22..54afc3dac 100644 --- a/layout/reftests/reftest-stylo.list +++ b/layout/reftests/reftest-stylo.list @@ -249,9 +249,6 @@ include mathml/reftest-stylo.list # margin-collapsing include margin-collapsing/reftest-stylo.list -# marquee/ -include marquee/reftest-stylo.list - # native-theme/ # skipping for B2G since something around radio-nonnative.html makes the whole suite hang skip-if(B2G||Android||Mulet) include native-theme/reftest-stylo.list diff --git a/layout/reftests/reftest.list b/layout/reftests/reftest.list index b2da025d5..b06eba58e 100644 --- a/layout/reftests/reftest.list +++ b/layout/reftests/reftest.list @@ -247,9 +247,6 @@ include mathml/reftest.list # margin-collapsing include margin-collapsing/reftest.list -# marquee/ -include marquee/reftest.list - # native-theme/ # (no XUL theme on Android) skip-if(Android) include native-theme/reftest.list diff --git a/layout/reftests/writing-mode/reftest-stylo.list b/layout/reftests/writing-mode/reftest-stylo.list index 5574d9b5b..76f6813e6 100644 --- a/layout/reftests/writing-mode/reftest-stylo.list +++ b/layout/reftests/writing-mode/reftest-stylo.list @@ -65,8 +65,6 @@ HTTP(..) == 1115916-1-vertical-metrics.html 1115916-1-vertical-metrics.html == ua-style-sheet-border-3.html ua-style-sheet-border-3.html == ua-style-sheet-border-4.html ua-style-sheet-border-4.html == ua-style-sheet-border-5.html ua-style-sheet-border-5.html -== ua-style-sheet-size-1.html ua-style-sheet-size-1.html -== ua-style-sheet-size-2.html ua-style-sheet-size-2.html == ua-style-sheet-fieldset-1.html ua-style-sheet-fieldset-1.html skip-if(Android||B2G||Mulet||(winWidget&&!/^Windows\x20NT\x205\.1/.test(http.oscpu))) == ua-style-sheet-textarea-1.html ua-style-sheet-textarea-1.html diff --git a/layout/reftests/writing-mode/reftest.list b/layout/reftests/writing-mode/reftest.list index b670dbd13..13c58d2cb 100644 --- a/layout/reftests/writing-mode/reftest.list +++ b/layout/reftests/writing-mode/reftest.list @@ -58,8 +58,6 @@ fuzzy(116,94) fuzzy-if(winWidget,135,124) HTTP(..) == 1115916-1-vertical-metrics == ua-style-sheet-border-3.html ua-style-sheet-border-3-ref.html == ua-style-sheet-border-4.html ua-style-sheet-border-4-ref.html == ua-style-sheet-border-5.html ua-style-sheet-border-5-ref.html -== ua-style-sheet-size-1.html ua-style-sheet-size-1-ref.html -== ua-style-sheet-size-2.html ua-style-sheet-size-2-ref.html == ua-style-sheet-fieldset-1.html ua-style-sheet-fieldset-1-ref.html skip-if(Android||(winWidget&&!/^Windows\x20NT\x205\.1/.test(http.oscpu))) == ua-style-sheet-textarea-1.html ua-style-sheet-textarea-1a-ref.html diff --git a/layout/reftests/writing-mode/ua-style-sheet-size-1-ref.html b/layout/reftests/writing-mode/ua-style-sheet-size-1-ref.html deleted file mode 100644 index 06f6d5700..000000000 --- a/layout/reftests/writing-mode/ua-style-sheet-size-1-ref.html +++ /dev/null @@ -1,22 +0,0 @@ -<!DOCTYPE html> -<meta charset=utf-8> -<title>Test for logical margins on marquee elements in the UA style sheet</title> -<style> -.v-rl { writing-mode: vertical-rl; } -.ltr, .rtl, .v-rl { border: 1px solid blue; padding: 16px; } -marquee { background-color: yellow; color: transparent; } -.ltr marquee { width: -moz-available; height: auto; } -.rtl marquee { width: -moz-available; height: auto; } -.v-rl marquee { width: auto; height: -moz-available; } -</style> -<div class=ltr> - <marquee>A</marquee> -</div> -<div class=rtl dir=rtl> - <marquee>A</marquee> -</div> -<!-- disabled until bug 1132308 -<div class=v-rl> - <marquee>A</marquee> -</div> ---> diff --git a/layout/reftests/writing-mode/ua-style-sheet-size-1.html b/layout/reftests/writing-mode/ua-style-sheet-size-1.html deleted file mode 100644 index 754908501..000000000 --- a/layout/reftests/writing-mode/ua-style-sheet-size-1.html +++ /dev/null @@ -1,19 +0,0 @@ -<!DOCTYPE html> -<meta charset=utf-8> -<title>Test for logical sizes on marquee elements in the UA style sheet</title> -<style> -.v-rl { writing-mode: vertical-rl; } -.ltr, .rtl, .v-rl { border: 1px solid blue; padding: 16px; } -marquee { background-color: yellow; color: transparent; } -</style> -<div class=ltr> - <marquee>A</marquee> -</div> -<div class=rtl dir=rtl> - <marquee>A</marquee> -</div> -<!-- disabled until bug 1132308 -<div class=v-rl> - <marquee>A</marquee> -</div> ---> diff --git a/layout/reftests/writing-mode/ua-style-sheet-size-2-ref.html b/layout/reftests/writing-mode/ua-style-sheet-size-2-ref.html deleted file mode 100644 index 3c53326ba..000000000 --- a/layout/reftests/writing-mode/ua-style-sheet-size-2-ref.html +++ /dev/null @@ -1,22 +0,0 @@ -<!DOCTYPE html> -<meta charset=utf-8> -<title>Test for logical margins on marquee elements in the UA style sheet</title> -<style> -.v-rl { writing-mode: vertical-rl; } -.ltr, .rtl, .v-rl { border: 1px solid blue; padding: 16px; } -marquee { background-color: yellow; color: transparent; } -.ltr marquee { width: -moz-available; height: 200px; } -.rtl marquee { width: -moz-available; height: 200px; } -.v-rl marquee { width: 200px; height: -moz-available; } -</style> -<div class=ltr> - <marquee direction=down>A</marquee> -</div> -<div class=rtl dir=rtl> - <marquee direction=down>A</marquee> -</div> -<!-- disabled until bug 1132308 -<div class=v-rl> - <marquee direction=down>A</marquee> -</div> ---> diff --git a/layout/reftests/writing-mode/ua-style-sheet-size-2.html b/layout/reftests/writing-mode/ua-style-sheet-size-2.html deleted file mode 100644 index 1c0be6f4b..000000000 --- a/layout/reftests/writing-mode/ua-style-sheet-size-2.html +++ /dev/null @@ -1,19 +0,0 @@ -<!DOCTYPE html> -<meta charset=utf-8> -<title>Test for logical sizes on marquee elements in the UA style sheet</title> -<style> -.v-rl { writing-mode: vertical-rl; } -.ltr, .rtl, .v-rl { border: 1px solid blue; padding: 16px; } -marquee { background-color: yellow; color: transparent; } -</style> -<div class=ltr> - <marquee direction=down>A</marquee> -</div> -<div class=rtl dir=rtl> - <marquee direction=down>A</marquee> -</div> -<!-- disabled until bug 1132308 -<div class=v-rl> - <marquee direction=down>A</marquee> -</div> ---> diff --git a/layout/style/contenteditable.css b/layout/style/contenteditable.css index c550bc7c9..6d569f75e 100644 --- a/layout/style/contenteditable.css +++ b/layout/style/contenteditable.css @@ -80,15 +80,6 @@ input[contenteditable="true"][type="file"] { -moz-user-focus: none !important; } -/* emulation of non-standard HTML <marquee> tag */ -marquee:-moz-read-write { - -moz-binding: url('chrome://xbl-marquee/content/xbl-marquee.xml#marquee-horizontal-editable'); -} - -marquee[direction="up"]:-moz-read-write, marquee[direction="down"]:-moz-read-write { - -moz-binding: url('chrome://xbl-marquee/content/xbl-marquee.xml#marquee-vertical-editable'); -} - *|*:-moz-read-write > input[type="hidden"], input[contenteditable="true"][type="hidden"] { border: 1px solid black !important; diff --git a/layout/style/moz.build b/layout/style/moz.build index ff06b5101..bdc86ee99 100644 --- a/layout/style/moz.build +++ b/layout/style/moz.build @@ -19,7 +19,6 @@ with Files('CSSRuleList.*'): with Files('nsDOM*'): BUG_COMPONENT = ('Core', 'DOM: CSS Object Model') -DIRS += ['xbl-marquee'] TEST_DIRS += ['test'] XPIDL_SOURCES += [ diff --git a/layout/style/nsCSSParser.cpp b/layout/style/nsCSSParser.cpp index 556e35406..f6b84bfac 100644 --- a/layout/style/nsCSSParser.cpp +++ b/layout/style/nsCSSParser.cpp @@ -5941,8 +5941,6 @@ CSSParserImpl::ParseAttributeSelector(int32_t& aDataMask, "language", "defer", "type", - // additional attributes not in HTML4 - "direction", // marquee nullptr }; short i = 0; @@ -15318,17 +15316,17 @@ CSSParserImpl::ParseFontFeatureSettings(nsCSSValue& aValue) return true; } -bool
-CSSParserImpl::ParseFontVariationSettings(nsCSSValue& aValue)
-{
- // TODO: Actually implement this.
-
- // This stub is here because websites insist on considering this
- // very hardware-dependent and O.S.-variable low-level font-control
- // as a "critical feature" which it isn't as there is 0 guarantee
- // that font variation settings are supported or honored by any
- // operating system used by the client.
- return true;
+bool +CSSParserImpl::ParseFontVariationSettings(nsCSSValue& aValue) +{ + // TODO: Actually implement this. + + // This stub is here because websites insist on considering this + // very hardware-dependent and O.S.-variable low-level font-control + // as a "critical feature" which it isn't as there is 0 guarantee + // that font variation settings are supported or honored by any + // operating system used by the client. + return true; } bool diff --git a/layout/style/res/html.css b/layout/style/res/html.css index 44e41c8d0..b975bf0c9 100644 --- a/layout/style/res/html.css +++ b/layout/style/res/html.css @@ -64,7 +64,6 @@ legend, li, listing, main, -marquee, menu, nav, noframes, @@ -819,25 +818,9 @@ dialog:not([open]) { display: none; } -/* emulation of non-standard HTML <marquee> tag */ -marquee { - inline-size: -moz-available; - display: inline-block; - vertical-align: text-bottom; - text-align: start; - -moz-binding: url('chrome://xbl-marquee/content/xbl-marquee.xml#marquee-horizontal'); -} - -marquee[direction="up"], marquee[direction="down"] { - -moz-binding: url('chrome://xbl-marquee/content/xbl-marquee.xml#marquee-vertical'); - block-size: 200px; -} - /* PRINT ONLY rules follow */ @media print { - marquee { -moz-binding: none; } - } /* Ruby */ diff --git a/layout/style/xbl-marquee/jar.mn b/layout/style/xbl-marquee/jar.mn deleted file mode 100644 index 9247cb4a1..000000000 --- a/layout/style/xbl-marquee/jar.mn +++ /dev/null @@ -1,8 +0,0 @@ -# This Source Code Form is subject to the terms of the Mozilla Public -# License, v. 2.0. If a copy of the MPL was not distributed with this -# file, You can obtain one at http://mozilla.org/MPL/2.0/. - -toolkit.jar: -% content xbl-marquee %content/xbl-marquee/ contentaccessible=yes - content/xbl-marquee/xbl-marquee.xml - content/xbl-marquee/xbl-marquee.css diff --git a/layout/style/xbl-marquee/moz.build b/layout/style/xbl-marquee/moz.build deleted file mode 100644 index eb4454d28..000000000 --- a/layout/style/xbl-marquee/moz.build +++ /dev/null @@ -1,7 +0,0 @@ -# -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*- -# vim: set filetype=python: -# This Source Code Form is subject to the terms of the Mozilla Public -# License, v. 2.0. If a copy of the MPL was not distributed with this -# file, You can obtain one at http://mozilla.org/MPL/2.0/. - -JAR_MANIFESTS += ['jar.mn']
\ No newline at end of file diff --git a/layout/style/xbl-marquee/xbl-marquee.css b/layout/style/xbl-marquee/xbl-marquee.css deleted file mode 100644 index e6d3ee94b..000000000 --- a/layout/style/xbl-marquee/xbl-marquee.css +++ /dev/null @@ -1,12 +0,0 @@ -/* This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ - -/* PRINT ONLY rules */ -@media print { - - marquee > * > * { - margin: 0 !important; - padding: 0 !important; - } /* This hack is needed until bug 119078 gets fixed */ -} diff --git a/layout/style/xbl-marquee/xbl-marquee.xml b/layout/style/xbl-marquee/xbl-marquee.xml deleted file mode 100644 index bb837624d..000000000 --- a/layout/style/xbl-marquee/xbl-marquee.xml +++ /dev/null @@ -1,733 +0,0 @@ -<?xml version="1.0"?> -<!-- This Source Code Form is subject to the terms of the Mozilla Public - - License, v. 2.0. If a copy of the MPL was not distributed with this - - file, You can obtain one at http://mozilla.org/MPL/2.0/. --> - -<bindings id="marqueeBindings" - xmlns="http://www.mozilla.org/xbl" - xmlns:html="http://www.w3.org/1999/xhtml" - xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" - xmlns:xbl="http://www.mozilla.org/xbl"> - - - <binding id="marquee" bindToUntrustedContent="true"> - - <resources> - <stylesheet src="chrome://xbl-marquee/content/xbl-marquee.css"/> - </resources> - <implementation> - - <property name="scrollAmount" exposeToUntrustedContent="true"> - <getter> - <![CDATA[ - this._mutationActor(this._mutationObserver.takeRecords()); - return this._scrollAmount; - ]]> - </getter> - <setter> - <![CDATA[ - var val = parseInt(val); - if (val < 0) { - return; - } - if (isNaN(val)) { - val = 0; - } - this.setAttribute("scrollamount", val); - ]]> - </setter> - </property> - - <property name="scrollDelay" exposeToUntrustedContent="true"> - <getter> - <![CDATA[ - this._mutationActor(this._mutationObserver.takeRecords()); - var val = parseInt(this.getAttribute("scrolldelay")); - - if (val <= 0 || isNaN(val)) { - return this._scrollDelay; - } - - return val; - ]]> - </getter> - <setter> - var val = parseInt(val); - if (val > 0 ) { - this.setAttribute("scrolldelay", val); - } - </setter> - </property> - - <property name="trueSpeed" exposeToUntrustedContent="true"> - <getter> - <![CDATA[ - if (!this.hasAttribute("truespeed")) { - return false; - } - - return true; - ]]> - </getter> - <setter> - <![CDATA[ - if (val) { - this.setAttribute("truespeed", ""); - } else { - this.removeAttribute('truespeed'); - } - ]]> - </setter> - </property> - - <property name="direction" exposeToUntrustedContent="true"> - <getter> - this._mutationActor(this._mutationObserver.takeRecords()); - return this._direction; - </getter> - <setter> - <![CDATA[ - if (typeof val == 'string') { - val = val.toLowerCase(); - } else { - return; - } - if (val != 'left' && val != 'right' && val != 'up' && val != 'down') { - val = 'left'; - } - - this.setAttribute("direction", val); - ]]> - </setter> - </property> - - <property name="behavior" exposeToUntrustedContent="true"> - <getter> - this._mutationActor(this._mutationObserver.takeRecords()); - return this._behavior; - </getter> - <setter> - if (typeof val == 'string') { - val = val.toLowerCase(); - } - if (val == "alternate" || val == "slide" || val == 'scroll') { - this.setAttribute("behavior", val); - } - </setter> - </property> - - - <property name="loop" exposeToUntrustedContent="true"> - <getter> - <![CDATA[ - this._mutationActor(this._mutationObserver.takeRecords()); - return this._loop; - ]]> - </getter> - <setter> - <![CDATA[ - var val = parseInt(val); - if (val == -1 || val > 0) { - this.setAttribute("loop", val); - } - ]]> - </setter> - </property> - - - <property name="onstart" exposeToUntrustedContent="true"> - <getter> - return this.getAttribute("onstart"); - </getter> - <setter> - this._setEventListener("start", val, true); - this.setAttribute("onstart", val); - </setter> - </property> - - <property name="onfinish" exposeToUntrustedContent="true"> - <getter> - return this.getAttribute("onfinish"); - </getter> - <setter> - this._setEventListener("finish", val, true); - this.setAttribute("onfinish", val); - </setter> - </property> - - <property name="onbounce" exposeToUntrustedContent="true"> - <getter> - return this.getAttribute("onbounce"); - </getter> - <setter> - this._setEventListener("bounce", val, true); - this.setAttribute("onbounce", val); - </setter> - </property> - - <property name="outerDiv" - onget="return document.getAnonymousNodes(this)[0]" - /> - - <property name="innerDiv" - onget="return document.getAnonymousElementByAttribute(this, 'class', 'innerDiv');" - /> - - <property name="height" exposeToUntrustedContent="true" - onget="return this.getAttribute('height');" - onset="this.setAttribute('height', val);" - /> - - <property name="width" exposeToUntrustedContent="true" - onget="return this.getAttribute('width');" - onset="this.setAttribute('width', val);" - /> - - <method name="_set_scrollDelay"> - <parameter name="aValue"/> - <body> - <![CDATA[ - aValue = parseInt(aValue); - if (aValue <= 0) { - return; - } else if (isNaN(aValue)) { - this._scrollDelay = 85; - } else if (aValue < 60) { - if (this.trueSpeed == true) { - this._scrollDelay = aValue; - } else { - this._scrollDelay = 60; - } - } else { - this._scrollDelay = aValue; - } - ]]> - </body> - </method> - - <method name="_set_scrollAmount"> - <parameter name="aValue"/> - <body> - <![CDATA[ - aValue = parseInt(aValue); - if (isNaN(aValue)) { - this._scrollAmount = 6; - } else if (aValue < 0) { - return; - } else { - this._scrollAmount = aValue; - } - ]]> - </body> - </method> - - <method name="_set_behavior"> - <parameter name="aValue"/> - <body> - <![CDATA[ - if (typeof aValue == 'string') { - aValue = aValue.toLowerCase(); - } - if (aValue != 'alternate' && aValue != 'slide' && aValue != 'scroll') { - this._behavior = 'scroll'; - } else { - this._behavior = aValue; - } - ]]> - </body> - </method> - - <method name="_set_direction"> - <parameter name="aValue"/> - <body> - <![CDATA[ - if (typeof aValue == 'string') { - aValue = aValue.toLowerCase(); - } - if (aValue != 'left' && aValue != 'right' && aValue != 'up' && aValue != 'down') { - aValue = 'left'; - } - - if (aValue != this._direction) { - this.startNewDirection = true; - } - this._direction = aValue; - ]]> - </body> - </method> - - <method name="_set_loop"> - <parameter name="aValue"/> - <body> - <![CDATA[ - var aValue = parseInt(aValue); - if (aValue == 0) { - return; - } - if (isNaN(aValue) || aValue <= -1) { - aValue = -1; - } - this._loop = aValue; - ]]> - </body> - </method> - - <method name="_setEventListener"> - <parameter name="aName"/> - <parameter name="aValue"/> - <parameter name="aIgnoreNextCall"/> - <body> - <![CDATA[ - // _setEventListener is only used for setting the attribute event - // handlers, which we want to ignore if our document is sandboxed - // without the allow-scripts keyword. - if (document.hasScriptsBlockedBySandbox) { - return true; - } - - // attribute event handlers should only be added if the - // document's CSP allows it. - if (!document.inlineScriptAllowedByCSP) { - return true; - } - - if (this._ignoreNextCall) { - return this._ignoreNextCall = false; - } - - if (aIgnoreNextCall) { - this._ignoreNextCall = true; - } - - if (typeof this["_on" + aName] == 'function') { - this.removeEventListener(aName, this["_on" + aName], false); - } - - switch (typeof aValue) - { - case "function": - this["_on" + aName] = aValue; - this.addEventListener(aName, this["_on" + aName], false); - break; - - case "string": - if (!aIgnoreNextCall) { - try { - // Function Xrays make this simple and safe. \o/ - this["_on" + aName] = new window.Function("event", aValue); - } - catch(e) { - return false; - } - this.addEventListener(aName, this["_on" + aName], false); - } - else { - this["_on" + aName] = aValue; - } - break; - - case "object": - this["_on" + aName] = aValue; - break; - - default: - this._ignoreNextCall = false; - throw new Error("Invalid argument for Marquee::on" + aName); - } - return true; - ]]> - </body> - </method> - - <method name="_fireEvent"> - <parameter name="aName"/> - <parameter name="aBubbles"/> - <parameter name="aCancelable"/> - <body> - <![CDATA[ - var e = document.createEvent("Events"); - e.initEvent(aName, aBubbles, aCancelable); - this.dispatchEvent(e); - ]]> - </body> - </method> - - <method name="start" exposeToUntrustedContent="true"> - <body> - <![CDATA[ - if (this.runId == 0) { - var myThis = this; - var lambda = function myTimeOutFunction(){myThis._doMove(false);} - this.runId = window.setTimeout(lambda, this._scrollDelay - this._deltaStartStop); - this._deltaStartStop = 0; - } - ]]> - </body> - </method> - - <method name="stop" exposeToUntrustedContent="true"> - <body> - <![CDATA[ - if (this.runId != 0) { - this._deltaStartStop = Date.now()- this._lastMoveDate; - clearTimeout(this.runId); - } - - this.runId = 0; - ]]> - </body> - </method> - - <method name="_doMove"> - <parameter name="aResetPosition"/> - <body> - <![CDATA[ - this._lastMoveDate = Date.now(); - - //startNewDirection is true at first load and whenever the direction is changed - if (this.startNewDirection) { - this.startNewDirection = false; //we only want this to run once every scroll direction change - - var corrvalue = 0; - - switch (this._direction) - { - case "up": - var height = document.defaultView.getComputedStyle(this, "").height; - this.outerDiv.style.height = height; - if (this.originalHeight > this.outerDiv.offsetHeight) { - corrvalue = this.originalHeight - this.outerDiv.offsetHeight; - } - this.innerDiv.style.padding = height + " 0"; - this.dirsign = 1; - this.startAt = (this._behavior == 'alternate') ? (this.originalHeight - corrvalue) : 0; - this.stopAt = (this._behavior == 'alternate' || this._behavior == 'slide') ? - (parseInt(height) + corrvalue) : (this.originalHeight + parseInt(height)); - break; - - case "down": - var height = document.defaultView.getComputedStyle(this, "").height; - this.outerDiv.style.height = height; - if (this.originalHeight > this.outerDiv.offsetHeight) { - corrvalue = this.originalHeight - this.outerDiv.offsetHeight; - } - this.innerDiv.style.padding = height + " 0"; - this.dirsign = -1; - this.startAt = (this._behavior == 'alternate') ? - (parseInt(height) + corrvalue) : (this.originalHeight + parseInt(height)); - this.stopAt = (this._behavior == 'alternate' || this._behavior == 'slide') ? - (this.originalHeight - corrvalue) : 0; - break; - - case "right": - if (this.innerDiv.offsetWidth > this.outerDiv.offsetWidth) { - corrvalue = this.innerDiv.offsetWidth - this.outerDiv.offsetWidth; - } - this.dirsign = -1; - this.stopAt = (this._behavior == 'alternate' || this._behavior == 'slide') ? - (this.innerDiv.offsetWidth - corrvalue) : 0; - this.startAt = this.outerDiv.offsetWidth + ((this._behavior == 'alternate') ? - corrvalue : (this.innerDiv.offsetWidth + this.stopAt)); - break; - - case "left": - default: - if (this.innerDiv.offsetWidth > this.outerDiv.offsetWidth) { - corrvalue = this.innerDiv.offsetWidth - this.outerDiv.offsetWidth; - } - this.dirsign = 1; - this.startAt = (this._behavior == 'alternate') ? (this.innerDiv.offsetWidth - corrvalue) : 0; - this.stopAt = this.outerDiv.offsetWidth + - ((this._behavior == 'alternate' || this._behavior == 'slide') ? - corrvalue : (this.innerDiv.offsetWidth + this.startAt)); - } - - if (aResetPosition) { - this.newPosition = this.startAt; - this._fireEvent("start", false, false); - } - } //end if - - this.newPosition = this.newPosition + (this.dirsign * this._scrollAmount); - - if ((this.dirsign == 1 && this.newPosition > this.stopAt) || - (this.dirsign == -1 && this.newPosition < this.stopAt)) - { - switch (this._behavior) - { - case 'alternate': - // lets start afresh - this.startNewDirection = true; - - // swap direction - const swap = {left: "right", down: "up", up: "down", right: "left"}; - this._direction = swap[this._direction]; - this.newPosition = this.stopAt; - - if ((this._direction == "up") || (this._direction == "down")) { - this.outerDiv.scrollTop = this.newPosition; - } else { - this.outerDiv.scrollLeft = this.newPosition; - } - - if (this._loop != 1) { - this._fireEvent("bounce", false, true); - } - break; - - case 'slide': - if (this._loop > 1) { - this.newPosition = this.startAt; - } - break; - - default: - this.newPosition = this.startAt; - - if ((this._direction == "up") || (this._direction == "down")) { - this.outerDiv.scrollTop = this.newPosition; - } else { - this.outerDiv.scrollLeft = this.newPosition; - } - - //dispatch start event, even when this._loop == 1, comp. with IE6 - this._fireEvent("start", false, false); - } - - if (this._loop > 1) { - this._loop--; - } else if (this._loop == 1) { - if ((this._direction == "up") || (this._direction == "down")) { - this.outerDiv.scrollTop = this.stopAt; - } else { - this.outerDiv.scrollLeft = this.stopAt; - } - this.stop(); - this._fireEvent("finish", false, true); - return; - } - } - else { - if ((this._direction == "up") || (this._direction == "down")) { - this.outerDiv.scrollTop = this.newPosition; - } else { - this.outerDiv.scrollLeft = this.newPosition; - } - } - - var myThis = this; - var lambda = function myTimeOutFunction(){myThis._doMove(false);} - this.runId = window.setTimeout(lambda, this._scrollDelay); - ]]> - </body> - </method> - - <method name="init"> - <body> - <![CDATA[ - this.stop(); - - if ((this._direction != "up") && (this._direction != "down")) { - var width = window.getComputedStyle(this, "").width; - this.innerDiv.parentNode.style.margin = '0 ' + width; - - //XXX Adding the margin sometimes causes the marquee to widen, - // see testcase from bug bug 364434: - // https://bugzilla.mozilla.org/attachment.cgi?id=249233 - // Just add a fixed width with current marquee's width for now - if (width != window.getComputedStyle(this, "").width) { - var width = window.getComputedStyle(this, "").width; - this.outerDiv.style.width = width; - this.innerDiv.parentNode.style.margin = '0 ' + width; - } - } - else { - // store the original height before we add padding - this.innerDiv.style.padding = 0; - this.originalHeight = this.innerDiv.offsetHeight; - } - - this._doMove(true); - ]]> - </body> - </method> - - <method name="_mutationActor"> - <parameter name="aMutations"/> - <body> - <![CDATA[ - while (aMutations.length > 0) { - var mutation = aMutations.shift(); - var attrName = mutation.attributeName.toLowerCase(); - var oldValue = mutation.oldValue; - var target = mutation.target; - var newValue = target.getAttribute(attrName); - - if (oldValue != newValue) { - switch (attrName) { - case "loop": - target._set_loop(newValue); - if (target.rundId == 0) { - target.start(); - } - break; - case "scrollamount": - target._set_scrollAmount(newValue); - break; - case "scrolldelay": - target._set_scrollDelay(newValue); - target.stop(); - target.start(); - break; - case "truespeed": - //needed to update target._scrollDelay - var myThis = target; - var lambda = function() {myThis._set_scrollDelay(myThis.getAttribute('scrolldelay'));} - window.setTimeout(lambda, 0); - break; - case "behavior": - target._set_behavior(newValue); - target.startNewDirection = true; - if ((oldValue == "slide" && target.newPosition == target.stopAt) || - newValue == "alternate" || newValue == "slide") { - target.stop(); - target._doMove(true); - } - break; - case "direction": - if (!newValue) { - newValue = "left"; - } - target._set_direction(newValue); - break; - case "width": - case "height": - target.startNewDirection = true; - break; - case "onstart": - target._setEventListener("start", newValue); - break; - case "onfinish": - target._setEventListener("finish", newValue); - break; - case "onbounce": - target._setEventListener("bounce", newValue); - break; - } - } - } - ]]> - </body> - </method> - - <constructor> - <![CDATA[ - // Set up state. - this._scrollAmount = 6; - this._scrollDelay = 85; - this._direction = "left"; - this._behavior = "scroll"; - this._loop = -1; - this.dirsign = 1; - this.startAt = 0; - this.stopAt = 0; - this.newPosition = 0; - this.runId = 0; - this.originalHeight = 0; - this.startNewDirection = true; - - // hack needed to fix js error, see bug 386470 - var myThis = this; - var lambda = function myScopeFunction() { if (myThis.init) myThis.init(); } - - this._set_direction(this.getAttribute('direction')); - this._set_behavior(this.getAttribute('behavior')); - this._set_scrollDelay(this.getAttribute('scrolldelay')); - this._set_scrollAmount(this.getAttribute('scrollamount')); - this._set_loop(this.getAttribute('loop')); - this._setEventListener("start", this.getAttribute("onstart")); - this._setEventListener("finish", this.getAttribute("onfinish")); - this._setEventListener("bounce", this.getAttribute("onbounce")); - this.startNewDirection = true; - - this._mutationObserver = new MutationObserver(this._mutationActor); - this._mutationObserver.observe(this, { attributes: true, - attributeOldValue: true, - attributeFilter: ['loop', 'scrollamount', 'scrolldelay', '', 'truespeed', 'behavior', - 'direction', 'width', 'height', 'onstart', 'onfinish', 'onbounce'] }); - - // init needs to be run after the page has loaded in order to calculate - // the correct height/width - if (document.readyState == "complete") { - lambda(); - } else { - window.addEventListener("load", lambda, false); - } - ]]> - </constructor> - </implementation> - - </binding> - - <binding id="marquee-horizontal" bindToUntrustedContent="true" - extends="chrome://xbl-marquee/content/xbl-marquee.xml#marquee" - inheritstyle="false"> - - <!-- White-space isn't allowed because a marquee could be - inside 'white-space: pre' --> - <content> - <html:div style="display: -moz-box; overflow: hidden; width: -moz-available;" - ><html:div style="display: -moz-box;" - ><html:div class="innerDiv" style="display: table; border-spacing: 0;" - ><html:div - ><children - /></html:div - ></html:div - ></html:div - ></html:div> - </content> - - </binding> - - <binding id="marquee-vertical" bindToUntrustedContent="true" - extends="chrome://xbl-marquee/content/xbl-marquee.xml#marquee" - inheritstyle="false"> - - <!-- White-space isn't allowed because a marquee could be - inside 'white-space: pre' --> - <content> - <html:div style="overflow: hidden; width: -moz-available;" - ><html:div class="innerDiv" - ><children - /></html:div - ></html:div> - </content> - - </binding> - - <binding id="marquee-horizontal-editable" bindToUntrustedContent="true" - inheritstyle="false"> - - <!-- White-space isn't allowed because a marquee could be - inside 'white-space: pre' --> - <content> - <html:div style="display: inline-block; overflow: auto; width: -moz-available;" - ><children - /></html:div> - </content> - - </binding> - - <binding id="marquee-vertical-editable" bindToUntrustedContent="true" - inheritstyle="false"> - - <!-- White-space isn't allowed because a marquee could be - inside 'white-space: pre' --> - <content> - <html:div style="overflow: auto; height: inherit; width: -moz-available;" - ><children/></html:div> - </content> - - </binding> - -</bindings> |