author | Simon Montagu <smontagu@smontagu.org> |
Tue, 20 Nov 2012 06:21:15 -0800 | |
changeset 113773 | a64c112c6858ac5ccf29a71d4de81f9ebdc5ea9e |
parent 113772 | 84b9a773104b213fcba936790fe24a466b0ff7c3 |
child 113774 | b7e492bf7c1386e9847913d91dab00415937a296 |
push id | 23890 |
push user | ryanvm@gmail.com |
push date | Wed, 21 Nov 2012 02:43:32 +0000 |
treeherder | mozilla-central@4f19e7fd8bea [default view] [failures only] |
perfherder | [talos] [build metrics] [platform microbench] (compared to previous push) |
reviewers | ehsan |
bugs | 548206 |
milestone | 20.0a1 |
first release with | nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
|
last release without | nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
|
new file mode 100644 --- /dev/null +++ b/layout/reftests/bidi/dirAuto/dynamicDirAuto-ChangeText-LTR1.html @@ -0,0 +1,18 @@ +<!DOCTYPE HTML> +<html> + <head> + <meta charset="utf-8"> + <title>Set and unset dir="auto"</title> + <script type="text/javascript" src="setDir.js"></script> + <style> + textarea { resize: none; } + </style> + </head> + <body onload="setAllTextValuesTo('ABC אבג')"> + <div><input type="text" value="אבג ABC" id="set0" dir="auto"></div> + <div><span id="set1" dir="auto">אבג ABC</span></div> + <div><textarea id="set2" dir="auto">אבג ABC</textarea></div> + <div><button id="set3" dir="auto">אבג ABC</button></div> + <div><bdi id="set4">אבג ABC</bdi></div> + </body> +</html>
new file mode 100644 --- /dev/null +++ b/layout/reftests/bidi/dirAuto/dynamicDirAuto-ChangeText-LTR10.html @@ -0,0 +1,18 @@ +<!DOCTYPE HTML> +<html> + <head> + <meta charset="utf-8"> + <title>Set and unset dir="auto"</title> + <script type="text/javascript" src="setDir.js"></script> + <style> + textarea { resize: none; } + </style> + </head> + <body onload="setAllTextDefaultValuesTo('ABC אבג')"> + <div><input type="text" value="..." id="set0" dir="auto"></div> + <div><span id="set1" dir="auto">...</span></div> + <div><textarea id="set2" dir="auto">...</textarea></div> + <div><button id="set3" dir="auto">...</button></div> + <div><bdi id="set4">...</bdi></div> + </body> +</html>
new file mode 100644 --- /dev/null +++ b/layout/reftests/bidi/dirAuto/dynamicDirAuto-ChangeText-LTR2.html @@ -0,0 +1,18 @@ +<!DOCTYPE HTML> +<html> + <head> + <meta charset="utf-8"> + <title>Set and unset dir="auto"</title> + <script type="text/javascript" src="setDir.js"></script> + <style> + textarea { resize: none; } + </style> + </head> + <body onload="setAllTextValuesTo('ABC אבג')"> + <div><input type="text" value="..." id="set0" dir="auto"></div> + <div><span id="set1" dir="auto">...</span></div> + <div><textarea id="set2" dir="auto">...</textarea></div> + <div><button id="set3" dir="auto">...</button></div> + <div><bdi id="set4">...</bdi></div> + </body> +</html>
new file mode 100644 --- /dev/null +++ b/layout/reftests/bidi/dirAuto/dynamicDirAuto-ChangeText-LTR3.html @@ -0,0 +1,18 @@ +<!DOCTYPE HTML> +<html> + <head> + <meta charset="utf-8"> + <title>Set and unset dir="auto"</title> + <script type="text/javascript" src="setDir.js"></script> + <style> + textarea { resize: none; } + </style> + </head> + <body onload="appendTextFromArray(new Array('ABC', ' ', 'אבג'))"> + <div><input type="text" value="­" id="set0" dir="auto"></div> + <div><span id="set1" dir="auto">­</span></div> + <div><textarea id="set2" dir="auto">­</textarea></div> + <div><button id="set3" dir="auto">­</button></div> + <div><bdi id="set4">­</bdi></div> + </body> +</html>
new file mode 100644 --- /dev/null +++ b/layout/reftests/bidi/dirAuto/dynamicDirAuto-ChangeText-LTR4.html @@ -0,0 +1,18 @@ +<!DOCTYPE HTML> +<html> + <head> + <meta charset="utf-8"> + <title>Set and unset dir="auto"</title> + <script type="text/javascript" src="setDir.js"></script> + <style> + textarea { resize: none; } + </style> + </head> + <body onload="prependTextFromArray(new Array('אבג', ' ', 'ABC'))"> + <div><input type="text" value="­" id="set0" dir="auto"></div> + <div><span id="set1" dir="auto">­</span></div> + <div><textarea id="set2" dir="auto">­</textarea></div> + <div><button id="set3" dir="auto">­</button></div> + <div><bdi id="set4">­</bdi></div> + </body> +</html>
new file mode 100644 --- /dev/null +++ b/layout/reftests/bidi/dirAuto/dynamicDirAuto-ChangeText-LTR5.html @@ -0,0 +1,18 @@ +<!DOCTYPE HTML> +<html> + <head> + <meta charset="utf-8"> + <title>Set and unset dir="auto"</title> + <script type="text/javascript" src="setDir.js"></script> + <style> + textarea { resize: none; } + </style> + </head> + <body onload="appendSpansFromArray(new Array('ABC', ' ', 'אבג'))"> + <div><input type="text" value="­" id="set0" dir="auto"></div> + <div><span id="set1" dir="auto">­</span></div> + <div><textarea id="set2" dir="auto">­</textarea></div> + <div><button id="set3" dir="auto">­</button></div> + <div><bdi id="set4">­</bdi></div> + </body> +</html>
new file mode 100644 --- /dev/null +++ b/layout/reftests/bidi/dirAuto/dynamicDirAuto-ChangeText-LTR6.html @@ -0,0 +1,18 @@ +<!DOCTYPE HTML> +<html> + <head> + <meta charset="utf-8"> + <title>Set and unset dir="auto"</title> + <script type="text/javascript" src="setDir.js"></script> + <style> + textarea { resize: none; } + </style> + </head> + <body onload="prependSpansFromArray(new Array('אבג', ' ', 'ABC'))"> + <div><input type="text" value="­" id="set0" dir="auto"></div> + <div><span id="set1" dir="auto">­</span></div> + <div><textarea id="set2" dir="auto">­</textarea></div> + <div><button id="set3" dir="auto">­</button></div> + <div><bdi id="set4">­</bdi></div> + </body> +</html>
new file mode 100644 --- /dev/null +++ b/layout/reftests/bidi/dirAuto/dynamicDirAuto-ChangeText-LTR7.html @@ -0,0 +1,18 @@ +<!DOCTYPE HTML> +<html> + <head> + <meta charset="utf-8"> + <title>Set and unset dir="auto"</title> + <script type="text/javascript" src="setDir.js"></script> + <style> + textarea { resize: none; } + </style> + </head> + <body onload="setAllTextChildrenTo('ABC אבג')"> + <div><input type="text" value="אבג ABC" id="set0" dir="auto"></div> + <div><span id="set1" dir="auto">אבג ABC</span></div> + <div><textarea id="set2" dir="auto">אבג ABC</textarea></div> + <div><button id="set3" dir="auto">אבג ABC</button></div> + <div><bdi id="set4">אבג ABC</bdi></div> + </body> +</html>
new file mode 100644 --- /dev/null +++ b/layout/reftests/bidi/dirAuto/dynamicDirAuto-ChangeText-LTR8.html @@ -0,0 +1,18 @@ +<!DOCTYPE HTML> +<html> + <head> + <meta charset="utf-8"> + <title>Set and unset dir="auto"</title> + <script type="text/javascript" src="setDir.js"></script> + <style> + textarea { resize: none; } + </style> + </head> + <body onload="setAllTextChildrenTo('ABC אבג')"> + <div><input type="text" value="..." id="set0" dir="auto"></div> + <div><span id="set1" dir="auto">...</span></div> + <div><textarea id="set2" dir="auto">...</textarea></div> + <div><button id="set3" dir="auto">...</button></div> + <div><bdi id="set4">...</bdi></div> + </body> +</html>
new file mode 100644 --- /dev/null +++ b/layout/reftests/bidi/dirAuto/dynamicDirAuto-ChangeText-LTR9.html @@ -0,0 +1,18 @@ +<!DOCTYPE HTML> +<html> + <head> + <meta charset="utf-8"> + <title>Set and unset dir="auto"</title> + <script type="text/javascript" src="setDir.js"></script> + <style> + textarea { resize: none; } + </style> + </head> + <body onload="setAllTextDefaultValuesTo('ABC אבג')"> + <div><input type="text" value="אבג ABC" id="set0" dir="auto"></div> + <div><span id="set1" dir="auto">אבג ABC</span></div> + <div><textarea id="set2" dir="auto">אבג ABC</textarea></div> + <div><button id="set3" dir="auto">אבג ABC</button></div> + <div><bdi id="set4">אבג ABC</bdi></div> + </body> +</html>
new file mode 100644 --- /dev/null +++ b/layout/reftests/bidi/dirAuto/dynamicDirAuto-ChangeText-RTL1.html @@ -0,0 +1,18 @@ +<!DOCTYPE HTML> +<html> + <head> + <meta charset="utf-8"> + <title>Set and unset dir="auto"</title> + <script type="text/javascript" src="setDir.js"></script> + <style> + textarea { resize: none; } + </style> + </head> + <body onload="setAllTextValuesTo('אבג ABC')"> + <div><input type="text" value="ABC אבג" id="set0" dir="auto"></div> + <div><span id="set1" dir="auto">ABC אבג</span></div> + <div><textarea id="set2" dir="auto">ABC אבג</textarea></div> + <div><button id="set3" dir="auto">ABC אבג</button></div> + <div><bdi id="set4">ABC אבג</bdi></div> + </body> +</html>
new file mode 100644 --- /dev/null +++ b/layout/reftests/bidi/dirAuto/dynamicDirAuto-ChangeText-RTL10.html @@ -0,0 +1,18 @@ +<!DOCTYPE HTML> +<html> + <head> + <meta charset="utf-8"> + <title>Set and unset dir="auto"</title> + <script type="text/javascript" src="setDir.js"></script> + <style> + textarea { resize: none; } + </style> + </head> + <body onload="setAllTextDefaultValuesTo('אבג ABC')"> + <div><input type="text" value="..." id="set0" dir="auto"></div> + <div><span id="set1" dir="auto">...</span></div> + <div><textarea id="set2" dir="auto">...</textarea></div> + <div><button id="set3" dir="auto">...</button></div> + <div><bdi id="set4">...</bdi></div> + </body> +</html>
new file mode 100644 --- /dev/null +++ b/layout/reftests/bidi/dirAuto/dynamicDirAuto-ChangeText-RTL2.html @@ -0,0 +1,18 @@ +<!DOCTYPE HTML> +<html> + <head> + <meta charset="utf-8"> + <title>Set and unset dir="auto"</title> + <script type="text/javascript" src="setDir.js"></script> + <style> + textarea { resize: none; } + </style> + </head> + <body onload="setAllTextValuesTo('אבג ABC')"> + <div><input type="text" value="..." id="set0" dir="auto"></div> + <div><span id="set1" dir="auto">...</span></div> + <div><textarea id="set2" dir="auto">...</textarea></div> + <div><button id="set3" dir="auto">...</button></div> + <div><bdi id="set4">...</bdi></div> + </body> +</html>
new file mode 100644 --- /dev/null +++ b/layout/reftests/bidi/dirAuto/dynamicDirAuto-ChangeText-RTL3.html @@ -0,0 +1,18 @@ +<!DOCTYPE HTML> +<html> + <head> + <meta charset="utf-8"> + <title>Set and unset dir="auto"</title> + <script type="text/javascript" src="setDir.js"></script> + <style> + textarea { resize: none; } + </style> + </head> + <body onload="appendTextFromArray(new Array('אבג', ' ', 'ABC'))"> + <div><input type="text" value="­" id="set0" dir="auto"></div> + <div><span id="set1" dir="auto">­</span></div> + <div><textarea id="set2" dir="auto">­</textarea></div> + <div><button id="set3" dir="auto">­</button></div> + <div><bdi id="set4">­</bdi></div> + </body> +</html>
new file mode 100644 --- /dev/null +++ b/layout/reftests/bidi/dirAuto/dynamicDirAuto-ChangeText-RTL4.html @@ -0,0 +1,18 @@ +<!DOCTYPE HTML> +<html> + <head> + <meta charset="utf-8"> + <title>Set and unset dir="auto"</title> + <script type="text/javascript" src="setDir.js"></script> + <style> + textarea { resize: none; } + </style> + </head> + <body onload="prependTextFromArray(new Array('ABC', ' ', 'אבג'))"> + <div><input type="text" value="­" id="set0" dir="auto"></div> + <div><span id="set1" dir="auto">­</span></div> + <div><textarea id="set2" dir="auto">­</textarea></div> + <div><button id="set3" dir="auto">­</button></div> + <div><bdi id="set4">­</bdi></div> + </body> +</html>
new file mode 100644 --- /dev/null +++ b/layout/reftests/bidi/dirAuto/dynamicDirAuto-ChangeText-RTL5.html @@ -0,0 +1,18 @@ +<!DOCTYPE HTML> +<html> + <head> + <meta charset="utf-8"> + <title>Set and unset dir="auto"</title> + <script type="text/javascript" src="setDir.js"></script> + <style> + textarea { resize: none; } + </style> + </head> + <body onload="appendSpansFromArray(new Array('אבג', ' ', 'ABC'))"> + <div><input type="text" value="­" id="set0" dir="auto"></div> + <div><span id="set1" dir="auto">­</span></div> + <div><textarea id="set2" dir="auto">­</textarea></div> + <div><button id="set3" dir="auto">­</button></div> + <div><bdi id="set4">­</bdi></div> + </body> +</html>
new file mode 100644 --- /dev/null +++ b/layout/reftests/bidi/dirAuto/dynamicDirAuto-ChangeText-RTL6.html @@ -0,0 +1,18 @@ +<!DOCTYPE HTML> +<html> + <head> + <meta charset="utf-8"> + <title>Set and unset dir="auto"</title> + <script type="text/javascript" src="setDir.js"></script> + <style> + textarea { resize: none; } + </style> + </head> + <body onload="prependSpansFromArray(new Array('ABC', ' ', 'אבג'))"> + <div><input type="text" value="­" id="set0" dir="auto"></div> + <div><span id="set1" dir="auto">­</span></div> + <div><textarea id="set2" dir="auto">­</textarea></div> + <div><button id="set3" dir="auto">­</button></div> + <div><bdi id="set4">­</bdi></div> + </body> +</html>
new file mode 100644 --- /dev/null +++ b/layout/reftests/bidi/dirAuto/dynamicDirAuto-ChangeText-RTL7.html @@ -0,0 +1,18 @@ +<!DOCTYPE HTML> +<html> + <head> + <meta charset="utf-8"> + <title>Set and unset dir="auto"</title> + <script type="text/javascript" src="setDir.js"></script> + <style> + textarea { resize: none; } + </style> + </head> + <body onload="setAllTextChildrenTo('אבג ABC')"> + <div><input type="text" value="ABC אבג" id="set0" dir="auto"></div> + <div><span id="set1" dir="auto">ABC אבג</span></div> + <div><textarea id="set2" dir="auto">ABC אבג</textarea></div> + <div><button id="set3" dir="auto">ABC אבג</button></div> + <div><bdi id="set4">ABC אבג</bdi></div> + </body> +</html>
new file mode 100644 --- /dev/null +++ b/layout/reftests/bidi/dirAuto/dynamicDirAuto-ChangeText-RTL8.html @@ -0,0 +1,18 @@ +<!DOCTYPE HTML> +<html> + <head> + <meta charset="utf-8"> + <title>Set and unset dir="auto"</title> + <script type="text/javascript" src="setDir.js"></script> + <style> + textarea { resize: none; } + </style> + </head> + <body onload="setAllTextChildrenTo('אבג ABC')"> + <div><input type="text" value="..." id="set0" dir="auto"></div> + <div><span id="set1" dir="auto">...</span></div> + <div><textarea id="set2" dir="auto">...</textarea></div> + <div><button id="set3" dir="auto">...</button></div> + <div><bdi id="set4">...</bdi></div> + </body> +</html>
new file mode 100644 --- /dev/null +++ b/layout/reftests/bidi/dirAuto/dynamicDirAuto-ChangeText-RTL9.html @@ -0,0 +1,18 @@ +<!DOCTYPE HTML> +<html> + <head> + <meta charset="utf-8"> + <title>Set and unset dir="auto"</title> + <script type="text/javascript" src="setDir.js"></script> + <style> + textarea { resize: none; } + </style> + </head> + <body onload="setAllTextDefaultValuesTo('אבג ABC')"> + <div><input type="text" value="ABC אבג" id="set0" dir="auto"></div> + <div><span id="set1" dir="auto">ABC אבג</span></div> + <div><textarea id="set2" dir="auto">ABC אבג</textarea></div> + <div><button id="set3" dir="auto">ABC אבג</button></div> + <div><bdi id="set4">ABC אבג</bdi></div> + </body> +</html>
new file mode 100644 --- /dev/null +++ b/layout/reftests/bidi/dirAuto/dynamicDirAuto-DeleteText-LTR1.html @@ -0,0 +1,18 @@ +<!DOCTYPE HTML> +<html> + <head> + <meta charset="utf-8"> + <title>Set and unset dir="auto"</title> + <script type="text/javascript" src="setDir.js"></script> + <style> + textarea { resize: none; } + </style> + </head> + <body onload="removeElements()"> + <div><input type="text" value="ABC אבג" dir="auto"></div> + <div><span dir="auto"><span id="set0">DEF </span>ABC אבג</span></div> + <div><textarea dir="auto">ABC אבג</textarea></div> + <div><button dir="auto"><span id="set1">DEF </span>ABC אבג</button></div> + <div><bdi><span id="set2">DEF </span>ABC אבג</bdi></div> + </body> +</html>
new file mode 100644 --- /dev/null +++ b/layout/reftests/bidi/dirAuto/dynamicDirAuto-DeleteText-LTR2.html @@ -0,0 +1,18 @@ +<!DOCTYPE HTML> +<html> + <head> + <meta charset="utf-8"> + <title>Set and unset dir="auto"</title> + <script type="text/javascript" src="setDir.js"></script> + <style> + textarea { resize: none; } + </style> + </head> + <body onload="removeElements()"> + <div><input type="text" value="ABC אבג" dir="auto"></div> + <div><span dir="auto"><span id="set0">גדה </span>ABC אבג</span></div> + <div><textarea dir="auto">ABC אבג</textarea></div> + <div><button dir="auto"><span id="set1">גדה </span>ABC אבג</button></div> + <div><bdi><span id="set2">גדה </span>ABC אבג</bdi></div> + </body> +</html>
new file mode 100644 --- /dev/null +++ b/layout/reftests/bidi/dirAuto/dynamicDirAuto-DeleteText-LTR3.html @@ -0,0 +1,18 @@ +<!DOCTYPE HTML> +<html> + <head> + <meta charset="utf-8"> + <title>Set and unset dir="auto"</title> + <script type="text/javascript" src="setDir.js"></script> + <style> + textarea { resize: none; } + </style> + </head> + <body onload="removeElements()"> + <div><input type="text" value="ABC אבג" dir="auto"></div> + <div><span dir="auto"><span id="set0">... </span>ABC אבג</span></div> + <div><textarea dir="auto">ABC אבג</textarea></div> + <div><button dir="auto"><span id="set1">... </span>ABC אבג</button></div> + <div><bdi><span id="set2">... </span>ABC אבג</bdi></div> + </body> +</html>
new file mode 100644 --- /dev/null +++ b/layout/reftests/bidi/dirAuto/dynamicDirAuto-DeleteText-RTL1.html @@ -0,0 +1,18 @@ +<!DOCTYPE HTML> +<html> + <head> + <meta charset="utf-8"> + <title>Set and unset dir="auto"</title> + <script type="text/javascript" src="setDir.js"></script> + <style> + textarea { resize: none; } + </style> + </head> + <body onload="removeElements()"> + <div><input type="text" value="אבג ABC" dir="auto"></div> + <div><span dir="auto"><span id="set0">DEF </span>אבג ABC</span></div> + <div><textarea dir="auto">אבג ABC</textarea></div> + <div><button dir="auto"><span id="set1">DEF </span>אבג ABC</button></div> + <div><bdi><span id="set2">DEF </span>אבג ABC</bdi></div> + </body> +</html>
new file mode 100644 --- /dev/null +++ b/layout/reftests/bidi/dirAuto/dynamicDirAuto-DeleteText-RTL2.html @@ -0,0 +1,18 @@ +<!DOCTYPE HTML> +<html> + <head> + <meta charset="utf-8"> + <title>Set and unset dir="auto"</title> + <script type="text/javascript" src="setDir.js"></script> + <style> + textarea { resize: none; } + </style> + </head> + <body onload="removeElements()"> + <div><input type="text" value="אבג ABC" dir="auto"></div> + <div><span dir="auto"><span id="set0">גדה </span>אבג ABC</span></div> + <div><textarea dir="auto">אבג ABC</textarea></div> + <div><button dir="auto"><span id="set1">גדה </span>אבג ABC</button></div> + <div><bdi><span id="set2">גדה </span>אבג ABC</bdi></div> + </body> +</html>
new file mode 100644 --- /dev/null +++ b/layout/reftests/bidi/dirAuto/dynamicDirAuto-DeleteText-RTL3.html @@ -0,0 +1,18 @@ +<!DOCTYPE HTML> +<html> + <head> + <meta charset="utf-8"> + <title>Set and unset dir="auto"</title> + <script type="text/javascript" src="setDir.js"></script> + <style> + textarea { resize: none; } + </style> + </head> + <body onload="removeElements()"> + <div><input type="text" value="אבג ABC" dir="auto"></div> + <div><span dir="auto"><span id="set0">... </span>אבג ABC</span></div> + <div><textarea dir="auto">אבג ABC</textarea></div> + <div><button dir="auto"><span id="set1">... </span>אבג ABC</button></div> + <div><bdi><span id="set2">... </span>אבג ABC</bdi></div> + </body> +</html>
--- a/layout/reftests/bidi/dirAuto/reftest.list +++ b/layout/reftests/bidi/dirAuto/reftest.list @@ -128,8 +128,34 @@ == dynamicDirAuto-setRTL-InvalidDir3.html dynamicDirAuto-refRTL-NoDir.html == dynamicDirAuto-setRTL-InvalidDir4.html dynamicDirAuto-refRTL-NoDir.html == dynamicDirAuto-setRTL-InvalidDir5.html dynamicDirAuto-refRTL-NoDir.html == dynamicDirAuto-setRTL-InvalidDir6.html dynamicDirAuto-refRTL-NoDir.html == dynamicDirAuto-setRTL-InvalidDir7.html dynamicDirAuto-refRTL-NoDir.html == dynamicDirAuto-setRTL-InvalidDir8.html dynamicDirAuto-refRTL-NoDir.html == dynamicDirAuto-addLTR-Auto.html dynamicDirAuto-refLTR-LTR.html == dynamicDirAuto-addRTL-Auto.html dynamicDirAuto-refRTL-RTL.html +== dynamicDirAuto-ChangeText-LTR1.html dynamicDirAuto-refLTR-LTR.html +== dynamicDirAuto-ChangeText-LTR2.html dynamicDirAuto-refLTR-LTR.html +== dynamicDirAuto-ChangeText-LTR3.html dynamicDirAuto-refLTR-LTR.html +== dynamicDirAuto-ChangeText-LTR4.html dynamicDirAuto-refLTR-LTR.html +== dynamicDirAuto-ChangeText-LTR5.html dynamicDirAuto-refLTR-LTR.html +== dynamicDirAuto-ChangeText-LTR6.html dynamicDirAuto-refLTR-LTR.html +== dynamicDirAuto-ChangeText-LTR7.html dynamicDirAuto-refLTR-LTR.html +== dynamicDirAuto-ChangeText-LTR8.html dynamicDirAuto-refLTR-LTR.html +== dynamicDirAuto-ChangeText-LTR9.html dynamicDirAuto-refLTR-LTR.html +== dynamicDirAuto-ChangeText-LTR10.html dynamicDirAuto-refLTR-LTR.html +== dynamicDirAuto-ChangeText-RTL1.html dynamicDirAuto-refRTL-RTL.html +== dynamicDirAuto-ChangeText-RTL2.html dynamicDirAuto-refRTL-RTL.html +== dynamicDirAuto-ChangeText-RTL3.html dynamicDirAuto-refRTL-RTL.html +== dynamicDirAuto-ChangeText-RTL4.html dynamicDirAuto-refRTL-RTL.html +== dynamicDirAuto-ChangeText-RTL5.html dynamicDirAuto-refRTL-RTL.html +== dynamicDirAuto-ChangeText-RTL6.html dynamicDirAuto-refRTL-RTL.html +== dynamicDirAuto-ChangeText-RTL7.html dynamicDirAuto-refRTL-RTL.html +== dynamicDirAuto-ChangeText-RTL8.html dynamicDirAuto-refRTL-RTL.html +== dynamicDirAuto-ChangeText-RTL9.html dynamicDirAuto-refRTL-RTL.html +== dynamicDirAuto-ChangeText-RTL10.html dynamicDirAuto-refRTL-RTL.html +== dynamicDirAuto-DeleteText-LTR1.html dynamicDirAuto-refLTR-LTR.html +== dynamicDirAuto-DeleteText-LTR2.html dynamicDirAuto-refLTR-LTR.html +== dynamicDirAuto-DeleteText-LTR3.html dynamicDirAuto-refLTR-LTR.html +== dynamicDirAuto-DeleteText-RTL1.html dynamicDirAuto-refRTL-RTL.html +== dynamicDirAuto-DeleteText-RTL2.html dynamicDirAuto-refRTL-RTL.html +== dynamicDirAuto-DeleteText-RTL3.html dynamicDirAuto-refRTL-RTL.html
--- a/layout/reftests/bidi/dirAuto/setDir.js +++ b/layout/reftests/bidi/dirAuto/setDir.js @@ -54,8 +54,146 @@ function addLTRAutoElements() function addRTLAutoElements() { addOneElement('<input type="text" value="אבג ABC" id="set0" dir="auto">'); addOneElement('<span id="set1" dir="auto">אבג ABC</span>'); addOneElement('<textarea id="set2" dir="auto">אבג ABC</textarea>'); addOneElement('<button id="set3" dir="auto">אבג ABC</button>'); addOneElement('<bdi id="set4">אבג ABC</bdi>'); } + +function setAllTextValuesTo(newText) +{ + for (var i = 0; ; ++i) { + theElement = document.getElementById("set" + i); + if (!theElement) { + break; + } + if (theElement.tagName == "INPUT" || + theElement.tagName == "TEXTAREA") { + theElement.value = newText; + } else { + theElement.firstChild.textContent = newText; + } + } +} + +function setAllTextDefaultValuesTo(newText) +{ + for (var i = 0; ; ++i) { + theElement = document.getElementById("set" + i); + if (!theElement) { + break; + } + if (theElement.tagName == "INPUT" || + theElement.tagName == "TEXTAREA") { + theElement.defaultValue = newText; + } else { + theElement.firstChild.textContent = newText; + } + } +} + +function setAllTextChildrenTo(newText) +{ + for (var i = 0; ; ++i) { + theElement = document.getElementById("set" + i); + if (!theElement) { + break; + } + if (theElement.tagName == "INPUT") { + theElement.value = newText; + } else { + theElement.firstChild.textContent = newText; + } + } +} + +function appendTextFromArray(textArray) +{ + for (var i = 0; ; ++i) { + theElement = document.getElementById("set" + i); + if (!theElement) { + break; + } + for (var j = 0; j < textArray.length; ++j) { + if (theElement.tagName == "INPUT") { + theElement.value += textArray[j]; + } else { + var textNode = document.createTextNode(textArray[j]); + theElement.appendChild(textNode); + } + } + } +} + +function appendSpansFromArray(textArray) +{ + for (var i = 0; ; ++i) { + theElement = document.getElementById("set" + i); + if (!theElement) { + break; + } + for (var j = 0; j < textArray.length; ++j) { + // fake the result for elements that can't have markup content + if (theElement.tagName == "INPUT") { + theElement.value += textArray[j]; + } else if (theElement.tagName == "TEXTAREA") { + theElement.innerHTML += textArray[j]; + } else { + var span = document.createElement("span"); + span.innerHTML = textArray[j]; + theElement.appendChild(span); + } + } + } +} + +function prependTextFromArray(textArray) +{ + for (var i = 0; ; ++i) { + theElement = document.getElementById("set" + i); + if (!theElement) { + break; + } + for (var j = 0; j < textArray.length; ++j) { + if (theElement.tagName == "INPUT") { + theElement.value = textArray[j] + theElement.value; + } else { + var textNode = document.createTextNode(textArray[j]); + theElement.insertBefore(textNode, theElement.firstChild); + } + } + } +} + +function prependSpansFromArray(textArray) +{ + for (var i = 0; ; ++i) { + theElement = document.getElementById("set" + i); + if (!theElement) { + break; + } + for (var j = 0; j < textArray.length; ++j) { + // fake the result for elements that can't have markup content + if (theElement.tagName == "INPUT") { + theElement.value = textArray[j] + theElement.value; + } else if (theElement.tagName == "TEXTAREA") { + theElement.innerHTML = textArray[j] + theElement.innerHTML; + } else { + var span = document.createElement("span"); + span.innerHTML = textArray[j]; + theElement.insertBefore(span, theElement.firstChild); + } + } + } +} + +function removeElements() +{ + for (var i = 0; ; ++i) { + theElement = document.getElementById("set" + i); + if (!theElement) { + break; + } + theElement.parentNode.removeChild(theElement); + } +}