mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-28 19:38:13 +00:00
0cc5045cf7
--HG-- rename : layout/reftests/editor/338427-1-ref.html => editor/reftests/338427-1-ref.html rename : layout/reftests/editor/338427-1.html => editor/reftests/338427-1.html rename : layout/reftests/editor/338427-2-ref.html => editor/reftests/338427-2-ref.html rename : layout/reftests/editor/338427-2.html => editor/reftests/338427-2.html rename : layout/reftests/editor/338427-3-ref.html => editor/reftests/338427-3-ref.html rename : layout/reftests/editor/338427-3.html => editor/reftests/338427-3.html rename : layout/reftests/editor/388980-1-ref.html => editor/reftests/388980-1-ref.html rename : layout/reftests/editor/388980-1.html => editor/reftests/388980-1.html rename : layout/reftests/editor/462758-grabbers-resizers-ref.html => editor/reftests/462758-grabbers-resizers-ref.html rename : layout/reftests/editor/462758-grabbers-resizers.html => editor/reftests/462758-grabbers-resizers.html rename : layout/reftests/editor/642800-iframe.html => editor/reftests/642800-iframe.html rename : layout/reftests/editor/642800-ref.html => editor/reftests/642800-ref.html rename : layout/reftests/editor/642800.html => editor/reftests/642800.html rename : layout/reftests/editor/672709-ref.html => editor/reftests/672709-ref.html rename : layout/reftests/editor/672709.html => editor/reftests/672709.html rename : layout/reftests/editor/674212-spellcheck-ref.html => editor/reftests/674212-spellcheck-ref.html rename : layout/reftests/editor/674212-spellcheck.html => editor/reftests/674212-spellcheck.html rename : layout/reftests/editor/694880-1.html => editor/reftests/694880-1.html rename : layout/reftests/editor/694880-2.html => editor/reftests/694880-2.html rename : layout/reftests/editor/694880-3.html => editor/reftests/694880-3.html rename : layout/reftests/editor/694880-ref.html => editor/reftests/694880-ref.html rename : layout/reftests/editor/caret_after_reframe-ref.html => editor/reftests/caret_after_reframe-ref.html rename : layout/reftests/editor/caret_after_reframe.html => editor/reftests/caret_after_reframe.html rename : layout/reftests/editor/caret_on_focus-ref.html => editor/reftests/caret_on_focus-ref.html rename : layout/reftests/editor/caret_on_focus.html => editor/reftests/caret_on_focus.html rename : layout/reftests/editor/caret_on_positioned-ref.html => editor/reftests/caret_on_positioned-ref.html rename : layout/reftests/editor/caret_on_positioned.html => editor/reftests/caret_on_positioned.html rename : layout/reftests/editor/caret_on_presshell_reinit-2.html => editor/reftests/caret_on_presshell_reinit-2.html rename : layout/reftests/editor/caret_on_presshell_reinit-ref.html => editor/reftests/caret_on_presshell_reinit-ref.html rename : layout/reftests/editor/caret_on_presshell_reinit.html => editor/reftests/caret_on_presshell_reinit.html rename : layout/reftests/editor/caret_on_textarea_lastline-ref.html => editor/reftests/caret_on_textarea_lastline-ref.html rename : layout/reftests/editor/caret_on_textarea_lastline.html => editor/reftests/caret_on_textarea_lastline.html rename : layout/reftests/editor/dynamic-1.html => editor/reftests/dynamic-1.html rename : layout/reftests/editor/dynamic-overflow-change-ref.html => editor/reftests/dynamic-overflow-change-ref.html rename : layout/reftests/editor/dynamic-overflow-change.html => editor/reftests/dynamic-overflow-change.html rename : layout/reftests/editor/dynamic-ref.html => editor/reftests/dynamic-ref.html rename : layout/reftests/editor/dynamic-type-1.html => editor/reftests/dynamic-type-1.html rename : layout/reftests/editor/dynamic-type-2.html => editor/reftests/dynamic-type-2.html rename : layout/reftests/editor/dynamic-type-3.html => editor/reftests/dynamic-type-3.html rename : layout/reftests/editor/dynamic-type-4.html => editor/reftests/dynamic-type-4.html rename : layout/reftests/editor/emptypasswd-1.html => editor/reftests/emptypasswd-1.html rename : layout/reftests/editor/emptypasswd-2.html => editor/reftests/emptypasswd-2.html rename : layout/reftests/editor/emptypasswd-ref.html => editor/reftests/emptypasswd-ref.html rename : layout/reftests/editor/input-text-notheme-onfocus-reframe-ref.html => editor/reftests/input-text-notheme-onfocus-reframe-ref.html rename : layout/reftests/editor/input-text-notheme-onfocus-reframe.html => editor/reftests/input-text-notheme-onfocus-reframe.html rename : layout/reftests/editor/input-text-onfocus-reframe-ref.html => editor/reftests/input-text-onfocus-reframe-ref.html rename : layout/reftests/editor/input-text-onfocus-reframe.html => editor/reftests/input-text-onfocus-reframe.html rename : layout/reftests/editor/newline-1.html => editor/reftests/newline-1.html rename : layout/reftests/editor/newline-2.html => editor/reftests/newline-2.html rename : layout/reftests/editor/newline-3.html => editor/reftests/newline-3.html rename : layout/reftests/editor/newline-4.html => editor/reftests/newline-4.html rename : layout/reftests/editor/newline-ref.html => editor/reftests/newline-ref.html rename : layout/reftests/editor/nobogusnode-1.html => editor/reftests/nobogusnode-1.html rename : layout/reftests/editor/nobogusnode-2.html => editor/reftests/nobogusnode-2.html rename : layout/reftests/editor/nobogusnode-ref.html => editor/reftests/nobogusnode-ref.html rename : layout/reftests/editor/passwd-1.html => editor/reftests/passwd-1.html rename : layout/reftests/editor/passwd-2.html => editor/reftests/passwd-2.html rename : layout/reftests/editor/passwd-3.html => editor/reftests/passwd-3.html rename : layout/reftests/editor/passwd-4.html => editor/reftests/passwd-4.html rename : layout/reftests/editor/passwd-ref.html => editor/reftests/passwd-ref.html rename : layout/reftests/editor/reftest.list => editor/reftests/reftest.list rename : layout/reftests/editor/selection_visibility_after_reframe-2.html => editor/reftests/selection_visibility_after_reframe-2.html rename : layout/reftests/editor/selection_visibility_after_reframe-3.html => editor/reftests/selection_visibility_after_reframe-3.html rename : layout/reftests/editor/selection_visibility_after_reframe-ref.html => editor/reftests/selection_visibility_after_reframe-ref.html rename : layout/reftests/editor/selection_visibility_after_reframe.html => editor/reftests/selection_visibility_after_reframe.html rename : layout/reftests/editor/spellcheck-comma-valid-ref.html => editor/reftests/spellcheck-comma-valid-ref.html rename : layout/reftests/editor/spellcheck-comma-valid.html => editor/reftests/spellcheck-comma-valid.html rename : layout/reftests/editor/spellcheck-dotafterquote-valid-ref.html => editor/reftests/spellcheck-dotafterquote-valid-ref.html rename : layout/reftests/editor/spellcheck-dotafterquote-valid.html => editor/reftests/spellcheck-dotafterquote-valid.html rename : layout/reftests/editor/spellcheck-hyphen-invalid-ref.html => editor/reftests/spellcheck-hyphen-invalid-ref.html rename : layout/reftests/editor/spellcheck-hyphen-invalid.html => editor/reftests/spellcheck-hyphen-invalid.html rename : layout/reftests/editor/spellcheck-hyphen-multiple-invalid-ref.html => editor/reftests/spellcheck-hyphen-multiple-invalid-ref.html rename : layout/reftests/editor/spellcheck-hyphen-multiple-invalid.html => editor/reftests/spellcheck-hyphen-multiple-invalid.html rename : layout/reftests/editor/spellcheck-hyphen-multiple-valid-ref.html => editor/reftests/spellcheck-hyphen-multiple-valid-ref.html rename : layout/reftests/editor/spellcheck-hyphen-multiple-valid.html => editor/reftests/spellcheck-hyphen-multiple-valid.html rename : layout/reftests/editor/spellcheck-hyphen-valid-ref.html => editor/reftests/spellcheck-hyphen-valid-ref.html rename : layout/reftests/editor/spellcheck-hyphen-valid.html => editor/reftests/spellcheck-hyphen-valid.html rename : layout/reftests/editor/spellcheck-input-attr-after.html => editor/reftests/spellcheck-input-attr-after.html rename : layout/reftests/editor/spellcheck-input-attr-before.html => editor/reftests/spellcheck-input-attr-before.html rename : layout/reftests/editor/spellcheck-input-attr-dynamic-inherit.html => editor/reftests/spellcheck-input-attr-dynamic-inherit.html rename : layout/reftests/editor/spellcheck-input-attr-dynamic-override-inherit.html => editor/reftests/spellcheck-input-attr-dynamic-override-inherit.html rename : layout/reftests/editor/spellcheck-input-attr-dynamic-override.html => editor/reftests/spellcheck-input-attr-dynamic-override.html rename : layout/reftests/editor/spellcheck-input-attr-dynamic.html => editor/reftests/spellcheck-input-attr-dynamic.html rename : layout/reftests/editor/spellcheck-input-attr-inherit.html => editor/reftests/spellcheck-input-attr-inherit.html rename : layout/reftests/editor/spellcheck-input-disabled.html => editor/reftests/spellcheck-input-disabled.html rename : layout/reftests/editor/spellcheck-input-nofocus-ref.html => editor/reftests/spellcheck-input-nofocus-ref.html rename : layout/reftests/editor/spellcheck-input-property-dynamic-inherit.html => editor/reftests/spellcheck-input-property-dynamic-inherit.html rename : layout/reftests/editor/spellcheck-input-property-dynamic-override-inherit.html => editor/reftests/spellcheck-input-property-dynamic-override-inherit.html rename : layout/reftests/editor/spellcheck-input-property-dynamic-override.html => editor/reftests/spellcheck-input-property-dynamic-override.html rename : layout/reftests/editor/spellcheck-input-property-dynamic.html => editor/reftests/spellcheck-input-property-dynamic.html rename : layout/reftests/editor/spellcheck-input-ref.html => editor/reftests/spellcheck-input-ref.html rename : layout/reftests/editor/spellcheck-period-valid-ref.html => editor/reftests/spellcheck-period-valid-ref.html rename : layout/reftests/editor/spellcheck-period-valid.html => editor/reftests/spellcheck-period-valid.html rename : layout/reftests/editor/spellcheck-slash-valid-ref.html => editor/reftests/spellcheck-slash-valid-ref.html rename : layout/reftests/editor/spellcheck-slash-valid.html => editor/reftests/spellcheck-slash-valid.html rename : layout/reftests/editor/spellcheck-space-valid-ref.html => editor/reftests/spellcheck-space-valid-ref.html rename : layout/reftests/editor/spellcheck-space-valid.html => editor/reftests/spellcheck-space-valid.html rename : layout/reftests/editor/spellcheck-textarea-attr-dynamic-inherit.html => editor/reftests/spellcheck-textarea-attr-dynamic-inherit.html rename : layout/reftests/editor/spellcheck-textarea-attr-dynamic-override-inherit.html => editor/reftests/spellcheck-textarea-attr-dynamic-override-inherit.html rename : layout/reftests/editor/spellcheck-textarea-attr-dynamic-override.html => editor/reftests/spellcheck-textarea-attr-dynamic-override.html rename : layout/reftests/editor/spellcheck-textarea-attr-dynamic.html => editor/reftests/spellcheck-textarea-attr-dynamic.html rename : layout/reftests/editor/spellcheck-textarea-attr-inherit.html => editor/reftests/spellcheck-textarea-attr-inherit.html rename : layout/reftests/editor/spellcheck-textarea-attr.html => editor/reftests/spellcheck-textarea-attr.html rename : layout/reftests/editor/spellcheck-textarea-disabled.html => editor/reftests/spellcheck-textarea-disabled.html rename : layout/reftests/editor/spellcheck-textarea-focused-notreadonly.html => editor/reftests/spellcheck-textarea-focused-notreadonly.html rename : layout/reftests/editor/spellcheck-textarea-focused-reframe.html => editor/reftests/spellcheck-textarea-focused-reframe.html rename : layout/reftests/editor/spellcheck-textarea-focused.html => editor/reftests/spellcheck-textarea-focused.html rename : layout/reftests/editor/spellcheck-textarea-nofocus-ref.html => editor/reftests/spellcheck-textarea-nofocus-ref.html rename : layout/reftests/editor/spellcheck-textarea-nofocus.html => editor/reftests/spellcheck-textarea-nofocus.html rename : layout/reftests/editor/spellcheck-textarea-property-dynamic-inherit.html => editor/reftests/spellcheck-textarea-property-dynamic-inherit.html rename : layout/reftests/editor/spellcheck-textarea-property-dynamic-override-inherit.html => editor/reftests/spellcheck-textarea-property-dynamic-override-inherit.html rename : layout/reftests/editor/spellcheck-textarea-property-dynamic-override.html => editor/reftests/spellcheck-textarea-property-dynamic-override.html rename : layout/reftests/editor/spellcheck-textarea-property-dynamic.html => editor/reftests/spellcheck-textarea-property-dynamic.html rename : layout/reftests/editor/spellcheck-textarea-ref.html => editor/reftests/spellcheck-textarea-ref.html rename : layout/reftests/editor/unneeded_scroll-ref.html => editor/reftests/unneeded_scroll-ref.html rename : layout/reftests/editor/unneeded_scroll.html => editor/reftests/unneeded_scroll.html rename : layout/reftests/editor/xul/autocomplete-1.xul => editor/reftests/xul/autocomplete-1.xul rename : layout/reftests/editor/xul/autocomplete-ref.xul => editor/reftests/xul/autocomplete-ref.xul rename : layout/reftests/editor/xul/empty-1.xul => editor/reftests/xul/empty-1.xul rename : layout/reftests/editor/xul/empty-2.xul => editor/reftests/xul/empty-2.xul rename : layout/reftests/editor/xul/empty-ref.xul => editor/reftests/xul/empty-ref.xul rename : layout/reftests/editor/xul/emptyautocomplete-1.xul => editor/reftests/xul/emptyautocomplete-1.xul rename : layout/reftests/editor/xul/emptyautocomplete-ref.xul => editor/reftests/xul/emptyautocomplete-ref.xul rename : layout/reftests/editor/xul/emptymultiline-1.xul => editor/reftests/xul/emptymultiline-1.xul rename : layout/reftests/editor/xul/emptymultiline-2.xul => editor/reftests/xul/emptymultiline-2.xul rename : layout/reftests/editor/xul/emptymultiline-ref.xul => editor/reftests/xul/emptymultiline-ref.xul rename : layout/reftests/editor/xul/emptytextbox-1.xul => editor/reftests/xul/emptytextbox-1.xul rename : layout/reftests/editor/xul/emptytextbox-2.xul => editor/reftests/xul/emptytextbox-2.xul rename : layout/reftests/editor/xul/emptytextbox-3.xul => editor/reftests/xul/emptytextbox-3.xul rename : layout/reftests/editor/xul/emptytextbox-4.xul => editor/reftests/xul/emptytextbox-4.xul rename : layout/reftests/editor/xul/emptytextbox-5.xul => editor/reftests/xul/emptytextbox-5.xul rename : layout/reftests/editor/xul/emptytextbox-ref.xul => editor/reftests/xul/emptytextbox-ref.xul rename : layout/reftests/editor/xul/input.css => editor/reftests/xul/input.css rename : layout/reftests/editor/xul/number-1.xul => editor/reftests/xul/number-1.xul rename : layout/reftests/editor/xul/number-2.xul => editor/reftests/xul/number-2.xul rename : layout/reftests/editor/xul/number-3.xul => editor/reftests/xul/number-3.xul rename : layout/reftests/editor/xul/number-4.xul => editor/reftests/xul/number-4.xul rename : layout/reftests/editor/xul/number-5.xul => editor/reftests/xul/number-5.xul rename : layout/reftests/editor/xul/number-ref.xul => editor/reftests/xul/number-ref.xul rename : layout/reftests/editor/xul/numberwithvalue-1.xul => editor/reftests/xul/numberwithvalue-1.xul rename : layout/reftests/editor/xul/numberwithvalue-ref.xul => editor/reftests/xul/numberwithvalue-ref.xul rename : layout/reftests/editor/xul/passwd-1.xul => editor/reftests/xul/passwd-1.xul rename : layout/reftests/editor/xul/passwd-2.xul => editor/reftests/xul/passwd-2.xul rename : layout/reftests/editor/xul/passwd-3.xul => editor/reftests/xul/passwd-3.xul rename : layout/reftests/editor/xul/passwd-ref.xul => editor/reftests/xul/passwd-ref.xul rename : layout/reftests/editor/xul/plain-1.xul => editor/reftests/xul/plain-1.xul rename : layout/reftests/editor/xul/plain-ref.xul => editor/reftests/xul/plain-ref.xul rename : layout/reftests/editor/xul/platform.js => editor/reftests/xul/platform.js rename : layout/reftests/editor/xul/reftest.list => editor/reftests/xul/reftest.list rename : layout/reftests/editor/xul/textbox-1.xul => editor/reftests/xul/textbox-1.xul rename : layout/reftests/editor/xul/textbox-disabled.xul => editor/reftests/xul/textbox-disabled.xul rename : layout/reftests/editor/xul/textbox-readonly.xul => editor/reftests/xul/textbox-readonly.xul rename : layout/reftests/editor/xul/textbox-ref.xul => editor/reftests/xul/textbox-ref.xul
44 lines
1.2 KiB
HTML
44 lines
1.2 KiB
HTML
<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>
|