summaryrefslogtreecommitdiffstats
path: root/editor/reftests
diff options
context:
space:
mode:
Diffstat (limited to 'editor/reftests')
-rw-r--r--editor/reftests/1088158-ref.html2
-rw-r--r--editor/reftests/1088158.html8
-rw-r--r--editor/reftests/338427-1-ref.html7
-rw-r--r--editor/reftests/338427-1.html7
-rw-r--r--editor/reftests/338427-2-ref.html19
-rw-r--r--editor/reftests/338427-2.html18
-rw-r--r--editor/reftests/338427-3-ref.html19
-rw-r--r--editor/reftests/338427-3.html19
-rw-r--r--editor/reftests/388980-1-ref.html25
-rw-r--r--editor/reftests/388980-1.html43
-rw-r--r--editor/reftests/462758-grabbers-resizers-ref.html34
-rw-r--r--editor/reftests/462758-grabbers-resizers.html33
-rw-r--r--editor/reftests/642800-iframe.html29
-rw-r--r--editor/reftests/642800-ref.html7
-rw-r--r--editor/reftests/642800.html18
-rw-r--r--editor/reftests/672709-ref.html22
-rw-r--r--editor/reftests/672709.html12
-rw-r--r--editor/reftests/674212-spellcheck-ref.html20
-rw-r--r--editor/reftests/674212-spellcheck.html20
-rw-r--r--editor/reftests/694880-1.html10
-rw-r--r--editor/reftests/694880-2.html11
-rw-r--r--editor/reftests/694880-3.html10
-rw-r--r--editor/reftests/694880-ref.html9
-rw-r--r--editor/reftests/824080-1-ref.html17
-rw-r--r--editor/reftests/824080-1.html19
-rw-r--r--editor/reftests/824080-2-ref.html22
-rw-r--r--editor/reftests/824080-2.html22
-rw-r--r--editor/reftests/824080-3-ref.html21
-rw-r--r--editor/reftests/824080-3.html21
-rw-r--r--editor/reftests/824080-4-ref.html21
-rw-r--r--editor/reftests/824080-4.html26
-rw-r--r--editor/reftests/824080-5-ref.html22
-rw-r--r--editor/reftests/824080-5.html25
-rw-r--r--editor/reftests/824080-6-ref.html18
-rw-r--r--editor/reftests/824080-6.html20
-rw-r--r--editor/reftests/824080-7-ref.html19
-rw-r--r--editor/reftests/824080-7.html22
-rw-r--r--editor/reftests/911201-ref.html2
-rw-r--r--editor/reftests/911201.html2
-rw-r--r--editor/reftests/969773-ref.html24
-rw-r--r--editor/reftests/969773.html29
-rw-r--r--editor/reftests/997805-ref.html2
-rw-r--r--editor/reftests/997805.html16
-rw-r--r--editor/reftests/caret_after_reframe-ref.html6
-rw-r--r--editor/reftests/caret_after_reframe.html14
-rw-r--r--editor/reftests/caret_on_focus-ref.html11
-rw-r--r--editor/reftests/caret_on_focus.html11
-rw-r--r--editor/reftests/caret_on_positioned-ref.html8
-rw-r--r--editor/reftests/caret_on_positioned.html8
-rw-r--r--editor/reftests/caret_on_presshell_reinit-2.html27
-rw-r--r--editor/reftests/caret_on_presshell_reinit-ref.html19
-rw-r--r--editor/reftests/caret_on_presshell_reinit.html22
-rw-r--r--editor/reftests/caret_on_textarea_lastline-ref.html13
-rw-r--r--editor/reftests/caret_on_textarea_lastline.html14
-rw-r--r--editor/reftests/dynamic-1.html9
-rw-r--r--editor/reftests/dynamic-overflow-change-ref.html13
-rw-r--r--editor/reftests/dynamic-overflow-change.html13
-rw-r--r--editor/reftests/dynamic-ref.html6
-rw-r--r--editor/reftests/dynamic-type-1.html11
-rw-r--r--editor/reftests/dynamic-type-2.html11
-rw-r--r--editor/reftests/dynamic-type-3.html11
-rw-r--r--editor/reftests/dynamic-type-4.html11
-rw-r--r--editor/reftests/emptypasswd-1.html6
-rw-r--r--editor/reftests/emptypasswd-2.html9
-rw-r--r--editor/reftests/emptypasswd-ref.html6
-rw-r--r--editor/reftests/input-text-notheme-onfocus-reframe-ref.html28
-rw-r--r--editor/reftests/input-text-notheme-onfocus-reframe.html32
-rw-r--r--editor/reftests/input-text-onfocus-reframe-ref.html25
-rw-r--r--editor/reftests/input-text-onfocus-reframe.html29
-rw-r--r--editor/reftests/newline-1.html6
-rw-r--r--editor/reftests/newline-2.html6
-rw-r--r--editor/reftests/newline-3.html6
-rw-r--r--editor/reftests/newline-4.html6
-rw-r--r--editor/reftests/newline-ref.html6
-rw-r--r--editor/reftests/nobogusnode-1.html6
-rw-r--r--editor/reftests/nobogusnode-2.html5
-rw-r--r--editor/reftests/nobogusnode-ref.html6
-rw-r--r--editor/reftests/passwd-1.html6
-rw-r--r--editor/reftests/passwd-2.html6
-rw-r--r--editor/reftests/passwd-3.html9
-rw-r--r--editor/reftests/passwd-4.html19
-rw-r--r--editor/reftests/passwd-ref.html6
-rw-r--r--editor/reftests/readonly-editable-ref.html13
-rw-r--r--editor/reftests/readonly-editable.html24
-rw-r--r--editor/reftests/readonly-non-editable-ref.html21
-rw-r--r--editor/reftests/readonly-non-editable.html24
-rw-r--r--editor/reftests/readwrite-editable-ref.html13
-rw-r--r--editor/reftests/readwrite-editable.html24
-rw-r--r--editor/reftests/readwrite-non-editable-ref.html21
-rw-r--r--editor/reftests/readwrite-non-editable.html24
-rw-r--r--editor/reftests/reftest-stylo.list177
-rw-r--r--editor/reftests/reftest.list137
-rw-r--r--editor/reftests/selection_visibility_after_reframe-2.html11
-rw-r--r--editor/reftests/selection_visibility_after_reframe-3.html14
-rw-r--r--editor/reftests/selection_visibility_after_reframe-ref.html6
-rw-r--r--editor/reftests/selection_visibility_after_reframe.html15
-rw-r--r--editor/reftests/spellcheck-comma-valid-ref.html6
-rw-r--r--editor/reftests/spellcheck-comma-valid.html6
-rw-r--r--editor/reftests/spellcheck-contenteditable-attr-dynamic-inherit.html11
-rw-r--r--editor/reftests/spellcheck-contenteditable-attr-dynamic-override-inherit.html11
-rw-r--r--editor/reftests/spellcheck-contenteditable-attr-dynamic-override.html11
-rw-r--r--editor/reftests/spellcheck-contenteditable-attr-dynamic.html11
-rw-r--r--editor/reftests/spellcheck-contenteditable-attr-inherit.html6
-rw-r--r--editor/reftests/spellcheck-contenteditable-attr.html6
-rw-r--r--editor/reftests/spellcheck-contenteditable-disabled-partial-ref.html12
-rw-r--r--editor/reftests/spellcheck-contenteditable-disabled-partial.html11
-rw-r--r--editor/reftests/spellcheck-contenteditable-disabled-ref.html6
-rw-r--r--editor/reftests/spellcheck-contenteditable-disabled.html11
-rw-r--r--editor/reftests/spellcheck-contenteditable-focused-reframe.html18
-rw-r--r--editor/reftests/spellcheck-contenteditable-focused.html13
-rw-r--r--editor/reftests/spellcheck-contenteditable-nofocus-ref.html6
-rw-r--r--editor/reftests/spellcheck-contenteditable-nofocus.html6
-rw-r--r--editor/reftests/spellcheck-contenteditable-property-dynamic-inherit.html11
-rw-r--r--editor/reftests/spellcheck-contenteditable-property-dynamic-override-inherit.html11
-rw-r--r--editor/reftests/spellcheck-contenteditable-property-dynamic-override.html11
-rw-r--r--editor/reftests/spellcheck-contenteditable-property-dynamic.html11
-rw-r--r--editor/reftests/spellcheck-contenteditable-ref.html11
-rw-r--r--editor/reftests/spellcheck-dotafterquote-valid-ref.html6
-rw-r--r--editor/reftests/spellcheck-dotafterquote-valid.html6
-rw-r--r--editor/reftests/spellcheck-hyphen-invalid-ref.html6
-rw-r--r--editor/reftests/spellcheck-hyphen-invalid.html6
-rw-r--r--editor/reftests/spellcheck-hyphen-multiple-invalid-ref.html6
-rw-r--r--editor/reftests/spellcheck-hyphen-multiple-invalid.html6
-rw-r--r--editor/reftests/spellcheck-hyphen-multiple-valid-ref.html6
-rw-r--r--editor/reftests/spellcheck-hyphen-multiple-valid.html6
-rw-r--r--editor/reftests/spellcheck-hyphen-valid-ref.html6
-rw-r--r--editor/reftests/spellcheck-hyphen-valid.html6
-rw-r--r--editor/reftests/spellcheck-input-attr-after.html6
-rw-r--r--editor/reftests/spellcheck-input-attr-before.html6
-rw-r--r--editor/reftests/spellcheck-input-attr-dynamic-inherit.html11
-rw-r--r--editor/reftests/spellcheck-input-attr-dynamic-override-inherit.html11
-rw-r--r--editor/reftests/spellcheck-input-attr-dynamic-override.html11
-rw-r--r--editor/reftests/spellcheck-input-attr-dynamic.html11
-rw-r--r--editor/reftests/spellcheck-input-attr-inherit.html6
-rw-r--r--editor/reftests/spellcheck-input-disabled.html6
-rw-r--r--editor/reftests/spellcheck-input-nofocus-ref.html6
-rw-r--r--editor/reftests/spellcheck-input-property-dynamic-inherit.html11
-rw-r--r--editor/reftests/spellcheck-input-property-dynamic-override-inherit.html11
-rw-r--r--editor/reftests/spellcheck-input-property-dynamic-override.html11
-rw-r--r--editor/reftests/spellcheck-input-property-dynamic.html11
-rw-r--r--editor/reftests/spellcheck-input-ref.html11
-rw-r--r--editor/reftests/spellcheck-non-latin-arabic-ref.html9
-rw-r--r--editor/reftests/spellcheck-non-latin-arabic.html9
-rw-r--r--editor/reftests/spellcheck-non-latin-chinese-simplified-ref.html9
-rw-r--r--editor/reftests/spellcheck-non-latin-chinese-simplified.html9
-rw-r--r--editor/reftests/spellcheck-non-latin-chinese-traditional-ref.html9
-rw-r--r--editor/reftests/spellcheck-non-latin-chinese-traditional.html9
-rw-r--r--editor/reftests/spellcheck-non-latin-hebrew-ref.html9
-rw-r--r--editor/reftests/spellcheck-non-latin-hebrew.html9
-rw-r--r--editor/reftests/spellcheck-non-latin-japanese-ref.html9
-rw-r--r--editor/reftests/spellcheck-non-latin-japanese.html9
-rw-r--r--editor/reftests/spellcheck-non-latin-korean-ref.html9
-rw-r--r--editor/reftests/spellcheck-non-latin-korean.html9
-rw-r--r--editor/reftests/spellcheck-period-valid-ref.html6
-rw-r--r--editor/reftests/spellcheck-period-valid.html6
-rw-r--r--editor/reftests/spellcheck-slash-valid-ref.html6
-rw-r--r--editor/reftests/spellcheck-slash-valid.html6
-rw-r--r--editor/reftests/spellcheck-space-valid-ref.html6
-rw-r--r--editor/reftests/spellcheck-space-valid.html6
-rw-r--r--editor/reftests/spellcheck-superscript-1-ref.html3
-rw-r--r--editor/reftests/spellcheck-superscript-1.html3
-rw-r--r--editor/reftests/spellcheck-superscript-2-ref.html3
-rw-r--r--editor/reftests/spellcheck-superscript-2.html3
-rw-r--r--editor/reftests/spellcheck-textarea-attr-dynamic-inherit.html11
-rw-r--r--editor/reftests/spellcheck-textarea-attr-dynamic-override-inherit.html11
-rw-r--r--editor/reftests/spellcheck-textarea-attr-dynamic-override.html11
-rw-r--r--editor/reftests/spellcheck-textarea-attr-dynamic.html11
-rw-r--r--editor/reftests/spellcheck-textarea-attr-inherit.html6
-rw-r--r--editor/reftests/spellcheck-textarea-attr.html6
-rw-r--r--editor/reftests/spellcheck-textarea-disabled.html6
-rw-r--r--editor/reftests/spellcheck-textarea-focused-notreadonly.html19
-rw-r--r--editor/reftests/spellcheck-textarea-focused-reframe.html18
-rw-r--r--editor/reftests/spellcheck-textarea-focused.html13
-rw-r--r--editor/reftests/spellcheck-textarea-nofocus-ref.html6
-rw-r--r--editor/reftests/spellcheck-textarea-nofocus.html6
-rw-r--r--editor/reftests/spellcheck-textarea-property-dynamic-inherit.html11
-rw-r--r--editor/reftests/spellcheck-textarea-property-dynamic-override-inherit.html11
-rw-r--r--editor/reftests/spellcheck-textarea-property-dynamic-override.html11
-rw-r--r--editor/reftests/spellcheck-textarea-property-dynamic.html11
-rw-r--r--editor/reftests/spellcheck-textarea-ref.html11
-rw-r--r--editor/reftests/spellcheck-textarea-ref2.html11
-rw-r--r--editor/reftests/spellcheck-url-valid-ref.html14
-rw-r--r--editor/reftests/spellcheck-url-valid.html14
-rw-r--r--editor/reftests/unneeded_scroll-ref.html16
-rw-r--r--editor/reftests/unneeded_scroll.html24
-rw-r--r--editor/reftests/xul/autocomplete-1.xul14
-rw-r--r--editor/reftests/xul/autocomplete-ref.xul13
-rw-r--r--editor/reftests/xul/empty-1.xul13
-rw-r--r--editor/reftests/xul/empty-2.xul12
-rw-r--r--editor/reftests/xul/empty-ref.xul13
-rw-r--r--editor/reftests/xul/emptyautocomplete-1.xul12
-rw-r--r--editor/reftests/xul/emptyautocomplete-ref.xul13
-rw-r--r--editor/reftests/xul/emptymultiline-1.xul13
-rw-r--r--editor/reftests/xul/emptymultiline-2.xul13
-rw-r--r--editor/reftests/xul/emptymultiline-ref.xul13
-rw-r--r--editor/reftests/xul/emptytextbox-1.xul12
-rw-r--r--editor/reftests/xul/emptytextbox-2.xul12
-rw-r--r--editor/reftests/xul/emptytextbox-3.xul12
-rw-r--r--editor/reftests/xul/emptytextbox-4.xul12
-rw-r--r--editor/reftests/xul/emptytextbox-5.xul12
-rw-r--r--editor/reftests/xul/emptytextbox-ref.xul13
-rw-r--r--editor/reftests/xul/input.css70
-rw-r--r--editor/reftests/xul/number-1.xul12
-rw-r--r--editor/reftests/xul/number-2.xul12
-rw-r--r--editor/reftests/xul/number-3.xul12
-rw-r--r--editor/reftests/xul/number-4.xul12
-rw-r--r--editor/reftests/xul/number-5.xul12
-rw-r--r--editor/reftests/xul/number-ref.xul13
-rw-r--r--editor/reftests/xul/numberwithvalue-1.xul12
-rw-r--r--editor/reftests/xul/numberwithvalue-ref.xul13
-rw-r--r--editor/reftests/xul/passwd-1.xul12
-rw-r--r--editor/reftests/xul/passwd-2.xul12
-rw-r--r--editor/reftests/xul/passwd-3.xul12
-rw-r--r--editor/reftests/xul/passwd-ref.xul13
-rw-r--r--editor/reftests/xul/placeholder-reset.css8
-rw-r--r--editor/reftests/xul/plain-1.xul12
-rw-r--r--editor/reftests/xul/plain-ref.xul13
-rw-r--r--editor/reftests/xul/platform.js28
-rw-r--r--editor/reftests/xul/reftest-stylo.list67
-rw-r--r--editor/reftests/xul/reftest.list29
-rw-r--r--editor/reftests/xul/textbox-1.xul12
-rw-r--r--editor/reftests/xul/textbox-disabled.xul12
-rw-r--r--editor/reftests/xul/textbox-readonly.xul12
-rw-r--r--editor/reftests/xul/textbox-ref.xul13
224 files changed, 3196 insertions, 0 deletions
diff --git a/editor/reftests/1088158-ref.html b/editor/reftests/1088158-ref.html
new file mode 100644
index 000000000..be4592e69
--- /dev/null
+++ b/editor/reftests/1088158-ref.html
@@ -0,0 +1,2 @@
+<!DOCTYPE html>
+<textarea placeholder="placeholder"></textarea>
diff --git a/editor/reftests/1088158.html b/editor/reftests/1088158.html
new file mode 100644
index 000000000..435aa3f63
--- /dev/null
+++ b/editor/reftests/1088158.html
@@ -0,0 +1,8 @@
+<!DOCTYPE html>
+<script>
+ onload = function() {
+ var t = document.createElement('textarea');
+ t.placeholder = "placeholder";
+ document.body.appendChild(t.cloneNode(true));
+ }
+</script>
diff --git a/editor/reftests/338427-1-ref.html b/editor/reftests/338427-1-ref.html
new file mode 100644
index 000000000..d645ad9fb
--- /dev/null
+++ b/editor/reftests/338427-1-ref.html
@@ -0,0 +1,7 @@
+<!DOCTYPE html>
+<html>
+<body>
+ <textarea spellcheck="false" lang="testing-XX">strangeimpossibleword</textarea>
+</body>
+</html>
+
diff --git a/editor/reftests/338427-1.html b/editor/reftests/338427-1.html
new file mode 100644
index 000000000..7a645a224
--- /dev/null
+++ b/editor/reftests/338427-1.html
@@ -0,0 +1,7 @@
+<!DOCTYPE html>
+<html>
+<body>
+ <!-- invalid language will default to en-US, but no spell check since element is not focussed -->
+ <textarea lang="testing-XX">strangeimpossibleword</textarea>
+</body>
+</html>
diff --git a/editor/reftests/338427-2-ref.html b/editor/reftests/338427-2-ref.html
new file mode 100644
index 000000000..30a468c3e
--- /dev/null
+++ b/editor/reftests/338427-2-ref.html
@@ -0,0 +1,19 @@
+<!DOCTYPE html>
+<html class="reftest-wait">
+<script>
+function init() {
+ var editor = document.getElementById('editor');
+ editor.addEventListener("focus", function() {
+ window.setTimeout(function() {
+ document.documentElement.className = '';
+ }, 0);
+ }, false);
+ editor.focus();
+}
+</script>
+<body onload="init()">
+ <!-- invalid language will default to en-US -->
+ <div id="editor" lang="testing-XX" contenteditable="true" spellcheck="false">good possible word</div>
+</body>
+</html>
+
diff --git a/editor/reftests/338427-2.html b/editor/reftests/338427-2.html
new file mode 100644
index 000000000..7f29e91fb
--- /dev/null
+++ b/editor/reftests/338427-2.html
@@ -0,0 +1,18 @@
+<!DOCTYPE html>
+<html class="reftest-wait">
+<script>
+function init() {
+ var editor = document.getElementById('editor');
+ editor.addEventListener("focus", function() {
+ window.setTimeout(function() {
+ document.documentElement.className = '';
+ }, 0);
+ }, false);
+ editor.focus();
+}
+</script>
+<body onload="init()">
+ <!-- invalid language will default to en-US -->
+ <div id="editor" lang="testing-XX" contenteditable="true">good possible word</div>
+</body>
+</html>
diff --git a/editor/reftests/338427-3-ref.html b/editor/reftests/338427-3-ref.html
new file mode 100644
index 000000000..b72ccc997
--- /dev/null
+++ b/editor/reftests/338427-3-ref.html
@@ -0,0 +1,19 @@
+<!DOCTYPE html>
+<html class="reftest-wait">
+<script>
+function init() {
+ var editor = document.getElementById('editor');
+ // invalid language will default to en-US
+ editor.setAttribute('lang', 'testing-XX');
+ editor.addEventListener("focus", function() {
+ window.setTimeout(function() {
+ document.documentElement.className = '';
+ }, 0);
+ }, false);
+ editor.focus();
+}
+</script>
+<body onload="init()">
+ <textarea id="editor" spellcheck="false" lang="en-US">good possible word</textarea>
+</body>
+</html>
diff --git a/editor/reftests/338427-3.html b/editor/reftests/338427-3.html
new file mode 100644
index 000000000..6aead81da
--- /dev/null
+++ b/editor/reftests/338427-3.html
@@ -0,0 +1,19 @@
+<!DOCTYPE html>
+<html class="reftest-wait">
+<script>
+function init() {
+ var editor = document.getElementById('editor');
+ // invalid language will default to en-US
+ editor.setAttribute('lang', 'testing-XX');
+ editor.addEventListener("focus", function() {
+ window.setTimeout(function() {
+ document.documentElement.className = '';
+ }, 0);
+ }, false);
+ editor.focus();
+}
+</script>
+<body onload="init()">
+ <textarea id="editor" lang="en-US">good possible word</textarea>
+</body>
+</html>
diff --git a/editor/reftests/388980-1-ref.html b/editor/reftests/388980-1-ref.html
new file mode 100644
index 000000000..8b14d7e18
--- /dev/null
+++ b/editor/reftests/388980-1-ref.html
@@ -0,0 +1,25 @@
+<html>
+<head>
+<title>Reftest for bug 388980</title></html>
+<script type="text/javascript">
+
+var text = '<html><head></head><body style="font-size:16px;">'
+ + '<p><span style="background-color:red;">This paragraph should be red</span></p>'
+ + '<p><span style="background-color:blue;">This paragraph should be blue</span></p>'
+ + '<p>This paragraph should not be colored</p>'
+ + '</body></html>';
+
+function initIFrame() {
+ var doc = document.getElementById('theIFrame').contentDocument;
+ doc.designMode = 'on';
+ doc.open('text/html');
+ doc.write(text);
+ doc.close();
+}
+</script>
+</head>
+<body onload="initIFrame()" >
+<iframe id="theIFrame">
+</iframe>
+</body>
+</html>
diff --git a/editor/reftests/388980-1.html b/editor/reftests/388980-1.html
new file mode 100644
index 000000000..f2e7d0de0
--- /dev/null
+++ b/editor/reftests/388980-1.html
@@ -0,0 +1,43 @@
+<html>
+<head>
+<title>Reftest for bug 388980</title></html>
+<script type="text/javascript">
+
+var text = '<html><head></head><body style="font-size:16px;">'
+ + '<p id="redpar">This paragraph should be red</p>'
+ + '<p id="bluepar">This paragraph should be blue</p>'
+ + '<p>This paragraph should not be colored</p>'
+ +'</body></html>';
+
+
+function colorPar(par, color) {
+ var doc = document.getElementById('theIFrame').contentDocument;
+ var win = document.getElementById('theIFrame').contentWindow;
+ win.getSelection().selectAllChildren(doc.getElementById(par));
+ doc.execCommand("hilitecolor", false, color);
+ win.getSelection().removeAllRanges();
+}
+
+function initIFrame() {
+ var doc = document.getElementById('theIFrame').contentDocument;
+ doc.designMode = 'on';
+ doc.open('text/html');
+ doc.write(text);
+ doc.close();
+
+ // Test hilighting with styleWithCSS, should hilight the text...
+ doc.execCommand("styleWithCSS", false, true);
+ colorPar("redpar", "red");
+
+ // Test highlighting without styleWithCSS, should also work.
+ doc.execCommand("styleWithCSS", false, false);
+ colorPar("bluepar", "blue");
+
+}
+</script>
+</head>
+<body>
+<iframe id="theIFrame" onload="initIFrame()">
+</iframe>
+</body>
+</html>
diff --git a/editor/reftests/462758-grabbers-resizers-ref.html b/editor/reftests/462758-grabbers-resizers-ref.html
new file mode 100644
index 000000000..5627cde74
--- /dev/null
+++ b/editor/reftests/462758-grabbers-resizers-ref.html
@@ -0,0 +1,34 @@
+<!DOCTYPE html>
+<html class="reftest-wait">
+<head>
+ <script type="text/javascript">
+ function init() {
+ var editor = document.querySelector("div[contenteditable]");
+ editor.addEventListener("focus", function() {
+ setTimeout(function() {
+ document.documentElement.className = "";
+ }, 0);
+ }, false);
+ editor.focus();
+ }
+ </script>
+ <style type="text/css">
+ html, body, div {
+ margin: 0;
+ padding: 0;
+ }
+ div {
+ border: 1px solid black;
+ margin: 50px;
+ height: 200px;
+ width: 200px;
+ }
+ </style>
+</head>
+<body onload="init()">
+ <div contenteditable>
+ this editable container should be neither draggable nor resizable.
+ </div>
+</body>
+</html>
+
diff --git a/editor/reftests/462758-grabbers-resizers.html b/editor/reftests/462758-grabbers-resizers.html
new file mode 100644
index 000000000..66a8d8482
--- /dev/null
+++ b/editor/reftests/462758-grabbers-resizers.html
@@ -0,0 +1,33 @@
+<!DOCTYPE html>
+<html class="reftest-wait">
+<head>
+ <script type="text/javascript">
+ function init() {
+ var editor = document.querySelector("div[contenteditable]");
+ editor.addEventListener("focus", function() {
+ setTimeout(function() {
+ document.documentElement.className = "";
+ }, 0);
+ }, false);
+ editor.focus();
+ }
+ </script>
+ <style type="text/css">
+ html, body, div {
+ margin: 0;
+ padding: 0;
+ }
+ div {
+ border: 1px solid black;
+ margin: 50px;
+ height: 200px;
+ width: 200px;
+ }
+ </style>
+</head>
+<body onload="init()">
+ <div contenteditable style="position: absolute">
+ this editable container should be neither draggable nor resizable.
+ </div>
+</body>
+</html>
diff --git a/editor/reftests/642800-iframe.html b/editor/reftests/642800-iframe.html
new file mode 100644
index 000000000..bb1ab6397
--- /dev/null
+++ b/editor/reftests/642800-iframe.html
@@ -0,0 +1,29 @@
+<!DOCTYPE html>
+<html>
+<head>
+ <style>
+ @media only screen and (max-width: 480px) {
+ .overflow-hidden
+ {
+ overflow: hidden;
+ }
+
+ .float-left
+ {
+ float: left;
+ background: #f0f;
+ }
+ }
+ </style>
+</head>
+<body>
+ <h1>Iframe content</h1>
+ <div class="float-left">
+ <textarea>This text should be visible when window is resized </textarea>
+
+ </div>
+ <div class="overflow-hidden">
+ <textarea>This text should be visible when window is resized </textarea>
+ </div>
+</body>
+</html>
diff --git a/editor/reftests/642800-ref.html b/editor/reftests/642800-ref.html
new file mode 100644
index 000000000..f062b145b
--- /dev/null
+++ b/editor/reftests/642800-ref.html
@@ -0,0 +1,7 @@
+<!DOCTYPE html>
+<html class="reftest-wait">
+<body>
+ <iframe onload="document.documentElement.className=''" src="642800-iframe.html" id="iframe" style="width: 500px; height: 200px"></iframe>
+</body>
+</html>
+
diff --git a/editor/reftests/642800.html b/editor/reftests/642800.html
new file mode 100644
index 000000000..f2af58923
--- /dev/null
+++ b/editor/reftests/642800.html
@@ -0,0 +1,18 @@
+<!DOCTYPE html>
+<html class="reftest-wait">
+<head>
+ <script type="text/javascript">
+ function reframe(node) {
+ node.style.display = "none";
+ document.body.offsetWidth;
+ node.style.display = "block";
+ document.documentElement.className='';
+ }
+ </script>
+</head>
+<body>
+ <iframe onload="reframe(this)" src="642800-iframe.html" id="iframe" style="width: 500px; height: 200px"></iframe>
+
+</body>
+</html>
+
diff --git a/editor/reftests/672709-ref.html b/editor/reftests/672709-ref.html
new file mode 100644
index 000000000..b9fc369b0
--- /dev/null
+++ b/editor/reftests/672709-ref.html
@@ -0,0 +1,22 @@
+<!DOCTYPE html>
+<html class="reftest-wait">
+ <body>
+ <style>
+ :-moz-read-only { color: red; }
+ :-moz-read-write { color: green; }
+ </style>
+ <script>
+ onload = function() {
+ document.designMode = "on";
+ var p = document.createElement("p");
+ p.textContent = "test";
+ document.getElementById("x").appendChild(p);
+ getSelection().removeAllRanges(); // don't need a caret
+ document.documentElement.removeAttribute("class");
+ };
+ </script>
+ <div contenteditable id="x">
+ </div>
+ more test
+ </body>
+</html>
diff --git a/editor/reftests/672709.html b/editor/reftests/672709.html
new file mode 100644
index 000000000..d42c54b0c
--- /dev/null
+++ b/editor/reftests/672709.html
@@ -0,0 +1,12 @@
+<!DOCTYPE html>
+<html>
+ <body>
+ <style>
+ body { color: green; }
+ </style>
+ <div>
+ <p>test</p>
+ </div>
+ more test
+ </body>
+</html>
diff --git a/editor/reftests/674212-spellcheck-ref.html b/editor/reftests/674212-spellcheck-ref.html
new file mode 100644
index 000000000..2b2a6dfc6
--- /dev/null
+++ b/editor/reftests/674212-spellcheck-ref.html
@@ -0,0 +1,20 @@
+<!DOCTYPE html>
+<html lang="en-US" class="reftest-wait">
+<head>
+ <script type="text/javascript">
+ function init() {
+ var editor = document.querySelector("div[contenteditable]");
+ editor.addEventListener("focus", function() {
+ setTimeout(function() {
+ document.documentElement.className = "";
+ }, 0);
+ }, false);
+ editor.focus();
+ }
+ </script>
+</head>
+<body onload="init()">
+ <div contenteditable spellcheck>This is another misspellored word.</div>
+</body>
+</html>
+
diff --git a/editor/reftests/674212-spellcheck.html b/editor/reftests/674212-spellcheck.html
new file mode 100644
index 000000000..f22f5c453
--- /dev/null
+++ b/editor/reftests/674212-spellcheck.html
@@ -0,0 +1,20 @@
+<!DOCTYPE html>
+<html lang="en-US" class="reftest-wait">
+<head>
+ <script type="text/javascript">
+ function init() {
+ var editor = document.querySelector("div[contenteditable]");
+ editor.addEventListener("focus", function() {
+ editor.textContent = "This is another misspellored word.";
+ setTimeout(function() {
+ document.documentElement.className = "";
+ }, 0);
+ }, false);
+ editor.focus();
+ }
+ </script>
+</head>
+<body onload="init()">
+ <div contenteditable spellcheck>This is a misspellored word.</div>
+</body>
+</html>
diff --git a/editor/reftests/694880-1.html b/editor/reftests/694880-1.html
new file mode 100644
index 000000000..373c3070a
--- /dev/null
+++ b/editor/reftests/694880-1.html
@@ -0,0 +1,10 @@
+<!DOCTYPE html>
+<html>
+ <style>
+ :-moz-read-only { color: green; }
+ :-moz-read-write { color: red; }
+ </style>
+ <body onload="document.designMode='on';document.designMode='off'">
+ <div>test</div>
+ </body>
+</html>
diff --git a/editor/reftests/694880-2.html b/editor/reftests/694880-2.html
new file mode 100644
index 000000000..9f2617883
--- /dev/null
+++ b/editor/reftests/694880-2.html
@@ -0,0 +1,11 @@
+<!DOCTYPE html>
+<html>
+ <style>
+ :-moz-read-only { color: green; }
+ :-moz-read-write { color: red; }
+ </style>
+ <body onload="document.designMode='on';document.designMode='off'">
+ <div>test</div>
+ <div contenteditable></div>
+ </body>
+</html>
diff --git a/editor/reftests/694880-3.html b/editor/reftests/694880-3.html
new file mode 100644
index 000000000..c6d7837f7
--- /dev/null
+++ b/editor/reftests/694880-3.html
@@ -0,0 +1,10 @@
+<!DOCTYPE html>
+<html>
+ <style>
+ :-moz-read-only { color: red; }
+ :-moz-read-write { color: green; }
+ </style>
+ <body onload="document.designMode='on';document.designMode='off'">
+ <div contenteditable>test</div>
+ </body>
+</html>
diff --git a/editor/reftests/694880-ref.html b/editor/reftests/694880-ref.html
new file mode 100644
index 000000000..d5c40547e
--- /dev/null
+++ b/editor/reftests/694880-ref.html
@@ -0,0 +1,9 @@
+<!DOCTYPE html>
+<html>
+ <style>
+ div { color: green; }
+ </style>
+ <body>
+ <div>test</div>
+ </body>
+</html>
diff --git a/editor/reftests/824080-1-ref.html b/editor/reftests/824080-1-ref.html
new file mode 100644
index 000000000..8a8786472
--- /dev/null
+++ b/editor/reftests/824080-1-ref.html
@@ -0,0 +1,17 @@
+<!DOCTYPE html>
+<html>
+<head>
+ <script type="text/javascript">
+ function doTest()
+ {
+ var editor = document.getElementById("editor");
+ document.getSelection().selectAllChildren(document.body);
+ }
+ </script>
+</head>
+<body onload="doTest();">
+<p>normal text</p>
+<div id="editor">editable text</div>
+</body>
+</html>
+
diff --git a/editor/reftests/824080-1.html b/editor/reftests/824080-1.html
new file mode 100644
index 000000000..2dfe7e2c6
--- /dev/null
+++ b/editor/reftests/824080-1.html
@@ -0,0 +1,19 @@
+<!DOCTYPE html>
+<html>
+<head>
+ <script type="text/javascript">
+ function doTest()
+ {
+ var editor = document.getElementById("editor");
+ editor.focus();
+ editor.blur();
+ document.getSelection().selectAllChildren(document.body);
+ }
+ </script>
+</head>
+<body onload="doTest();">
+<p>normal text</p>
+<div id="editor" contenteditable>editable text</div>
+</body>
+</html>
+
diff --git a/editor/reftests/824080-2-ref.html b/editor/reftests/824080-2-ref.html
new file mode 100644
index 000000000..597e09fdc
--- /dev/null
+++ b/editor/reftests/824080-2-ref.html
@@ -0,0 +1,22 @@
+<!DOCTYPE html>
+<html>
+<head>
+ <script type="text/javascript">
+ function doTest()
+ {
+ document.getSelection().selectAllChildren(document.getElementById("text"));
+ var editor = document.getElementById("editor");
+ var editorBody = editor.contentDocument.body;
+ editor.contentDocument.getSelection().selectAllChildren(editorBody);
+ editor.focus();
+ editor.blur();
+ }
+ </script>
+</head>
+<body>
+<p id="text">normal text</p>
+<iframe id="editor" onload="doTest();"
+ src="data:text/html,<body>editable text</body>"></iframe>
+</body>
+</html>
+
diff --git a/editor/reftests/824080-2.html b/editor/reftests/824080-2.html
new file mode 100644
index 000000000..c4dc9afc6
--- /dev/null
+++ b/editor/reftests/824080-2.html
@@ -0,0 +1,22 @@
+<!DOCTYPE html>
+<html>
+<head>
+ <script type="text/javascript">
+ function doTest()
+ {
+ document.getSelection().selectAllChildren(document.getElementById("text"));
+ var editor = document.getElementById("editor");
+ var editorBody = editor.contentDocument.body;
+ editor.contentDocument.getSelection().selectAllChildren(editorBody);
+ editor.focus();
+ editor.blur();
+ }
+ </script>
+</head>
+<body>
+<p id="text">normal text</p>
+<iframe id="editor" onload="doTest();"
+ src="data:text/html,<script>document.designMode='on';</script><body>editable text</body>"></iframe>
+</body>
+</html>
+
diff --git a/editor/reftests/824080-3-ref.html b/editor/reftests/824080-3-ref.html
new file mode 100644
index 000000000..8849fc383
--- /dev/null
+++ b/editor/reftests/824080-3-ref.html
@@ -0,0 +1,21 @@
+<!DOCTYPE html>
+<html>
+<head>
+ <script type="text/javascript">
+ function doTest()
+ {
+ document.getSelection().selectAllChildren(document.getElementById("text"));
+ var editor = document.getElementById("editor");
+ var editorBody = editor.contentDocument.body;
+ editor.contentDocument.getSelection().selectAllChildren(editorBody);
+ editor.focus();
+ }
+ </script>
+</head>
+<body>
+<p id="text">normal text</p>
+<iframe id="editor" onload="doTest();"
+ src="data:text/html,<body>editable text</body>"></iframe>
+</body>
+</html>
+
diff --git a/editor/reftests/824080-3.html b/editor/reftests/824080-3.html
new file mode 100644
index 000000000..b9882e5bb
--- /dev/null
+++ b/editor/reftests/824080-3.html
@@ -0,0 +1,21 @@
+<!DOCTYPE html>
+<html>
+<head>
+ <script type="text/javascript">
+ function doTest()
+ {
+ document.getSelection().selectAllChildren(document.getElementById("text"));
+ var editor = document.getElementById("editor");
+ var editorBody = editor.contentDocument.body;
+ editor.contentDocument.getSelection().selectAllChildren(editorBody);
+ editor.focus();
+ }
+ </script>
+</head>
+<body>
+<p id="text">normal text</p>
+<iframe id="editor" onload="doTest();"
+ src="data:text/html,<script>document.designMode='on';</script><body>editable text</body>"></iframe>
+</body>
+</html>
+
diff --git a/editor/reftests/824080-4-ref.html b/editor/reftests/824080-4-ref.html
new file mode 100644
index 000000000..3bee66458
--- /dev/null
+++ b/editor/reftests/824080-4-ref.html
@@ -0,0 +1,21 @@
+<!DOCTYPE html>
+<html>
+<head>
+ <script type="text/javascript">
+ function doTest()
+ {
+ document.getSelection().selectAllChildren(document.body);
+ var editor = document.getElementById("editor");
+ var editorBody = editor.contentDocument.body;
+ editor.contentDocument.getSelection().selectAllChildren(editorBody);
+ }
+ </script>
+</head>
+<body>
+<p id="text">normal text</p>
+<div>content editable</div>
+<iframe id="editor" onload="doTest();"
+ src="data:text/html,<body>editable text</body>"></iframe>
+</body>
+</html>
+
diff --git a/editor/reftests/824080-4.html b/editor/reftests/824080-4.html
new file mode 100644
index 000000000..14cf4eedf
--- /dev/null
+++ b/editor/reftests/824080-4.html
@@ -0,0 +1,26 @@
+<!DOCTYPE html>
+<html>
+<head>
+ <script type="text/javascript">
+ function doTest()
+ {
+ var editor1 = document.getElementById("editor1");
+ editor1.focus();
+ editor1.blur();
+ document.getSelection().selectAllChildren(document.body);
+ var editor2 = document.getElementById("editor2");
+ var editorBody = editor2.contentDocument.body;
+ editor2.contentDocument.getSelection().selectAllChildren(editorBody);
+ editor2.focus();
+ editor2.blur();
+ }
+ </script>
+</head>
+<body>
+<p>normal text</p>
+<div id="editor1" contenteditable>content editable</div>
+<iframe id="editor2" onload="doTest();"
+ src="data:text/html,<script>document.designMode='on';</script><body>editable text</body>"></iframe>
+</body>
+</html>
+
diff --git a/editor/reftests/824080-5-ref.html b/editor/reftests/824080-5-ref.html
new file mode 100644
index 000000000..237fea213
--- /dev/null
+++ b/editor/reftests/824080-5-ref.html
@@ -0,0 +1,22 @@
+<!DOCTYPE html>
+<html>
+<head>
+ <script type="text/javascript">
+ function doTest()
+ {
+ document.getSelection().selectAllChildren(document.body);
+ var editor = document.getElementById("editor");
+ var editorBody = editor.contentDocument.body;
+ editor.contentDocument.getSelection().selectAllChildren(editorBody);
+ editor.focus();
+ }
+ </script>
+</head>
+<body>
+<p id="text">normal text</p>
+<div>content editable</div>
+<iframe id="editor" onload="doTest();"
+ src="data:text/html,<body>editable text</body>"></iframe>
+</body>
+</html>
+
diff --git a/editor/reftests/824080-5.html b/editor/reftests/824080-5.html
new file mode 100644
index 000000000..30771d63f
--- /dev/null
+++ b/editor/reftests/824080-5.html
@@ -0,0 +1,25 @@
+<!DOCTYPE html>
+<html>
+<head>
+ <script type="text/javascript">
+ function doTest()
+ {
+ var editor1 = document.getElementById("editor1");
+ editor1.focus();
+ editor1.blur();
+ document.getSelection().selectAllChildren(document.body);
+ var editor2 = document.getElementById("editor2");
+ var editorBody = editor2.contentDocument.body;
+ editor2.contentDocument.getSelection().selectAllChildren(editorBody);
+ editor2.focus();
+ }
+ </script>
+</head>
+<body>
+<p>normal text</p>
+<div id="editor1" contenteditable>content editable</div>
+<iframe id="editor2" onload="doTest();"
+ src="data:text/html,<script>document.designMode='on';</script><body>editable text</body>"></iframe>
+</body>
+</html>
+
diff --git a/editor/reftests/824080-6-ref.html b/editor/reftests/824080-6-ref.html
new file mode 100644
index 000000000..7813c74f1
--- /dev/null
+++ b/editor/reftests/824080-6-ref.html
@@ -0,0 +1,18 @@
+<!DOCTYPE html>
+<html>
+<head>
+ <script type="text/javascript">
+ function doTest()
+ {
+ var editor = document.getElementById("editor");
+ editor.focus();
+ editor.blur();
+ }
+ </script>
+</head>
+<body onload="doTest()">
+<p>normal text</p>
+<textarea id="editor">textarea</textarea>
+</body>
+</html>
+
diff --git a/editor/reftests/824080-6.html b/editor/reftests/824080-6.html
new file mode 100644
index 000000000..54bafd680
--- /dev/null
+++ b/editor/reftests/824080-6.html
@@ -0,0 +1,20 @@
+<!DOCTYPE html>
+<html>
+<head>
+ <script type="text/javascript">
+ function doTest()
+ {
+ document.getSelection().selectAllChildren(document.body);
+ var editor = document.getElementById("editor");
+ editor.focus();
+ editor.select();
+ editor.blur();
+ }
+ </script>
+</head>
+<body onload="doTest()">
+<p>normal text</p>
+<textarea id="editor">textarea</textarea>
+</body>
+</html>
+
diff --git a/editor/reftests/824080-7-ref.html b/editor/reftests/824080-7-ref.html
new file mode 100644
index 000000000..10162cb1f
--- /dev/null
+++ b/editor/reftests/824080-7-ref.html
@@ -0,0 +1,19 @@
+<!DOCTYPE html>
+<html>
+<head>
+ <script type="text/javascript">
+ function doTest()
+ {
+ var editor = document.getElementById("editor");
+ editor.focus();
+ editor.selectionStart = 2;
+ editor.selectionEnd = 4;
+ }
+ </script>
+</head>
+<body onload="doTest()">
+<p>normal text</p>
+<textarea id="editor">textarea</textarea>
+</body>
+</html>
+
diff --git a/editor/reftests/824080-7.html b/editor/reftests/824080-7.html
new file mode 100644
index 000000000..d09e1b5ba
--- /dev/null
+++ b/editor/reftests/824080-7.html
@@ -0,0 +1,22 @@
+<!DOCTYPE html>
+<html>
+<head>
+ <script type="text/javascript">
+ function doTest()
+ {
+ document.getSelection().selectAllChildren(document.body);
+ var editor = document.getElementById("editor");
+ editor.focus();
+ editor.selectionStart = 2;
+ editor.selectionEnd = 4;
+ editor.blur();
+ editor.focus();
+ }
+ </script>
+</head>
+<body onload="doTest()">
+<p>normal text</p>
+<textarea id="editor">textarea</textarea>
+</body>
+</html>
+
diff --git a/editor/reftests/911201-ref.html b/editor/reftests/911201-ref.html
new file mode 100644
index 000000000..323613ca2
--- /dev/null
+++ b/editor/reftests/911201-ref.html
@@ -0,0 +1,2 @@
+<!DOCTYPE html>
+<body contenteditable><div contenteditable=false>foo</div></body>
diff --git a/editor/reftests/911201.html b/editor/reftests/911201.html
new file mode 100644
index 000000000..6b78e1cd2
--- /dev/null
+++ b/editor/reftests/911201.html
@@ -0,0 +1,2 @@
+<!DOCTYPE html>
+<body contenteditable onload="document.body.innerHTML='<div contenteditable=false>foo</div>';"></body>
diff --git a/editor/reftests/969773-ref.html b/editor/reftests/969773-ref.html
new file mode 100644
index 000000000..888ed5186
--- /dev/null
+++ b/editor/reftests/969773-ref.html
@@ -0,0 +1,24 @@
+<!DOCTYPE html>
+<html class="reftest-wait">
+<head>
+ <meta charset="utf-8">
+ <title>Contenteditable Selection Test Case</title>
+ <script>
+ function runTests() {
+ var text = document.getElementById("text");
+
+ text.focus();
+
+ setTimeout(function () {
+ document.body.offsetHeight;
+ document.documentElement.removeAttribute('class');
+ }, 0);
+ }
+ document.addEventListener('MozReftestInvalidate', runTests, false);
+ </script>
+</head>
+<body>
+ <div>This is a contenteditable.</div>
+ <div id="text" tabindex="0">This is focusable text</div>
+</body>
+</html>
diff --git a/editor/reftests/969773.html b/editor/reftests/969773.html
new file mode 100644
index 000000000..1202c1555
--- /dev/null
+++ b/editor/reftests/969773.html
@@ -0,0 +1,29 @@
+<!DOCTYPE html>
+<html class="reftest-wait">
+<head>
+ <meta charset="utf-8">
+ <title>Contenteditable Selection Test Case</title>
+ <script>
+ function runTests() {
+ var editable = document.getElementById("editable");
+ var text = document.getElementById("text");
+
+ editable.focus();
+
+ setTimeout(function () {
+ editable.setAttribute("contenteditable", "false");
+ text.focus();
+ setTimeout(function () {
+ document.body.offsetHeight;
+ document.documentElement.removeAttribute('class');
+ }, 0);
+ }, 0);
+ }
+ document.addEventListener('MozReftestInvalidate', runTests, false);
+ </script>
+</head>
+<body>
+ <div id="editable" contenteditable="true" tabindex="0" spellcheck="false">This is a contenteditable.</div>
+ <div id="text" tabindex="0">This is focusable text</div>
+</body>
+</html>
diff --git a/editor/reftests/997805-ref.html b/editor/reftests/997805-ref.html
new file mode 100644
index 000000000..be4592e69
--- /dev/null
+++ b/editor/reftests/997805-ref.html
@@ -0,0 +1,2 @@
+<!DOCTYPE html>
+<textarea placeholder="placeholder"></textarea>
diff --git a/editor/reftests/997805.html b/editor/reftests/997805.html
new file mode 100644
index 000000000..91750138b
--- /dev/null
+++ b/editor/reftests/997805.html
@@ -0,0 +1,16 @@
+<!DOCTYPE html>
+<html class="reftest-wait">
+<textarea placeholder="placeholder"></textarea>
+<script>
+onload = function() {
+ var t = document.querySelector("textarea");
+ t.style.display = "none";
+ t.value = "test";
+ setTimeout(function() {
+ t.style.display = "";
+ t.value = "";
+ document.documentElement.className = "";
+ }, 0);
+};
+</script>
+</html>
diff --git a/editor/reftests/caret_after_reframe-ref.html b/editor/reftests/caret_after_reframe-ref.html
new file mode 100644
index 000000000..63c49f66c
--- /dev/null
+++ b/editor/reftests/caret_after_reframe-ref.html
@@ -0,0 +1,6 @@
+<!DOCTYPE html>
+<html>
+ <body>
+ <input autofocus style="display:block">
+ </body>
+</html>
diff --git a/editor/reftests/caret_after_reframe.html b/editor/reftests/caret_after_reframe.html
new file mode 100644
index 000000000..5e9c0f133
--- /dev/null
+++ b/editor/reftests/caret_after_reframe.html
@@ -0,0 +1,14 @@
+<!DOCTYPE html>
+<html class="reftest-wait">
+ <body>
+ <input onfocus="focused()" autofocus>
+ <script>
+ function focused() {
+ var i = document.querySelector("input");
+ i.style.display = "block";
+ document.offsetWidth;
+ document.documentElement.removeAttribute("class");
+ }
+ </script>
+ </body>
+</html>
diff --git a/editor/reftests/caret_on_focus-ref.html b/editor/reftests/caret_on_focus-ref.html
new file mode 100644
index 000000000..4282ac7f5
--- /dev/null
+++ b/editor/reftests/caret_on_focus-ref.html
@@ -0,0 +1,11 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <style>
+ div { min-height: 20px; }
+ </style>
+ </head>
+ <body onload="document.querySelector('div').focus();">
+ <div contenteditable="true"></div>
+ </body>
+</html>
diff --git a/editor/reftests/caret_on_focus.html b/editor/reftests/caret_on_focus.html
new file mode 100644
index 000000000..6dcedb4a4
--- /dev/null
+++ b/editor/reftests/caret_on_focus.html
@@ -0,0 +1,11 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <style>
+ div { min-height: 20px; }
+ </style>
+ </head>
+ <body onload="document.querySelector('div').focus();">
+ <div contenteditable="true"> </div>
+ </body>
+</html>
diff --git a/editor/reftests/caret_on_positioned-ref.html b/editor/reftests/caret_on_positioned-ref.html
new file mode 100644
index 000000000..04773979d
--- /dev/null
+++ b/editor/reftests/caret_on_positioned-ref.html
@@ -0,0 +1,8 @@
+<html><head>
+<title>caret should be visible on stack context contents</title>
+</head><body>
+<div id="d" style="width: 100px; height: 100px; background: none repeat scroll 0% 0% cyan;" contenteditable=""></div>
+<script>
+document.getElementById("d").focus();
+</script>
+</body></html> \ No newline at end of file
diff --git a/editor/reftests/caret_on_positioned.html b/editor/reftests/caret_on_positioned.html
new file mode 100644
index 000000000..8a4a3c2f3
--- /dev/null
+++ b/editor/reftests/caret_on_positioned.html
@@ -0,0 +1,8 @@
+<html><head>
+<title>caret should be visible on stack context contents</title>
+</head><body>
+<div id="d" style="position: absolute; width: 100px; height: 100px; background: none repeat scroll 0% 0% cyan;" contenteditable=""></div>
+<script>
+document.getElementById("d").focus();
+</script>
+</body></html> \ No newline at end of file
diff --git a/editor/reftests/caret_on_presshell_reinit-2.html b/editor/reftests/caret_on_presshell_reinit-2.html
new file mode 100644
index 000000000..5acf3c97b
--- /dev/null
+++ b/editor/reftests/caret_on_presshell_reinit-2.html
@@ -0,0 +1,27 @@
+<!DOCTYPE html>
+<html class="reftest-wait">
+ <body>
+ <iframe src="data:text/html,<body><div></div></body>"></iframe>
+ <script type="text/javascript">
+ onload = function() {
+ var i = document.querySelector("iframe");
+ var win = i.contentWindow;
+ var doc = win.document;
+ var div = doc.querySelector("div");
+ win.getSelection().collapse(div, 0);
+ i.focus();
+ div.contentEditable = true;
+ div.focus();
+ setTimeout(function() {
+ var span = doc.createElement("span");
+ span.appendChild(doc.createTextNode("foo"));
+ div.appendChild(span);
+ div.style.outlineWidth = 0; // remove the focus outline
+ i.style.position = "absolute";
+ document.body.clientWidth;
+ document.documentElement.removeAttribute("class");
+ }, 0);
+ };
+ </script>
+ </body>
+</html>
diff --git a/editor/reftests/caret_on_presshell_reinit-ref.html b/editor/reftests/caret_on_presshell_reinit-ref.html
new file mode 100644
index 000000000..db5b8d620
--- /dev/null
+++ b/editor/reftests/caret_on_presshell_reinit-ref.html
@@ -0,0 +1,19 @@
+<!DOCTYPE html>
+<html>
+ <body>
+ <div style="position: absolute">
+ <iframe src="data:text/html,<body contenteditable>foo</body>"></iframe>
+ </div>
+ <script type="text/javascript">
+ onload = function() {
+ var iframe = document.querySelector("iframe");
+ var win = iframe.contentWindow;
+ var body = win.document.body;
+ iframe.focus();
+ body.focus();
+ var sel = win.getSelection();
+ sel.collapse(body.firstChild, 0);
+ };
+ </script>
+ </body>
+</html>
diff --git a/editor/reftests/caret_on_presshell_reinit.html b/editor/reftests/caret_on_presshell_reinit.html
new file mode 100644
index 000000000..2d872383a
--- /dev/null
+++ b/editor/reftests/caret_on_presshell_reinit.html
@@ -0,0 +1,22 @@
+<!DOCTYPE html>
+<html>
+ <body>
+ <div>
+ <iframe src="data:text/html,<body contenteditable>foo</body>"></iframe>
+ </div>
+ <script type="text/javascript">
+ onload = function() {
+ var div = document.querySelector("div");
+ div.style.position = "absolute";
+ document.body.clientWidth;
+ var iframe = document.querySelector("iframe");
+ var win = iframe.contentWindow;
+ var body = win.document.body;
+ iframe.focus();
+ body.focus();
+ var sel = win.getSelection();
+ sel.collapse(body.firstChild, 0);
+ };
+ </script>
+ </body>
+</html>
diff --git a/editor/reftests/caret_on_textarea_lastline-ref.html b/editor/reftests/caret_on_textarea_lastline-ref.html
new file mode 100644
index 000000000..9c1040255
--- /dev/null
+++ b/editor/reftests/caret_on_textarea_lastline-ref.html
@@ -0,0 +1,13 @@
+<!DOCTYPE html>
+<html>
+<body onload="loaded()">
+<script>
+ function loaded() {
+ var t = document.querySelector('textarea');
+ t.selectionStart = t.selectionEnd = t.value.length;
+ t.focus();
+ }
+</script>
+<textarea>foo</textarea>
+</body>
+</html>
diff --git a/editor/reftests/caret_on_textarea_lastline.html b/editor/reftests/caret_on_textarea_lastline.html
new file mode 100644
index 000000000..24a53bd7d
--- /dev/null
+++ b/editor/reftests/caret_on_textarea_lastline.html
@@ -0,0 +1,14 @@
+<!DOCTYPE html>
+<html>
+<body onload="loaded()">
+<script>
+ function loaded() {
+ var t = document.querySelector('textarea');
+ t.selectionStart = t.selectionEnd = t.value.length;
+ t.focus();
+ }
+</script>
+<textarea>foo
+</textarea>
+</body>
+</html>
diff --git a/editor/reftests/dynamic-1.html b/editor/reftests/dynamic-1.html
new file mode 100644
index 000000000..5f2b8b7dc
--- /dev/null
+++ b/editor/reftests/dynamic-1.html
@@ -0,0 +1,9 @@
+<!DOCTYPE html>
+<html>
+<body>
+ <input type="text">
+ <script>
+ document.getElementsByTagName("input")[0].value = "abcdef";
+ </script>
+</body>
+</html>
diff --git a/editor/reftests/dynamic-overflow-change-ref.html b/editor/reftests/dynamic-overflow-change-ref.html
new file mode 100644
index 000000000..52e5f5bb0
--- /dev/null
+++ b/editor/reftests/dynamic-overflow-change-ref.html
@@ -0,0 +1,13 @@
+<!DOCTYPE html>
+<html>
+ <body>
+ <textarea rows="2" style="overflow: hidden;">
+ this
+ is
+ a
+ textarea
+ with
+ overflow
+ </textarea>
+ </body>
+</html>
diff --git a/editor/reftests/dynamic-overflow-change.html b/editor/reftests/dynamic-overflow-change.html
new file mode 100644
index 000000000..57a1b8f74
--- /dev/null
+++ b/editor/reftests/dynamic-overflow-change.html
@@ -0,0 +1,13 @@
+<!DOCTYPE html>
+<html>
+ <body onload="document.querySelector('textarea').style.overflow='hidden'">
+ <textarea rows="2">
+ this
+ is
+ a
+ textarea
+ with
+ overflow
+ </textarea>
+ </body>
+</html>
diff --git a/editor/reftests/dynamic-ref.html b/editor/reftests/dynamic-ref.html
new file mode 100644
index 000000000..07882ee7a
--- /dev/null
+++ b/editor/reftests/dynamic-ref.html
@@ -0,0 +1,6 @@
+<!DOCTYPE html>
+<html>
+<body>
+ <input type="text" value="abcdef">
+</body>
+</html>
diff --git a/editor/reftests/dynamic-type-1.html b/editor/reftests/dynamic-type-1.html
new file mode 100644
index 000000000..fb0c3ec68
--- /dev/null
+++ b/editor/reftests/dynamic-type-1.html
@@ -0,0 +1,11 @@
+<!DOCTYPE html>
+<html>
+<body>
+ <input type="checkbox">
+ <script>
+ var i = document.getElementsByTagName("input")[0];
+ i.type = "text";
+ i.value = "abcdef";
+ </script>
+</body>
+</html>
diff --git a/editor/reftests/dynamic-type-2.html b/editor/reftests/dynamic-type-2.html
new file mode 100644
index 000000000..4d99ac06e
--- /dev/null
+++ b/editor/reftests/dynamic-type-2.html
@@ -0,0 +1,11 @@
+<!DOCTYPE html>
+<html>
+<body>
+ <input type="checkbox">
+ <script>
+ var i = document.getElementsByTagName("input")[0];
+ i.value = "abcdef";
+ i.type = "text";
+ </script>
+</body>
+</html>
diff --git a/editor/reftests/dynamic-type-3.html b/editor/reftests/dynamic-type-3.html
new file mode 100644
index 000000000..7cf5be6ab
--- /dev/null
+++ b/editor/reftests/dynamic-type-3.html
@@ -0,0 +1,11 @@
+<!DOCTYPE html>
+<html>
+<body>
+ <input type="checkbox" value="foo">
+ <script>
+ var i = document.getElementsByTagName("input")[0];
+ i.type = "text";
+ i.value = "abcdef";
+ </script>
+</body>
+</html>
diff --git a/editor/reftests/dynamic-type-4.html b/editor/reftests/dynamic-type-4.html
new file mode 100644
index 000000000..7cf5be6ab
--- /dev/null
+++ b/editor/reftests/dynamic-type-4.html
@@ -0,0 +1,11 @@
+<!DOCTYPE html>
+<html>
+<body>
+ <input type="checkbox" value="foo">
+ <script>
+ var i = document.getElementsByTagName("input")[0];
+ i.type = "text";
+ i.value = "abcdef";
+ </script>
+</body>
+</html>
diff --git a/editor/reftests/emptypasswd-1.html b/editor/reftests/emptypasswd-1.html
new file mode 100644
index 000000000..86775633b
--- /dev/null
+++ b/editor/reftests/emptypasswd-1.html
@@ -0,0 +1,6 @@
+<!DOCTYPE html>
+<html>
+<body>
+ <input type="password">
+</body>
+</html>
diff --git a/editor/reftests/emptypasswd-2.html b/editor/reftests/emptypasswd-2.html
new file mode 100644
index 000000000..6e33f46b1
--- /dev/null
+++ b/editor/reftests/emptypasswd-2.html
@@ -0,0 +1,9 @@
+<!DOCTYPE html>
+<html>
+<body>
+ <input type="password" value="abcdef">
+ <script>
+ document.getElementsByTagName("input")[0].value = "";
+ </script>
+</body>
+</html>
diff --git a/editor/reftests/emptypasswd-ref.html b/editor/reftests/emptypasswd-ref.html
new file mode 100644
index 000000000..7f09f6e8b
--- /dev/null
+++ b/editor/reftests/emptypasswd-ref.html
@@ -0,0 +1,6 @@
+<!DOCTYPE html>
+<html>
+<body>
+ <input type="text">
+</body>
+</html>
diff --git a/editor/reftests/input-text-notheme-onfocus-reframe-ref.html b/editor/reftests/input-text-notheme-onfocus-reframe-ref.html
new file mode 100644
index 000000000..e97f55f16
--- /dev/null
+++ b/editor/reftests/input-text-notheme-onfocus-reframe-ref.html
@@ -0,0 +1,28 @@
+<!DOCTYPE HTML>
+<html class="reftest-wait">
+<head>
+ <title>bug 536421</title>
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<style>
+input { border:1px solid blue; }
+</style>
+</head>
+<body onload="doTest()">
+ <input value="test" id="textbox" onfocus="triggerBug();" type="text">
+ <script type="text/javascript">
+ function finishTest()
+ {
+ document.documentElement.removeAttribute("class");
+ }
+ function triggerBug()
+ {
+ finishTest();
+ }
+ function doTest()
+ {
+ var t = document.getElementById("textbox");
+ t.focus();
+ }
+ </script>
+</body>
+</html>
diff --git a/editor/reftests/input-text-notheme-onfocus-reframe.html b/editor/reftests/input-text-notheme-onfocus-reframe.html
new file mode 100644
index 000000000..19bc273d1
--- /dev/null
+++ b/editor/reftests/input-text-notheme-onfocus-reframe.html
@@ -0,0 +1,32 @@
+<!DOCTYPE HTML>
+<html class="reftest-wait">
+<head>
+ <title>bug 536421</title>
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<style>
+input { border:1px solid blue; }
+</style>
+</head>
+<body onload="doTest()">
+ <input value="test" id="textbox" onfocus="triggerBug();" type="text">
+ <script type="text/javascript">
+ function finishTest()
+ {
+ document.documentElement.removeAttribute("class");
+ }
+ function triggerBug()
+ {
+ var t = document.getElementById("textbox");
+ t.style.display = "none";
+ document.body.offsetWidth;
+ t.style.display = "";
+ finishTest();
+ }
+ function doTest()
+ {
+ var t = document.getElementById("textbox");
+ t.focus();
+ }
+ </script>
+</body>
+</html>
diff --git a/editor/reftests/input-text-onfocus-reframe-ref.html b/editor/reftests/input-text-onfocus-reframe-ref.html
new file mode 100644
index 000000000..e17757897
--- /dev/null
+++ b/editor/reftests/input-text-onfocus-reframe-ref.html
@@ -0,0 +1,25 @@
+<!DOCTYPE HTML>
+<html class="reftest-wait">
+<head>
+ <title>bug 536421</title>
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+</head>
+<body onload="doTest()">
+ <input value="test" id="textbox" onfocus="triggerBug();" type="text">
+ <script type="text/javascript">
+ function finishTest()
+ {
+ document.documentElement.removeAttribute("class");
+ }
+ function triggerBug()
+ {
+ finishTest();
+ }
+ function doTest()
+ {
+ var t = document.getElementById("textbox");
+ t.focus();
+ }
+ </script>
+</body>
+</html>
diff --git a/editor/reftests/input-text-onfocus-reframe.html b/editor/reftests/input-text-onfocus-reframe.html
new file mode 100644
index 000000000..339ef95c6
--- /dev/null
+++ b/editor/reftests/input-text-onfocus-reframe.html
@@ -0,0 +1,29 @@
+<!DOCTYPE HTML>
+<html class="reftest-wait">
+<head>
+ <title>bug 536421</title>
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+</head>
+<body onload="doTest()">
+ <input value="test" id="textbox" onfocus="triggerBug();" type="text">
+ <script type="text/javascript">
+ function finishTest()
+ {
+ document.documentElement.removeAttribute("class");
+ }
+ function triggerBug()
+ {
+ var t = document.getElementById("textbox");
+ t.style.display = "none";
+ document.body.offsetWidth;
+ t.style.display = "";
+ finishTest();
+ }
+ function doTest()
+ {
+ var t = document.getElementById("textbox");
+ t.focus();
+ }
+ </script>
+</body>
+</html>
diff --git a/editor/reftests/newline-1.html b/editor/reftests/newline-1.html
new file mode 100644
index 000000000..5a7ce8c19
--- /dev/null
+++ b/editor/reftests/newline-1.html
@@ -0,0 +1,6 @@
+<!DOCTYPE html>
+<html>
+<body>
+ <input type="text" value="aaa&#10;bbb">
+</body>
+</html>
diff --git a/editor/reftests/newline-2.html b/editor/reftests/newline-2.html
new file mode 100644
index 000000000..7965bc860
--- /dev/null
+++ b/editor/reftests/newline-2.html
@@ -0,0 +1,6 @@
+<!DOCTYPE html>
+<html>
+<body>
+ <input type="text" value="&#10;aaa bbb">
+</body>
+</html>
diff --git a/editor/reftests/newline-3.html b/editor/reftests/newline-3.html
new file mode 100644
index 000000000..18760df4c
--- /dev/null
+++ b/editor/reftests/newline-3.html
@@ -0,0 +1,6 @@
+<!DOCTYPE html>
+<html>
+<body>
+ <input type="text" value="aaa bbb&#10;">
+</body>
+</html>
diff --git a/editor/reftests/newline-4.html b/editor/reftests/newline-4.html
new file mode 100644
index 000000000..2f51eaa20
--- /dev/null
+++ b/editor/reftests/newline-4.html
@@ -0,0 +1,6 @@
+<!DOCTYPE html>
+<html>
+<body>
+ <input type="text" value="a&#10;a&#10;a&#10; &#10;b&#10;b&#10;b">
+</body>
+</html>
diff --git a/editor/reftests/newline-ref.html b/editor/reftests/newline-ref.html
new file mode 100644
index 000000000..3630626dd
--- /dev/null
+++ b/editor/reftests/newline-ref.html
@@ -0,0 +1,6 @@
+<!DOCTYPE html>
+<html>
+<body>
+ <input type="text" value="aaa bbb">
+</body>
+</html>
diff --git a/editor/reftests/nobogusnode-1.html b/editor/reftests/nobogusnode-1.html
new file mode 100644
index 000000000..450d6b1e5
--- /dev/null
+++ b/editor/reftests/nobogusnode-1.html
@@ -0,0 +1,6 @@
+<!DOCTYPE html>
+<html>
+<body contenteditable>
+ This is a test.
+</body>
+</html>
diff --git a/editor/reftests/nobogusnode-2.html b/editor/reftests/nobogusnode-2.html
new file mode 100644
index 000000000..532e59740
--- /dev/null
+++ b/editor/reftests/nobogusnode-2.html
@@ -0,0 +1,5 @@
+<html xmlns="http://www.w3.org/1999/xhtml">
+<body contenteditable="true">
+ This is a test.
+</body>
+</html>
diff --git a/editor/reftests/nobogusnode-ref.html b/editor/reftests/nobogusnode-ref.html
new file mode 100644
index 000000000..052a53b51
--- /dev/null
+++ b/editor/reftests/nobogusnode-ref.html
@@ -0,0 +1,6 @@
+<!DOCTYPE html>
+<html>
+<body>
+ This is a test.
+</body>
+</html>
diff --git a/editor/reftests/passwd-1.html b/editor/reftests/passwd-1.html
new file mode 100644
index 000000000..f6f21d84f
--- /dev/null
+++ b/editor/reftests/passwd-1.html
@@ -0,0 +1,6 @@
+<!DOCTYPE html>
+<html>
+<body>
+ <input type="password" value="123456">
+</body>
+</html>
diff --git a/editor/reftests/passwd-2.html b/editor/reftests/passwd-2.html
new file mode 100644
index 000000000..07882ee7a
--- /dev/null
+++ b/editor/reftests/passwd-2.html
@@ -0,0 +1,6 @@
+<!DOCTYPE html>
+<html>
+<body>
+ <input type="text" value="abcdef">
+</body>
+</html>
diff --git a/editor/reftests/passwd-3.html b/editor/reftests/passwd-3.html
new file mode 100644
index 000000000..3e1e715eb
--- /dev/null
+++ b/editor/reftests/passwd-3.html
@@ -0,0 +1,9 @@
+<!DOCTYPE html>
+<html>
+<body>
+ <input type="password">
+ <script>
+ document.getElementsByTagName("input")[0].value = "abcdef";
+ </script>
+</body>
+</html>
diff --git a/editor/reftests/passwd-4.html b/editor/reftests/passwd-4.html
new file mode 100644
index 000000000..607a22ae4
--- /dev/null
+++ b/editor/reftests/passwd-4.html
@@ -0,0 +1,19 @@
+<!DOCTYPE html>
+<!--
+Make sure that focusing a password text element does not
+cause a non-breaking space character to show up.
+-->
+<html class="reftest-wait">
+<body onload="loaded()">
+ <input type="password">
+ <script>
+ function loaded() {
+ var i = document.getElementsByTagName("input")[0];
+ i.focus();
+ i.value += "abcdef";
+ i.blur();
+ document.documentElement.className = "";
+ }
+ </script>
+</body>
+</html>
diff --git a/editor/reftests/passwd-ref.html b/editor/reftests/passwd-ref.html
new file mode 100644
index 000000000..b203fa7d5
--- /dev/null
+++ b/editor/reftests/passwd-ref.html
@@ -0,0 +1,6 @@
+<!DOCTYPE html>
+<html>
+<body>
+ <input type="password" value="abcdef">
+</body>
+</html>
diff --git a/editor/reftests/readonly-editable-ref.html b/editor/reftests/readonly-editable-ref.html
new file mode 100644
index 000000000..99f1e5101
--- /dev/null
+++ b/editor/reftests/readonly-editable-ref.html
@@ -0,0 +1,13 @@
+<!DOCTYPE html>
+<html>
+ <body>
+ <input>
+ <input readonly>
+ <input type=password>
+ <input type=password readonly>
+ <input type=email>
+ <input type=email readonly>
+ <textarea></textarea>
+ <textarea readonly></textarea>
+ </body>
+</html>
diff --git a/editor/reftests/readonly-editable.html b/editor/reftests/readonly-editable.html
new file mode 100644
index 000000000..49210e581
--- /dev/null
+++ b/editor/reftests/readonly-editable.html
@@ -0,0 +1,24 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <style>
+ :-moz-read-write + span {
+ display: none;
+ }
+ span {
+ color: transparent; /* workaround for bug 617524 */
+ outline: 1px solid green;
+ }
+ </style>
+ </head>
+ <body contenteditable>
+ <input><span>hide me</span>
+ <input readonly><span>hide me</span>
+ <input type=password><span>hide me</span>
+ <input type=password readonly><span>hide me</span>
+ <input type=email><span>hide me</span>
+ <input type=email readonly><span>hide me</span>
+ <textarea></textarea><span>hide me</span>
+ <textarea readonly></textarea><span>hide me</span>
+ </body>
+</html>
diff --git a/editor/reftests/readonly-non-editable-ref.html b/editor/reftests/readonly-non-editable-ref.html
new file mode 100644
index 000000000..a91071e42
--- /dev/null
+++ b/editor/reftests/readonly-non-editable-ref.html
@@ -0,0 +1,21 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <style>
+ span {
+ color: transparent; /* workaround for bug 617524 */
+ outline: 1px solid green;
+ }
+ </style>
+ </head>
+ <body>
+ <input><span>hide me</span>
+ <input readonly>
+ <input type=password><span>hide me</span>
+ <input type=password readonly>
+ <input type=email><span>hide me</span>
+ <input type=email readonly>
+ <textarea></textarea><span>hide me</span>
+ <textarea readonly></textarea>
+ </body>
+</html>
diff --git a/editor/reftests/readonly-non-editable.html b/editor/reftests/readonly-non-editable.html
new file mode 100644
index 000000000..9766045ed
--- /dev/null
+++ b/editor/reftests/readonly-non-editable.html
@@ -0,0 +1,24 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <style>
+ :-moz-read-only + span {
+ display: none;
+ }
+ span {
+ color: transparent; /* workaround for bug 617524 */
+ outline: 1px solid green;
+ }
+ </style>
+ </head>
+ <body>
+ <input><span>hide me</span>
+ <input readonly><span>hide me</span>
+ <input type=password><span>hide me</span>
+ <input type=password readonly><span>hide me</span>
+ <input type=email><span>hide me</span>
+ <input type=email readonly><span>hide me</span>
+ <textarea></textarea><span>hide me</span>
+ <textarea readonly></textarea><span>hide me</span>
+ </body>
+</html>
diff --git a/editor/reftests/readwrite-editable-ref.html b/editor/reftests/readwrite-editable-ref.html
new file mode 100644
index 000000000..99f1e5101
--- /dev/null
+++ b/editor/reftests/readwrite-editable-ref.html
@@ -0,0 +1,13 @@
+<!DOCTYPE html>
+<html>
+ <body>
+ <input>
+ <input readonly>
+ <input type=password>
+ <input type=password readonly>
+ <input type=email>
+ <input type=email readonly>
+ <textarea></textarea>
+ <textarea readonly></textarea>
+ </body>
+</html>
diff --git a/editor/reftests/readwrite-editable.html b/editor/reftests/readwrite-editable.html
new file mode 100644
index 000000000..49210e581
--- /dev/null
+++ b/editor/reftests/readwrite-editable.html
@@ -0,0 +1,24 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <style>
+ :-moz-read-write + span {
+ display: none;
+ }
+ span {
+ color: transparent; /* workaround for bug 617524 */
+ outline: 1px solid green;
+ }
+ </style>
+ </head>
+ <body contenteditable>
+ <input><span>hide me</span>
+ <input readonly><span>hide me</span>
+ <input type=password><span>hide me</span>
+ <input type=password readonly><span>hide me</span>
+ <input type=email><span>hide me</span>
+ <input type=email readonly><span>hide me</span>
+ <textarea></textarea><span>hide me</span>
+ <textarea readonly></textarea><span>hide me</span>
+ </body>
+</html>
diff --git a/editor/reftests/readwrite-non-editable-ref.html b/editor/reftests/readwrite-non-editable-ref.html
new file mode 100644
index 000000000..12e1c46c0
--- /dev/null
+++ b/editor/reftests/readwrite-non-editable-ref.html
@@ -0,0 +1,21 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <style>
+ span {
+ color: transparent; /* workaround for bug 617524 */
+ outline: 1px solid green;
+ }
+ </style>
+ </head>
+ <body>
+ <input>
+ <input readonly><span>hide me</span>
+ <input type=password>
+ <input type=password readonly><span>hide me</span>
+ <input type=email>
+ <input type=email readonly><span>hide me</span>
+ <textarea></textarea>
+ <textarea readonly></textarea><span>hide me</span>
+ </body>
+</html>
diff --git a/editor/reftests/readwrite-non-editable.html b/editor/reftests/readwrite-non-editable.html
new file mode 100644
index 000000000..535f21f1a
--- /dev/null
+++ b/editor/reftests/readwrite-non-editable.html
@@ -0,0 +1,24 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <style>
+ :-moz-read-write + span {
+ display: none;
+ }
+ span {
+ color: transparent; /* workaround for bug 617524 */
+ outline: 1px solid green;
+ }
+ </style>
+ </head>
+ <body>
+ <input><span>hide me</span>
+ <input readonly><span>hide me</span>
+ <input type=password><span>hide me</span>
+ <input type=password readonly><span>hide me</span>
+ <input type=email><span>hide me</span>
+ <input type=email readonly><span>hide me</span>
+ <textarea></textarea><span>hide me</span>
+ <textarea readonly></textarea><span>hide me</span>
+ </body>
+</html>
diff --git a/editor/reftests/reftest-stylo.list b/editor/reftests/reftest-stylo.list
new file mode 100644
index 000000000..ce42a4d40
--- /dev/null
+++ b/editor/reftests/reftest-stylo.list
@@ -0,0 +1,177 @@
+# DO NOT EDIT! This is a auto-generated temporary list for Stylo testing
+# include the XUL reftests
+include xul/reftest-stylo.list
+
+== newline-1.html newline-1.html
+== newline-2.html newline-2.html
+== newline-3.html newline-3.html
+== newline-4.html newline-4.html
+== dynamic-1.html dynamic-1.html
+== dynamic-type-1.html dynamic-type-1.html
+== dynamic-type-2.html dynamic-type-2.html
+== dynamic-type-3.html dynamic-type-3.html
+== dynamic-type-4.html dynamic-type-4.html
+== passwd-1.html passwd-1.html
+== passwd-2.html passwd-2.html
+== passwd-3.html passwd-3.html
+needs-focus == passwd-4.html passwd-4.html
+== emptypasswd-1.html emptypasswd-1.html
+== emptypasswd-2.html emptypasswd-2.html
+== caret_on_positioned.html caret_on_positioned.html
+skip-if(B2G||Mulet) fails-if(Android) needs-focus == spellcheck-input-disabled.html spellcheck-input-disabled.html
+# Initial mulet triage: parity with B2G/B2G Desktop
+== spellcheck-input-attr-before.html spellcheck-input-attr-before.html
+skip-if(B2G||Mulet) fails-if(Android) needs-focus == spellcheck-input-attr-before.html spellcheck-input-attr-before.html
+# Initial mulet triage: parity with B2G/B2G Desktop
+== spellcheck-input-attr-after.html spellcheck-input-attr-after.html
+skip-if(B2G||Mulet) fails-if(Android) needs-focus == spellcheck-input-attr-after.html spellcheck-input-attr-after.html
+# Initial mulet triage: parity with B2G/B2G Desktop
+== spellcheck-input-attr-inherit.html spellcheck-input-attr-inherit.html
+skip-if(B2G||Mulet) fails-if(Android) needs-focus == spellcheck-input-attr-inherit.html spellcheck-input-attr-inherit.html
+# Initial mulet triage: parity with B2G/B2G Desktop
+== spellcheck-input-attr-dynamic.html spellcheck-input-attr-dynamic.html
+skip-if(B2G||Mulet) fails-if(Android) needs-focus == spellcheck-input-attr-dynamic.html spellcheck-input-attr-dynamic.html
+# Initial mulet triage: parity with B2G/B2G Desktop
+== spellcheck-input-attr-dynamic-inherit.html spellcheck-input-attr-dynamic-inherit.html
+skip-if(B2G||Mulet) fails-if(Android) needs-focus == spellcheck-input-attr-dynamic-inherit.html spellcheck-input-attr-dynamic-inherit.html
+# Initial mulet triage: parity with B2G/B2G Desktop
+== spellcheck-input-property-dynamic.html spellcheck-input-property-dynamic.html
+skip-if(B2G||Mulet) fails-if(Android) needs-focus == spellcheck-input-property-dynamic.html spellcheck-input-property-dynamic.html
+# Initial mulet triage: parity with B2G/B2G Desktop
+== spellcheck-input-property-dynamic-inherit.html spellcheck-input-property-dynamic-inherit.html
+skip-if(B2G||Mulet) fails-if(Android) needs-focus == spellcheck-input-property-dynamic-inherit.html spellcheck-input-property-dynamic-inherit.html
+# Initial mulet triage: parity with B2G/B2G Desktop
+== spellcheck-input-attr-dynamic-override.html spellcheck-input-attr-dynamic-override.html
+skip-if(B2G||Mulet) fails-if(Android) needs-focus == spellcheck-input-attr-dynamic-override.html spellcheck-input-attr-dynamic-override.html
+# Initial mulet triage: parity with B2G/B2G Desktop
+== spellcheck-input-attr-dynamic-override-inherit.html spellcheck-input-attr-dynamic-override-inherit.html
+skip-if(B2G||Mulet) fails-if(Android) needs-focus == spellcheck-input-attr-dynamic-override-inherit.html spellcheck-input-attr-dynamic-override-inherit.html
+# Initial mulet triage: parity with B2G/B2G Desktop
+== spellcheck-input-property-dynamic-override.html spellcheck-input-property-dynamic-override.html
+skip-if(B2G||Mulet) fails-if(Android) needs-focus == spellcheck-input-property-dynamic-override.html spellcheck-input-property-dynamic-override.html
+# Initial mulet triage: parity with B2G/B2G Desktop
+== spellcheck-input-property-dynamic-override-inherit.html spellcheck-input-property-dynamic-override-inherit.html
+skip-if(B2G||Mulet) fails-if(Android) needs-focus == spellcheck-input-property-dynamic-override-inherit.html spellcheck-input-property-dynamic-override-inherit.html
+# Initial mulet triage: parity with B2G/B2G Desktop
+== spellcheck-textarea-attr.html spellcheck-textarea-attr.html
+#the random-if(Android) tests pass on android native, but fail on android-xul, see bug 728942
+skip-if(B2G||Mulet) random-if(Android) needs-focus == spellcheck-textarea-attr.html spellcheck-textarea-attr.html
+# Initial mulet triage: parity with B2G/B2G Desktop
+needs-focus == spellcheck-textarea-focused.html spellcheck-textarea-focused.html
+needs-focus == spellcheck-textarea-focused-reframe.html spellcheck-textarea-focused-reframe.html
+needs-focus == spellcheck-textarea-focused-notreadonly.html spellcheck-textarea-focused-notreadonly.html
+skip-if(B2G||Mulet) random-if(Android) needs-focus == spellcheck-textarea-nofocus.html spellcheck-textarea-nofocus.html
+# Initial mulet triage: parity with B2G/B2G Desktop
+skip-if(B2G||Mulet) random-if(Android) needs-focus == spellcheck-textarea-disabled.html spellcheck-textarea-disabled.html
+# Initial mulet triage: parity with B2G/B2G Desktop
+skip-if(B2G||Mulet) random-if(Android) needs-focus == spellcheck-textarea-attr-inherit.html spellcheck-textarea-attr-inherit.html
+# Initial mulet triage: parity with B2G/B2G Desktop
+skip-if(B2G||Mulet) random-if(Android) needs-focus == spellcheck-textarea-attr-dynamic.html spellcheck-textarea-attr-dynamic.html
+# Initial mulet triage: parity with B2G/B2G Desktop
+skip-if(B2G||Mulet) random-if(Android) needs-focus == spellcheck-textarea-attr-dynamic-inherit.html spellcheck-textarea-attr-dynamic-inherit.html
+# Initial mulet triage: parity with B2G/B2G Desktop
+skip-if(B2G||Mulet) random-if(Android) needs-focus == spellcheck-textarea-property-dynamic.html spellcheck-textarea-property-dynamic.html
+# Initial mulet triage: parity with B2G/B2G Desktop
+skip-if(B2G||Mulet) random-if(Android) needs-focus == spellcheck-textarea-property-dynamic-inherit.html spellcheck-textarea-property-dynamic-inherit.html
+# Initial mulet triage: parity with B2G/B2G Desktop
+skip-if(B2G||Mulet) random-if(Android) needs-focus == spellcheck-textarea-attr-dynamic-override.html spellcheck-textarea-attr-dynamic-override.html
+# Initial mulet triage: parity with B2G/B2G Desktop
+skip-if(B2G||Mulet) random-if(Android) needs-focus == spellcheck-textarea-attr-dynamic-override-inherit.html spellcheck-textarea-attr-dynamic-override-inherit.html
+# Initial mulet triage: parity with B2G/B2G Desktop
+skip-if(B2G||Mulet) random-if(Android) needs-focus == spellcheck-textarea-property-dynamic-override.html spellcheck-textarea-property-dynamic-override.html
+# Initial mulet triage: parity with B2G/B2G Desktop
+skip-if(B2G||Mulet) random-if(Android) needs-focus == spellcheck-textarea-property-dynamic-override-inherit.html spellcheck-textarea-property-dynamic-override-inherit.html
+# Initial mulet triage: parity with B2G/B2G Desktop
+needs-focus == caret_on_focus.html caret_on_focus.html
+needs-focus == caret_on_textarea_lastline.html caret_on_textarea_lastline.html
+needs-focus == input-text-onfocus-reframe.html input-text-onfocus-reframe.html
+needs-focus == input-text-notheme-onfocus-reframe.html input-text-notheme-onfocus-reframe.html
+skip-if(B2G||Mulet) needs-focus == caret_after_reframe.html caret_after_reframe.html
+# B2G timed out waiting for reftest-wait to be removed
+# Initial mulet triage: parity with B2G/B2G Desktop
+== nobogusnode-1.html nobogusnode-1.html
+== nobogusnode-2.html nobogusnode-2.html
+== spellcheck-hyphen-valid.html spellcheck-hyphen-valid.html
+skip-if(B2G||Mulet) fails-if(Android) needs-focus == spellcheck-hyphen-invalid.html spellcheck-hyphen-invalid.html
+# Initial mulet triage: parity with B2G/B2G Desktop
+== spellcheck-slash-valid.html spellcheck-slash-valid.html
+== spellcheck-period-valid.html spellcheck-period-valid.html
+== spellcheck-space-valid.html spellcheck-space-valid.html
+== spellcheck-comma-valid.html spellcheck-comma-valid.html
+== spellcheck-hyphen-multiple-valid.html spellcheck-hyphen-multiple-valid.html
+skip-if(B2G||Mulet) fails-if(Android) needs-focus == spellcheck-hyphen-multiple-invalid.html spellcheck-hyphen-multiple-invalid.html
+# Initial mulet triage: parity with B2G/B2G Desktop
+== spellcheck-dotafterquote-valid.html spellcheck-dotafterquote-valid.html
+== spellcheck-url-valid.html spellcheck-url-valid.html
+needs-focus == spellcheck-non-latin-arabic.html spellcheck-non-latin-arabic.html
+needs-focus == spellcheck-non-latin-chinese-simplified.html spellcheck-non-latin-chinese-simplified.html
+needs-focus == spellcheck-non-latin-chinese-traditional.html spellcheck-non-latin-chinese-traditional.html
+needs-focus == spellcheck-non-latin-hebrew.html spellcheck-non-latin-hebrew.html
+needs-focus == spellcheck-non-latin-japanese.html spellcheck-non-latin-japanese.html
+needs-focus == spellcheck-non-latin-korean.html spellcheck-non-latin-korean.html
+== unneeded_scroll.html unneeded_scroll.html
+skip-if(B2G||Mulet) == caret_on_presshell_reinit.html caret_on_presshell_reinit.html
+# Initial mulet triage: parity with B2G/B2G Desktop
+fuzzy-if(browserIsRemote,255,3) asserts-if(browserIsRemote,0-1) skip-if(B2G||Mulet) fuzzy-if(skiaContent,1,5) == caret_on_presshell_reinit-2.html caret_on_presshell_reinit-2.html
+# Initial mulet triage: parity with B2G/B2G Desktop
+skip-if(B2G||Mulet) fuzzy-if(asyncPan&&!layersGPUAccelerated,102,2824) == 642800.html 642800.html
+# Initial mulet triage: parity with B2G/B2G Desktop
+== selection_visibility_after_reframe.html selection_visibility_after_reframe.html
+== selection_visibility_after_reframe-2.html selection_visibility_after_reframe-2.html
+== selection_visibility_after_reframe-3.html selection_visibility_after_reframe-3.html
+== 672709.html 672709.html
+== 338427-1.html 338427-1.html
+skip-if(Android||B2G||Mulet) needs-focus == 674212-spellcheck.html 674212-spellcheck.html
+# Initial mulet triage: parity with B2G/B2G Desktop
+skip-if(Android||B2G||Mulet) needs-focus == 338427-2.html 338427-2.html
+# Initial mulet triage: parity with B2G/B2G Desktop
+skip-if(Android||B2G||Mulet) needs-focus == 338427-3.html 338427-3.html
+# Initial mulet triage: parity with B2G/B2G Desktop
+skip-if(Android||B2G||Mulet) needs-focus == 462758-grabbers-resizers.html 462758-grabbers-resizers.html
+# Initial mulet triage: parity with B2G/B2G Desktop
+== readwrite-non-editable.html readwrite-non-editable.html
+== readwrite-editable.html readwrite-editable.html
+== readonly-non-editable.html readonly-non-editable.html
+== readonly-editable.html readonly-editable.html
+== dynamic-overflow-change.html dynamic-overflow-change.html
+== 694880-1.html 694880-1.html
+== 694880-2.html 694880-2.html
+== 694880-3.html 694880-3.html
+skip == 388980-1.html 388980-1.html
+needs-focus == spellcheck-superscript-1.html spellcheck-superscript-1.html
+skip-if(B2G||Mulet) fails-if(Android) needs-focus == spellcheck-superscript-2.html spellcheck-superscript-2.html
+# bug 783658
+# Initial mulet triage: parity with B2G/B2G Desktop
+fuzzy-if(skiaContent,1,3400) needs-focus pref(layout.accessiblecaret.enabled,false) == 824080-1.html 824080-1.html
+needs-focus pref(layout.accessiblecaret.enabled,false) == 824080-2.html 824080-2.html
+needs-focus pref(layout.accessiblecaret.enabled,false) == 824080-3.html 824080-3.html
+needs-focus == 824080-2.html 824080-2.html
+fuzzy-if(skiaContent,1,3200) needs-focus pref(layout.accessiblecaret.enabled,false) == 824080-4.html 824080-4.html
+fails fuzzy-if(skiaContent,2,1800) needs-focus pref(layout.accessiblecaret.enabled,false) == 824080-5.html 824080-5.html
+needs-focus == 824080-4.html 824080-4.html
+needs-focus == 824080-6.html 824080-6.html
+needs-focus pref(layout.accessiblecaret.enabled,false) == 824080-7.html 824080-7.html
+needs-focus == 824080-6.html 824080-6.html
+# Bug 674927: copy spellcheck-textarea tests to contenteditable
+== spellcheck-contenteditable-attr.html spellcheck-contenteditable-attr.html
+fails-if(Android||B2G||Mulet) needs-focus == spellcheck-contenteditable-attr.html spellcheck-contenteditable-attr.html
+# B2G no spellcheck underline
+# Initial mulet triage: parity with B2G/B2G Desktop
+needs-focus == spellcheck-contenteditable-focused.html spellcheck-contenteditable-focused.html
+needs-focus == spellcheck-contenteditable-focused-reframe.html spellcheck-contenteditable-focused-reframe.html
+== spellcheck-contenteditable-nofocus.html spellcheck-contenteditable-nofocus.html
+== spellcheck-contenteditable-disabled.html spellcheck-contenteditable-disabled.html
+== spellcheck-contenteditable-disabled-partial.html spellcheck-contenteditable-disabled-partial.html
+== spellcheck-contenteditable-attr-inherit.html spellcheck-contenteditable-attr-inherit.html
+== spellcheck-contenteditable-attr-dynamic.html spellcheck-contenteditable-attr-dynamic.html
+== spellcheck-contenteditable-attr-dynamic-inherit.html spellcheck-contenteditable-attr-dynamic-inherit.html
+== spellcheck-contenteditable-property-dynamic.html spellcheck-contenteditable-property-dynamic.html
+== spellcheck-contenteditable-property-dynamic-inherit.html spellcheck-contenteditable-property-dynamic-inherit.html
+== spellcheck-contenteditable-attr-dynamic-override.html spellcheck-contenteditable-attr-dynamic-override.html
+== spellcheck-contenteditable-attr-dynamic-override-inherit.html spellcheck-contenteditable-attr-dynamic-override-inherit.html
+== spellcheck-contenteditable-property-dynamic-override.html spellcheck-contenteditable-property-dynamic-override.html
+== spellcheck-contenteditable-property-dynamic-override-inherit.html spellcheck-contenteditable-property-dynamic-override-inherit.html
+== 911201.html 911201.html
+needs-focus == 969773.html 969773.html
+fails fuzzy-if(skiaContent,1,220) == 997805.html 997805.html
+fails fuzzy-if(skiaContent,1,220) == 1088158.html 1088158.html
diff --git a/editor/reftests/reftest.list b/editor/reftests/reftest.list
new file mode 100644
index 000000000..5664f6dc4
--- /dev/null
+++ b/editor/reftests/reftest.list
@@ -0,0 +1,137 @@
+# include the XUL reftests
+include xul/reftest.list
+
+!= newline-1.html newline-ref.html
+== newline-2.html newline-ref.html
+== newline-3.html newline-ref.html
+== newline-4.html newline-ref.html
+== dynamic-1.html dynamic-ref.html
+== dynamic-type-1.html dynamic-ref.html
+== dynamic-type-2.html dynamic-ref.html
+== dynamic-type-3.html dynamic-ref.html
+== dynamic-type-4.html dynamic-ref.html
+== passwd-1.html passwd-ref.html
+!= passwd-2.html passwd-ref.html
+== passwd-3.html passwd-ref.html
+needs-focus == passwd-4.html passwd-ref.html
+== emptypasswd-1.html emptypasswd-ref.html
+== emptypasswd-2.html emptypasswd-ref.html
+== caret_on_positioned.html caret_on_positioned-ref.html
+fails-if(Android) needs-focus != spellcheck-input-disabled.html spellcheck-input-ref.html
+== spellcheck-input-attr-before.html spellcheck-input-nofocus-ref.html
+fails-if(Android) needs-focus != spellcheck-input-attr-before.html spellcheck-input-ref.html
+== spellcheck-input-attr-after.html spellcheck-input-nofocus-ref.html
+fails-if(Android) needs-focus != spellcheck-input-attr-after.html spellcheck-input-ref.html
+== spellcheck-input-attr-inherit.html spellcheck-input-nofocus-ref.html
+fails-if(Android) needs-focus != spellcheck-input-attr-inherit.html spellcheck-input-ref.html
+== spellcheck-input-attr-dynamic.html spellcheck-input-nofocus-ref.html
+fails-if(Android) needs-focus != spellcheck-input-attr-dynamic.html spellcheck-input-ref.html
+== spellcheck-input-attr-dynamic-inherit.html spellcheck-input-nofocus-ref.html
+fails-if(Android) needs-focus != spellcheck-input-attr-dynamic-inherit.html spellcheck-input-ref.html
+== spellcheck-input-property-dynamic.html spellcheck-input-nofocus-ref.html
+fails-if(Android) needs-focus != spellcheck-input-property-dynamic.html spellcheck-input-ref.html
+== spellcheck-input-property-dynamic-inherit.html spellcheck-input-nofocus-ref.html
+fails-if(Android) needs-focus != spellcheck-input-property-dynamic-inherit.html spellcheck-input-ref.html
+== spellcheck-input-attr-dynamic-override.html spellcheck-input-nofocus-ref.html
+fails-if(Android) needs-focus != spellcheck-input-attr-dynamic-override.html spellcheck-input-ref.html
+== spellcheck-input-attr-dynamic-override-inherit.html spellcheck-input-nofocus-ref.html
+fails-if(Android) needs-focus != spellcheck-input-attr-dynamic-override-inherit.html spellcheck-input-ref.html
+== spellcheck-input-property-dynamic-override.html spellcheck-input-nofocus-ref.html
+fails-if(Android) needs-focus != spellcheck-input-property-dynamic-override.html spellcheck-input-ref.html
+== spellcheck-input-property-dynamic-override-inherit.html spellcheck-input-nofocus-ref.html
+fails-if(Android) needs-focus != spellcheck-input-property-dynamic-override-inherit.html spellcheck-input-ref.html
+== spellcheck-textarea-attr.html spellcheck-textarea-nofocus-ref.html
+#the random-if(Android) tests pass on android native, but fail on android-xul, see bug 728942
+random-if(Android) needs-focus != spellcheck-textarea-attr.html spellcheck-textarea-ref.html
+needs-focus == spellcheck-textarea-focused.html spellcheck-textarea-ref.html
+needs-focus == spellcheck-textarea-focused-reframe.html spellcheck-textarea-ref.html
+needs-focus == spellcheck-textarea-focused-notreadonly.html spellcheck-textarea-ref2.html
+random-if(Android) needs-focus != spellcheck-textarea-nofocus.html spellcheck-textarea-ref.html
+random-if(Android) needs-focus != spellcheck-textarea-disabled.html spellcheck-textarea-ref.html
+random-if(Android) needs-focus != spellcheck-textarea-attr-inherit.html spellcheck-textarea-ref.html
+random-if(Android) needs-focus != spellcheck-textarea-attr-dynamic.html spellcheck-textarea-ref.html
+random-if(Android) needs-focus != spellcheck-textarea-attr-dynamic-inherit.html spellcheck-textarea-ref.html
+random-if(Android) needs-focus != spellcheck-textarea-property-dynamic.html spellcheck-textarea-ref.html
+random-if(Android) needs-focus != spellcheck-textarea-property-dynamic-inherit.html spellcheck-textarea-ref.html
+random-if(Android) needs-focus != spellcheck-textarea-attr-dynamic-override.html spellcheck-textarea-ref.html
+random-if(Android) needs-focus != spellcheck-textarea-attr-dynamic-override-inherit.html spellcheck-textarea-ref.html
+random-if(Android) needs-focus != spellcheck-textarea-property-dynamic-override.html spellcheck-textarea-ref.html
+random-if(Android) needs-focus != spellcheck-textarea-property-dynamic-override-inherit.html spellcheck-textarea-ref.html
+needs-focus == caret_on_focus.html caret_on_focus-ref.html
+needs-focus != caret_on_textarea_lastline.html caret_on_textarea_lastline-ref.html
+needs-focus == input-text-onfocus-reframe.html input-text-onfocus-reframe-ref.html
+needs-focus == input-text-notheme-onfocus-reframe.html input-text-notheme-onfocus-reframe-ref.html
+needs-focus == caret_after_reframe.html caret_after_reframe-ref.html
+== nobogusnode-1.html nobogusnode-ref.html
+== nobogusnode-2.html nobogusnode-ref.html
+== spellcheck-hyphen-valid.html spellcheck-hyphen-valid-ref.html
+fails-if(Android) needs-focus != spellcheck-hyphen-invalid.html spellcheck-hyphen-invalid-ref.html
+== spellcheck-slash-valid.html spellcheck-slash-valid-ref.html
+== spellcheck-period-valid.html spellcheck-period-valid-ref.html
+== spellcheck-space-valid.html spellcheck-space-valid-ref.html
+== spellcheck-comma-valid.html spellcheck-comma-valid-ref.html
+== spellcheck-hyphen-multiple-valid.html spellcheck-hyphen-multiple-valid-ref.html
+fails-if(Android) needs-focus != spellcheck-hyphen-multiple-invalid.html spellcheck-hyphen-multiple-invalid-ref.html
+== spellcheck-dotafterquote-valid.html spellcheck-dotafterquote-valid-ref.html
+== spellcheck-url-valid.html spellcheck-url-valid-ref.html
+needs-focus == spellcheck-non-latin-arabic.html spellcheck-non-latin-arabic-ref.html
+needs-focus == spellcheck-non-latin-chinese-simplified.html spellcheck-non-latin-chinese-simplified-ref.html
+needs-focus == spellcheck-non-latin-chinese-traditional.html spellcheck-non-latin-chinese-traditional-ref.html
+needs-focus == spellcheck-non-latin-hebrew.html spellcheck-non-latin-hebrew-ref.html
+needs-focus == spellcheck-non-latin-japanese.html spellcheck-non-latin-japanese-ref.html
+needs-focus == spellcheck-non-latin-korean.html spellcheck-non-latin-korean-ref.html
+== unneeded_scroll.html unneeded_scroll-ref.html
+== caret_on_presshell_reinit.html caret_on_presshell_reinit-ref.html
+fuzzy-if(browserIsRemote,255,3) asserts-if(browserIsRemote,0-1) == caret_on_presshell_reinit-2.html caret_on_presshell_reinit-ref.html
+fuzzy-if(asyncPan&&!layersGPUAccelerated,102,2824) == 642800.html 642800-ref.html
+== selection_visibility_after_reframe.html selection_visibility_after_reframe-ref.html
+!= selection_visibility_after_reframe-2.html selection_visibility_after_reframe-ref.html
+!= selection_visibility_after_reframe-3.html selection_visibility_after_reframe-ref.html
+== 672709.html 672709-ref.html
+== 338427-1.html 338427-1-ref.html
+skip-if(Android) needs-focus == 674212-spellcheck.html 674212-spellcheck-ref.html
+skip-if(Android) needs-focus == 338427-2.html 338427-2-ref.html
+skip-if(Android) needs-focus == 338427-3.html 338427-3-ref.html
+skip-if(Android) needs-focus == 462758-grabbers-resizers.html 462758-grabbers-resizers-ref.html
+== readwrite-non-editable.html readwrite-non-editable-ref.html
+== readwrite-editable.html readwrite-editable-ref.html
+== readonly-non-editable.html readonly-non-editable-ref.html
+== readonly-editable.html readonly-editable-ref.html
+== dynamic-overflow-change.html dynamic-overflow-change-ref.html
+== 694880-1.html 694880-ref.html
+== 694880-2.html 694880-ref.html
+== 694880-3.html 694880-ref.html
+== 388980-1.html 388980-1-ref.html
+needs-focus == spellcheck-superscript-1.html spellcheck-superscript-1-ref.html
+fails-if(Android) needs-focus != spellcheck-superscript-2.html spellcheck-superscript-2-ref.html # bug 783658
+fuzzy-if(skiaContent,1,3400) needs-focus pref(layout.accessiblecaret.enabled,false) pref(layout.accessiblecaret.enabled_on_touch,false) == 824080-1.html 824080-1-ref.html
+fuzzy-if(OSX,1,1) needs-focus pref(layout.accessiblecaret.enabled,false) pref(layout.accessiblecaret.enabled_on_touch,false) == 824080-2.html 824080-2-ref.html #Bug 1313253
+fuzzy-if(OSX,1,1) needs-focus pref(layout.accessiblecaret.enabled,false) pref(layout.accessiblecaret.enabled_on_touch,false) == 824080-3.html 824080-3-ref.html #Bug 1312951
+needs-focus != 824080-2.html 824080-3.html
+fuzzy-if(skiaContent,1,3200) needs-focus pref(layout.accessiblecaret.enabled,false) pref(layout.accessiblecaret.enabled_on_touch,false) == 824080-4.html 824080-4-ref.html
+fuzzy-if(skiaContent,2,1800) needs-focus pref(layout.accessiblecaret.enabled,false) pref(layout.accessiblecaret.enabled_on_touch,false) == 824080-5.html 824080-5-ref.html
+needs-focus != 824080-4.html 824080-5.html
+needs-focus == 824080-6.html 824080-6-ref.html
+needs-focus pref(layout.accessiblecaret.enabled,false) pref(layout.accessiblecaret.enabled_on_touch,false) == 824080-7.html 824080-7-ref.html
+needs-focus != 824080-6.html 824080-7.html
+# Bug 674927: copy spellcheck-textarea tests to contenteditable
+== spellcheck-contenteditable-attr.html spellcheck-contenteditable-nofocus-ref.html
+fails-if(Android) needs-focus != spellcheck-contenteditable-attr.html spellcheck-contenteditable-ref.html
+needs-focus == spellcheck-contenteditable-focused.html spellcheck-contenteditable-ref.html
+needs-focus == spellcheck-contenteditable-focused-reframe.html spellcheck-contenteditable-ref.html
+== spellcheck-contenteditable-nofocus.html spellcheck-contenteditable-disabled-ref.html
+== spellcheck-contenteditable-disabled.html spellcheck-contenteditable-disabled-ref.html
+== spellcheck-contenteditable-disabled-partial.html spellcheck-contenteditable-disabled-partial-ref.html
+== spellcheck-contenteditable-attr-inherit.html spellcheck-contenteditable-disabled-ref.html
+== spellcheck-contenteditable-attr-dynamic.html spellcheck-contenteditable-disabled-ref.html
+== spellcheck-contenteditable-attr-dynamic-inherit.html spellcheck-contenteditable-disabled-ref.html
+== spellcheck-contenteditable-property-dynamic.html spellcheck-contenteditable-disabled-ref.html
+== spellcheck-contenteditable-property-dynamic-inherit.html spellcheck-contenteditable-disabled-ref.html
+== spellcheck-contenteditable-attr-dynamic-override.html spellcheck-contenteditable-disabled-ref.html
+== spellcheck-contenteditable-attr-dynamic-override-inherit.html spellcheck-contenteditable-disabled-ref.html
+== spellcheck-contenteditable-property-dynamic-override.html spellcheck-contenteditable-disabled-ref.html
+== spellcheck-contenteditable-property-dynamic-override-inherit.html spellcheck-contenteditable-disabled-ref.html
+== 911201.html 911201-ref.html
+needs-focus == 969773.html 969773-ref.html
+fuzzy-if(skiaContent,1,220) == 997805.html 997805-ref.html
+fuzzy-if(skiaContent,1,220) == 1088158.html 1088158-ref.html
diff --git a/editor/reftests/selection_visibility_after_reframe-2.html b/editor/reftests/selection_visibility_after_reframe-2.html
new file mode 100644
index 000000000..fb705cc36
--- /dev/null
+++ b/editor/reftests/selection_visibility_after_reframe-2.html
@@ -0,0 +1,11 @@
+<!DOCTYPE html>
+<html>
+ <body>
+ <input value="foo">
+ <script>
+ var i = document.querySelector("input");
+ i.selectionStart = 1;
+ i.selectionEnd = 2;
+ </script>
+ </body>
+</html>
diff --git a/editor/reftests/selection_visibility_after_reframe-3.html b/editor/reftests/selection_visibility_after_reframe-3.html
new file mode 100644
index 000000000..b05f130a1
--- /dev/null
+++ b/editor/reftests/selection_visibility_after_reframe-3.html
@@ -0,0 +1,14 @@
+<!DOCTYPE html>
+<html>
+ <body>
+ <input value="foo">
+ <script>
+ var i = document.querySelector("input");
+ i.selectionStart = 1;
+ i.selectionEnd = 2;
+ i.style.display = "none";
+ document.body.clientHeight;
+ i.style.display = "";
+ </script>
+ </body>
+</html>
diff --git a/editor/reftests/selection_visibility_after_reframe-ref.html b/editor/reftests/selection_visibility_after_reframe-ref.html
new file mode 100644
index 000000000..c227b39c8
--- /dev/null
+++ b/editor/reftests/selection_visibility_after_reframe-ref.html
@@ -0,0 +1,6 @@
+<!DOCTYPE html>
+<html>
+ <body>
+ <input value="foo">
+ </body>
+</html>
diff --git a/editor/reftests/selection_visibility_after_reframe.html b/editor/reftests/selection_visibility_after_reframe.html
new file mode 100644
index 000000000..b72cec829
--- /dev/null
+++ b/editor/reftests/selection_visibility_after_reframe.html
@@ -0,0 +1,15 @@
+<!DOCTYPE html>
+<html>
+ <body>
+ <input value="foo">
+ <script>
+ var i = document.querySelector("input");
+ i.selectionStart = 1;
+ i.selectionEnd = 2;
+ document.body.clientHeight;
+ i.style.display = "none";
+ document.body.clientHeight;
+ i.style.display = "";
+ </script>
+ </body>
+</html>
diff --git a/editor/reftests/spellcheck-comma-valid-ref.html b/editor/reftests/spellcheck-comma-valid-ref.html
new file mode 100644
index 000000000..d5856e06f
--- /dev/null
+++ b/editor/reftests/spellcheck-comma-valid-ref.html
@@ -0,0 +1,6 @@
+<!DOCTYPE html>
+<html>
+ <body>
+ <textarea autofocus spellcheck="false">good,nice</textarea>
+ </body>
+</html>
diff --git a/editor/reftests/spellcheck-comma-valid.html b/editor/reftests/spellcheck-comma-valid.html
new file mode 100644
index 000000000..768cdbcf2
--- /dev/null
+++ b/editor/reftests/spellcheck-comma-valid.html
@@ -0,0 +1,6 @@
+<!DOCTYPE html>
+<html>
+ <body>
+ <textarea autofocus>good,nice</textarea>
+ </body>
+</html>
diff --git a/editor/reftests/spellcheck-contenteditable-attr-dynamic-inherit.html b/editor/reftests/spellcheck-contenteditable-attr-dynamic-inherit.html
new file mode 100644
index 000000000..aa4e47c2c
--- /dev/null
+++ b/editor/reftests/spellcheck-contenteditable-attr-dynamic-inherit.html
@@ -0,0 +1,11 @@
+<!DOCTYPE html>
+<html>
+<body onload="init()">
+ <div contenteditable>blahblahblah</div>
+ <script>
+ function init() {
+ document.body.setAttribute("spellcheck", "false");
+ }
+ </script>
+</body>
+</html>
diff --git a/editor/reftests/spellcheck-contenteditable-attr-dynamic-override-inherit.html b/editor/reftests/spellcheck-contenteditable-attr-dynamic-override-inherit.html
new file mode 100644
index 000000000..1b4a0ab3b
--- /dev/null
+++ b/editor/reftests/spellcheck-contenteditable-attr-dynamic-override-inherit.html
@@ -0,0 +1,11 @@
+<!DOCTYPE html>
+<html>
+<body onload="init()" spellcheck="true">
+ <div contenteditable>blahblahblah</div>
+ <script>
+ function init() {
+ document.body.setAttribute("spellcheck", "false");
+ }
+ </script>
+</body>
+</html>
diff --git a/editor/reftests/spellcheck-contenteditable-attr-dynamic-override.html b/editor/reftests/spellcheck-contenteditable-attr-dynamic-override.html
new file mode 100644
index 000000000..e3a4d9077
--- /dev/null
+++ b/editor/reftests/spellcheck-contenteditable-attr-dynamic-override.html
@@ -0,0 +1,11 @@
+<!DOCTYPE html>
+<html>
+<body onload="init()">
+ <div contenteditable spellcheck="true">blahblahblah</div>
+ <script>
+ function init() {
+ document.querySelector("div").setAttribute("spellcheck", "false");
+ }
+ </script>
+</body>
+</html>
diff --git a/editor/reftests/spellcheck-contenteditable-attr-dynamic.html b/editor/reftests/spellcheck-contenteditable-attr-dynamic.html
new file mode 100644
index 000000000..37ba9f651
--- /dev/null
+++ b/editor/reftests/spellcheck-contenteditable-attr-dynamic.html
@@ -0,0 +1,11 @@
+<!DOCTYPE html>
+<html>
+<body onload="init()">
+ <div contenteditable>blahblahblah</div>
+ <script>
+ function init() {
+ document.querySelector("div").setAttribute("spellcheck", "false");
+ }
+ </script>
+</body>
+</html>
diff --git a/editor/reftests/spellcheck-contenteditable-attr-inherit.html b/editor/reftests/spellcheck-contenteditable-attr-inherit.html
new file mode 100644
index 000000000..6cbfcb3da
--- /dev/null
+++ b/editor/reftests/spellcheck-contenteditable-attr-inherit.html
@@ -0,0 +1,6 @@
+<!DOCTYPE html>
+<html>
+<body>
+ <span spellcheck="false"><div contenteditable>blahblahblah</div></span>
+</body>
+</html>
diff --git a/editor/reftests/spellcheck-contenteditable-attr.html b/editor/reftests/spellcheck-contenteditable-attr.html
new file mode 100644
index 000000000..df119a997
--- /dev/null
+++ b/editor/reftests/spellcheck-contenteditable-attr.html
@@ -0,0 +1,6 @@
+<!DOCTYPE html>
+<html>
+<body>
+ <div contenteditable>blahblahblah</div>
+</body>
+</html>
diff --git a/editor/reftests/spellcheck-contenteditable-disabled-partial-ref.html b/editor/reftests/spellcheck-contenteditable-disabled-partial-ref.html
new file mode 100644
index 000000000..30fe7a6bf
--- /dev/null
+++ b/editor/reftests/spellcheck-contenteditable-disabled-partial-ref.html
@@ -0,0 +1,12 @@
+<!DOCTYPE html>
+<html>
+<body>
+ <span contenteditable>sakde</span> kreid <span contenteditable>slodv</span>
+ <script>
+ // Adding focus to the textbox should trigger a spellcheck
+ document.querySelector("span").focus();
+ document.querySelector("span + span").focus();
+ document.querySelector("span + span").blur();
+ </script>
+</body>
+</html>
diff --git a/editor/reftests/spellcheck-contenteditable-disabled-partial.html b/editor/reftests/spellcheck-contenteditable-disabled-partial.html
new file mode 100644
index 000000000..c7b6c427c
--- /dev/null
+++ b/editor/reftests/spellcheck-contenteditable-disabled-partial.html
@@ -0,0 +1,11 @@
+<!DOCTYPE html>
+<html>
+<body>
+ <div contenteditable>sakde <span spellcheck=false>kreid</span> slodv</div>
+ <script>
+ // Adding focus to the textbox should trigger a spellcheck
+ document.querySelector("div").focus();
+ document.querySelector("div").blur();
+ </script>
+</body>
+</html>
diff --git a/editor/reftests/spellcheck-contenteditable-disabled-ref.html b/editor/reftests/spellcheck-contenteditable-disabled-ref.html
new file mode 100644
index 000000000..23571fa5e
--- /dev/null
+++ b/editor/reftests/spellcheck-contenteditable-disabled-ref.html
@@ -0,0 +1,6 @@
+<!DOCTYPE html>
+<html>
+<body>
+ <div>blahblahblah</div>
+</body>
+</html>
diff --git a/editor/reftests/spellcheck-contenteditable-disabled.html b/editor/reftests/spellcheck-contenteditable-disabled.html
new file mode 100644
index 000000000..3794f5767
--- /dev/null
+++ b/editor/reftests/spellcheck-contenteditable-disabled.html
@@ -0,0 +1,11 @@
+<!DOCTYPE html>
+<html>
+<body>
+ <div contenteditable spellcheck="false">blahblahblah</div>
+ <script>
+ // Adding focus to the textbox should trigger a spellcheck
+ document.querySelector("div").focus();
+ document.querySelector("div").blur();
+ </script>
+</body>
+</html>
diff --git a/editor/reftests/spellcheck-contenteditable-focused-reframe.html b/editor/reftests/spellcheck-contenteditable-focused-reframe.html
new file mode 100644
index 000000000..733ee05bb
--- /dev/null
+++ b/editor/reftests/spellcheck-contenteditable-focused-reframe.html
@@ -0,0 +1,18 @@
+<!DOCTYPE html>
+<html>
+<body>
+
+ <div contenteditable id="testBox" onfocus="reframe(this);">blahblahblah</div>
+ <script type="text/javascript">
+ function reframe(textbox) {
+ textbox.style.display = "none";
+ textbox.style.display = "";
+ textbox.clientWidth;
+ }
+ //Adding focus to the textbox should trigger a spellcheck
+ document.getElementById("testBox").focus();
+ document.getElementById("testBox").blur();
+ </script>
+
+</body>
+</html>
diff --git a/editor/reftests/spellcheck-contenteditable-focused.html b/editor/reftests/spellcheck-contenteditable-focused.html
new file mode 100644
index 000000000..808667399
--- /dev/null
+++ b/editor/reftests/spellcheck-contenteditable-focused.html
@@ -0,0 +1,13 @@
+<!DOCTYPE html>
+<html>
+<body>
+
+ <div contenteditable id="testBox">blahblahblah</div>
+ <script type="text/javascript">
+ //Adding focus to the textbox should trigger a spellcheck
+ document.getElementById("testBox").focus();
+ document.getElementById("testBox").blur();
+ </script>
+
+</body>
+</html>
diff --git a/editor/reftests/spellcheck-contenteditable-nofocus-ref.html b/editor/reftests/spellcheck-contenteditable-nofocus-ref.html
new file mode 100644
index 000000000..67241fb7f
--- /dev/null
+++ b/editor/reftests/spellcheck-contenteditable-nofocus-ref.html
@@ -0,0 +1,6 @@
+<!DOCTYPE html>
+<html>
+<body>
+ <div contenteditable spellcheck="true">blahblahblah</div>
+</body>
+</html>
diff --git a/editor/reftests/spellcheck-contenteditable-nofocus.html b/editor/reftests/spellcheck-contenteditable-nofocus.html
new file mode 100644
index 000000000..7e88dc3e1
--- /dev/null
+++ b/editor/reftests/spellcheck-contenteditable-nofocus.html
@@ -0,0 +1,6 @@
+<!DOCTYPE html>
+<html>
+<body>
+ <div contenteditable>blahblahblah</div>
+</body>
+</html>
diff --git a/editor/reftests/spellcheck-contenteditable-property-dynamic-inherit.html b/editor/reftests/spellcheck-contenteditable-property-dynamic-inherit.html
new file mode 100644
index 000000000..feb623dbb
--- /dev/null
+++ b/editor/reftests/spellcheck-contenteditable-property-dynamic-inherit.html
@@ -0,0 +1,11 @@
+<!DOCTYPE html>
+<html>
+<body onload="init()">
+ <div contenteditable>blahblahblah</div>
+ <script>
+ function init() {
+ document.body.spellcheck = false;
+ }
+ </script>
+</body>
+</html>
diff --git a/editor/reftests/spellcheck-contenteditable-property-dynamic-override-inherit.html b/editor/reftests/spellcheck-contenteditable-property-dynamic-override-inherit.html
new file mode 100644
index 000000000..26c5a4223
--- /dev/null
+++ b/editor/reftests/spellcheck-contenteditable-property-dynamic-override-inherit.html
@@ -0,0 +1,11 @@
+<!DOCTYPE html>
+<html>
+<body onload="init()" spellcheck="true">
+ <div contenteditable>blahblahblah</div>
+ <script>
+ function init() {
+ document.body.spellcheck = false;
+ }
+ </script>
+</body>
+</html>
diff --git a/editor/reftests/spellcheck-contenteditable-property-dynamic-override.html b/editor/reftests/spellcheck-contenteditable-property-dynamic-override.html
new file mode 100644
index 000000000..dd16894b8
--- /dev/null
+++ b/editor/reftests/spellcheck-contenteditable-property-dynamic-override.html
@@ -0,0 +1,11 @@
+<!DOCTYPE html>
+<html>
+<body onload="init()">
+ <div contenteditable spellcheck="true">blahblahblah</div>
+ <script>
+ function init() {
+ document.querySelector("div").spellcheck = false;
+ }
+ </script>
+</body>
+</html>
diff --git a/editor/reftests/spellcheck-contenteditable-property-dynamic.html b/editor/reftests/spellcheck-contenteditable-property-dynamic.html
new file mode 100644
index 000000000..eaf2db29a
--- /dev/null
+++ b/editor/reftests/spellcheck-contenteditable-property-dynamic.html
@@ -0,0 +1,11 @@
+<!DOCTYPE html>
+<html>
+<body onload="init()">
+ <div contenteditable>blahblahblah</div>
+ <script>
+ function init() {
+ document.querySelector("div").spellcheck = false;
+ }
+ </script>
+</body>
+</html>
diff --git a/editor/reftests/spellcheck-contenteditable-ref.html b/editor/reftests/spellcheck-contenteditable-ref.html
new file mode 100644
index 000000000..d28dbcf96
--- /dev/null
+++ b/editor/reftests/spellcheck-contenteditable-ref.html
@@ -0,0 +1,11 @@
+<!DOCTYPE html>
+<html>
+<body>
+ <div contenteditable spellcheck="true">blahblahblah</div>
+ <script type="text/javascript">
+ var box = document.getElementsByTagName("div")[0];
+ box.focus(); //Bring the textbox into focus, triggering a spellcheck
+ box.blur(); //Blur in order to make things similar to other tests otherwise
+ </script>
+</body>
+</html>
diff --git a/editor/reftests/spellcheck-dotafterquote-valid-ref.html b/editor/reftests/spellcheck-dotafterquote-valid-ref.html
new file mode 100644
index 000000000..b61904400
--- /dev/null
+++ b/editor/reftests/spellcheck-dotafterquote-valid-ref.html
@@ -0,0 +1,6 @@
+<!DOCTYPE html>
+<html>
+ <body>
+ <textarea autofocus spellcheck="false">'Apple'.</textarea>
+ </body>
+</html>
diff --git a/editor/reftests/spellcheck-dotafterquote-valid.html b/editor/reftests/spellcheck-dotafterquote-valid.html
new file mode 100644
index 000000000..1d3a605bb
--- /dev/null
+++ b/editor/reftests/spellcheck-dotafterquote-valid.html
@@ -0,0 +1,6 @@
+<!DOCTYPE html>
+<html>
+ <body>
+ <textarea autofocus>'Apple'.</textarea>
+ </body>
+</html>
diff --git a/editor/reftests/spellcheck-hyphen-invalid-ref.html b/editor/reftests/spellcheck-hyphen-invalid-ref.html
new file mode 100644
index 000000000..856fd840e
--- /dev/null
+++ b/editor/reftests/spellcheck-hyphen-invalid-ref.html
@@ -0,0 +1,6 @@
+<!DOCTYPE html>
+<html>
+ <body>
+ <textarea autofocus spellcheck="false">dddf-gggy</textarea>
+ </body>
+</html>
diff --git a/editor/reftests/spellcheck-hyphen-invalid.html b/editor/reftests/spellcheck-hyphen-invalid.html
new file mode 100644
index 000000000..bc4e4e240
--- /dev/null
+++ b/editor/reftests/spellcheck-hyphen-invalid.html
@@ -0,0 +1,6 @@
+<!DOCTYPE html>
+<html>
+ <body>
+ <textarea autofocus>dddf-gggy</textarea>
+ </body>
+</html>
diff --git a/editor/reftests/spellcheck-hyphen-multiple-invalid-ref.html b/editor/reftests/spellcheck-hyphen-multiple-invalid-ref.html
new file mode 100644
index 000000000..ab4cbd05a
--- /dev/null
+++ b/editor/reftests/spellcheck-hyphen-multiple-invalid-ref.html
@@ -0,0 +1,6 @@
+<!DOCTYPE html>
+<html>
+ <body>
+ <textarea style="width: 400px; height: 200px;" autofocus spellcheck="false">-hlloe hlloe- --hlloe --hlloe ---hlloe hlloe--- ---hlloe----</textarea>
+ </body>
+</html>
diff --git a/editor/reftests/spellcheck-hyphen-multiple-invalid.html b/editor/reftests/spellcheck-hyphen-multiple-invalid.html
new file mode 100644
index 000000000..bcc3f7113
--- /dev/null
+++ b/editor/reftests/spellcheck-hyphen-multiple-invalid.html
@@ -0,0 +1,6 @@
+<!DOCTYPE html>
+<html>
+ <body>
+ <textarea style="width: 400px; height: 200px;" autofocus>-hlloe hlloe- --hlloe --hlloe ---hlloe hlloe--- ---hlloe----</textarea>
+ </body>
+</html>
diff --git a/editor/reftests/spellcheck-hyphen-multiple-valid-ref.html b/editor/reftests/spellcheck-hyphen-multiple-valid-ref.html
new file mode 100644
index 000000000..324a566c4
--- /dev/null
+++ b/editor/reftests/spellcheck-hyphen-multiple-valid-ref.html
@@ -0,0 +1,6 @@
+<!DOCTYPE html>
+<html>
+ <body>
+ <textarea style="width: 400px; height: 200px;" autofocus spellcheck="false">- -- --- -hello hello- --hello --hello ---hello hello--- ---hello----</textarea>
+ </body>
+</html>
diff --git a/editor/reftests/spellcheck-hyphen-multiple-valid.html b/editor/reftests/spellcheck-hyphen-multiple-valid.html
new file mode 100644
index 000000000..7f0ce681c
--- /dev/null
+++ b/editor/reftests/spellcheck-hyphen-multiple-valid.html
@@ -0,0 +1,6 @@
+<!DOCTYPE html>
+<html>
+ <body>
+ <textarea style="width: 400px; height: 200px;" autofocus>- -- --- -hello hello- --hello --hello ---hello hello--- ---hello----</textarea>
+ </body>
+</html>
diff --git a/editor/reftests/spellcheck-hyphen-valid-ref.html b/editor/reftests/spellcheck-hyphen-valid-ref.html
new file mode 100644
index 000000000..73b507a3d
--- /dev/null
+++ b/editor/reftests/spellcheck-hyphen-valid-ref.html
@@ -0,0 +1,6 @@
+<!DOCTYPE html>
+<html>
+ <body>
+ <textarea autofocus spellcheck="false">scot-free</textarea>
+ </body>
+</html>
diff --git a/editor/reftests/spellcheck-hyphen-valid.html b/editor/reftests/spellcheck-hyphen-valid.html
new file mode 100644
index 000000000..2b56a6e24
--- /dev/null
+++ b/editor/reftests/spellcheck-hyphen-valid.html
@@ -0,0 +1,6 @@
+<!DOCTYPE html>
+<html>
+ <body>
+ <textarea autofocus>scot-free</textarea>
+ </body>
+</html>
diff --git a/editor/reftests/spellcheck-input-attr-after.html b/editor/reftests/spellcheck-input-attr-after.html
new file mode 100644
index 000000000..1e878b5d1
--- /dev/null
+++ b/editor/reftests/spellcheck-input-attr-after.html
@@ -0,0 +1,6 @@
+<!DOCTYPE html>
+<html>
+<body>
+ <input type="text" value="blahblahblah" spellcheck="true">
+</body>
+</html>
diff --git a/editor/reftests/spellcheck-input-attr-before.html b/editor/reftests/spellcheck-input-attr-before.html
new file mode 100644
index 000000000..8456e6c8c
--- /dev/null
+++ b/editor/reftests/spellcheck-input-attr-before.html
@@ -0,0 +1,6 @@
+<!DOCTYPE html>
+<html>
+<body>
+ <input type="text" spellcheck="true" value="blahblahblah">
+</body>
+</html>
diff --git a/editor/reftests/spellcheck-input-attr-dynamic-inherit.html b/editor/reftests/spellcheck-input-attr-dynamic-inherit.html
new file mode 100644
index 000000000..c87be7c3e
--- /dev/null
+++ b/editor/reftests/spellcheck-input-attr-dynamic-inherit.html
@@ -0,0 +1,11 @@
+<!DOCTYPE html>
+<html>
+<body onload="init()">
+ <input class="spell-checked" type="text" value="blahblahblah">
+ <script>
+ function init() {
+ document.body.setAttribute("spellcheck", "true");
+ }
+ </script>
+</body>
+</html>
diff --git a/editor/reftests/spellcheck-input-attr-dynamic-override-inherit.html b/editor/reftests/spellcheck-input-attr-dynamic-override-inherit.html
new file mode 100644
index 000000000..d7d12b78d
--- /dev/null
+++ b/editor/reftests/spellcheck-input-attr-dynamic-override-inherit.html
@@ -0,0 +1,11 @@
+<!DOCTYPE html>
+<html>
+<body onload="init()" spellcheck="false">
+ <input class="spell-checked" type="text" value="blahblahblah">
+ <script>
+ function init() {
+ document.body.setAttribute("spellcheck", "true");
+ }
+ </script>
+</body>
+</html>
diff --git a/editor/reftests/spellcheck-input-attr-dynamic-override.html b/editor/reftests/spellcheck-input-attr-dynamic-override.html
new file mode 100644
index 000000000..0f6095bd0
--- /dev/null
+++ b/editor/reftests/spellcheck-input-attr-dynamic-override.html
@@ -0,0 +1,11 @@
+<!DOCTYPE html>
+<html>
+<body onload="init()">
+ <input class="spell-checked" type="text" spellcheck="false" value="blahblahblah">
+ <script>
+ function init() {
+ document.querySelector("input").setAttribute("spellcheck", "true");
+ }
+ </script>
+</body>
+</html>
diff --git a/editor/reftests/spellcheck-input-attr-dynamic.html b/editor/reftests/spellcheck-input-attr-dynamic.html
new file mode 100644
index 000000000..27c8281fa
--- /dev/null
+++ b/editor/reftests/spellcheck-input-attr-dynamic.html
@@ -0,0 +1,11 @@
+<!DOCTYPE html>
+<html>
+<body onload="init()">
+ <input class="spell-checked" type="text" value="blahblahblah">
+ <script>
+ function init() {
+ document.querySelector("input").setAttribute("spellcheck", "true");
+ }
+ </script>
+</body>
+</html>
diff --git a/editor/reftests/spellcheck-input-attr-inherit.html b/editor/reftests/spellcheck-input-attr-inherit.html
new file mode 100644
index 000000000..c851bd189
--- /dev/null
+++ b/editor/reftests/spellcheck-input-attr-inherit.html
@@ -0,0 +1,6 @@
+<!DOCTYPE html>
+<html>
+<body>
+ <span spellcheck="true"><input class="spell-checked" type="text" value="blahblahblah"></span>
+</body>
+</html>
diff --git a/editor/reftests/spellcheck-input-disabled.html b/editor/reftests/spellcheck-input-disabled.html
new file mode 100644
index 000000000..f3b2f2ba9
--- /dev/null
+++ b/editor/reftests/spellcheck-input-disabled.html
@@ -0,0 +1,6 @@
+<!DOCTYPE html>
+<html>
+<body>
+ <input type="text" value="blahblahblah">
+</body>
+</html>
diff --git a/editor/reftests/spellcheck-input-nofocus-ref.html b/editor/reftests/spellcheck-input-nofocus-ref.html
new file mode 100644
index 000000000..1e878b5d1
--- /dev/null
+++ b/editor/reftests/spellcheck-input-nofocus-ref.html
@@ -0,0 +1,6 @@
+<!DOCTYPE html>
+<html>
+<body>
+ <input type="text" value="blahblahblah" spellcheck="true">
+</body>
+</html>
diff --git a/editor/reftests/spellcheck-input-property-dynamic-inherit.html b/editor/reftests/spellcheck-input-property-dynamic-inherit.html
new file mode 100644
index 000000000..1cf839bae
--- /dev/null
+++ b/editor/reftests/spellcheck-input-property-dynamic-inherit.html
@@ -0,0 +1,11 @@
+<!DOCTYPE html>
+<html>
+<body onload="init()">
+ <input class="spell-checked" type="text" value="blahblahblah">
+ <script>
+ function init() {
+ document.body.spellcheck = true;
+ }
+ </script>
+</body>
+</html>
diff --git a/editor/reftests/spellcheck-input-property-dynamic-override-inherit.html b/editor/reftests/spellcheck-input-property-dynamic-override-inherit.html
new file mode 100644
index 000000000..eb380dc96
--- /dev/null
+++ b/editor/reftests/spellcheck-input-property-dynamic-override-inherit.html
@@ -0,0 +1,11 @@
+<!DOCTYPE html>
+<html>
+<body onload="init()" spellcheck="false">
+ <input class="spell-checked" type="text" value="blahblahblah">
+ <script>
+ function init() {
+ document.body.spellcheck = true;
+ }
+ </script>
+</body>
+</html>
diff --git a/editor/reftests/spellcheck-input-property-dynamic-override.html b/editor/reftests/spellcheck-input-property-dynamic-override.html
new file mode 100644
index 000000000..fad2fb3ed
--- /dev/null
+++ b/editor/reftests/spellcheck-input-property-dynamic-override.html
@@ -0,0 +1,11 @@
+<!DOCTYPE html>
+<html>
+<body onload="init()">
+ <input class="spell-checked" type="text" spellcheck="false" value="blahblahblah">
+ <script>
+ function init() {
+ document.querySelector("input").spellcheck = true;
+ }
+ </script>
+</body>
+</html>
diff --git a/editor/reftests/spellcheck-input-property-dynamic.html b/editor/reftests/spellcheck-input-property-dynamic.html
new file mode 100644
index 000000000..dd59ec6ea
--- /dev/null
+++ b/editor/reftests/spellcheck-input-property-dynamic.html
@@ -0,0 +1,11 @@
+<!DOCTYPE html>
+<html>
+<body onload="init()">
+ <input class="spell-checked" type="text" value="blahblahblah">
+ <script>
+ function init() {
+ document.querySelector("input").spellcheck = true;
+ }
+ </script>
+</body>
+</html>
diff --git a/editor/reftests/spellcheck-input-ref.html b/editor/reftests/spellcheck-input-ref.html
new file mode 100644
index 000000000..8dde5e6f1
--- /dev/null
+++ b/editor/reftests/spellcheck-input-ref.html
@@ -0,0 +1,11 @@
+<!DOCTYPE html>
+<html>
+<body>
+ <input type="text" value="blahblahblah" spellcheck="true">
+ <script>
+ var i = document.getElementsByTagName("input")[0];
+ i.focus(); // init the editor
+ i.blur(); // we actually don't need the focus
+ </script>
+</body>
+</html>
diff --git a/editor/reftests/spellcheck-non-latin-arabic-ref.html b/editor/reftests/spellcheck-non-latin-arabic-ref.html
new file mode 100644
index 000000000..67850b46c
--- /dev/null
+++ b/editor/reftests/spellcheck-non-latin-arabic-ref.html
@@ -0,0 +1,9 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <meta charset="utf-8">
+ </head>
+ <body>
+ <textarea autofocus spellcheck="false">سلام</textarea>
+ </body>
+</html>
diff --git a/editor/reftests/spellcheck-non-latin-arabic.html b/editor/reftests/spellcheck-non-latin-arabic.html
new file mode 100644
index 000000000..fbbe19388
--- /dev/null
+++ b/editor/reftests/spellcheck-non-latin-arabic.html
@@ -0,0 +1,9 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <meta charset="utf-8">
+ </head>
+ <body>
+ <textarea autofocus>سلام</textarea>
+ </body>
+</html>
diff --git a/editor/reftests/spellcheck-non-latin-chinese-simplified-ref.html b/editor/reftests/spellcheck-non-latin-chinese-simplified-ref.html
new file mode 100644
index 000000000..83ad79c26
--- /dev/null
+++ b/editor/reftests/spellcheck-non-latin-chinese-simplified-ref.html
@@ -0,0 +1,9 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <meta charset="utf-8">
+ </head>
+ <body>
+ <textarea autofocus spellcheck="false">你好</textarea>
+ </body>
+</html>
diff --git a/editor/reftests/spellcheck-non-latin-chinese-simplified.html b/editor/reftests/spellcheck-non-latin-chinese-simplified.html
new file mode 100644
index 000000000..8db16489a
--- /dev/null
+++ b/editor/reftests/spellcheck-non-latin-chinese-simplified.html
@@ -0,0 +1,9 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <meta charset="utf-8">
+ </head>
+ <body>
+ <textarea autofocus>你好</textarea>
+ </body>
+</html>
diff --git a/editor/reftests/spellcheck-non-latin-chinese-traditional-ref.html b/editor/reftests/spellcheck-non-latin-chinese-traditional-ref.html
new file mode 100644
index 000000000..83ad79c26
--- /dev/null
+++ b/editor/reftests/spellcheck-non-latin-chinese-traditional-ref.html
@@ -0,0 +1,9 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <meta charset="utf-8">
+ </head>
+ <body>
+ <textarea autofocus spellcheck="false">你好</textarea>
+ </body>
+</html>
diff --git a/editor/reftests/spellcheck-non-latin-chinese-traditional.html b/editor/reftests/spellcheck-non-latin-chinese-traditional.html
new file mode 100644
index 000000000..8db16489a
--- /dev/null
+++ b/editor/reftests/spellcheck-non-latin-chinese-traditional.html
@@ -0,0 +1,9 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <meta charset="utf-8">
+ </head>
+ <body>
+ <textarea autofocus>你好</textarea>
+ </body>
+</html>
diff --git a/editor/reftests/spellcheck-non-latin-hebrew-ref.html b/editor/reftests/spellcheck-non-latin-hebrew-ref.html
new file mode 100644
index 000000000..e2bd7c6d2
--- /dev/null
+++ b/editor/reftests/spellcheck-non-latin-hebrew-ref.html
@@ -0,0 +1,9 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <meta charset="utf-8">
+ </head>
+ <body>
+ <textarea autofocus spellcheck="false">שלום</textarea>
+ </body>
+</html>
diff --git a/editor/reftests/spellcheck-non-latin-hebrew.html b/editor/reftests/spellcheck-non-latin-hebrew.html
new file mode 100644
index 000000000..9372c4e9a
--- /dev/null
+++ b/editor/reftests/spellcheck-non-latin-hebrew.html
@@ -0,0 +1,9 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <meta charset="utf-8">
+ </head>
+ <body>
+ <textarea autofocus>שלום</textarea>
+ </body>
+</html>
diff --git a/editor/reftests/spellcheck-non-latin-japanese-ref.html b/editor/reftests/spellcheck-non-latin-japanese-ref.html
new file mode 100644
index 000000000..a978cd3ce
--- /dev/null
+++ b/editor/reftests/spellcheck-non-latin-japanese-ref.html
@@ -0,0 +1,9 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <meta charset="utf-8">
+ </head>
+ <body>
+ <textarea autofocus spellcheck="false">こんにちは</textarea>
+ </body>
+</html>
diff --git a/editor/reftests/spellcheck-non-latin-japanese.html b/editor/reftests/spellcheck-non-latin-japanese.html
new file mode 100644
index 000000000..d79bb0e5e
--- /dev/null
+++ b/editor/reftests/spellcheck-non-latin-japanese.html
@@ -0,0 +1,9 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <meta charset="utf-8">
+ </head>
+ <body>
+ <textarea autofocus>こんにちは</textarea>
+ </body>
+</html>
diff --git a/editor/reftests/spellcheck-non-latin-korean-ref.html b/editor/reftests/spellcheck-non-latin-korean-ref.html
new file mode 100644
index 000000000..53d1909f3
--- /dev/null
+++ b/editor/reftests/spellcheck-non-latin-korean-ref.html
@@ -0,0 +1,9 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <meta charset="utf-8">
+ </head>
+ <body>
+ <textarea autofocus spellcheck="false">안녕하세요</textarea>
+ </body>
+</html>
diff --git a/editor/reftests/spellcheck-non-latin-korean.html b/editor/reftests/spellcheck-non-latin-korean.html
new file mode 100644
index 000000000..f0f65e82e
--- /dev/null
+++ b/editor/reftests/spellcheck-non-latin-korean.html
@@ -0,0 +1,9 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <meta charset="utf-8">
+ </head>
+ <body>
+ <textarea autofocus>안녕하세요</textarea>
+ </body>
+</html>
diff --git a/editor/reftests/spellcheck-period-valid-ref.html b/editor/reftests/spellcheck-period-valid-ref.html
new file mode 100644
index 000000000..5ee87992b
--- /dev/null
+++ b/editor/reftests/spellcheck-period-valid-ref.html
@@ -0,0 +1,6 @@
+<!DOCTYPE html>
+<html>
+ <body>
+ <textarea autofocus spellcheck="false">good.nice</textarea>
+ </body>
+</html>
diff --git a/editor/reftests/spellcheck-period-valid.html b/editor/reftests/spellcheck-period-valid.html
new file mode 100644
index 000000000..aaa5aa468
--- /dev/null
+++ b/editor/reftests/spellcheck-period-valid.html
@@ -0,0 +1,6 @@
+<!DOCTYPE html>
+<html>
+ <body>
+ <textarea autofocus>good.nice</textarea>
+ </body>
+</html>
diff --git a/editor/reftests/spellcheck-slash-valid-ref.html b/editor/reftests/spellcheck-slash-valid-ref.html
new file mode 100644
index 000000000..fddc03252
--- /dev/null
+++ b/editor/reftests/spellcheck-slash-valid-ref.html
@@ -0,0 +1,6 @@
+<!DOCTYPE html>
+<html>
+ <body>
+ <textarea autofocus spellcheck="false">good/nice</textarea>
+ </body>
+</html>
diff --git a/editor/reftests/spellcheck-slash-valid.html b/editor/reftests/spellcheck-slash-valid.html
new file mode 100644
index 000000000..37e8d1bf4
--- /dev/null
+++ b/editor/reftests/spellcheck-slash-valid.html
@@ -0,0 +1,6 @@
+<!DOCTYPE html>
+<html>
+ <body>
+ <textarea autofocus>good/nice</textarea>
+ </body>
+</html>
diff --git a/editor/reftests/spellcheck-space-valid-ref.html b/editor/reftests/spellcheck-space-valid-ref.html
new file mode 100644
index 000000000..9fea33e96
--- /dev/null
+++ b/editor/reftests/spellcheck-space-valid-ref.html
@@ -0,0 +1,6 @@
+<!DOCTYPE html>
+<html>
+ <body>
+ <textarea autofocus spellcheck="false">good nice</textarea>
+ </body>
+</html>
diff --git a/editor/reftests/spellcheck-space-valid.html b/editor/reftests/spellcheck-space-valid.html
new file mode 100644
index 000000000..575426d47
--- /dev/null
+++ b/editor/reftests/spellcheck-space-valid.html
@@ -0,0 +1,6 @@
+<!DOCTYPE html>
+<html>
+ <body>
+ <textarea autofocus>good nice</textarea>
+ </body>
+</html>
diff --git a/editor/reftests/spellcheck-superscript-1-ref.html b/editor/reftests/spellcheck-superscript-1-ref.html
new file mode 100644
index 000000000..35df20d70
--- /dev/null
+++ b/editor/reftests/spellcheck-superscript-1-ref.html
@@ -0,0 +1,3 @@
+<!doctype html>
+<textarea spellcheck=false>&sup1; &sup2; &sup3;</textarea>
+<script>document.body.firstChild.focus()</script>
diff --git a/editor/reftests/spellcheck-superscript-1.html b/editor/reftests/spellcheck-superscript-1.html
new file mode 100644
index 000000000..b7b317295
--- /dev/null
+++ b/editor/reftests/spellcheck-superscript-1.html
@@ -0,0 +1,3 @@
+<!doctype html>
+<textarea>&sup1; &sup2; &sup3;</textarea>
+<script>document.body.firstChild.focus()</script>
diff --git a/editor/reftests/spellcheck-superscript-2-ref.html b/editor/reftests/spellcheck-superscript-2-ref.html
new file mode 100644
index 000000000..19276bd71
--- /dev/null
+++ b/editor/reftests/spellcheck-superscript-2-ref.html
@@ -0,0 +1,3 @@
+<!doctype html>
+<textarea>&sup1; &sup2; &sup3; mispeled</textarea>
+<script>document.body.firstChild.focus()</script>
diff --git a/editor/reftests/spellcheck-superscript-2.html b/editor/reftests/spellcheck-superscript-2.html
new file mode 100644
index 000000000..350d2bc8c
--- /dev/null
+++ b/editor/reftests/spellcheck-superscript-2.html
@@ -0,0 +1,3 @@
+<!doctype html>
+<textarea spellcheck=false>&sup1; &sup2; &sup3; mispeled</textarea>
+<script>document.body.firstChild.focus()</script>
diff --git a/editor/reftests/spellcheck-textarea-attr-dynamic-inherit.html b/editor/reftests/spellcheck-textarea-attr-dynamic-inherit.html
new file mode 100644
index 000000000..a4a938494
--- /dev/null
+++ b/editor/reftests/spellcheck-textarea-attr-dynamic-inherit.html
@@ -0,0 +1,11 @@
+<!DOCTYPE html>
+<html>
+<body onload="init()">
+ <textarea>blahblahblah</textarea>
+ <script>
+ function init() {
+ document.body.setAttribute("spellcheck", "false");
+ }
+ </script>
+</body>
+</html>
diff --git a/editor/reftests/spellcheck-textarea-attr-dynamic-override-inherit.html b/editor/reftests/spellcheck-textarea-attr-dynamic-override-inherit.html
new file mode 100644
index 000000000..a6ae716b5
--- /dev/null
+++ b/editor/reftests/spellcheck-textarea-attr-dynamic-override-inherit.html
@@ -0,0 +1,11 @@
+<!DOCTYPE html>
+<html>
+<body onload="init()" spellcheck="true">
+ <textarea>blahblahblah</textarea>
+ <script>
+ function init() {
+ document.body.setAttribute("spellcheck", "false");
+ }
+ </script>
+</body>
+</html>
diff --git a/editor/reftests/spellcheck-textarea-attr-dynamic-override.html b/editor/reftests/spellcheck-textarea-attr-dynamic-override.html
new file mode 100644
index 000000000..96e956608
--- /dev/null
+++ b/editor/reftests/spellcheck-textarea-attr-dynamic-override.html
@@ -0,0 +1,11 @@
+<!DOCTYPE html>
+<html>
+<body onload="init()">
+ <textarea spellcheck="true">blahblahblah</textarea>
+ <script>
+ function init() {
+ document.querySelector("textarea").setAttribute("spellcheck", "false");
+ }
+ </script>
+</body>
+</html>
diff --git a/editor/reftests/spellcheck-textarea-attr-dynamic.html b/editor/reftests/spellcheck-textarea-attr-dynamic.html
new file mode 100644
index 000000000..745e66c7c
--- /dev/null
+++ b/editor/reftests/spellcheck-textarea-attr-dynamic.html
@@ -0,0 +1,11 @@
+<!DOCTYPE html>
+<html>
+<body onload="init()">
+ <textarea>blahblahblah</textarea>
+ <script>
+ function init() {
+ document.querySelector("textarea").setAttribute("spellcheck", "false");
+ }
+ </script>
+</body>
+</html>
diff --git a/editor/reftests/spellcheck-textarea-attr-inherit.html b/editor/reftests/spellcheck-textarea-attr-inherit.html
new file mode 100644
index 000000000..c261fec5a
--- /dev/null
+++ b/editor/reftests/spellcheck-textarea-attr-inherit.html
@@ -0,0 +1,6 @@
+<!DOCTYPE html>
+<html>
+<body>
+ <span spellcheck="false"><textarea>blahblahblah</textarea></span>
+</body>
+</html>
diff --git a/editor/reftests/spellcheck-textarea-attr.html b/editor/reftests/spellcheck-textarea-attr.html
new file mode 100644
index 000000000..223f948dc
--- /dev/null
+++ b/editor/reftests/spellcheck-textarea-attr.html
@@ -0,0 +1,6 @@
+<!DOCTYPE html>
+<html>
+<body>
+ <textarea>blahblahblah</textarea>
+</body>
+</html>
diff --git a/editor/reftests/spellcheck-textarea-disabled.html b/editor/reftests/spellcheck-textarea-disabled.html
new file mode 100644
index 000000000..cfaf3ed53
--- /dev/null
+++ b/editor/reftests/spellcheck-textarea-disabled.html
@@ -0,0 +1,6 @@
+<!DOCTYPE html>
+<html>
+<body>
+ <textarea spellcheck="false">blahblahblah</textarea>
+</body>
+</html>
diff --git a/editor/reftests/spellcheck-textarea-focused-notreadonly.html b/editor/reftests/spellcheck-textarea-focused-notreadonly.html
new file mode 100644
index 000000000..475ae6002
--- /dev/null
+++ b/editor/reftests/spellcheck-textarea-focused-notreadonly.html
@@ -0,0 +1,19 @@
+<!DOCTYPE html>
+<html>
+<body>
+
+ <textarea id="testBox" style="padding:2px;" readonly></textarea>
+ <script type="text/javascript">
+ //Adding focus to the textbox should trigger a spellcheck
+ var textbox = document.getElementById("testBox");
+ addEventListener("load", function() {
+ textbox.readOnly = false;
+ textbox.focus();
+ textbox.value = "blahblahblah";
+ textbox.selectionStart = textbox.selectionEnd = 0;
+ textbox.blur();
+ }, false);
+ </script>
+
+</body>
+</html>
diff --git a/editor/reftests/spellcheck-textarea-focused-reframe.html b/editor/reftests/spellcheck-textarea-focused-reframe.html
new file mode 100644
index 000000000..6e6f871dd
--- /dev/null
+++ b/editor/reftests/spellcheck-textarea-focused-reframe.html
@@ -0,0 +1,18 @@
+<!DOCTYPE html>
+<html>
+<body>
+
+ <textarea id="testBox" onfocus="reframe(this);">blahblahblah</textarea>
+ <script type="text/javascript">
+ function reframe(textbox) {
+ textbox.style.display = "none";
+ textbox.style.display = "";
+ textbox.clientWidth;
+ }
+ //Adding focus to the textbox should trigger a spellcheck
+ document.getElementById("testBox").focus();
+ document.getElementById("testBox").blur();
+ </script>
+
+</body>
+</html>
diff --git a/editor/reftests/spellcheck-textarea-focused.html b/editor/reftests/spellcheck-textarea-focused.html
new file mode 100644
index 000000000..04d689cc1
--- /dev/null
+++ b/editor/reftests/spellcheck-textarea-focused.html
@@ -0,0 +1,13 @@
+<!DOCTYPE html>
+<html>
+<body>
+
+ <textarea id="testBox">blahblahblah</textarea>
+ <script type="text/javascript">
+ //Adding focus to the textbox should trigger a spellcheck
+ document.getElementById("testBox").focus();
+ document.getElementById("testBox").blur();
+ </script>
+
+</body>
+</html>
diff --git a/editor/reftests/spellcheck-textarea-nofocus-ref.html b/editor/reftests/spellcheck-textarea-nofocus-ref.html
new file mode 100644
index 000000000..8d993983e
--- /dev/null
+++ b/editor/reftests/spellcheck-textarea-nofocus-ref.html
@@ -0,0 +1,6 @@
+<!DOCTYPE html>
+<html>
+<body>
+ <textarea spellcheck="true">blahblahblah</textarea>
+</body>
+</html>
diff --git a/editor/reftests/spellcheck-textarea-nofocus.html b/editor/reftests/spellcheck-textarea-nofocus.html
new file mode 100644
index 000000000..a1ce1a0a9
--- /dev/null
+++ b/editor/reftests/spellcheck-textarea-nofocus.html
@@ -0,0 +1,6 @@
+<!DOCTYPE html>
+<html>
+<body>
+ <textarea>blahblahblah</textarea>
+</body>
+</html> \ No newline at end of file
diff --git a/editor/reftests/spellcheck-textarea-property-dynamic-inherit.html b/editor/reftests/spellcheck-textarea-property-dynamic-inherit.html
new file mode 100644
index 000000000..125f578bf
--- /dev/null
+++ b/editor/reftests/spellcheck-textarea-property-dynamic-inherit.html
@@ -0,0 +1,11 @@
+<!DOCTYPE html>
+<html>
+<body onload="init()">
+ <textarea>blahblahblah</textarea>
+ <script>
+ function init() {
+ document.body.spellcheck = false;
+ }
+ </script>
+</body>
+</html>
diff --git a/editor/reftests/spellcheck-textarea-property-dynamic-override-inherit.html b/editor/reftests/spellcheck-textarea-property-dynamic-override-inherit.html
new file mode 100644
index 000000000..0e773646e
--- /dev/null
+++ b/editor/reftests/spellcheck-textarea-property-dynamic-override-inherit.html
@@ -0,0 +1,11 @@
+<!DOCTYPE html>
+<html>
+<body onload="init()" spellcheck="true">
+ <textarea>blahblahblah</textarea>
+ <script>
+ function init() {
+ document.body.spellcheck = false;
+ }
+ </script>
+</body>
+</html>
diff --git a/editor/reftests/spellcheck-textarea-property-dynamic-override.html b/editor/reftests/spellcheck-textarea-property-dynamic-override.html
new file mode 100644
index 000000000..f929d3bec
--- /dev/null
+++ b/editor/reftests/spellcheck-textarea-property-dynamic-override.html
@@ -0,0 +1,11 @@
+<!DOCTYPE html>
+<html>
+<body onload="init()">
+ <textarea spellcheck="true">blahblahblah</textarea>
+ <script>
+ function init() {
+ document.querySelector("textarea").spellcheck = false;
+ }
+ </script>
+</body>
+</html>
diff --git a/editor/reftests/spellcheck-textarea-property-dynamic.html b/editor/reftests/spellcheck-textarea-property-dynamic.html
new file mode 100644
index 000000000..d0c94f68e
--- /dev/null
+++ b/editor/reftests/spellcheck-textarea-property-dynamic.html
@@ -0,0 +1,11 @@
+<!DOCTYPE html>
+<html>
+<body onload="init()">
+ <textarea>blahblahblah</textarea>
+ <script>
+ function init() {
+ document.querySelector("textarea").spellcheck = false;
+ }
+ </script>
+</body>
+</html>
diff --git a/editor/reftests/spellcheck-textarea-ref.html b/editor/reftests/spellcheck-textarea-ref.html
new file mode 100644
index 000000000..91ecd1d8e
--- /dev/null
+++ b/editor/reftests/spellcheck-textarea-ref.html
@@ -0,0 +1,11 @@
+<!DOCTYPE html>
+<html>
+<body>
+ <textarea spellcheck="true">blahblahblah</textarea>
+ <script type="text/javascript">
+ var box = document.getElementsByTagName("textarea")[0];
+ box.focus(); //Bring the textbox into focus, triggering a spellcheck
+ box.blur(); //Blur in order to make things similar to other tests otherwise
+ </script>
+</body>
+</html>
diff --git a/editor/reftests/spellcheck-textarea-ref2.html b/editor/reftests/spellcheck-textarea-ref2.html
new file mode 100644
index 000000000..6bd588a23
--- /dev/null
+++ b/editor/reftests/spellcheck-textarea-ref2.html
@@ -0,0 +1,11 @@
+<!DOCTYPE html>
+<html>
+<body>
+ <textarea spellcheck="true" style="padding:2px;">blahblahblah</textarea>
+ <script type="text/javascript">
+ var box = document.getElementsByTagName("textarea")[0];
+ box.focus(); //Bring the textbox into focus, triggering a spellcheck
+ box.blur(); //Blur in order to make things similar to other tests otherwise
+ </script>
+</body>
+</html>
diff --git a/editor/reftests/spellcheck-url-valid-ref.html b/editor/reftests/spellcheck-url-valid-ref.html
new file mode 100644
index 000000000..7f9f7530d
--- /dev/null
+++ b/editor/reftests/spellcheck-url-valid-ref.html
@@ -0,0 +1,14 @@
+<!DOCTYPE html>
+<html>
+ <body>
+ <textarea autofocus rows=10 cols=60 spellcheck=false>
+http://fooi.barj/bazk
+https://fooi.barj/bazk
+news://fooi.barj/bazk
+ftp://fooi.barj/bazk
+data:fooi/barj,bazk
+javascript:fooi.barj.bazk();
+fooi@barj.bazk
+</textarea>
+ </body>
+</html>
diff --git a/editor/reftests/spellcheck-url-valid.html b/editor/reftests/spellcheck-url-valid.html
new file mode 100644
index 000000000..f492560a2
--- /dev/null
+++ b/editor/reftests/spellcheck-url-valid.html
@@ -0,0 +1,14 @@
+<!DOCTYPE html>
+<html>
+ <body>
+ <textarea autofocus rows=10 cols=60>
+http://fooi.barj/bazk
+https://fooi.barj/bazk
+news://fooi.barj/bazk
+ftp://fooi.barj/bazk
+data:fooi/barj,bazk
+javascript:fooi.barj.bazk();
+fooi@barj.bazk
+</textarea>
+ </body>
+</html>
diff --git a/editor/reftests/unneeded_scroll-ref.html b/editor/reftests/unneeded_scroll-ref.html
new file mode 100644
index 000000000..9d6ec25bb
--- /dev/null
+++ b/editor/reftests/unneeded_scroll-ref.html
@@ -0,0 +1,16 @@
+<!DOCTYPE html>
+<html>
+ <body>
+ <div>
+ <textarea>I
+ am
+ a
+ long
+ long
+ long
+ long
+ textarea
+ </textarea>
+ </div>
+ </body>
+</html>
diff --git a/editor/reftests/unneeded_scroll.html b/editor/reftests/unneeded_scroll.html
new file mode 100644
index 000000000..6d9eba355
--- /dev/null
+++ b/editor/reftests/unneeded_scroll.html
@@ -0,0 +1,24 @@
+<!DOCTYPE html>
+<html>
+ <body>
+ <script>
+ document.addEventListener("DOMContentLoaded", function() {
+ var t = document.querySelector("textarea");
+ t.focus();
+ document.querySelector("#dst").appendChild(t);
+ }, false);
+ </script>
+ <div>
+ <textarea>I
+ am
+ a
+ long
+ long
+ long
+ long
+ textarea
+ </textarea>
+ </div>
+ <div id="dst"></div>
+ </body>
+</html>
diff --git a/editor/reftests/xul/autocomplete-1.xul b/editor/reftests/xul/autocomplete-1.xul
new file mode 100644
index 000000000..4ba8edb8c
--- /dev/null
+++ b/editor/reftests/xul/autocomplete-1.xul
@@ -0,0 +1,14 @@
+<?xml version="1.0"?>
+<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
+
+<window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
+ xmlns:html="http://www.w3.org/1999/xhtml"
+ title="Textbox tests">
+
+ <script type="text/javascript" src="platform.js"/>
+
+ <!-- leading space in the value to ensure no pixels of t get clipped
+ in one rendering but not the other -->
+ <textbox type="autocomplete" value=" test"/>
+
+</window>
diff --git a/editor/reftests/xul/autocomplete-ref.xul b/editor/reftests/xul/autocomplete-ref.xul
new file mode 100644
index 000000000..829948964
--- /dev/null
+++ b/editor/reftests/xul/autocomplete-ref.xul
@@ -0,0 +1,13 @@
+<?xml version="1.0"?>
+<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
+<?xml-stylesheet href="input.css" type="text/css"?>
+
+<window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
+ xmlns:html="http://www.w3.org/1999/xhtml"
+ title="Textbox tests">
+
+ <script type="text/javascript" src="platform.js"/>
+
+ <html:input class="ac" value=" test"/>
+
+</window>
diff --git a/editor/reftests/xul/empty-1.xul b/editor/reftests/xul/empty-1.xul
new file mode 100644
index 000000000..cb0bd576b
--- /dev/null
+++ b/editor/reftests/xul/empty-1.xul
@@ -0,0 +1,13 @@
+<?xml version="1.0"?>
+<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
+<?xml-stylesheet href="placeholder-reset.css" type="text/css"?>
+
+<window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
+ xmlns:html="http://www.w3.org/1999/xhtml"
+ title="Textbox tests">
+
+ <script type="text/javascript" src="platform.js"/>
+
+ <textbox placeholder=" test"/>
+
+</window>
diff --git a/editor/reftests/xul/empty-2.xul b/editor/reftests/xul/empty-2.xul
new file mode 100644
index 000000000..e7f59fa6e
--- /dev/null
+++ b/editor/reftests/xul/empty-2.xul
@@ -0,0 +1,12 @@
+<?xml version="1.0"?>
+<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
+
+<window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
+ xmlns:html="http://www.w3.org/1999/xhtml"
+ title="Textbox tests">
+
+ <script type="text/javascript" src="platform.js"/>
+
+ <textbox placeholder=" test" value="value"/>
+
+</window>
diff --git a/editor/reftests/xul/empty-ref.xul b/editor/reftests/xul/empty-ref.xul
new file mode 100644
index 000000000..6caf215ed
--- /dev/null
+++ b/editor/reftests/xul/empty-ref.xul
@@ -0,0 +1,13 @@
+<?xml version="1.0"?>
+<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
+<?xml-stylesheet href="input.css" type="text/css"?>
+
+<window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
+ xmlns:html="http://www.w3.org/1999/xhtml"
+ title="Textbox tests">
+
+ <script type="text/javascript" src="platform.js"/>
+
+ <html:input class="empty" value=" test"/>
+
+</window>
diff --git a/editor/reftests/xul/emptyautocomplete-1.xul b/editor/reftests/xul/emptyautocomplete-1.xul
new file mode 100644
index 000000000..ddbd50512
--- /dev/null
+++ b/editor/reftests/xul/emptyautocomplete-1.xul
@@ -0,0 +1,12 @@
+<?xml version="1.0"?>
+<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
+
+<window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
+ xmlns:html="http://www.w3.org/1999/xhtml"
+ title="Textbox tests">
+
+ <script type="text/javascript" src="platform.js"/>
+
+ <textbox type="autocomplete"/>
+
+</window>
diff --git a/editor/reftests/xul/emptyautocomplete-ref.xul b/editor/reftests/xul/emptyautocomplete-ref.xul
new file mode 100644
index 000000000..abe557fdb
--- /dev/null
+++ b/editor/reftests/xul/emptyautocomplete-ref.xul
@@ -0,0 +1,13 @@
+<?xml version="1.0"?>
+<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
+<?xml-stylesheet href="input.css" type="text/css"?>
+
+<window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
+ xmlns:html="http://www.w3.org/1999/xhtml"
+ title="Textbox tests">
+
+ <script type="text/javascript" src="platform.js"/>
+
+ <html:input class="ac"/>
+
+</window>
diff --git a/editor/reftests/xul/emptymultiline-1.xul b/editor/reftests/xul/emptymultiline-1.xul
new file mode 100644
index 000000000..dbe72be3d
--- /dev/null
+++ b/editor/reftests/xul/emptymultiline-1.xul
@@ -0,0 +1,13 @@
+<?xml version="1.0"?>
+<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
+<?xml-stylesheet href="input.css" type="text/css"?>
+
+<window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
+ xmlns:html="http://www.w3.org/1999/xhtml"
+ title="Textbox tests">
+
+ <script type="text/javascript" src="platform.js"/>
+
+ <textbox multiline="true"/>
+
+</window>
diff --git a/editor/reftests/xul/emptymultiline-2.xul b/editor/reftests/xul/emptymultiline-2.xul
new file mode 100644
index 000000000..c43d432ad
--- /dev/null
+++ b/editor/reftests/xul/emptymultiline-2.xul
@@ -0,0 +1,13 @@
+<?xml version="1.0"?>
+<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
+<?xml-stylesheet href="input.css" type="text/css"?>
+
+<window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
+ xmlns:html="http://www.w3.org/1999/xhtml"
+ title="Textbox tests">
+
+ <script type="text/javascript" src="platform.js"/>
+
+ <textbox multiline="true" rows="10"/>
+
+</window>
diff --git a/editor/reftests/xul/emptymultiline-ref.xul b/editor/reftests/xul/emptymultiline-ref.xul
new file mode 100644
index 000000000..ef79718dd
--- /dev/null
+++ b/editor/reftests/xul/emptymultiline-ref.xul
@@ -0,0 +1,13 @@
+<?xml version="1.0"?>
+<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
+<?xml-stylesheet href="input.css" type="text/css"?>
+
+<window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
+ xmlns:html="http://www.w3.org/1999/xhtml"
+ title="Textbox tests">
+
+ <script type="text/javascript" src="platform.js"/>
+
+ <html:textarea rows="10" style="resize: none;"/>
+
+</window>
diff --git a/editor/reftests/xul/emptytextbox-1.xul b/editor/reftests/xul/emptytextbox-1.xul
new file mode 100644
index 000000000..aba191a94
--- /dev/null
+++ b/editor/reftests/xul/emptytextbox-1.xul
@@ -0,0 +1,12 @@
+<?xml version="1.0"?>
+<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
+
+<window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
+ xmlns:html="http://www.w3.org/1999/xhtml"
+ title="Textbox tests">
+
+ <script type="text/javascript" src="platform.js"/>
+
+ <textbox/>
+
+</window>
diff --git a/editor/reftests/xul/emptytextbox-2.xul b/editor/reftests/xul/emptytextbox-2.xul
new file mode 100644
index 000000000..973e89882
--- /dev/null
+++ b/editor/reftests/xul/emptytextbox-2.xul
@@ -0,0 +1,12 @@
+<?xml version="1.0"?>
+<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
+
+<window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
+ xmlns:html="http://www.w3.org/1999/xhtml"
+ title="Textbox tests">
+
+ <script type="text/javascript" src="platform.js"/>
+
+ <textbox type="password"/>
+
+</window>
diff --git a/editor/reftests/xul/emptytextbox-3.xul b/editor/reftests/xul/emptytextbox-3.xul
new file mode 100644
index 000000000..a37ce6429
--- /dev/null
+++ b/editor/reftests/xul/emptytextbox-3.xul
@@ -0,0 +1,12 @@
+<?xml version="1.0"?>
+<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
+
+<window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
+ xmlns:html="http://www.w3.org/1999/xhtml"
+ title="Textbox tests">
+
+ <script type="text/javascript" src="platform.js"/>
+
+ <textbox type="number"/>
+
+</window>
diff --git a/editor/reftests/xul/emptytextbox-4.xul b/editor/reftests/xul/emptytextbox-4.xul
new file mode 100644
index 000000000..979cd118e
--- /dev/null
+++ b/editor/reftests/xul/emptytextbox-4.xul
@@ -0,0 +1,12 @@
+<?xml version="1.0"?>
+<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
+
+<window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
+ xmlns:html="http://www.w3.org/1999/xhtml"
+ title="Textbox tests">
+
+ <script type="text/javascript" src="platform.js"/>
+
+ <textbox type="search"/>
+
+</window>
diff --git a/editor/reftests/xul/emptytextbox-5.xul b/editor/reftests/xul/emptytextbox-5.xul
new file mode 100644
index 000000000..6c8c27971
--- /dev/null
+++ b/editor/reftests/xul/emptytextbox-5.xul
@@ -0,0 +1,12 @@
+<?xml version="1.0"?>
+<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
+
+<window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
+ xmlns:html="http://www.w3.org/1999/xhtml"
+ title="Textbox tests">
+
+ <script type="text/javascript" src="platform.js"/>
+
+ <textbox type="timed"/>
+
+</window>
diff --git a/editor/reftests/xul/emptytextbox-ref.xul b/editor/reftests/xul/emptytextbox-ref.xul
new file mode 100644
index 000000000..58089ca6d
--- /dev/null
+++ b/editor/reftests/xul/emptytextbox-ref.xul
@@ -0,0 +1,13 @@
+<?xml version="1.0"?>
+<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
+<?xml-stylesheet href="input.css" type="text/css"?>
+
+<window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
+ xmlns:html="http://www.w3.org/1999/xhtml"
+ title="Textbox tests">
+
+ <script type="text/javascript" src="platform.js"/>
+
+ <html:input/>
+
+</window>
diff --git a/editor/reftests/xul/input.css b/editor/reftests/xul/input.css
new file mode 100644
index 000000000..2104b16d2
--- /dev/null
+++ b/editor/reftests/xul/input.css
@@ -0,0 +1,70 @@
+@namespace url('http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul');
+@namespace html url('http://www.w3.org/1999/xhtml');
+
+#mac html|input, #mac html|textarea {
+ margin: 4px;
+ padding: 0 1px;
+}
+
+#win html|input, #win html|textarea {
+ margin: 2px 4px;
+ padding: 2px 3px 3px;
+ padding-inline-start: 5px;
+}
+
+#win html|input:-moz-system-metric(windows-default-theme) {
+ padding: 1px 2px 2px;
+ padding-inline-start: 4px;
+}
+
+#linux html|input, #linux html|textarea {
+ margin: 2px 4px;
+ padding: 2px 5px 3px;
+}
+
+textbox[multiline="true"], html|textarea {
+ border: none !important;
+ -moz-appearance: none !important;
+ background-color: white !important;
+ border-top-right-radius: 0;
+ border-bottom-left-radius: 0;
+}
+
+html|input, html|textarea {
+ font: inherit;
+}
+
+html|input.ac {
+ padding: 0 4px !important;
+}
+
+html|input.empty {
+ color: graytext;
+}
+
+:root:not(.winxp) html|input.empty:-moz-system-metric(windows-default-theme) {
+ font-style: italic;
+}
+
+html|input.num {
+ text-align: end;
+}
+
+#mac html|input.num {
+ margin-inline-end: 8px;
+}
+
+#win html|input.num {
+ padding: 0 !important;
+}
+
+#linux html|input.num {
+ margin-inline-end: 3px;
+ padding: 3px 4px;
+}
+
+html|div.plainfield {
+ color: -moz-fieldtext;
+ white-space: pre;
+}
+
diff --git a/editor/reftests/xul/number-1.xul b/editor/reftests/xul/number-1.xul
new file mode 100644
index 000000000..a37ce6429
--- /dev/null
+++ b/editor/reftests/xul/number-1.xul
@@ -0,0 +1,12 @@
+<?xml version="1.0"?>
+<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
+
+<window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
+ xmlns:html="http://www.w3.org/1999/xhtml"
+ title="Textbox tests">
+
+ <script type="text/javascript" src="platform.js"/>
+
+ <textbox type="number"/>
+
+</window>
diff --git a/editor/reftests/xul/number-2.xul b/editor/reftests/xul/number-2.xul
new file mode 100644
index 000000000..73d2e84a0
--- /dev/null
+++ b/editor/reftests/xul/number-2.xul
@@ -0,0 +1,12 @@
+<?xml version="1.0"?>
+<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
+
+<window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
+ xmlns:html="http://www.w3.org/1999/xhtml"
+ title="Textbox tests">
+
+ <script type="text/javascript" src="platform.js"/>
+
+ <textbox type="number" hidespinbuttons="false"/>
+
+</window>
diff --git a/editor/reftests/xul/number-3.xul b/editor/reftests/xul/number-3.xul
new file mode 100644
index 000000000..8ddadcf63
--- /dev/null
+++ b/editor/reftests/xul/number-3.xul
@@ -0,0 +1,12 @@
+<?xml version="1.0"?>
+<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
+
+<window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
+ xmlns:html="http://www.w3.org/1999/xhtml"
+ title="Textbox tests">
+
+ <script type="text/javascript" src="platform.js"/>
+
+ <textbox type="number" hidespinbuttons="true"/>
+
+</window>
diff --git a/editor/reftests/xul/number-4.xul b/editor/reftests/xul/number-4.xul
new file mode 100644
index 000000000..40650e8e4
--- /dev/null
+++ b/editor/reftests/xul/number-4.xul
@@ -0,0 +1,12 @@
+<?xml version="1.0"?>
+<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
+
+<window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
+ xmlns:html="http://www.w3.org/1999/xhtml"
+ title="Textbox tests">
+
+ <script type="text/javascript" src="platform.js"/>
+
+ <textbox type="number" value="1" hidespinbuttons="true"/>
+
+</window>
diff --git a/editor/reftests/xul/number-5.xul b/editor/reftests/xul/number-5.xul
new file mode 100644
index 000000000..bd6346fe5
--- /dev/null
+++ b/editor/reftests/xul/number-5.xul
@@ -0,0 +1,12 @@
+<?xml version="1.0"?>
+<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
+
+<window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
+ xmlns:html="http://www.w3.org/1999/xhtml"
+ title="Textbox tests">
+
+ <script type="text/javascript" src="platform.js"/>
+
+ <textbox type="number" value="test" hidespinbuttons="true"/>
+
+</window>
diff --git a/editor/reftests/xul/number-ref.xul b/editor/reftests/xul/number-ref.xul
new file mode 100644
index 000000000..abff29d97
--- /dev/null
+++ b/editor/reftests/xul/number-ref.xul
@@ -0,0 +1,13 @@
+<?xml version="1.0"?>
+<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
+<?xml-stylesheet href="input.css" type="text/css"?>
+
+<window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
+ xmlns:html="http://www.w3.org/1999/xhtml"
+ title="Textbox tests">
+
+ <script type="text/javascript" src="platform.js"/>
+
+ <html:input value="0" class="num"/>
+
+</window>
diff --git a/editor/reftests/xul/numberwithvalue-1.xul b/editor/reftests/xul/numberwithvalue-1.xul
new file mode 100644
index 000000000..3aaebcfdf
--- /dev/null
+++ b/editor/reftests/xul/numberwithvalue-1.xul
@@ -0,0 +1,12 @@
+<?xml version="1.0"?>
+<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
+
+<window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
+ xmlns:html="http://www.w3.org/1999/xhtml"
+ title="Textbox tests">
+
+ <script type="text/javascript" src="platform.js"/>
+
+ <textbox type="number" value="123" hidespinbuttons="true"/>
+
+</window>
diff --git a/editor/reftests/xul/numberwithvalue-ref.xul b/editor/reftests/xul/numberwithvalue-ref.xul
new file mode 100644
index 000000000..8ddc7a144
--- /dev/null
+++ b/editor/reftests/xul/numberwithvalue-ref.xul
@@ -0,0 +1,13 @@
+<?xml version="1.0"?>
+<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
+<?xml-stylesheet href="input.css" type="text/css"?>
+
+<window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
+ xmlns:html="http://www.w3.org/1999/xhtml"
+ title="Textbox tests">
+
+ <script type="text/javascript" src="platform.js"/>
+
+ <html:input value="123" class="num"/>
+
+</window>
diff --git a/editor/reftests/xul/passwd-1.xul b/editor/reftests/xul/passwd-1.xul
new file mode 100644
index 000000000..1f9619a16
--- /dev/null
+++ b/editor/reftests/xul/passwd-1.xul
@@ -0,0 +1,12 @@
+<?xml version="1.0"?>
+<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
+
+<window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
+ xmlns:html="http://www.w3.org/1999/xhtml"
+ title="Textbox tests">
+
+ <script type="text/javascript" src="platform.js"/>
+
+ <textbox type="password" value="test"/>
+
+</window>
diff --git a/editor/reftests/xul/passwd-2.xul b/editor/reftests/xul/passwd-2.xul
new file mode 100644
index 000000000..54fa5937b
--- /dev/null
+++ b/editor/reftests/xul/passwd-2.xul
@@ -0,0 +1,12 @@
+<?xml version="1.0"?>
+<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
+
+<window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
+ xmlns:html="http://www.w3.org/1999/xhtml"
+ title="Textbox tests">
+
+ <script type="text/javascript" src="platform.js"/>
+
+ <textbox type="password" value="abcd"/>
+
+</window>
diff --git a/editor/reftests/xul/passwd-3.xul b/editor/reftests/xul/passwd-3.xul
new file mode 100644
index 000000000..b1849931b
--- /dev/null
+++ b/editor/reftests/xul/passwd-3.xul
@@ -0,0 +1,12 @@
+<?xml version="1.0"?>
+<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
+
+<window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
+ xmlns:html="http://www.w3.org/1999/xhtml"
+ title="Textbox tests">
+
+ <script type="text/javascript" src="platform.js"/>
+
+ <textbox value="test"/>
+
+</window>
diff --git a/editor/reftests/xul/passwd-ref.xul b/editor/reftests/xul/passwd-ref.xul
new file mode 100644
index 000000000..1f93bc339
--- /dev/null
+++ b/editor/reftests/xul/passwd-ref.xul
@@ -0,0 +1,13 @@
+<?xml version="1.0"?>
+<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
+<?xml-stylesheet href="input.css" type="text/css"?>
+
+<window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
+ xmlns:html="http://www.w3.org/1999/xhtml"
+ title="Textbox tests">
+
+ <script type="text/javascript" src="platform.js"/>
+
+ <html:input type="password" value="test"/>
+
+</window>
diff --git a/editor/reftests/xul/placeholder-reset.css b/editor/reftests/xul/placeholder-reset.css
new file mode 100644
index 000000000..a2c41e69b
--- /dev/null
+++ b/editor/reftests/xul/placeholder-reset.css
@@ -0,0 +1,8 @@
+@namespace url('http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul');
+@namespace html url('http://www.w3.org/1999/xhtml');
+
+/* We need to have a non-transparent placeholder so we can test it. */
+html|input::placeholder {
+ opacity: 1.0;
+ color: graytext;
+}
diff --git a/editor/reftests/xul/plain-1.xul b/editor/reftests/xul/plain-1.xul
new file mode 100644
index 000000000..ab573d0fc
--- /dev/null
+++ b/editor/reftests/xul/plain-1.xul
@@ -0,0 +1,12 @@
+<?xml version="1.0"?>
+<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
+
+<window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
+ xmlns:html="http://www.w3.org/1999/xhtml"
+ title="Textbox tests">
+
+ <script type="text/javascript" src="platform.js"/>
+
+ <textbox value=" test" class="plain"/>
+
+</window>
diff --git a/editor/reftests/xul/plain-ref.xul b/editor/reftests/xul/plain-ref.xul
new file mode 100644
index 000000000..f345e675e
--- /dev/null
+++ b/editor/reftests/xul/plain-ref.xul
@@ -0,0 +1,13 @@
+<?xml version="1.0"?>
+<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
+<?xml-stylesheet href="input.css" type="text/css"?>
+
+<window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
+ xmlns:html="http://www.w3.org/1999/xhtml"
+ title="Textbox tests">
+
+ <script type="text/javascript" src="platform.js"/>
+
+ <html:div class="plainfield"> test</html:div>
+
+</window>
diff --git a/editor/reftests/xul/platform.js b/editor/reftests/xul/platform.js
new file mode 100644
index 000000000..f45e6d1f5
--- /dev/null
+++ b/editor/reftests/xul/platform.js
@@ -0,0 +1,28 @@
+// The appearance of XUL elements is platform-specific, so we set the
+// style of the root element according to the platform, so that the
+// CSS code inside input.css can select the correct styles for each
+// platform.
+
+var id;
+var ua = navigator.userAgent;
+
+if (/Windows/.test(ua)) {
+ id = "win";
+ if (/NT 5\.1/.test(ua) || /NT 5\.2; Win64/.test(ua))
+ var classname = "winxp";
+}
+else if (/Linux/.test(ua))
+ id = "linux";
+else if (/SunOS/.test(ua))
+ id = "linux";
+else if (/Mac OS X/.test(ua))
+ id = "mac";
+
+if (id)
+ document.documentElement.setAttribute("id", id);
+else
+ document.documentElement.appendChild(
+ document.createTextNode("Unrecognized platform")
+ );
+if (classname)
+ document.documentElement.setAttribute("class", classname);
diff --git a/editor/reftests/xul/reftest-stylo.list b/editor/reftests/xul/reftest-stylo.list
new file mode 100644
index 000000000..cfaa7a058
--- /dev/null
+++ b/editor/reftests/xul/reftest-stylo.list
@@ -0,0 +1,67 @@
+# DO NOT EDIT! This is a auto-generated temporary list for Stylo testing
+fails-if(Android||B2G) skip-if((B2G&&browserIsRemote)||Mulet||((browserIsRemote&&winWidget))) == empty-1.xul empty-1.xul
+# bug 783658
+# Initial mulet triage: parity with B2G/B2G Desktop, Windows: bug 1239170
+skip-if((B2G&&browserIsRemote)||Mulet) == empty-2.xul empty-2.xul
+# Initial mulet triage: parity with B2G/B2G Desktop
+# There is no way to simulate an autocomplete textbox in windows XP/Vista/7/8/10 default theme using CSS.
+# Therefore, the equlity tests below should be marked as failing.
+fails-if(Android||B2G) fails-if(windowsDefaultTheme&&/^Windows\x20NT\x20(5\.[12]|6\.[012]|10\.0)/.test(http.oscpu)) skip-if((B2G&&browserIsRemote)||Mulet) == autocomplete-1.xul autocomplete-1.xul
+# bug 783658
+# Initial mulet triage: parity with B2G/B2G Desktop
+fails-if(Android||B2G) fails-if(windowsDefaultTheme&&/^Windows\x20NT\x20(5\.[12]|6\.[012]|10\.0)/.test(http.oscpu)) skip-if((B2G&&browserIsRemote)||Mulet) == emptyautocomplete-1.xul emptyautocomplete-1.xul
+# bug 783658
+# Initial mulet triage: parity with B2G/B2G Desktop
+skip-if((B2G&&browserIsRemote)||Mulet) == emptymultiline-1.xul emptymultiline-1.xul
+# Initial mulet triage: parity with B2G/B2G Desktop
+fails-if(Android||B2G) skip-if((B2G&&browserIsRemote)||Mulet) == emptymultiline-2.xul emptymultiline-2.xul
+# bug 783658
+# Initial mulet triage: parity with B2G/B2G Desktop
+fails-if(Android||B2G) skip-if((B2G&&browserIsRemote)||Mulet||((browserIsRemote&&winWidget))) == emptytextbox-1.xul emptytextbox-1.xul
+# bug 783658
+# Initial mulet triage: parity with B2G/B2G Desktop, Windows: bug 1239170
+fails-if(Android||B2G) skip-if((B2G&&browserIsRemote)||Mulet||((browserIsRemote&&winWidget))) == emptytextbox-2.xul emptytextbox-2.xul
+# bug 783658
+# Initial mulet triage: parity with B2G/B2G Desktop, Windows: bug 1239170
+fails skip-if((B2G&&browserIsRemote)||Mulet) == emptytextbox-3.xul emptytextbox-3.xul
+# Initial mulet triage: parity with B2G/B2G Desktop
+skip-if((B2G&&browserIsRemote)||Mulet) == emptytextbox-4.xul emptytextbox-4.xul
+# Initial mulet triage: parity with B2G/B2G Desktop
+fails-if(Android||B2G) skip-if((B2G&&browserIsRemote)||Mulet||((browserIsRemote&&winWidget))) == emptytextbox-5.xul emptytextbox-5.xul
+# bug 783658
+# Initial mulet triage: parity with B2G/B2G Desktop, Windows: bug 1239170
+# There is no way to simulate a number textbox in windows XP/Vista/7 default theme using CSS.
+# Therefore, the equlity tests below should be marked as failing.
+skip-if((B2G&&browserIsRemote)||Mulet) == number-1.xul number-1.xul
+# Initial mulet triage: parity with B2G/B2G Desktop
+skip-if((B2G&&browserIsRemote)||Mulet) == number-2.xul number-2.xul
+# Initial mulet triage: parity with B2G/B2G Desktop
+fails-if(Android||B2G) fails-if(windowsDefaultTheme&&/^Windows\x20NT\x20(5\.[12]|6\.[012]|10\.0)/.test(http.oscpu)) skip-if((B2G&&browserIsRemote)||Mulet) == number-3.xul number-3.xul
+# bug 783658
+# Initial mulet triage: parity with B2G/B2G Desktop
+skip-if((B2G&&browserIsRemote)||Mulet) == number-4.xul number-4.xul
+# Initial mulet triage: parity with B2G/B2G Desktop
+fails-if(Android||B2G) fails-if(windowsDefaultTheme&&/^Windows\x20NT\x20(5\.[12]|6\.[012]|10\.0)/.test(http.oscpu)) skip-if((B2G&&browserIsRemote)||Mulet) == number-5.xul number-5.xul
+# bug 783658
+# Initial mulet triage: parity with B2G/B2G Desktop
+fails-if(Android||B2G) fails-if(windowsDefaultTheme&&/^Windows\x20NT\x20(5\.[12]|6\.[012]|10\.0)/.test(http.oscpu)) skip-if((B2G&&browserIsRemote)||Mulet) == numberwithvalue-1.xul numberwithvalue-1.xul
+# bug 783658
+# Initial mulet triage: parity with B2G/B2G Desktop
+fails-if(Android||B2G) skip-if((B2G&&browserIsRemote)||Mulet||((browserIsRemote&&winWidget))) == passwd-1.xul passwd-1.xul
+# bug 783658
+# Initial mulet triage: parity with B2G/B2G Desktop, Windows: bug 1239170
+fails-if(Android||B2G) skip-if((B2G&&browserIsRemote)||Mulet||((browserIsRemote&&winWidget))) == passwd-2.xul passwd-2.xul
+# bug 783658
+# Initial mulet triage: parity with B2G/B2G Desktop, Windows: bug 1239170
+skip-if((B2G&&browserIsRemote)||Mulet) == passwd-3.xul passwd-3.xul
+# Initial mulet triage: parity with B2G/B2G Desktop
+fails-if(Android||B2G) skip-if((B2G&&browserIsRemote)||Mulet) == plain-1.xul plain-1.xul
+# bug 783658
+# Initial mulet triage: parity with B2G/B2G Desktop
+fails-if(Android||B2G) skip-if((B2G&&browserIsRemote)||Mulet||(browserIsRemote&&winWidget)) == textbox-1.xul textbox-1.xul
+# Initial mulet triage: parity with B2G/B2G Desktop, Windows: bug 1239170
+skip-if((B2G&&browserIsRemote)||Mulet) == textbox-disabled.xul textbox-disabled.xul
+# Initial mulet triage: parity with B2G/B2G Desktop
+# Read-only textboxes look like normal textboxes in windows Vista/7 default theme
+fails-if(windowsDefaultTheme&&/^Windows\x20NT\x20(6\.[012]|10\.0)/.test(http.oscpu)) skip-if((B2G&&browserIsRemote)||Mulet||(browserIsRemote&&winWidget)) == textbox-readonly.xul textbox-readonly.xul
+# Initial mulet triage: parity with B2G/B2G Desktop, Windows: bug 1239170
diff --git a/editor/reftests/xul/reftest.list b/editor/reftests/xul/reftest.list
new file mode 100644
index 000000000..76bd9174f
--- /dev/null
+++ b/editor/reftests/xul/reftest.list
@@ -0,0 +1,29 @@
+fails-if(Android) skip-if(browserIsRemote&&winWidget) == empty-1.xul empty-ref.xul # Windows: bug 1239170
+!= empty-2.xul empty-ref.xul
+# There is no way to simulate an autocomplete textbox in windows XP/Vista/7/8/10 default theme using CSS.
+# Therefore, the equlity tests below should be marked as failing.
+fails-if(Android) fails-if(windowsDefaultTheme&&/^Windows\x20NT\x20(5\.[12]|6\.[012]|10\.0)/.test(http.oscpu)) == autocomplete-1.xul autocomplete-ref.xul # bug 783658
+fails-if(Android) fails-if(windowsDefaultTheme&&/^Windows\x20NT\x20(5\.[12]|6\.[012]|10\.0)/.test(http.oscpu)) == emptyautocomplete-1.xul emptyautocomplete-ref.xul # bug 783658
+!= emptymultiline-1.xul emptymultiline-ref.xul
+fails-if(Android) == emptymultiline-2.xul emptymultiline-ref.xul # bug 783658
+fails-if(Android) skip-if(browserIsRemote&&winWidget) == emptytextbox-1.xul emptytextbox-ref.xul # Windows: bug 1239170
+fails-if(Android) skip-if(browserIsRemote&&winWidget) == emptytextbox-2.xul emptytextbox-ref.xul # Windows: bug 1239170
+!= emptytextbox-3.xul emptytextbox-ref.xul
+!= emptytextbox-4.xul emptytextbox-ref.xul
+fails-if(Android) skip-if(browserIsRemote&&winWidget) == emptytextbox-5.xul emptytextbox-ref.xul # Windows: bug 1239170
+# There is no way to simulate a number textbox in windows XP/Vista/7 default theme using CSS.
+# Therefore, the equlity tests below should be marked as failing.
+!= number-1.xul number-ref.xul
+!= number-2.xul number-ref.xul
+fails-if(Android) fails-if(windowsDefaultTheme&&/^Windows\x20NT\x20(5\.[12]|6\.[012]|10\.0)/.test(http.oscpu)) == number-3.xul number-ref.xul # bug 783658
+!= number-4.xul number-ref.xul
+fails-if(Android) fails-if(windowsDefaultTheme&&/^Windows\x20NT\x20(5\.[12]|6\.[012]|10\.0)/.test(http.oscpu)) == number-5.xul number-ref.xul # bug 783658
+fails-if(Android) fails-if(windowsDefaultTheme&&/^Windows\x20NT\x20(5\.[12]|6\.[012]|10\.0)/.test(http.oscpu)) == numberwithvalue-1.xul numberwithvalue-ref.xul # bug 783658
+fails-if(Android) skip-if(browserIsRemote&&winWidget) == passwd-1.xul passwd-ref.xul # Windows: bug 1239170
+fails-if(Android) skip-if(browserIsRemote&&winWidget) == passwd-2.xul passwd-ref.xul # Windows: bug 1239170
+!= passwd-3.xul passwd-ref.xul
+fails-if(Android) == plain-1.xul plain-ref.xul # bug 783658
+fails-if(Android) skip-if(browserIsRemote&&winWidget) == textbox-1.xul textbox-ref.xul # Windows: bug 1239170
+!= textbox-disabled.xul textbox-ref.xul
+# Read-only textboxes look like normal textboxes in windows Vista/7 default theme
+fails-if(windowsDefaultTheme&&/^Windows\x20NT\x20(6\.[012]|10\.0)/.test(http.oscpu)) skip-if(browserIsRemote&&winWidget) != textbox-readonly.xul textbox-ref.xul # Windows: bug 1239170
diff --git a/editor/reftests/xul/textbox-1.xul b/editor/reftests/xul/textbox-1.xul
new file mode 100644
index 000000000..aae7e89ea
--- /dev/null
+++ b/editor/reftests/xul/textbox-1.xul
@@ -0,0 +1,12 @@
+<?xml version="1.0"?>
+<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
+
+<window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
+ xmlns:html="http://www.w3.org/1999/xhtml"
+ title="Textbox tests">
+
+ <script type="text/javascript" src="platform.js"/>
+
+ <textbox value=" test"/>
+
+</window>
diff --git a/editor/reftests/xul/textbox-disabled.xul b/editor/reftests/xul/textbox-disabled.xul
new file mode 100644
index 000000000..c1ae83a3c
--- /dev/null
+++ b/editor/reftests/xul/textbox-disabled.xul
@@ -0,0 +1,12 @@
+<?xml version="1.0"?>
+<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
+
+<window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
+ xmlns:html="http://www.w3.org/1999/xhtml"
+ title="Textbox tests">
+
+ <script type="text/javascript" src="platform.js"/>
+
+ <textbox value=" test" disabled="true"/>
+
+</window>
diff --git a/editor/reftests/xul/textbox-readonly.xul b/editor/reftests/xul/textbox-readonly.xul
new file mode 100644
index 000000000..f9d8b5f57
--- /dev/null
+++ b/editor/reftests/xul/textbox-readonly.xul
@@ -0,0 +1,12 @@
+<?xml version="1.0"?>
+<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
+
+<window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
+ xmlns:html="http://www.w3.org/1999/xhtml"
+ title="Textbox tests">
+
+ <script type="text/javascript" src="platform.js"/>
+
+ <textbox value=" test" readonly="true"/>
+
+</window>
diff --git a/editor/reftests/xul/textbox-ref.xul b/editor/reftests/xul/textbox-ref.xul
new file mode 100644
index 000000000..8be9fc8e4
--- /dev/null
+++ b/editor/reftests/xul/textbox-ref.xul
@@ -0,0 +1,13 @@
+<?xml version="1.0"?>
+<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
+<?xml-stylesheet href="input.css" type="text/css"?>
+
+<window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
+ xmlns:html="http://www.w3.org/1999/xhtml"
+ title="Textbox tests">
+
+ <script type="text/javascript" src="platform.js"/>
+
+ <html:input value=" test"/>
+
+</window>