mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 748310 - Return false for invalid createLink/insertImage values instead of throwing; r=ehsan
This commit is contained in:
parent
c1e77a8721
commit
e6a6919350
@ -3094,10 +3094,12 @@ nsHTMLDocument::ExecCommand(const nsAString& commandID,
|
||||
nsIDOMWindow* window = GetWindow();
|
||||
NS_ENSURE_TRUE(window, NS_ERROR_FAILURE);
|
||||
|
||||
if ((cmdToDispatch.EqualsLiteral("cmd_paragraphState") ||
|
||||
cmdToDispatch.EqualsLiteral("cmd_fontSize")) &&
|
||||
if ((cmdToDispatch.EqualsLiteral("cmd_fontSize") ||
|
||||
cmdToDispatch.EqualsLiteral("cmd_insertImageNoUI") ||
|
||||
cmdToDispatch.EqualsLiteral("cmd_insertLinkNoUI") ||
|
||||
cmdToDispatch.EqualsLiteral("cmd_paragraphState")) &&
|
||||
paramStr.IsEmpty()) {
|
||||
// Invalid value
|
||||
// Invalid value, return false
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
@ -1637,7 +1637,7 @@ var browserTests = [
|
||||
["foo[bar]baz",
|
||||
[["createlink",""]],
|
||||
"foo[bar]baz",
|
||||
[true],
|
||||
[false],
|
||||
{"createlink":[false,false,"",false,false,""]}],
|
||||
["foo[]bar",
|
||||
[["delete",""]],
|
||||
@ -4992,17 +4992,17 @@ var browserTests = [
|
||||
["foo[bar]baz",
|
||||
[["fontsize","2em"]],
|
||||
"foo[bar]baz",
|
||||
[true],
|
||||
[false],
|
||||
{"fontsize":[false,false,"3",false,false,"3"]}],
|
||||
["foo[bar]baz",
|
||||
[["fontsize","20pt"]],
|
||||
"foo[bar]baz",
|
||||
[true],
|
||||
[false],
|
||||
{"fontsize":[false,false,"3",false,false,"3"]}],
|
||||
["foo[bar]baz",
|
||||
[["fontsize","xx-large"]],
|
||||
"foo[bar]baz",
|
||||
[true],
|
||||
[false],
|
||||
{"fontsize":[false,false,"3",false,false,"3"]}],
|
||||
["foo[bar]baz",
|
||||
[["stylewithcss","true"],["fontsize"," 1 "]],
|
||||
@ -5017,7 +5017,7 @@ var browserTests = [
|
||||
["foo[bar]baz",
|
||||
[["fontsize","1."]],
|
||||
"foo[bar]baz",
|
||||
[true],
|
||||
[false],
|
||||
{"fontsize":[false,false,"3",false,false,"3"]}],
|
||||
["foo[bar]baz",
|
||||
[["stylewithcss","true"],["fontsize","1.0"]],
|
||||
@ -5112,7 +5112,7 @@ var browserTests = [
|
||||
["foo[bar]baz",
|
||||
[["fontsize",""]],
|
||||
"foo[bar]baz",
|
||||
[true],
|
||||
[false],
|
||||
{"fontsize":[false,false,"3",false,false,"3"]}],
|
||||
["<table><tbody><tr><td>foo<td>b[a]r<td>baz</table>",
|
||||
[["stylewithcss","true"],["fontsize","4"]],
|
||||
@ -5882,7 +5882,7 @@ var browserTests = [
|
||||
["foo[bar]baz",
|
||||
[["forecolor","currentColor"]],
|
||||
"foo[bar]baz",
|
||||
[true],
|
||||
[false],
|
||||
{"forecolor":[false,false,"rgb(0, 0, 0)",false,false,"rgb(0, 0, 0)"]}],
|
||||
["<table><tbody><tr><td>foo<td>b[a]r<td>baz</table>",
|
||||
[["stylewithcss","true"],["forecolor","#0000FF"]],
|
||||
@ -7022,42 +7022,42 @@ var browserTests = [
|
||||
["<blockquote>[foo]</blockquote><p>extra",
|
||||
[["formatblock","<blockquote>"]],
|
||||
"<blockquote>[foo]</blockquote><p>extra</p>",
|
||||
[true],
|
||||
[false],
|
||||
{"formatblock":[false,false,"",false,false,""]}],
|
||||
["<blockquote><p>[foo]<p>bar</blockquote><p>extra",
|
||||
[["formatblock","<blockquote>"]],
|
||||
"<blockquote><p>[foo]</p><p>bar</p></blockquote><p>extra</p>",
|
||||
[true],
|
||||
[false],
|
||||
{"formatblock":[false,false,"p",false,false,"p"]}],
|
||||
["[foo]<blockquote>bar</blockquote><p>extra",
|
||||
[["formatblock","<blockquote>"]],
|
||||
"[foo]<blockquote>bar</blockquote><p>extra</p>",
|
||||
[true],
|
||||
[false],
|
||||
{"formatblock":[false,false,"",false,false,""]}],
|
||||
["<p>[foo<p>bar]<p>baz",
|
||||
[["formatblock","<blockquote>"]],
|
||||
"<p>[foo</p><p>bar]</p><p>baz</p>",
|
||||
[true],
|
||||
[false],
|
||||
{"formatblock":[false,false,"p",false,false,"p"]}],
|
||||
["<section>[foo]</section>",
|
||||
[["formatblock","<blockquote>"]],
|
||||
"<section>[foo]</section>",
|
||||
[true],
|
||||
[false],
|
||||
{"formatblock":[false,false,"",false,false,""]}],
|
||||
["<section><p>[foo]</section>",
|
||||
[["formatblock","<blockquote>"]],
|
||||
"<section><p>[foo]</p></section>",
|
||||
[true],
|
||||
[false],
|
||||
{"formatblock":[false,false,"p",false,false,"p"]}],
|
||||
["<section><hgroup><h1>[foo]</h1><h2>bar</h2></hgroup><p>baz</section>",
|
||||
[["formatblock","<blockquote>"]],
|
||||
"<section><hgroup><h1>[foo]</h1><h2>bar</h2></hgroup><p>baz</p></section>",
|
||||
[true],
|
||||
[false],
|
||||
{"formatblock":[false,false,"h1",false,false,"h1"]}],
|
||||
["<section>[foo]</section>",
|
||||
[["formatblock","<article>"]],
|
||||
"<section>[foo]</section>",
|
||||
[true],
|
||||
[false],
|
||||
{"formatblock":[false,false,"",false,false,""]}],
|
||||
["<div>[foobar]</div>",
|
||||
[["defaultparagraphseparator","div"],["formatblock","<address>"]],
|
||||
@ -7072,12 +7072,12 @@ var browserTests = [
|
||||
["<div>[foobar]</div>",
|
||||
[["formatblock","<article>"]],
|
||||
"<div>[foobar]</div>",
|
||||
[true],
|
||||
[false],
|
||||
{"formatblock":[false,false,"div",false,false,"div"]}],
|
||||
["<div>[foobar]</div>",
|
||||
[["formatblock","<blockquote>"]],
|
||||
"<div>[foobar]</div>",
|
||||
[true],
|
||||
[false],
|
||||
{"formatblock":[false,false,"div",false,false,"div"]}],
|
||||
["<div>[foobar]</div>",
|
||||
[["defaultparagraphseparator","div"],["formatblock","<dd>"]],
|
||||
@ -7092,12 +7092,12 @@ var browserTests = [
|
||||
["<div>[foobar]</div>",
|
||||
[["formatblock","<del>"]],
|
||||
"<div>[foobar]</div>",
|
||||
[true],
|
||||
[false],
|
||||
{"formatblock":[false,false,"div",false,false,"div"]}],
|
||||
["<div>[foobar]</div>",
|
||||
[["formatblock","<dl>"]],
|
||||
"<div>[foobar]</div>",
|
||||
[true],
|
||||
[false],
|
||||
{"formatblock":[false,false,"div",false,false,"div"]}],
|
||||
["<div>[foobar]</div>",
|
||||
[["defaultparagraphseparator","div"],["formatblock","<dt>"]],
|
||||
@ -7172,17 +7172,17 @@ var browserTests = [
|
||||
["<div>[foobar]</div>",
|
||||
[["formatblock","<ins>"]],
|
||||
"<div>[foobar]</div>",
|
||||
[true],
|
||||
[false],
|
||||
{"formatblock":[false,false,"div",false,false,"div"]}],
|
||||
["<div>[foobar]</div>",
|
||||
[["formatblock","<li>"]],
|
||||
"<div>[foobar]</div>",
|
||||
[true],
|
||||
[false],
|
||||
{"formatblock":[false,false,"div",false,false,"div"]}],
|
||||
["<div>[foobar]</div>",
|
||||
[["formatblock","<ol>"]],
|
||||
"<div>[foobar]</div>",
|
||||
[true],
|
||||
[false],
|
||||
{"formatblock":[false,false,"div",false,false,"div"]}],
|
||||
["<div>[foobar]</div>",
|
||||
[["defaultparagraphseparator","div"],["formatblock","<p>"]],
|
||||
@ -7207,12 +7207,12 @@ var browserTests = [
|
||||
["<div>[foobar]</div>",
|
||||
[["formatblock","<ul>"]],
|
||||
"<div>[foobar]</div>",
|
||||
[true],
|
||||
[false],
|
||||
{"formatblock":[false,false,"div",false,false,"div"]}],
|
||||
["<div>[foobar]</div>",
|
||||
[["formatblock","<quasit>"]],
|
||||
"<div>[foobar]</div>",
|
||||
[true],
|
||||
[false],
|
||||
{"formatblock":[false,false,"div",false,false,"div"]}],
|
||||
["<p>[foobar]</p>",
|
||||
[["defaultparagraphseparator","div"],["formatblock","<address>"]],
|
||||
@ -7227,22 +7227,22 @@ var browserTests = [
|
||||
["<p>[foobar]</p>",
|
||||
[["formatblock","<article>"]],
|
||||
"<p>[foobar]</p>",
|
||||
[true],
|
||||
[false],
|
||||
{"formatblock":[false,false,"p",false,false,"p"]}],
|
||||
["<p>[foobar]</p>",
|
||||
[["formatblock","<aside>"]],
|
||||
"<p>[foobar]</p>",
|
||||
[true],
|
||||
[false],
|
||||
{"formatblock":[false,false,"p",false,false,"p"]}],
|
||||
["<p>[foobar]</p>",
|
||||
[["formatblock","<blockquote>"]],
|
||||
"<p>[foobar]</p>",
|
||||
[true],
|
||||
[false],
|
||||
{"formatblock":[false,false,"p",false,false,"p"]}],
|
||||
["<p>[foobar]</p>",
|
||||
[["formatblock","<body>"]],
|
||||
"<p>[foobar]</p>",
|
||||
[true],
|
||||
[false],
|
||||
{"formatblock":[false,false,"p",false,false,"p"]}],
|
||||
["<p>[foobar]</p>",
|
||||
[["defaultparagraphseparator","div"],["formatblock","<dd>"]],
|
||||
@ -7257,17 +7257,17 @@ var browserTests = [
|
||||
["<p>[foobar]</p>",
|
||||
[["formatblock","<del>"]],
|
||||
"<p>[foobar]</p>",
|
||||
[true],
|
||||
[false],
|
||||
{"formatblock":[false,false,"p",false,false,"p"]}],
|
||||
["<p>[foobar]</p>",
|
||||
[["formatblock","<details>"]],
|
||||
"<p>[foobar]</p>",
|
||||
[true],
|
||||
[false],
|
||||
{"formatblock":[false,false,"p",false,false,"p"]}],
|
||||
["<p>[foobar]</p>",
|
||||
[["formatblock","<dir>"]],
|
||||
"<p>[foobar]</p>",
|
||||
[true],
|
||||
[false],
|
||||
{"formatblock":[false,false,"p",false,false,"p"]}],
|
||||
["<p>[foobar]</p>",
|
||||
[["defaultparagraphseparator","div"],["formatblock","<div>"]],
|
||||
@ -7282,7 +7282,7 @@ var browserTests = [
|
||||
["<p>[foobar]</p>",
|
||||
[["formatblock","<dl>"]],
|
||||
"<p>[foobar]</p>",
|
||||
[true],
|
||||
[false],
|
||||
{"formatblock":[false,false,"p",false,false,"p"]}],
|
||||
["<p>[foobar]</p>",
|
||||
[["defaultparagraphseparator","div"],["formatblock","<dt>"]],
|
||||
@ -7297,27 +7297,27 @@ var browserTests = [
|
||||
["<p>[foobar]</p>",
|
||||
[["formatblock","<fieldset>"]],
|
||||
"<p>[foobar]</p>",
|
||||
[true],
|
||||
[false],
|
||||
{"formatblock":[false,false,"p",false,false,"p"]}],
|
||||
["<p>[foobar]</p>",
|
||||
[["formatblock","<figcaption>"]],
|
||||
"<p>[foobar]</p>",
|
||||
[true],
|
||||
[false],
|
||||
{"formatblock":[false,false,"p",false,false,"p"]}],
|
||||
["<p>[foobar]</p>",
|
||||
[["formatblock","<figure>"]],
|
||||
"<p>[foobar]</p>",
|
||||
[true],
|
||||
[false],
|
||||
{"formatblock":[false,false,"p",false,false,"p"]}],
|
||||
["<p>[foobar]</p>",
|
||||
[["formatblock","<footer>"]],
|
||||
"<p>[foobar]</p>",
|
||||
[true],
|
||||
[false],
|
||||
{"formatblock":[false,false,"p",false,false,"p"]}],
|
||||
["<p>[foobar]</p>",
|
||||
[["formatblock","<form>"]],
|
||||
"<p>[foobar]</p>",
|
||||
[true],
|
||||
[false],
|
||||
{"formatblock":[false,false,"p",false,false,"p"]}],
|
||||
["<p>[foobar]</p>",
|
||||
[["defaultparagraphseparator","div"],["formatblock","<h1>"]],
|
||||
@ -7382,57 +7382,57 @@ var browserTests = [
|
||||
["<p>[foobar]</p>",
|
||||
[["formatblock","<header>"]],
|
||||
"<p>[foobar]</p>",
|
||||
[true],
|
||||
[false],
|
||||
{"formatblock":[false,false,"p",false,false,"p"]}],
|
||||
["<p>[foobar]</p>",
|
||||
[["formatblock","<head>"]],
|
||||
"<p>[foobar]</p>",
|
||||
[true],
|
||||
[false],
|
||||
{"formatblock":[false,false,"p",false,false,"p"]}],
|
||||
["<p>[foobar]</p>",
|
||||
[["formatblock","<hgroup>"]],
|
||||
"<p>[foobar]</p>",
|
||||
[true],
|
||||
[false],
|
||||
{"formatblock":[false,false,"p",false,false,"p"]}],
|
||||
["<p>[foobar]</p>",
|
||||
[["formatblock","<hr>"]],
|
||||
"<p>[foobar]</p>",
|
||||
[true],
|
||||
[false],
|
||||
{"formatblock":[false,false,"p",false,false,"p"]}],
|
||||
["<p>[foobar]</p>",
|
||||
[["formatblock","<html>"]],
|
||||
"<p>[foobar]</p>",
|
||||
[true],
|
||||
[false],
|
||||
{"formatblock":[false,false,"p",false,false,"p"]}],
|
||||
["<p>[foobar]</p>",
|
||||
[["formatblock","<ins>"]],
|
||||
"<p>[foobar]</p>",
|
||||
[true],
|
||||
[false],
|
||||
{"formatblock":[false,false,"p",false,false,"p"]}],
|
||||
["<p>[foobar]</p>",
|
||||
[["formatblock","<li>"]],
|
||||
"<p>[foobar]</p>",
|
||||
[true],
|
||||
[false],
|
||||
{"formatblock":[false,false,"p",false,false,"p"]}],
|
||||
["<p>[foobar]</p>",
|
||||
[["formatblock","<listing>"]],
|
||||
"<p>[foobar]</p>",
|
||||
[true],
|
||||
[false],
|
||||
{"formatblock":[false,false,"p",false,false,"p"]}],
|
||||
["<p>[foobar]</p>",
|
||||
[["formatblock","<menu>"]],
|
||||
"<p>[foobar]</p>",
|
||||
[true],
|
||||
[false],
|
||||
{"formatblock":[false,false,"p",false,false,"p"]}],
|
||||
["<p>[foobar]</p>",
|
||||
[["formatblock","<nav>"]],
|
||||
"<p>[foobar]</p>",
|
||||
[true],
|
||||
[false],
|
||||
{"formatblock":[false,false,"p",false,false,"p"]}],
|
||||
["<p>[foobar]</p>",
|
||||
[["formatblock","<ol>"]],
|
||||
"<p>[foobar]</p>",
|
||||
[true],
|
||||
[false],
|
||||
{"formatblock":[false,false,"p",false,false,"p"]}],
|
||||
["<p>[foobar]</p>",
|
||||
[["formatblock","<p>"]],
|
||||
@ -7442,7 +7442,7 @@ var browserTests = [
|
||||
["<p>[foobar]</p>",
|
||||
[["formatblock","<plaintext>"]],
|
||||
"<p>[foobar]</p>",
|
||||
[true],
|
||||
[false],
|
||||
{"formatblock":[false,false,"p",false,false,"p"]}],
|
||||
["<p>[foobar]</p>",
|
||||
[["defaultparagraphseparator","div"],["formatblock","<pre>"]],
|
||||
@ -7457,22 +7457,22 @@ var browserTests = [
|
||||
["<p>[foobar]</p>",
|
||||
[["formatblock","<section>"]],
|
||||
"<p>[foobar]</p>",
|
||||
[true],
|
||||
[false],
|
||||
{"formatblock":[false,false,"p",false,false,"p"]}],
|
||||
["<p>[foobar]</p>",
|
||||
[["formatblock","<ul>"]],
|
||||
"<p>[foobar]</p>",
|
||||
[true],
|
||||
[false],
|
||||
{"formatblock":[false,false,"p",false,false,"p"]}],
|
||||
["<p>[foobar]</p>",
|
||||
[["formatblock","<xmp>"]],
|
||||
"<p>[foobar]</p>",
|
||||
[true],
|
||||
[false],
|
||||
{"formatblock":[false,false,"p",false,false,"p"]}],
|
||||
["<p>[foobar]</p>",
|
||||
[["formatblock","<quasit>"]],
|
||||
"<p>[foobar]</p>",
|
||||
[true],
|
||||
[false],
|
||||
{"formatblock":[false,false,"p",false,false,"p"]}],
|
||||
["<p>[foo<p>bar]",
|
||||
[["defaultparagraphseparator","div"],["formatblock","<address>"]],
|
||||
@ -7487,22 +7487,22 @@ var browserTests = [
|
||||
["<p>[foo<p>bar]",
|
||||
[["formatblock","<article>"]],
|
||||
"<p>[foo</p><p>bar]</p>",
|
||||
[true],
|
||||
[false],
|
||||
{"formatblock":[false,false,"p",false,false,"p"]}],
|
||||
["<p>[foo<p>bar]",
|
||||
[["formatblock","<aside>"]],
|
||||
"<p>[foo</p><p>bar]</p>",
|
||||
[true],
|
||||
[false],
|
||||
{"formatblock":[false,false,"p",false,false,"p"]}],
|
||||
["<p>[foo<p>bar]",
|
||||
[["formatblock","<blockquote>"]],
|
||||
"<p>[foo</p><p>bar]</p>",
|
||||
[true],
|
||||
[false],
|
||||
{"formatblock":[false,false,"p",false,false,"p"]}],
|
||||
["<p>[foo<p>bar]",
|
||||
[["formatblock","<body>"]],
|
||||
"<p>[foo</p><p>bar]</p>",
|
||||
[true],
|
||||
[false],
|
||||
{"formatblock":[false,false,"p",false,false,"p"]}],
|
||||
["<p>[foo<p>bar]",
|
||||
[["defaultparagraphseparator","div"],["formatblock","<dd>"]],
|
||||
@ -7517,17 +7517,17 @@ var browserTests = [
|
||||
["<p>[foo<p>bar]",
|
||||
[["formatblock","<del>"]],
|
||||
"<p>[foo</p><p>bar]</p>",
|
||||
[true],
|
||||
[false],
|
||||
{"formatblock":[false,false,"p",false,false,"p"]}],
|
||||
["<p>[foo<p>bar]",
|
||||
[["formatblock","<details>"]],
|
||||
"<p>[foo</p><p>bar]</p>",
|
||||
[true],
|
||||
[false],
|
||||
{"formatblock":[false,false,"p",false,false,"p"]}],
|
||||
["<p>[foo<p>bar]",
|
||||
[["formatblock","<dir>"]],
|
||||
"<p>[foo</p><p>bar]</p>",
|
||||
[true],
|
||||
[false],
|
||||
{"formatblock":[false,false,"p",false,false,"p"]}],
|
||||
["<p>[foo<p>bar]",
|
||||
[["defaultparagraphseparator","div"],["formatblock","<div>"]],
|
||||
@ -7542,7 +7542,7 @@ var browserTests = [
|
||||
["<p>[foo<p>bar]",
|
||||
[["formatblock","<dl>"]],
|
||||
"<p>[foo</p><p>bar]</p>",
|
||||
[true],
|
||||
[false],
|
||||
{"formatblock":[false,false,"p",false,false,"p"]}],
|
||||
["<p>[foo<p>bar]",
|
||||
[["defaultparagraphseparator","div"],["formatblock","<dt>"]],
|
||||
@ -7557,27 +7557,27 @@ var browserTests = [
|
||||
["<p>[foo<p>bar]",
|
||||
[["formatblock","<fieldset>"]],
|
||||
"<p>[foo</p><p>bar]</p>",
|
||||
[true],
|
||||
[false],
|
||||
{"formatblock":[false,false,"p",false,false,"p"]}],
|
||||
["<p>[foo<p>bar]",
|
||||
[["formatblock","<figcaption>"]],
|
||||
"<p>[foo</p><p>bar]</p>",
|
||||
[true],
|
||||
[false],
|
||||
{"formatblock":[false,false,"p",false,false,"p"]}],
|
||||
["<p>[foo<p>bar]",
|
||||
[["formatblock","<figure>"]],
|
||||
"<p>[foo</p><p>bar]</p>",
|
||||
[true],
|
||||
[false],
|
||||
{"formatblock":[false,false,"p",false,false,"p"]}],
|
||||
["<p>[foo<p>bar]",
|
||||
[["formatblock","<footer>"]],
|
||||
"<p>[foo</p><p>bar]</p>",
|
||||
[true],
|
||||
[false],
|
||||
{"formatblock":[false,false,"p",false,false,"p"]}],
|
||||
["<p>[foo<p>bar]",
|
||||
[["formatblock","<form>"]],
|
||||
"<p>[foo</p><p>bar]</p>",
|
||||
[true],
|
||||
[false],
|
||||
{"formatblock":[false,false,"p",false,false,"p"]}],
|
||||
["<p>[foo<p>bar]",
|
||||
[["defaultparagraphseparator","div"],["formatblock","<h1>"]],
|
||||
@ -7642,57 +7642,57 @@ var browserTests = [
|
||||
["<p>[foo<p>bar]",
|
||||
[["formatblock","<header>"]],
|
||||
"<p>[foo</p><p>bar]</p>",
|
||||
[true],
|
||||
[false],
|
||||
{"formatblock":[false,false,"p",false,false,"p"]}],
|
||||
["<p>[foo<p>bar]",
|
||||
[["formatblock","<head>"]],
|
||||
"<p>[foo</p><p>bar]</p>",
|
||||
[true],
|
||||
[false],
|
||||
{"formatblock":[false,false,"p",false,false,"p"]}],
|
||||
["<p>[foo<p>bar]",
|
||||
[["formatblock","<hgroup>"]],
|
||||
"<p>[foo</p><p>bar]</p>",
|
||||
[true],
|
||||
[false],
|
||||
{"formatblock":[false,false,"p",false,false,"p"]}],
|
||||
["<p>[foo<p>bar]",
|
||||
[["formatblock","<hr>"]],
|
||||
"<p>[foo</p><p>bar]</p>",
|
||||
[true],
|
||||
[false],
|
||||
{"formatblock":[false,false,"p",false,false,"p"]}],
|
||||
["<p>[foo<p>bar]",
|
||||
[["formatblock","<html>"]],
|
||||
"<p>[foo</p><p>bar]</p>",
|
||||
[true],
|
||||
[false],
|
||||
{"formatblock":[false,false,"p",false,false,"p"]}],
|
||||
["<p>[foo<p>bar]",
|
||||
[["formatblock","<ins>"]],
|
||||
"<p>[foo</p><p>bar]</p>",
|
||||
[true],
|
||||
[false],
|
||||
{"formatblock":[false,false,"p",false,false,"p"]}],
|
||||
["<p>[foo<p>bar]",
|
||||
[["formatblock","<li>"]],
|
||||
"<p>[foo</p><p>bar]</p>",
|
||||
[true],
|
||||
[false],
|
||||
{"formatblock":[false,false,"p",false,false,"p"]}],
|
||||
["<p>[foo<p>bar]",
|
||||
[["formatblock","<listing>"]],
|
||||
"<p>[foo</p><p>bar]</p>",
|
||||
[true],
|
||||
[false],
|
||||
{"formatblock":[false,false,"p",false,false,"p"]}],
|
||||
["<p>[foo<p>bar]",
|
||||
[["formatblock","<menu>"]],
|
||||
"<p>[foo</p><p>bar]</p>",
|
||||
[true],
|
||||
[false],
|
||||
{"formatblock":[false,false,"p",false,false,"p"]}],
|
||||
["<p>[foo<p>bar]",
|
||||
[["formatblock","<nav>"]],
|
||||
"<p>[foo</p><p>bar]</p>",
|
||||
[true],
|
||||
[false],
|
||||
{"formatblock":[false,false,"p",false,false,"p"]}],
|
||||
["<p>[foo<p>bar]",
|
||||
[["formatblock","<ol>"]],
|
||||
"<p>[foo</p><p>bar]</p>",
|
||||
[true],
|
||||
[false],
|
||||
{"formatblock":[false,false,"p",false,false,"p"]}],
|
||||
["<p>[foo<p>bar]",
|
||||
[["formatblock","<p>"]],
|
||||
@ -7702,7 +7702,7 @@ var browserTests = [
|
||||
["<p>[foo<p>bar]",
|
||||
[["formatblock","<plaintext>"]],
|
||||
"<p>[foo</p><p>bar]</p>",
|
||||
[true],
|
||||
[false],
|
||||
{"formatblock":[false,false,"p",false,false,"p"]}],
|
||||
["<p>[foo<p>bar]",
|
||||
[["defaultparagraphseparator","div"],["formatblock","<pre>"]],
|
||||
@ -7717,22 +7717,22 @@ var browserTests = [
|
||||
["<p>[foo<p>bar]",
|
||||
[["formatblock","<section>"]],
|
||||
"<p>[foo</p><p>bar]</p>",
|
||||
[true],
|
||||
[false],
|
||||
{"formatblock":[false,false,"p",false,false,"p"]}],
|
||||
["<p>[foo<p>bar]",
|
||||
[["formatblock","<ul>"]],
|
||||
"<p>[foo</p><p>bar]</p>",
|
||||
[true],
|
||||
[false],
|
||||
{"formatblock":[false,false,"p",false,false,"p"]}],
|
||||
["<p>[foo<p>bar]",
|
||||
[["formatblock","<xmp>"]],
|
||||
"<p>[foo</p><p>bar]</p>",
|
||||
[true],
|
||||
[false],
|
||||
{"formatblock":[false,false,"p",false,false,"p"]}],
|
||||
["<p>[foo<p>bar]",
|
||||
[["formatblock","<quasit>"]],
|
||||
"<p>[foo</p><p>bar]</p>",
|
||||
[true],
|
||||
[false],
|
||||
{"formatblock":[false,false,"p",false,false,"p"]}],
|
||||
["<div>[foobar]</div>",
|
||||
[["defaultparagraphseparator","div"],["formatblock","p"]],
|
||||
@ -12742,7 +12742,7 @@ var browserTests = [
|
||||
["foo[bar]baz",
|
||||
[["insertimage",""]],
|
||||
"foo[bar]baz",
|
||||
[true],
|
||||
[false],
|
||||
{"insertimage":[false,false,"",false,false,""]}],
|
||||
["foo[bar]baz",
|
||||
[["insertimage","/img/lion.svg"]],
|
||||
@ -27447,7 +27447,7 @@ var browserTests = [
|
||||
["foo[bar]baz",
|
||||
[["defaultparagraphseparator",""]],
|
||||
"foo[bar]baz",
|
||||
[true],
|
||||
[false],
|
||||
{"defaultparagraphseparator":[false,false,"p",false,false,"div"]}],
|
||||
["foo[bar]baz",
|
||||
[["defaultparagraphseparator","div"]],
|
||||
@ -27472,22 +27472,32 @@ var browserTests = [
|
||||
["foo[bar]baz",
|
||||
[["defaultparagraphseparator"," div "]],
|
||||
"foo[bar]baz",
|
||||
[true],
|
||||
[false],
|
||||
{"defaultparagraphseparator":[false,false,"p",false,false,"div"]}],
|
||||
["foo[bar]baz",
|
||||
[["defaultparagraphseparator"," p "]],
|
||||
"foo[bar]baz",
|
||||
[true],
|
||||
[false],
|
||||
{"defaultparagraphseparator":[false,false,"p",false,false,"div"]}],
|
||||
["foo[bar]baz",
|
||||
[["defaultparagraphseparator","<div>"]],
|
||||
"foo[bar]baz",
|
||||
[false],
|
||||
{"defaultparagraphseparator":[false,false,"p",false,false,"div"]}],
|
||||
["foo[bar]baz",
|
||||
[["defaultparagraphseparator","<p>"]],
|
||||
"foo[bar]baz",
|
||||
[false],
|
||||
{"defaultparagraphseparator":[false,false,"p",false,false,"div"]}],
|
||||
["foo[bar]baz",
|
||||
[["defaultparagraphseparator","li"]],
|
||||
"foo[bar]baz",
|
||||
[true],
|
||||
[false],
|
||||
{"defaultparagraphseparator":[false,false,"p",false,false,"div"]}],
|
||||
["foo[bar]baz",
|
||||
[["defaultparagraphseparator","blockquote"]],
|
||||
"foo[bar]baz",
|
||||
[true],
|
||||
[false],
|
||||
{"defaultparagraphseparator":[false,false,"p",false,false,"div"]}],
|
||||
["foo[bar]baz",
|
||||
[["selectall",""]],
|
||||
|
@ -543,7 +543,17 @@ function myExecCommand(command, showUi, value, range) {
|
||||
|
||||
// "Take the action for command, passing value to the instructions as an
|
||||
// argument."
|
||||
commands[command].action(value);
|
||||
var ret = commands[command].action(value);
|
||||
|
||||
// Check for bugs
|
||||
if (ret !== true && ret !== false) {
|
||||
throw "execCommand() didn't return true or false: " + ret;
|
||||
}
|
||||
|
||||
// "If the previous step returned false, return false."
|
||||
if (ret === false) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// "Return true."
|
||||
return true;
|
||||
@ -3072,7 +3082,7 @@ commands.backcolor = {
|
||||
// "If value is not a valid CSS color, prepend "#" to it."
|
||||
//
|
||||
// "If value is still not a valid CSS color, or if it is currentColor,
|
||||
// abort these steps and do nothing."
|
||||
// return false."
|
||||
//
|
||||
// Cheap hack for testing, no attempt to be comprehensive.
|
||||
if (/^([0-9a-fA-F]{3}){1,2}$/.test(value)) {
|
||||
@ -3081,11 +3091,14 @@ commands.backcolor = {
|
||||
if (!/^(rgba?|hsla?)\(.*\)$/.test(value)
|
||||
&& !parseSimpleColor(value)
|
||||
&& value.toLowerCase() != "transparent") {
|
||||
return;
|
||||
return false;
|
||||
}
|
||||
|
||||
// "Set the selection's value to value."
|
||||
setSelectionValue("backcolor", value);
|
||||
|
||||
// "Return true."
|
||||
return true;
|
||||
}, standardInlineValueCommand: true, relevantCssProperty: "backgroundColor",
|
||||
equivalentValues: function(val1, val2) {
|
||||
// "Either both strings are valid CSS colors and have the same red,
|
||||
@ -3101,12 +3114,14 @@ commands.backcolor = {
|
||||
commands.bold = {
|
||||
action: function() {
|
||||
// "If queryCommandState("bold") returns true, set the selection's
|
||||
// value to "normal". Otherwise set the selection's value to "bold"."
|
||||
// value to "normal". Otherwise set the selection's value to "bold".
|
||||
// Either way, return true."
|
||||
if (myQueryCommandState("bold")) {
|
||||
setSelectionValue("bold", "normal");
|
||||
} else {
|
||||
setSelectionValue("bold", "bold");
|
||||
}
|
||||
return true;
|
||||
}, inlineCommandActivatedValues: ["bold", "600", "700", "800", "900"],
|
||||
relevantCssProperty: "fontWeight",
|
||||
equivalentValues: function(val1, val2) {
|
||||
@ -3125,9 +3140,9 @@ commands.bold = {
|
||||
//@{
|
||||
commands.createlink = {
|
||||
action: function(value) {
|
||||
// "If value is the empty string, abort these steps and do nothing."
|
||||
// "If value is the empty string, return false."
|
||||
if (value === "") {
|
||||
return;
|
||||
return false;
|
||||
}
|
||||
|
||||
// "For each editable a element that has an href attribute and is an
|
||||
@ -3148,6 +3163,9 @@ commands.createlink = {
|
||||
|
||||
// "Set the selection's value to value."
|
||||
setSelectionValue("createlink", value);
|
||||
|
||||
// "Return true."
|
||||
return true;
|
||||
}
|
||||
};
|
||||
|
||||
@ -3156,8 +3174,9 @@ commands.createlink = {
|
||||
//@{
|
||||
commands.fontname = {
|
||||
action: function(value) {
|
||||
// "Set the selection's value to value."
|
||||
// "Set the selection's value to value, then return true."
|
||||
setSelectionValue("fontname", value);
|
||||
return true;
|
||||
}, standardInlineValueCommand: true, relevantCssProperty: "fontFamily"
|
||||
};
|
||||
|
||||
@ -3176,7 +3195,7 @@ function normalizeFontSize(value) {
|
||||
|
||||
// "If value is not a valid floating point number, and would not be a valid
|
||||
// floating point number if a single leading "+" character were stripped,
|
||||
// abort these steps and do nothing."
|
||||
// return false."
|
||||
if (!/^[-+]?[0-9]+(\.[0-9]+)?([eE][-+]?[0-9]+)?$/.test(value)) {
|
||||
return null;
|
||||
}
|
||||
@ -3242,11 +3261,14 @@ commands.fontsize = {
|
||||
action: function(value) {
|
||||
value = normalizeFontSize(value);
|
||||
if (value === null) {
|
||||
return;
|
||||
return false;
|
||||
}
|
||||
|
||||
// "Set the selection's value to value."
|
||||
setSelectionValue("fontsize", value);
|
||||
|
||||
// "Return true."
|
||||
return true;
|
||||
}, indeterm: function() {
|
||||
// "True if among formattable nodes that are effectively contained in
|
||||
// the active range, there are two that have distinct effective command
|
||||
@ -3357,7 +3379,7 @@ commands.forecolor = {
|
||||
// "If value is not a valid CSS color, prepend "#" to it."
|
||||
//
|
||||
// "If value is still not a valid CSS color, or if it is currentColor,
|
||||
// abort these steps and do nothing."
|
||||
// return false."
|
||||
//
|
||||
// Cheap hack for testing, no attempt to be comprehensive.
|
||||
if (/^([0-9a-fA-F]{3}){1,2}$/.test(value)) {
|
||||
@ -3366,11 +3388,14 @@ commands.forecolor = {
|
||||
if (!/^(rgba?|hsla?)\(.*\)$/.test(value)
|
||||
&& !parseSimpleColor(value)
|
||||
&& value.toLowerCase() != "transparent") {
|
||||
return;
|
||||
return false;
|
||||
}
|
||||
|
||||
// "Set the selection's value to value."
|
||||
setSelectionValue("forecolor", value);
|
||||
|
||||
// "Return true."
|
||||
return true;
|
||||
}, standardInlineValueCommand: true, relevantCssProperty: "color",
|
||||
equivalentValues: function(val1, val2) {
|
||||
// "Either both strings are valid CSS colors and have the same red,
|
||||
@ -3391,7 +3416,7 @@ commands.hilitecolor = {
|
||||
// "If value is not a valid CSS color, prepend "#" to it."
|
||||
//
|
||||
// "If value is still not a valid CSS color, or if it is currentColor,
|
||||
// abort these steps and do nothing."
|
||||
// return false."
|
||||
//
|
||||
// Cheap hack for testing, no attempt to be comprehensive.
|
||||
if (/^([0-9a-fA-F]{3}){1,2}$/.test(value)) {
|
||||
@ -3400,11 +3425,14 @@ commands.hilitecolor = {
|
||||
if (!/^(rgba?|hsla?)\(.*\)$/.test(value)
|
||||
&& !parseSimpleColor(value)
|
||||
&& value.toLowerCase() != "transparent") {
|
||||
return;
|
||||
return false;
|
||||
}
|
||||
|
||||
// "Set the selection's value to value."
|
||||
setSelectionValue("hilitecolor", value);
|
||||
|
||||
// "Return true."
|
||||
return true;
|
||||
}, indeterm: function() {
|
||||
// "True if among editable Text nodes that are effectively contained in
|
||||
// the active range, there are two that have distinct effective command
|
||||
@ -3431,12 +3459,14 @@ commands.hilitecolor = {
|
||||
commands.italic = {
|
||||
action: function() {
|
||||
// "If queryCommandState("italic") returns true, set the selection's
|
||||
// value to "normal". Otherwise set the selection's value to "italic"."
|
||||
// value to "normal". Otherwise set the selection's value to "italic".
|
||||
// Either way, return true."
|
||||
if (myQueryCommandState("italic")) {
|
||||
setSelectionValue("italic", "normal");
|
||||
} else {
|
||||
setSelectionValue("italic", "italic");
|
||||
}
|
||||
return true;
|
||||
}, inlineCommandActivatedValues: ["italic", "oblique"],
|
||||
relevantCssProperty: "fontStyle"
|
||||
};
|
||||
@ -3545,6 +3575,9 @@ commands.removeformat = {
|
||||
].forEach(function(command) {
|
||||
setSelectionValue(command, null);
|
||||
});
|
||||
|
||||
// "Return true."
|
||||
return true;
|
||||
}
|
||||
};
|
||||
|
||||
@ -3555,12 +3588,13 @@ commands.strikethrough = {
|
||||
action: function() {
|
||||
// "If queryCommandState("strikethrough") returns true, set the
|
||||
// selection's value to null. Otherwise set the selection's value to
|
||||
// "line-through"."
|
||||
// "line-through". Either way, return true."
|
||||
if (myQueryCommandState("strikethrough")) {
|
||||
setSelectionValue("strikethrough", null);
|
||||
} else {
|
||||
setSelectionValue("strikethrough", "line-through");
|
||||
}
|
||||
return true;
|
||||
}, inlineCommandActivatedValues: ["line-through"]
|
||||
};
|
||||
|
||||
@ -3579,6 +3613,9 @@ commands.subscript = {
|
||||
if (!state) {
|
||||
setSelectionValue("subscript", "subscript");
|
||||
}
|
||||
|
||||
// "Return true."
|
||||
return true;
|
||||
}, indeterm: function() {
|
||||
// "True if either among formattable nodes that are effectively
|
||||
// contained in the active range, there is at least one with effective
|
||||
@ -3609,6 +3646,9 @@ commands.superscript = {
|
||||
if (!state) {
|
||||
setSelectionValue("superscript", "superscript");
|
||||
}
|
||||
|
||||
// "Return true."
|
||||
return true;
|
||||
}, indeterm: function() {
|
||||
// "True if either among formattable nodes that are effectively
|
||||
// contained in the active range, there is at least one with effective
|
||||
@ -3629,12 +3669,14 @@ commands.superscript = {
|
||||
commands.underline = {
|
||||
action: function() {
|
||||
// "If queryCommandState("underline") returns true, set the selection's
|
||||
// value to null. Otherwise set the selection's value to "underline"."
|
||||
// value to null. Otherwise set the selection's value to "underline".
|
||||
// Either way, return true."
|
||||
if (myQueryCommandState("underline")) {
|
||||
setSelectionValue("underline", null);
|
||||
} else {
|
||||
setSelectionValue("underline", "underline");
|
||||
}
|
||||
return true;
|
||||
}, inlineCommandActivatedValues: ["underline"]
|
||||
};
|
||||
|
||||
@ -3679,6 +3721,9 @@ commands.unlink = {
|
||||
for (var i = 0; i < hyperlinks.length; i++) {
|
||||
clearValue(hyperlinks[i], "unlink");
|
||||
}
|
||||
|
||||
// "Return true."
|
||||
return true;
|
||||
}
|
||||
};
|
||||
|
||||
@ -6144,10 +6189,10 @@ commands["delete"] = {
|
||||
preservesOverrides: true,
|
||||
action: function() {
|
||||
// "If the active range is not collapsed, delete the selection and
|
||||
// abort these steps."
|
||||
// return true."
|
||||
if (!getActiveRange().collapsed) {
|
||||
deleteSelection();
|
||||
return;
|
||||
return true;
|
||||
}
|
||||
|
||||
// "Canonicalize whitespace at the active range's start."
|
||||
@ -6187,13 +6232,13 @@ commands["delete"] = {
|
||||
|
||||
// "Otherwise, if node has a child with index offset − 1 and that
|
||||
// child is an editable a, remove that child from node, preserving
|
||||
// its descendants. Then abort these steps."
|
||||
// its descendants. Then return true."
|
||||
} else if (0 <= offset - 1
|
||||
&& offset - 1 < node.childNodes.length
|
||||
&& isEditable(node.childNodes[offset - 1])
|
||||
&& isHtmlElement(node.childNodes[offset - 1], "a")) {
|
||||
removePreservingDescendants(node.childNodes[offset - 1]);
|
||||
return;
|
||||
return true;
|
||||
|
||||
// "Otherwise, if node has a child with index offset − 1 and that
|
||||
// child is not a block node or a br or an img, set node to that
|
||||
@ -6232,13 +6277,13 @@ commands["delete"] = {
|
||||
// "Delete the selection."
|
||||
deleteSelection();
|
||||
|
||||
// "Abort these steps."
|
||||
return;
|
||||
// "Return true."
|
||||
return true;
|
||||
}
|
||||
|
||||
// "If node is an inline node, abort these steps."
|
||||
// "If node is an inline node, return true."
|
||||
if (isInlineNode(node)) {
|
||||
return;
|
||||
return true;
|
||||
}
|
||||
|
||||
// "If node is an li or dt or dd and is the first child of its parent,
|
||||
@ -6286,8 +6331,8 @@ commands["delete"] = {
|
||||
// "Fix disallowed ancestors of node."
|
||||
fixDisallowedAncestors(node);
|
||||
|
||||
// "Abort these steps."
|
||||
return;
|
||||
// "Return true."
|
||||
return true;
|
||||
}
|
||||
|
||||
// "Let start node equal node and let start offset equal offset."
|
||||
@ -6348,14 +6393,14 @@ commands["delete"] = {
|
||||
outdentNode(nodeList[i]);
|
||||
}
|
||||
|
||||
// "Abort these steps."
|
||||
return;
|
||||
// "Return true."
|
||||
return true;
|
||||
}
|
||||
|
||||
// "If the child of start node with index start offset is a table,
|
||||
// abort these steps."
|
||||
// return true."
|
||||
if (isHtmlElement(startNode.childNodes[startOffset], "table")) {
|
||||
return;
|
||||
return true;
|
||||
}
|
||||
|
||||
// "If start node has a child with index start offset − 1, and that
|
||||
@ -6373,8 +6418,8 @@ commands["delete"] = {
|
||||
getSelection().extend(startNode, startOffset);
|
||||
getActiveRange().setEnd(startNode, startOffset);
|
||||
|
||||
// "Abort these steps."
|
||||
return;
|
||||
// "Return true."
|
||||
return true;
|
||||
}
|
||||
|
||||
// "If offset is zero; and either the child of start node with index
|
||||
@ -6408,8 +6453,8 @@ commands["delete"] = {
|
||||
getActiveRange().setStart(node, offset);
|
||||
getActiveRange().collapse(true);
|
||||
|
||||
// "Abort these steps."
|
||||
return;
|
||||
// "Return true."
|
||||
return true;
|
||||
}
|
||||
|
||||
// "If the child of start node with index start offset is an li or dt
|
||||
@ -6480,9 +6525,9 @@ commands["delete"] = {
|
||||
getActiveRange().setStart(originalRange.startContainer, originalRange.startOffset);
|
||||
getActiveRange().setEnd(originalRange.endContainer, originalRange.endOffset);
|
||||
|
||||
// "Abort these steps."
|
||||
// "Return true."
|
||||
extraRanges.pop();
|
||||
return;
|
||||
return true;
|
||||
}
|
||||
|
||||
// "While start node has a child with index start offset minus one:"
|
||||
@ -6515,6 +6560,9 @@ commands["delete"] = {
|
||||
|
||||
// "Delete the selection, with direction "backward"."
|
||||
deleteSelection({direction: "backward"});
|
||||
|
||||
// "Return true."
|
||||
return true;
|
||||
}
|
||||
};
|
||||
|
||||
@ -6538,10 +6586,9 @@ commands.formatblock = {
|
||||
// "Let value be converted to ASCII lowercase."
|
||||
value = value.toLowerCase();
|
||||
|
||||
// "If value is not a formattable block name, abort these steps and do
|
||||
// nothing."
|
||||
// "If value is not a formattable block name, return false."
|
||||
if (formattableBlockNames.indexOf(value) == -1) {
|
||||
return;
|
||||
return false;
|
||||
}
|
||||
|
||||
// "Block-extend the active range, and let new range be the result."
|
||||
@ -6645,6 +6692,9 @@ commands.formatblock = {
|
||||
: function() { return false },
|
||||
function() { return document.createElement(value) }));
|
||||
}
|
||||
|
||||
// "Return true."
|
||||
return true;
|
||||
}, indeterm: function() {
|
||||
// "If the active range is null, return false."
|
||||
if (!getActiveRange()) {
|
||||
@ -6761,10 +6811,10 @@ commands.forwarddelete = {
|
||||
preservesOverrides: true,
|
||||
action: function() {
|
||||
// "If the active range is not collapsed, delete the selection and
|
||||
// abort these steps."
|
||||
// return true."
|
||||
if (!getActiveRange().collapsed) {
|
||||
deleteSelection();
|
||||
return;
|
||||
return true;
|
||||
}
|
||||
|
||||
// "Canonicalize whitespace at the active range's start."
|
||||
@ -6847,13 +6897,13 @@ commands.forwarddelete = {
|
||||
// "Delete the selection."
|
||||
deleteSelection();
|
||||
|
||||
// "Abort these steps."
|
||||
return;
|
||||
// "Return true."
|
||||
return true;
|
||||
}
|
||||
|
||||
// "If node is an inline node, abort these steps."
|
||||
// "If node is an inline node, return true."
|
||||
if (isInlineNode(node)) {
|
||||
return;
|
||||
return true;
|
||||
}
|
||||
|
||||
// "If node has a child with index offset and that child is a br or hr
|
||||
@ -6873,8 +6923,8 @@ commands.forwarddelete = {
|
||||
// "Delete the selection."
|
||||
deleteSelection();
|
||||
|
||||
// "Abort these steps."
|
||||
return;
|
||||
// "Return true."
|
||||
return true;
|
||||
}
|
||||
|
||||
// "Let end node equal node and let end offset equal offset."
|
||||
@ -6910,9 +6960,9 @@ commands.forwarddelete = {
|
||||
}
|
||||
|
||||
// "If the child of end node with index end offset minus one is a
|
||||
// table, abort these steps."
|
||||
// table, return true."
|
||||
if (isHtmlElement(endNode.childNodes[endOffset - 1], "table")) {
|
||||
return;
|
||||
return true;
|
||||
}
|
||||
|
||||
// "If the child of end node with index end offset is a table:"
|
||||
@ -6927,8 +6977,8 @@ commands.forwarddelete = {
|
||||
getSelection().extend(endNode, endOffset + 1);
|
||||
getActiveRange().setEnd(endNode, endOffset + 1);
|
||||
|
||||
// "Abort these steps."
|
||||
return;
|
||||
// "Return true."
|
||||
return true;
|
||||
}
|
||||
|
||||
// "If offset is the length of node, and the child of end node with
|
||||
@ -6953,8 +7003,8 @@ commands.forwarddelete = {
|
||||
getActiveRange().setStart(node, offset);
|
||||
getActiveRange().collapse(true);
|
||||
|
||||
// "Abort these steps."
|
||||
return;
|
||||
// "Return true."
|
||||
return true;
|
||||
}
|
||||
|
||||
// "While end node has a child with index end offset:"
|
||||
@ -6984,6 +7034,9 @@ commands.forwarddelete = {
|
||||
|
||||
// "Delete the selection."
|
||||
deleteSelection();
|
||||
|
||||
// "Return true."
|
||||
return true;
|
||||
}
|
||||
};
|
||||
|
||||
@ -7073,6 +7126,9 @@ commands.indent = {
|
||||
// "Indent sublist."
|
||||
indentNodes(sublist);
|
||||
}
|
||||
|
||||
// "Return true."
|
||||
return true;
|
||||
}
|
||||
};
|
||||
|
||||
@ -7121,10 +7177,10 @@ commands.inserthorizontalrule = {
|
||||
deleteSelection({blockMerging: false});
|
||||
|
||||
// "If the active range's start node is neither editable nor an editing
|
||||
// host, abort these steps."
|
||||
// host, return true."
|
||||
if (!isEditable(getActiveRange().startContainer)
|
||||
&& !isEditingHost(getActiveRange().startContainer)) {
|
||||
return;
|
||||
return true;
|
||||
}
|
||||
|
||||
// "If the active range's start node is a Text node and its start
|
||||
@ -7170,6 +7226,9 @@ commands.inserthorizontalrule = {
|
||||
getSelection().collapse(hr.parentNode, 1 + getNodeIndex(hr));
|
||||
getActiveRange().setStart(hr.parentNode, 1 + getNodeIndex(hr));
|
||||
getActiveRange().collapse(true);
|
||||
|
||||
// "Return true."
|
||||
return true;
|
||||
}
|
||||
};
|
||||
|
||||
@ -7183,10 +7242,10 @@ commands.inserthtml = {
|
||||
deleteSelection();
|
||||
|
||||
// "If the active range's start node is neither editable nor an editing
|
||||
// host, abort these steps."
|
||||
// host, return true."
|
||||
if (!isEditable(getActiveRange().startContainer)
|
||||
&& !isEditingHost(getActiveRange().startContainer)) {
|
||||
return;
|
||||
return true;
|
||||
}
|
||||
|
||||
// "Let frag be the result of calling createContextualFragment(value)
|
||||
@ -7196,9 +7255,9 @@ commands.inserthtml = {
|
||||
// "Let last child be the lastChild of frag."
|
||||
var lastChild = frag.lastChild;
|
||||
|
||||
// "If last child is null, abort these steps."
|
||||
// "If last child is null, return true."
|
||||
if (!lastChild) {
|
||||
return;
|
||||
return true;
|
||||
}
|
||||
|
||||
// "Let descendants be all descendants of frag."
|
||||
@ -7242,6 +7301,9 @@ commands.inserthtml = {
|
||||
for (var i = 0; i < descendants.length; i++) {
|
||||
fixDisallowedAncestors(descendants[i]);
|
||||
}
|
||||
|
||||
// "Return true."
|
||||
return true;
|
||||
}
|
||||
};
|
||||
|
||||
@ -7251,9 +7313,9 @@ commands.inserthtml = {
|
||||
commands.insertimage = {
|
||||
preservesOverrides: true,
|
||||
action: function(value) {
|
||||
// "If value is the empty string, abort these steps and do nothing."
|
||||
// "If value is the empty string, return false."
|
||||
if (value === "") {
|
||||
return;
|
||||
return false;
|
||||
}
|
||||
|
||||
// "Delete the selection, with strip wrappers false."
|
||||
@ -7263,10 +7325,10 @@ commands.insertimage = {
|
||||
var range = getActiveRange();
|
||||
|
||||
// "If the active range's start node is neither editable nor an editing
|
||||
// host, abort these steps."
|
||||
// host, return true."
|
||||
if (!isEditable(getActiveRange().startContainer)
|
||||
&& !isEditingHost(getActiveRange().startContainer)) {
|
||||
return;
|
||||
return true;
|
||||
}
|
||||
|
||||
// "If range's start node is a block node whose sole child is a br, and
|
||||
@ -7304,6 +7366,9 @@ commands.insertimage = {
|
||||
// to actually do what the spec says.
|
||||
img.removeAttribute("width");
|
||||
img.removeAttribute("height");
|
||||
|
||||
// "Return true."
|
||||
return true;
|
||||
}
|
||||
};
|
||||
|
||||
@ -7317,25 +7382,25 @@ commands.insertlinebreak = {
|
||||
deleteSelection({stripWrappers: false});
|
||||
|
||||
// "If the active range's start node is neither editable nor an editing
|
||||
// host, abort these steps."
|
||||
// host, return true."
|
||||
if (!isEditable(getActiveRange().startContainer)
|
||||
&& !isEditingHost(getActiveRange().startContainer)) {
|
||||
return;
|
||||
return true;
|
||||
}
|
||||
|
||||
// "If the active range's start node is an Element, and "br" is not an
|
||||
// allowed child of it, abort these steps."
|
||||
// allowed child of it, return true."
|
||||
if (getActiveRange().startContainer.nodeType == Node.ELEMENT_NODE
|
||||
&& !isAllowedChild("br", getActiveRange().startContainer)) {
|
||||
return;
|
||||
return true;
|
||||
}
|
||||
|
||||
// "If the active range's start node is not an Element, and "br" is not
|
||||
// an allowed child of the active range's start node's parent, abort
|
||||
// these steps."
|
||||
// an allowed child of the active range's start node's parent, return
|
||||
// true."
|
||||
if (getActiveRange().startContainer.nodeType != Node.ELEMENT_NODE
|
||||
&& !isAllowedChild("br", getActiveRange().startContainer.parentNode)) {
|
||||
return;
|
||||
return true;
|
||||
}
|
||||
|
||||
// "If the active range's start node is a Text node and its start
|
||||
@ -7390,6 +7455,9 @@ commands.insertlinebreak = {
|
||||
getActiveRange().setStart(br.parentNode, 1 + getNodeIndex(br));
|
||||
getActiveRange().setEnd(br.parentNode, 1 + getNodeIndex(br));
|
||||
}
|
||||
|
||||
// "Return true."
|
||||
return true;
|
||||
}
|
||||
};
|
||||
|
||||
@ -7398,8 +7466,8 @@ commands.insertlinebreak = {
|
||||
//@{
|
||||
commands.insertorderedlist = {
|
||||
preservesOverrides: true,
|
||||
// "Toggle lists with tag name "ol"."
|
||||
action: function() { toggleLists("ol") },
|
||||
// "Toggle lists with tag name "ol", then return true."
|
||||
action: function() { toggleLists("ol"); return true },
|
||||
// "True if the selection's list state is "mixed" or "mixed ol", false
|
||||
// otherwise."
|
||||
indeterm: function() { return /^mixed( ol)?$/.test(getSelectionListState()) },
|
||||
@ -7417,10 +7485,10 @@ commands.insertparagraph = {
|
||||
deleteSelection();
|
||||
|
||||
// "If the active range's start node is neither editable nor an editing
|
||||
// host, abort these steps."
|
||||
// host, return true."
|
||||
if (!isEditable(getActiveRange().startContainer)
|
||||
&& !isEditingHost(getActiveRange().startContainer)) {
|
||||
return;
|
||||
return true;
|
||||
}
|
||||
|
||||
// "Let node and offset be the active range's start node and offset."
|
||||
@ -7514,9 +7582,9 @@ commands.insertparagraph = {
|
||||
// "If node list is empty:"
|
||||
if (!nodeList.length) {
|
||||
// "If tag is not an allowed child of the active range's start
|
||||
// node, abort these steps."
|
||||
// node, return true."
|
||||
if (!isAllowedChild(tag, getActiveRange().startContainer)) {
|
||||
return;
|
||||
return true;
|
||||
}
|
||||
|
||||
// "Set container to the result of calling createElement(tag)
|
||||
@ -7536,8 +7604,8 @@ commands.insertparagraph = {
|
||||
getActiveRange().setStart(container, 0);
|
||||
getActiveRange().setEnd(container, 0);
|
||||
|
||||
// "Abort these steps."
|
||||
return;
|
||||
// "Return true."
|
||||
return true;
|
||||
}
|
||||
|
||||
// "While the nextSibling of the last member of node list is not
|
||||
@ -7586,8 +7654,8 @@ commands.insertparagraph = {
|
||||
getActiveRange().setEnd(node, offset + 1);
|
||||
}
|
||||
|
||||
// "Abort these steps."
|
||||
return;
|
||||
// "Return true."
|
||||
return true;
|
||||
}
|
||||
|
||||
// "If container's local name is "li", "dt", or "dd"; and either it has
|
||||
@ -7621,8 +7689,8 @@ commands.insertparagraph = {
|
||||
// "Fix disallowed ancestors of container."
|
||||
fixDisallowedAncestors(container);
|
||||
|
||||
// "Abort these steps."
|
||||
return;
|
||||
// "Return true."
|
||||
return true;
|
||||
}
|
||||
|
||||
// "Let new line range be a new range whose start is the same as
|
||||
@ -7746,6 +7814,9 @@ commands.insertparagraph = {
|
||||
getSelection().collapse(newContainer, 0);
|
||||
getActiveRange().setStart(newContainer, 0);
|
||||
getActiveRange().setEnd(newContainer, 0);
|
||||
|
||||
// "Return true."
|
||||
return true;
|
||||
}
|
||||
};
|
||||
|
||||
@ -7758,10 +7829,10 @@ commands.inserttext = {
|
||||
deleteSelection({stripWrappers: false});
|
||||
|
||||
// "If the active range's start node is neither editable nor an editing
|
||||
// host, abort these steps."
|
||||
// host, return true."
|
||||
if (!isEditable(getActiveRange().startContainer)
|
||||
&& !isEditingHost(getActiveRange().startContainer)) {
|
||||
return;
|
||||
return true;
|
||||
}
|
||||
|
||||
// "If value's length is greater than one:"
|
||||
@ -7772,20 +7843,20 @@ commands.inserttext = {
|
||||
commands.inserttext.action(value[i]);
|
||||
}
|
||||
|
||||
// "Abort these steps."
|
||||
return;
|
||||
// "Return true."
|
||||
return true;
|
||||
}
|
||||
|
||||
// "If value is the empty string, abort these steps."
|
||||
// "If value is the empty string, return true."
|
||||
if (value == "") {
|
||||
return;
|
||||
return true;
|
||||
}
|
||||
|
||||
// "If value is a newline (U+00A0), take the action for the
|
||||
// insertParagraph command and abort these steps."
|
||||
// insertParagraph command and return true."
|
||||
if (value == "\n") {
|
||||
commands.insertparagraph.action();
|
||||
return;
|
||||
return true;
|
||||
}
|
||||
|
||||
// "Let node and offset be the active range's start node and offset."
|
||||
@ -7893,6 +7964,9 @@ commands.inserttext = {
|
||||
// throws, which we don't want.
|
||||
try { getSelection().collapseToEnd(); } catch(e) {}
|
||||
getActiveRange().collapse(false);
|
||||
|
||||
// "Return true."
|
||||
return true;
|
||||
}
|
||||
};
|
||||
|
||||
@ -7901,8 +7975,8 @@ commands.inserttext = {
|
||||
//@{
|
||||
commands.insertunorderedlist = {
|
||||
preservesOverrides: true,
|
||||
// "Toggle lists with tag name "ul"."
|
||||
action: function() { toggleLists("ul") },
|
||||
// "Toggle lists with tag name "ul", then return true."
|
||||
action: function() { toggleLists("ul"); return true },
|
||||
// "True if the selection's list state is "mixed" or "mixed ul", false
|
||||
// otherwise."
|
||||
indeterm: function() { return /^mixed( ul)?$/.test(getSelectionListState()) },
|
||||
@ -7915,8 +7989,8 @@ commands.insertunorderedlist = {
|
||||
//@{
|
||||
commands.justifycenter = {
|
||||
preservesOverrides: true,
|
||||
// "Justify the selection with alignment "center"."
|
||||
action: function() { justifySelection("center") },
|
||||
// "Justify the selection with alignment "center", then return true."
|
||||
action: function() { justifySelection("center"); return true },
|
||||
indeterm: function() {
|
||||
// "Return false if the active range is null. Otherwise, block-extend
|
||||
// the active range. Return true if among visible editable nodes that
|
||||
@ -7969,8 +8043,8 @@ commands.justifycenter = {
|
||||
//@{
|
||||
commands.justifyfull = {
|
||||
preservesOverrides: true,
|
||||
// "Justify the selection with alignment "justify"."
|
||||
action: function() { justifySelection("justify") },
|
||||
// "Justify the selection with alignment "justify", then return true."
|
||||
action: function() { justifySelection("justify"); return true },
|
||||
indeterm: function() {
|
||||
// "Return false if the active range is null. Otherwise, block-extend
|
||||
// the active range. Return true if among visible editable nodes that
|
||||
@ -8023,8 +8097,8 @@ commands.justifyfull = {
|
||||
//@{
|
||||
commands.justifyleft = {
|
||||
preservesOverrides: true,
|
||||
// "Justify the selection with alignment "left"."
|
||||
action: function() { justifySelection("left") },
|
||||
// "Justify the selection with alignment "left", then return true."
|
||||
action: function() { justifySelection("left"); return true },
|
||||
indeterm: function() {
|
||||
// "Return false if the active range is null. Otherwise, block-extend
|
||||
// the active range. Return true if among visible editable nodes that
|
||||
@ -8077,8 +8151,8 @@ commands.justifyleft = {
|
||||
//@{
|
||||
commands.justifyright = {
|
||||
preservesOverrides: true,
|
||||
// "Justify the selection with alignment "right"."
|
||||
action: function() { justifySelection("right") },
|
||||
// "Justify the selection with alignment "right", then return true."
|
||||
action: function() { justifySelection("right"); return true },
|
||||
indeterm: function() {
|
||||
// "Return false if the active range is null. Otherwise, block-extend
|
||||
// the active range. Return true if among visible editable nodes that
|
||||
@ -8223,6 +8297,9 @@ commands.outdent = {
|
||||
// "Restore the values from values."
|
||||
restoreValues(values);
|
||||
}
|
||||
|
||||
// "Return true."
|
||||
return true;
|
||||
}
|
||||
};
|
||||
|
||||
@ -8238,11 +8315,13 @@ commands.defaultparagraphseparator = {
|
||||
action: function(value) {
|
||||
// "Let value be converted to ASCII lowercase. If value is then equal
|
||||
// to "p" or "div", set the context object's default single-line
|
||||
// container name to value. Otherwise, do nothing."
|
||||
// container name to value and return true. Otherwise, return false."
|
||||
value = value.toLowerCase();
|
||||
if (value == "p" || value == "div") {
|
||||
defaultSingleLineContainerName = value;
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}, value: function() {
|
||||
// "Return the context object's default single-line container name."
|
||||
return defaultSingleLineContainerName;
|
||||
@ -8275,6 +8354,9 @@ commands.selectall = {
|
||||
} else {
|
||||
getSelection().selectAllChildren(target);
|
||||
}
|
||||
|
||||
// "Return true."
|
||||
return true;
|
||||
}
|
||||
};
|
||||
|
||||
@ -8285,8 +8367,9 @@ commands.stylewithcss = {
|
||||
action: function(value) {
|
||||
// "If value is an ASCII case-insensitive match for the string
|
||||
// "false", set the CSS styling flag to false. Otherwise, set the
|
||||
// CSS styling flag to true."
|
||||
// CSS styling flag to true. Either way, return true."
|
||||
cssStylingFlag = String(value).toLowerCase() != "false";
|
||||
return true;
|
||||
}, state: function() { return cssStylingFlag }
|
||||
};
|
||||
|
||||
@ -8297,8 +8380,9 @@ commands.usecss = {
|
||||
action: function(value) {
|
||||
// "If value is an ASCII case-insensitive match for the string "false",
|
||||
// set the CSS styling flag to true. Otherwise, set the CSS styling
|
||||
// flag to false."
|
||||
// flag to false. Either way, return true."
|
||||
cssStylingFlag = String(value).toLowerCase() == "false";
|
||||
return true;
|
||||
}
|
||||
};
|
||||
//@}
|
||||
@ -8423,10 +8507,11 @@ commandNames.forEach(function(command) {
|
||||
|
||||
commands[command].action = function(value) {
|
||||
var overrides = recordCurrentOverrides();
|
||||
oldAction(value);
|
||||
var ret = oldAction(value);
|
||||
if (getActiveRange().collapsed) {
|
||||
restoreStatesAndValues(overrides);
|
||||
}
|
||||
return ret;
|
||||
};
|
||||
}
|
||||
});
|
||||
|
@ -4035,6 +4035,8 @@ var tests = {
|
||||
['P', 'foo[bar]baz'],
|
||||
[' div ', 'foo[bar]baz'],
|
||||
[' p ', 'foo[bar]baz'],
|
||||
['<div>', 'foo[bar]baz'],
|
||||
['<p>', 'foo[bar]baz'],
|
||||
['li', 'foo[bar]baz'],
|
||||
['blockquote', 'foo[bar]baz'],
|
||||
],
|
||||
|
@ -26,9 +26,7 @@
|
||||
"Command backColor, value \"green\": input event, canceled":true,
|
||||
"Command backColor, value \"green\": beforeinput event, uncanceled":true,
|
||||
"Command backColor, value \"green\": input event, uncanceled":true,
|
||||
"Command createLink, value \"\": execCommand() must not throw, canceled":true,
|
||||
"Command createLink, value \"\": beforeinput event, canceled":true,
|
||||
"Command createLink, value \"\": execCommand() must not throw, uncanceled":true,
|
||||
"Command createLink, value \"\": beforeinput event, uncanceled":true,
|
||||
"Command createLink, value \"\": input event, uncanceled":true,
|
||||
"Command createLink, value \"quasit\": beforeinput event, canceled":true,
|
||||
@ -203,9 +201,7 @@
|
||||
"Command insertHTML, value \"<b>hi</b>\": input event, canceled":true,
|
||||
"Command insertHTML, value \"<b>hi</b>\": beforeinput event, uncanceled":true,
|
||||
"Command insertHTML, value \"<b>hi</b>\": input event, uncanceled":true,
|
||||
"Command insertImage, value \"\": execCommand() must not throw, canceled":true,
|
||||
"Command insertImage, value \"\": beforeinput event, canceled":true,
|
||||
"Command insertImage, value \"\": execCommand() must not throw, uncanceled":true,
|
||||
"Command insertImage, value \"\": beforeinput event, uncanceled":true,
|
||||
"Command insertImage, value \"\": input event, uncanceled":true,
|
||||
"Command insertImage, value \"quasit\": beforeinput event, canceled":true,
|
||||
|
@ -310,7 +310,6 @@
|
||||
"[[\"createlink\",\"http://www.google.com/\"]] \"{<a href=otherurl><b>foobar]baz</b></a>\" compare innerHTML":true,
|
||||
"[[\"createlink\",\"http://www.google.com/\"]] \"<a name=abc>foo[bar]baz</a>\" compare innerHTML":true,
|
||||
"[[\"createlink\",\"http://www.google.com/\"]] \"<a name=abc><b>foo[bar]baz</b></a>\" compare innerHTML":true,
|
||||
"[[\"createlink\",\"\"]] \"foo[bar]baz\": execCommand(\"createlink\", false, \"\") return value":true,
|
||||
"[[\"stylewithcss\",\"true\"],[\"delete\",\"\"]] \"foo<span style=display:none>bar</span>[]baz\" compare innerHTML":true,
|
||||
"[[\"stylewithcss\",\"false\"],[\"delete\",\"\"]] \"foo<span style=display:none>bar</span>[]baz\" compare innerHTML":true,
|
||||
"[[\"delete\",\"\"]] \"foo<script>bar</script>[]baz\" compare innerHTML":true,
|
||||
@ -1470,18 +1469,20 @@
|
||||
"[[\"stylewithcss\",\"false\"],[\"fontsize\",\"8\"]] \"foo[bar]baz\" queryCommandValue(\"fontsize\") before":true,
|
||||
"[[\"stylewithcss\",\"true\"],[\"fontsize\",\"100\"]] \"foo[bar]baz\" queryCommandValue(\"fontsize\") before":true,
|
||||
"[[\"stylewithcss\",\"false\"],[\"fontsize\",\"100\"]] \"foo[bar]baz\" queryCommandValue(\"fontsize\") before":true,
|
||||
"[[\"fontsize\",\"2em\"]] \"foo[bar]baz\": execCommand(\"fontsize\", false, \"2em\") return value":true,
|
||||
"[[\"fontsize\",\"2em\"]] \"foo[bar]baz\" compare innerHTML":true,
|
||||
"[[\"fontsize\",\"2em\"]] \"foo[bar]baz\" queryCommandValue(\"fontsize\") before":true,
|
||||
"[[\"fontsize\",\"2em\"]] \"foo[bar]baz\" queryCommandValue(\"fontsize\") after":true,
|
||||
"[[\"fontsize\",\"20pt\"]] \"foo[bar]baz\": execCommand(\"fontsize\", false, \"20pt\") return value":true,
|
||||
"[[\"fontsize\",\"20pt\"]] \"foo[bar]baz\" compare innerHTML":true,
|
||||
"[[\"fontsize\",\"20pt\"]] \"foo[bar]baz\" queryCommandValue(\"fontsize\") before":true,
|
||||
"[[\"fontsize\",\"20pt\"]] \"foo[bar]baz\" queryCommandValue(\"fontsize\") after":true,
|
||||
"[[\"fontsize\",\"xx-large\"]] \"foo[bar]baz\": execCommand(\"fontsize\", false, \"xx-large\") return value":true,
|
||||
"[[\"fontsize\",\"xx-large\"]] \"foo[bar]baz\" queryCommandValue(\"fontsize\") before":true,
|
||||
"[[\"fontsize\",\"xx-large\"]] \"foo[bar]baz\" queryCommandValue(\"fontsize\") after":true,
|
||||
"[[\"stylewithcss\",\"true\"],[\"fontsize\",\" 1 \"]] \"foo[bar]baz\" queryCommandValue(\"fontsize\") before":true,
|
||||
"[[\"stylewithcss\",\"true\"],[\"fontsize\",\" 1 \"]] \"foo[bar]baz\" queryCommandValue(\"fontsize\") after":true,
|
||||
"[[\"stylewithcss\",\"false\"],[\"fontsize\",\" 1 \"]] \"foo[bar]baz\" queryCommandValue(\"fontsize\") before":true,
|
||||
"[[\"fontsize\",\"1.\"]] \"foo[bar]baz\": execCommand(\"fontsize\", false, \"1.\") return value":true,
|
||||
"[[\"fontsize\",\"1.\"]] \"foo[bar]baz\" compare innerHTML":true,
|
||||
"[[\"fontsize\",\"1.\"]] \"foo[bar]baz\" queryCommandValue(\"fontsize\") before":true,
|
||||
"[[\"fontsize\",\"1.\"]] \"foo[bar]baz\" queryCommandValue(\"fontsize\") after":true,
|
||||
@ -1512,7 +1513,6 @@
|
||||
"[[\"stylewithcss\",\"true\"],[\"fontsize\",\"-9\"]] \"foo[bar]baz\" queryCommandValue(\"fontsize\") before":true,
|
||||
"[[\"stylewithcss\",\"true\"],[\"fontsize\",\"-9\"]] \"foo[bar]baz\" queryCommandValue(\"fontsize\") after":true,
|
||||
"[[\"stylewithcss\",\"false\"],[\"fontsize\",\"-9\"]] \"foo[bar]baz\" queryCommandValue(\"fontsize\") before":true,
|
||||
"[[\"fontsize\",\"\"]] \"foo[bar]baz\": execCommand(\"fontsize\", false, \"\") return value":true,
|
||||
"[[\"fontsize\",\"\"]] \"foo[bar]baz\" queryCommandValue(\"fontsize\") before":true,
|
||||
"[[\"fontsize\",\"\"]] \"foo[bar]baz\" queryCommandValue(\"fontsize\") after":true,
|
||||
"[[\"stylewithcss\",\"true\"],[\"fontsize\",\"4\"]] \"<table><tbody><tr><td>foo<td>b[a]r<td>baz</table>\" queryCommandValue(\"fontsize\") before":true,
|
||||
@ -1710,6 +1710,7 @@
|
||||
"[[\"stylewithcss\",\"true\"],[\"forecolor\",\"transparent\"]] \"foo[bar]baz\" compare innerHTML":true,
|
||||
"[[\"stylewithcss\",\"true\"],[\"forecolor\",\"transparent\"]] \"foo[bar]baz\" queryCommandValue(\"forecolor\") after":true,
|
||||
"[[\"stylewithcss\",\"false\"],[\"forecolor\",\"transparent\"]] \"foo[bar]baz\" compare innerHTML":true,
|
||||
"[[\"forecolor\",\"currentColor\"]] \"foo[bar]baz\": execCommand(\"forecolor\", false, \"currentColor\") return value":true,
|
||||
"[[\"forecolor\",\"currentColor\"]] \"foo[bar]baz\" compare innerHTML":true,
|
||||
"[[\"forecolor\",\"currentColor\"]] \"foo[bar]baz\" queryCommandValue(\"forecolor\") after":true,
|
||||
"[[\"stylewithcss\",\"false\"],[\"forecolor\",\"#0000FF\"]] \"<table><tbody><tr><td>foo<td>b[a]r<td>baz</table>\" compare innerHTML":true,
|
||||
@ -2293,14 +2294,20 @@
|
||||
"[[\"defaultparagraphseparator\",\"p\"],[\"formatblock\",\"<p>\"]] \"<quasit style=\\\"display: block\\\">[foobar]</quasit>\": execCommand(\"defaultparagraphseparator\", false, \"p\") return value":true,
|
||||
"[[\"defaultparagraphseparator\",\"p\"],[\"formatblock\",\"<p>\"]] \"<quasit style=\\\"display: block\\\">[foobar]</quasit>\" queryCommandValue(\"defaultparagraphseparator\") before":true,
|
||||
"[[\"defaultparagraphseparator\",\"p\"],[\"formatblock\",\"<p>\"]] \"<quasit style=\\\"display: block\\\">[foobar]</quasit>\" queryCommandValue(\"defaultparagraphseparator\") after":true,
|
||||
"[[\"formatblock\",\"<blockquote>\"]] \"<blockquote>[foo]</blockquote><p>extra\": execCommand(\"formatblock\", false, \"<blockquote>\") return value":true,
|
||||
"[[\"formatblock\",\"<blockquote>\"]] \"<blockquote>[foo]</blockquote><p>extra\" compare innerHTML":true,
|
||||
"[[\"formatblock\",\"<blockquote>\"]] \"<blockquote><p>[foo]<p>bar</blockquote><p>extra\": execCommand(\"formatblock\", false, \"<blockquote>\") return value":true,
|
||||
"[[\"formatblock\",\"<blockquote>\"]] \"<blockquote><p>[foo]<p>bar</blockquote><p>extra\" compare innerHTML":true,
|
||||
"[[\"formatblock\",\"<blockquote>\"]] \"[foo]<blockquote>bar</blockquote><p>extra\": execCommand(\"formatblock\", false, \"<blockquote>\") return value":true,
|
||||
"[[\"formatblock\",\"<blockquote>\"]] \"[foo]<blockquote>bar</blockquote><p>extra\" compare innerHTML":true,
|
||||
"[[\"formatblock\",\"<blockquote>\"]] \"<p>[foo<p>bar]<p>baz\": execCommand(\"formatblock\", false, \"<blockquote>\") return value":true,
|
||||
"[[\"formatblock\",\"<blockquote>\"]] \"<p>[foo<p>bar]<p>baz\" compare innerHTML":true,
|
||||
"[[\"formatblock\",\"<blockquote>\"]] \"<section>[foo]</section>\": execCommand(\"formatblock\", false, \"<blockquote>\") return value":true,
|
||||
"[[\"formatblock\",\"<blockquote>\"]] \"<section>[foo]</section>\" compare innerHTML":true,
|
||||
"[[\"formatblock\",\"<blockquote>\"]] \"<section><p>[foo]</section>\": execCommand(\"formatblock\", false, \"<blockquote>\") return value":true,
|
||||
"[[\"formatblock\",\"<blockquote>\"]] \"<section><p>[foo]</section>\" compare innerHTML":true,
|
||||
"[[\"formatblock\",\"<blockquote>\"]] \"<section><hgroup><h1>[foo]</h1><h2>bar</h2></hgroup><p>baz</section>\": execCommand(\"formatblock\", false, \"<blockquote>\") return value":true,
|
||||
"[[\"formatblock\",\"<blockquote>\"]] \"<section><hgroup><h1>[foo]</h1><h2>bar</h2></hgroup><p>baz</section>\" compare innerHTML":true,
|
||||
"[[\"formatblock\",\"<article>\"]] \"<section>[foo]</section>\": execCommand(\"formatblock\", false, \"<article>\") return value":true,
|
||||
"[[\"defaultparagraphseparator\",\"div\"],[\"formatblock\",\"<address>\"]] \"<div>[foobar]</div>\": execCommand(\"defaultparagraphseparator\", false, \"div\") return value":true,
|
||||
"[[\"defaultparagraphseparator\",\"div\"],[\"formatblock\",\"<address>\"]] \"<div>[foobar]</div>\" compare innerHTML":true,
|
||||
"[[\"defaultparagraphseparator\",\"div\"],[\"formatblock\",\"<address>\"]] \"<div>[foobar]</div>\" queryCommandValue(\"defaultparagraphseparator\") before":true,
|
||||
@ -2311,9 +2318,9 @@
|
||||
"[[\"defaultparagraphseparator\",\"p\"],[\"formatblock\",\"<address>\"]] \"<div>[foobar]</div>\" queryCommandValue(\"defaultparagraphseparator\") before":true,
|
||||
"[[\"defaultparagraphseparator\",\"p\"],[\"formatblock\",\"<address>\"]] \"<div>[foobar]</div>\" queryCommandValue(\"defaultparagraphseparator\") after":true,
|
||||
"[[\"defaultparagraphseparator\",\"p\"],[\"formatblock\",\"<address>\"]] \"<div>[foobar]</div>\" queryCommandValue(\"formatblock\") before":true,
|
||||
"[[\"formatblock\",\"<article>\"]] \"<div>[foobar]</div>\": execCommand(\"formatblock\", false, \"<article>\") return value":true,
|
||||
"[[\"formatblock\",\"<article>\"]] \"<div>[foobar]</div>\" queryCommandValue(\"formatblock\") before":true,
|
||||
"[[\"formatblock\",\"<article>\"]] \"<div>[foobar]</div>\" queryCommandValue(\"formatblock\") after":true,
|
||||
"[[\"formatblock\",\"<blockquote>\"]] \"<div>[foobar]</div>\": execCommand(\"formatblock\", false, \"<blockquote>\") return value":true,
|
||||
"[[\"formatblock\",\"<blockquote>\"]] \"<div>[foobar]</div>\" compare innerHTML":true,
|
||||
"[[\"formatblock\",\"<blockquote>\"]] \"<div>[foobar]</div>\" queryCommandValue(\"formatblock\") before":true,
|
||||
"[[\"formatblock\",\"<blockquote>\"]] \"<div>[foobar]</div>\" queryCommandValue(\"formatblock\") after":true,
|
||||
@ -2329,9 +2336,9 @@
|
||||
"[[\"defaultparagraphseparator\",\"p\"],[\"formatblock\",\"<dd>\"]] \"<div>[foobar]</div>\" queryCommandValue(\"defaultparagraphseparator\") after":true,
|
||||
"[[\"defaultparagraphseparator\",\"p\"],[\"formatblock\",\"<dd>\"]] \"<div>[foobar]</div>\" queryCommandValue(\"formatblock\") before":true,
|
||||
"[[\"defaultparagraphseparator\",\"p\"],[\"formatblock\",\"<dd>\"]] \"<div>[foobar]</div>\" queryCommandValue(\"formatblock\") after":true,
|
||||
"[[\"formatblock\",\"<del>\"]] \"<div>[foobar]</div>\": execCommand(\"formatblock\", false, \"<del>\") return value":true,
|
||||
"[[\"formatblock\",\"<del>\"]] \"<div>[foobar]</div>\" queryCommandValue(\"formatblock\") before":true,
|
||||
"[[\"formatblock\",\"<del>\"]] \"<div>[foobar]</div>\" queryCommandValue(\"formatblock\") after":true,
|
||||
"[[\"formatblock\",\"<dl>\"]] \"<div>[foobar]</div>\": execCommand(\"formatblock\", false, \"<dl>\") return value":true,
|
||||
"[[\"formatblock\",\"<dl>\"]] \"<div>[foobar]</div>\" compare innerHTML":true,
|
||||
"[[\"formatblock\",\"<dl>\"]] \"<div>[foobar]</div>\" queryCommandValue(\"formatblock\") before":true,
|
||||
"[[\"formatblock\",\"<dl>\"]] \"<div>[foobar]</div>\" queryCommandValue(\"formatblock\") after":true,
|
||||
@ -2407,13 +2414,10 @@
|
||||
"[[\"defaultparagraphseparator\",\"p\"],[\"formatblock\",\"<h6>\"]] \"<div>[foobar]</div>\" queryCommandValue(\"defaultparagraphseparator\") before":true,
|
||||
"[[\"defaultparagraphseparator\",\"p\"],[\"formatblock\",\"<h6>\"]] \"<div>[foobar]</div>\" queryCommandValue(\"defaultparagraphseparator\") after":true,
|
||||
"[[\"defaultparagraphseparator\",\"p\"],[\"formatblock\",\"<h6>\"]] \"<div>[foobar]</div>\" queryCommandValue(\"formatblock\") before":true,
|
||||
"[[\"formatblock\",\"<ins>\"]] \"<div>[foobar]</div>\": execCommand(\"formatblock\", false, \"<ins>\") return value":true,
|
||||
"[[\"formatblock\",\"<ins>\"]] \"<div>[foobar]</div>\" queryCommandValue(\"formatblock\") before":true,
|
||||
"[[\"formatblock\",\"<ins>\"]] \"<div>[foobar]</div>\" queryCommandValue(\"formatblock\") after":true,
|
||||
"[[\"formatblock\",\"<li>\"]] \"<div>[foobar]</div>\": execCommand(\"formatblock\", false, \"<li>\") return value":true,
|
||||
"[[\"formatblock\",\"<li>\"]] \"<div>[foobar]</div>\" queryCommandValue(\"formatblock\") before":true,
|
||||
"[[\"formatblock\",\"<li>\"]] \"<div>[foobar]</div>\" queryCommandValue(\"formatblock\") after":true,
|
||||
"[[\"formatblock\",\"<ol>\"]] \"<div>[foobar]</div>\": execCommand(\"formatblock\", false, \"<ol>\") return value":true,
|
||||
"[[\"formatblock\",\"<ol>\"]] \"<div>[foobar]</div>\" queryCommandValue(\"formatblock\") before":true,
|
||||
"[[\"formatblock\",\"<ol>\"]] \"<div>[foobar]</div>\" queryCommandValue(\"formatblock\") after":true,
|
||||
"[[\"defaultparagraphseparator\",\"div\"],[\"formatblock\",\"<p>\"]] \"<div>[foobar]</div>\": execCommand(\"defaultparagraphseparator\", false, \"div\") return value":true,
|
||||
@ -2436,10 +2440,8 @@
|
||||
"[[\"defaultparagraphseparator\",\"p\"],[\"formatblock\",\"<pre>\"]] \"<div>[foobar]</div>\" queryCommandValue(\"defaultparagraphseparator\") before":true,
|
||||
"[[\"defaultparagraphseparator\",\"p\"],[\"formatblock\",\"<pre>\"]] \"<div>[foobar]</div>\" queryCommandValue(\"defaultparagraphseparator\") after":true,
|
||||
"[[\"defaultparagraphseparator\",\"p\"],[\"formatblock\",\"<pre>\"]] \"<div>[foobar]</div>\" queryCommandValue(\"formatblock\") before":true,
|
||||
"[[\"formatblock\",\"<ul>\"]] \"<div>[foobar]</div>\": execCommand(\"formatblock\", false, \"<ul>\") return value":true,
|
||||
"[[\"formatblock\",\"<ul>\"]] \"<div>[foobar]</div>\" queryCommandValue(\"formatblock\") before":true,
|
||||
"[[\"formatblock\",\"<ul>\"]] \"<div>[foobar]</div>\" queryCommandValue(\"formatblock\") after":true,
|
||||
"[[\"formatblock\",\"<quasit>\"]] \"<div>[foobar]</div>\": execCommand(\"formatblock\", false, \"<quasit>\") return value":true,
|
||||
"[[\"formatblock\",\"<quasit>\"]] \"<div>[foobar]</div>\" queryCommandValue(\"formatblock\") before":true,
|
||||
"[[\"formatblock\",\"<quasit>\"]] \"<div>[foobar]</div>\" queryCommandValue(\"formatblock\") after":true,
|
||||
"[[\"defaultparagraphseparator\",\"div\"],[\"formatblock\",\"<address>\"]] \"<p>[foobar]</p>\": execCommand(\"defaultparagraphseparator\", false, \"div\") return value":true,
|
||||
@ -2448,10 +2450,8 @@
|
||||
"[[\"defaultparagraphseparator\",\"p\"],[\"formatblock\",\"<address>\"]] \"<p>[foobar]</p>\": execCommand(\"defaultparagraphseparator\", false, \"p\") return value":true,
|
||||
"[[\"defaultparagraphseparator\",\"p\"],[\"formatblock\",\"<address>\"]] \"<p>[foobar]</p>\" queryCommandValue(\"defaultparagraphseparator\") before":true,
|
||||
"[[\"defaultparagraphseparator\",\"p\"],[\"formatblock\",\"<address>\"]] \"<p>[foobar]</p>\" queryCommandValue(\"defaultparagraphseparator\") after":true,
|
||||
"[[\"formatblock\",\"<article>\"]] \"<p>[foobar]</p>\": execCommand(\"formatblock\", false, \"<article>\") return value":true,
|
||||
"[[\"formatblock\",\"<aside>\"]] \"<p>[foobar]</p>\": execCommand(\"formatblock\", false, \"<aside>\") return value":true,
|
||||
"[[\"formatblock\",\"<blockquote>\"]] \"<p>[foobar]</p>\": execCommand(\"formatblock\", false, \"<blockquote>\") return value":true,
|
||||
"[[\"formatblock\",\"<blockquote>\"]] \"<p>[foobar]</p>\" compare innerHTML":true,
|
||||
"[[\"formatblock\",\"<body>\"]] \"<p>[foobar]</p>\": execCommand(\"formatblock\", false, \"<body>\") return value":true,
|
||||
"[[\"defaultparagraphseparator\",\"div\"],[\"formatblock\",\"<dd>\"]] \"<p>[foobar]</p>\": execCommand(\"defaultparagraphseparator\", false, \"div\") return value":true,
|
||||
"[[\"defaultparagraphseparator\",\"div\"],[\"formatblock\",\"<dd>\"]] \"<p>[foobar]</p>\" queryCommandValue(\"defaultparagraphseparator\") before":true,
|
||||
"[[\"defaultparagraphseparator\",\"div\"],[\"formatblock\",\"<dd>\"]] \"<p>[foobar]</p>\" queryCommandValue(\"defaultparagraphseparator\") after":true,
|
||||
@ -2460,9 +2460,6 @@
|
||||
"[[\"defaultparagraphseparator\",\"p\"],[\"formatblock\",\"<dd>\"]] \"<p>[foobar]</p>\" queryCommandValue(\"defaultparagraphseparator\") before":true,
|
||||
"[[\"defaultparagraphseparator\",\"p\"],[\"formatblock\",\"<dd>\"]] \"<p>[foobar]</p>\" queryCommandValue(\"defaultparagraphseparator\") after":true,
|
||||
"[[\"defaultparagraphseparator\",\"p\"],[\"formatblock\",\"<dd>\"]] \"<p>[foobar]</p>\" queryCommandValue(\"formatblock\") after":true,
|
||||
"[[\"formatblock\",\"<del>\"]] \"<p>[foobar]</p>\": execCommand(\"formatblock\", false, \"<del>\") return value":true,
|
||||
"[[\"formatblock\",\"<details>\"]] \"<p>[foobar]</p>\": execCommand(\"formatblock\", false, \"<details>\") return value":true,
|
||||
"[[\"formatblock\",\"<dir>\"]] \"<p>[foobar]</p>\": execCommand(\"formatblock\", false, \"<dir>\") return value":true,
|
||||
"[[\"defaultparagraphseparator\",\"div\"],[\"formatblock\",\"<div>\"]] \"<p>[foobar]</p>\": execCommand(\"defaultparagraphseparator\", false, \"div\") return value":true,
|
||||
"[[\"defaultparagraphseparator\",\"div\"],[\"formatblock\",\"<div>\"]] \"<p>[foobar]</p>\" queryCommandValue(\"defaultparagraphseparator\") before":true,
|
||||
"[[\"defaultparagraphseparator\",\"div\"],[\"formatblock\",\"<div>\"]] \"<p>[foobar]</p>\" queryCommandValue(\"defaultparagraphseparator\") after":true,
|
||||
@ -2471,6 +2468,7 @@
|
||||
"[[\"defaultparagraphseparator\",\"p\"],[\"formatblock\",\"<div>\"]] \"<p>[foobar]</p>\" queryCommandValue(\"defaultparagraphseparator\") before":true,
|
||||
"[[\"defaultparagraphseparator\",\"p\"],[\"formatblock\",\"<div>\"]] \"<p>[foobar]</p>\" queryCommandValue(\"defaultparagraphseparator\") after":true,
|
||||
"[[\"defaultparagraphseparator\",\"p\"],[\"formatblock\",\"<div>\"]] \"<p>[foobar]</p>\" queryCommandValue(\"formatblock\") after":true,
|
||||
"[[\"formatblock\",\"<dl>\"]] \"<p>[foobar]</p>\": execCommand(\"formatblock\", false, \"<dl>\") return value":true,
|
||||
"[[\"formatblock\",\"<dl>\"]] \"<p>[foobar]</p>\" compare innerHTML":true,
|
||||
"[[\"formatblock\",\"<dl>\"]] \"<p>[foobar]</p>\" queryCommandValue(\"formatblock\") after":true,
|
||||
"[[\"defaultparagraphseparator\",\"div\"],[\"formatblock\",\"<dt>\"]] \"<p>[foobar]</p>\": execCommand(\"defaultparagraphseparator\", false, \"div\") return value":true,
|
||||
@ -2481,11 +2479,6 @@
|
||||
"[[\"defaultparagraphseparator\",\"p\"],[\"formatblock\",\"<dt>\"]] \"<p>[foobar]</p>\" queryCommandValue(\"defaultparagraphseparator\") before":true,
|
||||
"[[\"defaultparagraphseparator\",\"p\"],[\"formatblock\",\"<dt>\"]] \"<p>[foobar]</p>\" queryCommandValue(\"defaultparagraphseparator\") after":true,
|
||||
"[[\"defaultparagraphseparator\",\"p\"],[\"formatblock\",\"<dt>\"]] \"<p>[foobar]</p>\" queryCommandValue(\"formatblock\") after":true,
|
||||
"[[\"formatblock\",\"<fieldset>\"]] \"<p>[foobar]</p>\": execCommand(\"formatblock\", false, \"<fieldset>\") return value":true,
|
||||
"[[\"formatblock\",\"<figcaption>\"]] \"<p>[foobar]</p>\": execCommand(\"formatblock\", false, \"<figcaption>\") return value":true,
|
||||
"[[\"formatblock\",\"<figure>\"]] \"<p>[foobar]</p>\": execCommand(\"formatblock\", false, \"<figure>\") return value":true,
|
||||
"[[\"formatblock\",\"<footer>\"]] \"<p>[foobar]</p>\": execCommand(\"formatblock\", false, \"<footer>\") return value":true,
|
||||
"[[\"formatblock\",\"<form>\"]] \"<p>[foobar]</p>\": execCommand(\"formatblock\", false, \"<form>\") return value":true,
|
||||
"[[\"defaultparagraphseparator\",\"div\"],[\"formatblock\",\"<h1>\"]] \"<p>[foobar]</p>\": execCommand(\"defaultparagraphseparator\", false, \"div\") return value":true,
|
||||
"[[\"defaultparagraphseparator\",\"div\"],[\"formatblock\",\"<h1>\"]] \"<p>[foobar]</p>\" queryCommandValue(\"defaultparagraphseparator\") before":true,
|
||||
"[[\"defaultparagraphseparator\",\"div\"],[\"formatblock\",\"<h1>\"]] \"<p>[foobar]</p>\" queryCommandValue(\"defaultparagraphseparator\") after":true,
|
||||
@ -2522,28 +2515,12 @@
|
||||
"[[\"defaultparagraphseparator\",\"p\"],[\"formatblock\",\"<h6>\"]] \"<p>[foobar]</p>\": execCommand(\"defaultparagraphseparator\", false, \"p\") return value":true,
|
||||
"[[\"defaultparagraphseparator\",\"p\"],[\"formatblock\",\"<h6>\"]] \"<p>[foobar]</p>\" queryCommandValue(\"defaultparagraphseparator\") before":true,
|
||||
"[[\"defaultparagraphseparator\",\"p\"],[\"formatblock\",\"<h6>\"]] \"<p>[foobar]</p>\" queryCommandValue(\"defaultparagraphseparator\") after":true,
|
||||
"[[\"formatblock\",\"<header>\"]] \"<p>[foobar]</p>\": execCommand(\"formatblock\", false, \"<header>\") return value":true,
|
||||
"[[\"formatblock\",\"<head>\"]] \"<p>[foobar]</p>\": execCommand(\"formatblock\", false, \"<head>\") return value":true,
|
||||
"[[\"formatblock\",\"<hgroup>\"]] \"<p>[foobar]</p>\": execCommand(\"formatblock\", false, \"<hgroup>\") return value":true,
|
||||
"[[\"formatblock\",\"<hr>\"]] \"<p>[foobar]</p>\": execCommand(\"formatblock\", false, \"<hr>\") return value":true,
|
||||
"[[\"formatblock\",\"<html>\"]] \"<p>[foobar]</p>\": execCommand(\"formatblock\", false, \"<html>\") return value":true,
|
||||
"[[\"formatblock\",\"<ins>\"]] \"<p>[foobar]</p>\": execCommand(\"formatblock\", false, \"<ins>\") return value":true,
|
||||
"[[\"formatblock\",\"<li>\"]] \"<p>[foobar]</p>\": execCommand(\"formatblock\", false, \"<li>\") return value":true,
|
||||
"[[\"formatblock\",\"<listing>\"]] \"<p>[foobar]</p>\": execCommand(\"formatblock\", false, \"<listing>\") return value":true,
|
||||
"[[\"formatblock\",\"<menu>\"]] \"<p>[foobar]</p>\": execCommand(\"formatblock\", false, \"<menu>\") return value":true,
|
||||
"[[\"formatblock\",\"<nav>\"]] \"<p>[foobar]</p>\": execCommand(\"formatblock\", false, \"<nav>\") return value":true,
|
||||
"[[\"formatblock\",\"<ol>\"]] \"<p>[foobar]</p>\": execCommand(\"formatblock\", false, \"<ol>\") return value":true,
|
||||
"[[\"formatblock\",\"<plaintext>\"]] \"<p>[foobar]</p>\": execCommand(\"formatblock\", false, \"<plaintext>\") return value":true,
|
||||
"[[\"defaultparagraphseparator\",\"div\"],[\"formatblock\",\"<pre>\"]] \"<p>[foobar]</p>\": execCommand(\"defaultparagraphseparator\", false, \"div\") return value":true,
|
||||
"[[\"defaultparagraphseparator\",\"div\"],[\"formatblock\",\"<pre>\"]] \"<p>[foobar]</p>\" queryCommandValue(\"defaultparagraphseparator\") before":true,
|
||||
"[[\"defaultparagraphseparator\",\"div\"],[\"formatblock\",\"<pre>\"]] \"<p>[foobar]</p>\" queryCommandValue(\"defaultparagraphseparator\") after":true,
|
||||
"[[\"defaultparagraphseparator\",\"p\"],[\"formatblock\",\"<pre>\"]] \"<p>[foobar]</p>\": execCommand(\"defaultparagraphseparator\", false, \"p\") return value":true,
|
||||
"[[\"defaultparagraphseparator\",\"p\"],[\"formatblock\",\"<pre>\"]] \"<p>[foobar]</p>\" queryCommandValue(\"defaultparagraphseparator\") before":true,
|
||||
"[[\"defaultparagraphseparator\",\"p\"],[\"formatblock\",\"<pre>\"]] \"<p>[foobar]</p>\" queryCommandValue(\"defaultparagraphseparator\") after":true,
|
||||
"[[\"formatblock\",\"<section>\"]] \"<p>[foobar]</p>\": execCommand(\"formatblock\", false, \"<section>\") return value":true,
|
||||
"[[\"formatblock\",\"<ul>\"]] \"<p>[foobar]</p>\": execCommand(\"formatblock\", false, \"<ul>\") return value":true,
|
||||
"[[\"formatblock\",\"<xmp>\"]] \"<p>[foobar]</p>\": execCommand(\"formatblock\", false, \"<xmp>\") return value":true,
|
||||
"[[\"formatblock\",\"<quasit>\"]] \"<p>[foobar]</p>\": execCommand(\"formatblock\", false, \"<quasit>\") return value":true,
|
||||
"[[\"defaultparagraphseparator\",\"div\"],[\"formatblock\",\"<address>\"]] \"<p>[foo<p>bar]\": execCommand(\"defaultparagraphseparator\", false, \"div\") return value":true,
|
||||
"[[\"defaultparagraphseparator\",\"div\"],[\"formatblock\",\"<address>\"]] \"<p>[foo<p>bar]\" compare innerHTML":true,
|
||||
"[[\"defaultparagraphseparator\",\"div\"],[\"formatblock\",\"<address>\"]] \"<p>[foo<p>bar]\" queryCommandValue(\"defaultparagraphseparator\") before":true,
|
||||
@ -2552,10 +2529,8 @@
|
||||
"[[\"defaultparagraphseparator\",\"p\"],[\"formatblock\",\"<address>\"]] \"<p>[foo<p>bar]\" compare innerHTML":true,
|
||||
"[[\"defaultparagraphseparator\",\"p\"],[\"formatblock\",\"<address>\"]] \"<p>[foo<p>bar]\" queryCommandValue(\"defaultparagraphseparator\") before":true,
|
||||
"[[\"defaultparagraphseparator\",\"p\"],[\"formatblock\",\"<address>\"]] \"<p>[foo<p>bar]\" queryCommandValue(\"defaultparagraphseparator\") after":true,
|
||||
"[[\"formatblock\",\"<article>\"]] \"<p>[foo<p>bar]\": execCommand(\"formatblock\", false, \"<article>\") return value":true,
|
||||
"[[\"formatblock\",\"<aside>\"]] \"<p>[foo<p>bar]\": execCommand(\"formatblock\", false, \"<aside>\") return value":true,
|
||||
"[[\"formatblock\",\"<blockquote>\"]] \"<p>[foo<p>bar]\": execCommand(\"formatblock\", false, \"<blockquote>\") return value":true,
|
||||
"[[\"formatblock\",\"<blockquote>\"]] \"<p>[foo<p>bar]\" compare innerHTML":true,
|
||||
"[[\"formatblock\",\"<body>\"]] \"<p>[foo<p>bar]\": execCommand(\"formatblock\", false, \"<body>\") return value":true,
|
||||
"[[\"defaultparagraphseparator\",\"div\"],[\"formatblock\",\"<dd>\"]] \"<p>[foo<p>bar]\": execCommand(\"defaultparagraphseparator\", false, \"div\") return value":true,
|
||||
"[[\"defaultparagraphseparator\",\"div\"],[\"formatblock\",\"<dd>\"]] \"<p>[foo<p>bar]\" queryCommandValue(\"defaultparagraphseparator\") before":true,
|
||||
"[[\"defaultparagraphseparator\",\"div\"],[\"formatblock\",\"<dd>\"]] \"<p>[foo<p>bar]\" queryCommandValue(\"defaultparagraphseparator\") after":true,
|
||||
@ -2564,9 +2539,6 @@
|
||||
"[[\"defaultparagraphseparator\",\"p\"],[\"formatblock\",\"<dd>\"]] \"<p>[foo<p>bar]\" queryCommandValue(\"defaultparagraphseparator\") before":true,
|
||||
"[[\"defaultparagraphseparator\",\"p\"],[\"formatblock\",\"<dd>\"]] \"<p>[foo<p>bar]\" queryCommandValue(\"defaultparagraphseparator\") after":true,
|
||||
"[[\"defaultparagraphseparator\",\"p\"],[\"formatblock\",\"<dd>\"]] \"<p>[foo<p>bar]\" queryCommandValue(\"formatblock\") after":true,
|
||||
"[[\"formatblock\",\"<del>\"]] \"<p>[foo<p>bar]\": execCommand(\"formatblock\", false, \"<del>\") return value":true,
|
||||
"[[\"formatblock\",\"<details>\"]] \"<p>[foo<p>bar]\": execCommand(\"formatblock\", false, \"<details>\") return value":true,
|
||||
"[[\"formatblock\",\"<dir>\"]] \"<p>[foo<p>bar]\": execCommand(\"formatblock\", false, \"<dir>\") return value":true,
|
||||
"[[\"defaultparagraphseparator\",\"div\"],[\"formatblock\",\"<div>\"]] \"<p>[foo<p>bar]\": execCommand(\"defaultparagraphseparator\", false, \"div\") return value":true,
|
||||
"[[\"defaultparagraphseparator\",\"div\"],[\"formatblock\",\"<div>\"]] \"<p>[foo<p>bar]\" queryCommandValue(\"defaultparagraphseparator\") before":true,
|
||||
"[[\"defaultparagraphseparator\",\"div\"],[\"formatblock\",\"<div>\"]] \"<p>[foo<p>bar]\" queryCommandValue(\"defaultparagraphseparator\") after":true,
|
||||
@ -2575,6 +2547,7 @@
|
||||
"[[\"defaultparagraphseparator\",\"p\"],[\"formatblock\",\"<div>\"]] \"<p>[foo<p>bar]\" queryCommandValue(\"defaultparagraphseparator\") before":true,
|
||||
"[[\"defaultparagraphseparator\",\"p\"],[\"formatblock\",\"<div>\"]] \"<p>[foo<p>bar]\" queryCommandValue(\"defaultparagraphseparator\") after":true,
|
||||
"[[\"defaultparagraphseparator\",\"p\"],[\"formatblock\",\"<div>\"]] \"<p>[foo<p>bar]\" queryCommandValue(\"formatblock\") after":true,
|
||||
"[[\"formatblock\",\"<dl>\"]] \"<p>[foo<p>bar]\": execCommand(\"formatblock\", false, \"<dl>\") return value":true,
|
||||
"[[\"formatblock\",\"<dl>\"]] \"<p>[foo<p>bar]\" compare innerHTML":true,
|
||||
"[[\"formatblock\",\"<dl>\"]] \"<p>[foo<p>bar]\" queryCommandValue(\"formatblock\") after":true,
|
||||
"[[\"defaultparagraphseparator\",\"div\"],[\"formatblock\",\"<dt>\"]] \"<p>[foo<p>bar]\": execCommand(\"defaultparagraphseparator\", false, \"div\") return value":true,
|
||||
@ -2585,11 +2558,6 @@
|
||||
"[[\"defaultparagraphseparator\",\"p\"],[\"formatblock\",\"<dt>\"]] \"<p>[foo<p>bar]\" queryCommandValue(\"defaultparagraphseparator\") before":true,
|
||||
"[[\"defaultparagraphseparator\",\"p\"],[\"formatblock\",\"<dt>\"]] \"<p>[foo<p>bar]\" queryCommandValue(\"defaultparagraphseparator\") after":true,
|
||||
"[[\"defaultparagraphseparator\",\"p\"],[\"formatblock\",\"<dt>\"]] \"<p>[foo<p>bar]\" queryCommandValue(\"formatblock\") after":true,
|
||||
"[[\"formatblock\",\"<fieldset>\"]] \"<p>[foo<p>bar]\": execCommand(\"formatblock\", false, \"<fieldset>\") return value":true,
|
||||
"[[\"formatblock\",\"<figcaption>\"]] \"<p>[foo<p>bar]\": execCommand(\"formatblock\", false, \"<figcaption>\") return value":true,
|
||||
"[[\"formatblock\",\"<figure>\"]] \"<p>[foo<p>bar]\": execCommand(\"formatblock\", false, \"<figure>\") return value":true,
|
||||
"[[\"formatblock\",\"<footer>\"]] \"<p>[foo<p>bar]\": execCommand(\"formatblock\", false, \"<footer>\") return value":true,
|
||||
"[[\"formatblock\",\"<form>\"]] \"<p>[foo<p>bar]\": execCommand(\"formatblock\", false, \"<form>\") return value":true,
|
||||
"[[\"defaultparagraphseparator\",\"div\"],[\"formatblock\",\"<h1>\"]] \"<p>[foo<p>bar]\": execCommand(\"defaultparagraphseparator\", false, \"div\") return value":true,
|
||||
"[[\"defaultparagraphseparator\",\"div\"],[\"formatblock\",\"<h1>\"]] \"<p>[foo<p>bar]\" compare innerHTML":true,
|
||||
"[[\"defaultparagraphseparator\",\"div\"],[\"formatblock\",\"<h1>\"]] \"<p>[foo<p>bar]\" queryCommandValue(\"defaultparagraphseparator\") before":true,
|
||||
@ -2638,18 +2606,6 @@
|
||||
"[[\"defaultparagraphseparator\",\"p\"],[\"formatblock\",\"<h6>\"]] \"<p>[foo<p>bar]\" compare innerHTML":true,
|
||||
"[[\"defaultparagraphseparator\",\"p\"],[\"formatblock\",\"<h6>\"]] \"<p>[foo<p>bar]\" queryCommandValue(\"defaultparagraphseparator\") before":true,
|
||||
"[[\"defaultparagraphseparator\",\"p\"],[\"formatblock\",\"<h6>\"]] \"<p>[foo<p>bar]\" queryCommandValue(\"defaultparagraphseparator\") after":true,
|
||||
"[[\"formatblock\",\"<header>\"]] \"<p>[foo<p>bar]\": execCommand(\"formatblock\", false, \"<header>\") return value":true,
|
||||
"[[\"formatblock\",\"<head>\"]] \"<p>[foo<p>bar]\": execCommand(\"formatblock\", false, \"<head>\") return value":true,
|
||||
"[[\"formatblock\",\"<hgroup>\"]] \"<p>[foo<p>bar]\": execCommand(\"formatblock\", false, \"<hgroup>\") return value":true,
|
||||
"[[\"formatblock\",\"<hr>\"]] \"<p>[foo<p>bar]\": execCommand(\"formatblock\", false, \"<hr>\") return value":true,
|
||||
"[[\"formatblock\",\"<html>\"]] \"<p>[foo<p>bar]\": execCommand(\"formatblock\", false, \"<html>\") return value":true,
|
||||
"[[\"formatblock\",\"<ins>\"]] \"<p>[foo<p>bar]\": execCommand(\"formatblock\", false, \"<ins>\") return value":true,
|
||||
"[[\"formatblock\",\"<li>\"]] \"<p>[foo<p>bar]\": execCommand(\"formatblock\", false, \"<li>\") return value":true,
|
||||
"[[\"formatblock\",\"<listing>\"]] \"<p>[foo<p>bar]\": execCommand(\"formatblock\", false, \"<listing>\") return value":true,
|
||||
"[[\"formatblock\",\"<menu>\"]] \"<p>[foo<p>bar]\": execCommand(\"formatblock\", false, \"<menu>\") return value":true,
|
||||
"[[\"formatblock\",\"<nav>\"]] \"<p>[foo<p>bar]\": execCommand(\"formatblock\", false, \"<nav>\") return value":true,
|
||||
"[[\"formatblock\",\"<ol>\"]] \"<p>[foo<p>bar]\": execCommand(\"formatblock\", false, \"<ol>\") return value":true,
|
||||
"[[\"formatblock\",\"<plaintext>\"]] \"<p>[foo<p>bar]\": execCommand(\"formatblock\", false, \"<plaintext>\") return value":true,
|
||||
"[[\"defaultparagraphseparator\",\"div\"],[\"formatblock\",\"<pre>\"]] \"<p>[foo<p>bar]\": execCommand(\"defaultparagraphseparator\", false, \"div\") return value":true,
|
||||
"[[\"defaultparagraphseparator\",\"div\"],[\"formatblock\",\"<pre>\"]] \"<p>[foo<p>bar]\" compare innerHTML":true,
|
||||
"[[\"defaultparagraphseparator\",\"div\"],[\"formatblock\",\"<pre>\"]] \"<p>[foo<p>bar]\" queryCommandValue(\"defaultparagraphseparator\") before":true,
|
||||
@ -2658,10 +2614,6 @@
|
||||
"[[\"defaultparagraphseparator\",\"p\"],[\"formatblock\",\"<pre>\"]] \"<p>[foo<p>bar]\" compare innerHTML":true,
|
||||
"[[\"defaultparagraphseparator\",\"p\"],[\"formatblock\",\"<pre>\"]] \"<p>[foo<p>bar]\" queryCommandValue(\"defaultparagraphseparator\") before":true,
|
||||
"[[\"defaultparagraphseparator\",\"p\"],[\"formatblock\",\"<pre>\"]] \"<p>[foo<p>bar]\" queryCommandValue(\"defaultparagraphseparator\") after":true,
|
||||
"[[\"formatblock\",\"<section>\"]] \"<p>[foo<p>bar]\": execCommand(\"formatblock\", false, \"<section>\") return value":true,
|
||||
"[[\"formatblock\",\"<ul>\"]] \"<p>[foo<p>bar]\": execCommand(\"formatblock\", false, \"<ul>\") return value":true,
|
||||
"[[\"formatblock\",\"<xmp>\"]] \"<p>[foo<p>bar]\": execCommand(\"formatblock\", false, \"<xmp>\") return value":true,
|
||||
"[[\"formatblock\",\"<quasit>\"]] \"<p>[foo<p>bar]\": execCommand(\"formatblock\", false, \"<quasit>\") return value":true,
|
||||
"[[\"defaultparagraphseparator\",\"div\"],[\"formatblock\",\"p\"]] \"<div>[foobar]</div>\": execCommand(\"defaultparagraphseparator\", false, \"div\") return value":true,
|
||||
"[[\"defaultparagraphseparator\",\"div\"],[\"formatblock\",\"p\"]] \"<div>[foobar]</div>\" compare innerHTML":true,
|
||||
"[[\"defaultparagraphseparator\",\"div\"],[\"formatblock\",\"p\"]] \"<div>[foobar]</div>\" queryCommandValue(\"defaultparagraphseparator\") before":true,
|
||||
@ -4156,7 +4108,6 @@
|
||||
"[[\"inserthtml\",\"<!--abc-->\"]] \"<p><!--foo-->{}<span><br></span><!--bar--></p>\" compare innerHTML":true,
|
||||
"[[\"inserthtml\",\"abc\"]] \"<p>{}<span><!--foo--><br><!--bar--></span></p>\" compare innerHTML":true,
|
||||
"[[\"inserthtml\",\"<!--abc-->\"]] \"<p>{}<span><!--foo--><br><!--bar--></span></p>\" compare innerHTML":true,
|
||||
"[[\"insertimage\",\"\"]] \"foo[bar]baz\": execCommand(\"insertimage\", false, \"\") return value":true,
|
||||
"[[\"insertimage\",\"/img/lion.svg\"]] \"foo{<span style=color:#aBcDeF>bar</span>}baz\" compare innerHTML":true,
|
||||
"[[\"stylewithcss\",\"true\"],[\"insertimage\",\"/img/lion.svg\"]] \"[foo<span style=color:#aBcDeF>bar]</span>baz\" compare innerHTML":true,
|
||||
"[[\"stylewithcss\",\"false\"],[\"insertimage\",\"/img/lion.svg\"]] \"[foo<span style=color:#aBcDeF>bar]</span>baz\" compare innerHTML":true,
|
||||
@ -11085,7 +11036,6 @@
|
||||
"[[\"unlink\",\"\"]] \"foo<a id=foo href=http://www.google.com/>[bar]</a>baz\" compare innerHTML":true,
|
||||
"[[\"unlink\",\"\"]] \"foo[<a id=foo href=http://www.google.com/>bar</a>]baz\" compare innerHTML":true,
|
||||
"[[\"unlink\",\"\"]] \"[foo<a id=foo href=http://www.google.com/>bar</a>baz]\" compare innerHTML":true,
|
||||
"[[\"defaultparagraphseparator\",\"\"]] \"foo[bar]baz\": execCommand(\"defaultparagraphseparator\", false, \"\") return value":true,
|
||||
"[[\"defaultparagraphseparator\",\"\"]] \"foo[bar]baz\" queryCommandValue(\"defaultparagraphseparator\") before":true,
|
||||
"[[\"defaultparagraphseparator\",\"\"]] \"foo[bar]baz\" queryCommandValue(\"defaultparagraphseparator\") after":true,
|
||||
"[[\"defaultparagraphseparator\",\"div\"]] \"foo[bar]baz\": execCommand(\"defaultparagraphseparator\", false, \"div\") return value":true,
|
||||
@ -11100,16 +11050,16 @@
|
||||
"[[\"defaultparagraphseparator\",\"P\"]] \"foo[bar]baz\": execCommand(\"defaultparagraphseparator\", false, \"P\") return value":true,
|
||||
"[[\"defaultparagraphseparator\",\"P\"]] \"foo[bar]baz\" queryCommandValue(\"defaultparagraphseparator\") before":true,
|
||||
"[[\"defaultparagraphseparator\",\"P\"]] \"foo[bar]baz\" queryCommandValue(\"defaultparagraphseparator\") after":true,
|
||||
"[[\"defaultparagraphseparator\",\" div \"]] \"foo[bar]baz\": execCommand(\"defaultparagraphseparator\", false, \" div \") return value":true,
|
||||
"[[\"defaultparagraphseparator\",\" div \"]] \"foo[bar]baz\" queryCommandValue(\"defaultparagraphseparator\") before":true,
|
||||
"[[\"defaultparagraphseparator\",\" div \"]] \"foo[bar]baz\" queryCommandValue(\"defaultparagraphseparator\") after":true,
|
||||
"[[\"defaultparagraphseparator\",\" p \"]] \"foo[bar]baz\": execCommand(\"defaultparagraphseparator\", false, \" p \") return value":true,
|
||||
"[[\"defaultparagraphseparator\",\" p \"]] \"foo[bar]baz\" queryCommandValue(\"defaultparagraphseparator\") before":true,
|
||||
"[[\"defaultparagraphseparator\",\" p \"]] \"foo[bar]baz\" queryCommandValue(\"defaultparagraphseparator\") after":true,
|
||||
"[[\"defaultparagraphseparator\",\"li\"]] \"foo[bar]baz\": execCommand(\"defaultparagraphseparator\", false, \"li\") return value":true,
|
||||
"[[\"defaultparagraphseparator\",\"<div>\"]] \"foo[bar]baz\" queryCommandValue(\"defaultparagraphseparator\") before":true,
|
||||
"[[\"defaultparagraphseparator\",\"<div>\"]] \"foo[bar]baz\" queryCommandValue(\"defaultparagraphseparator\") after":true,
|
||||
"[[\"defaultparagraphseparator\",\"<p>\"]] \"foo[bar]baz\" queryCommandValue(\"defaultparagraphseparator\") before":true,
|
||||
"[[\"defaultparagraphseparator\",\"<p>\"]] \"foo[bar]baz\" queryCommandValue(\"defaultparagraphseparator\") after":true,
|
||||
"[[\"defaultparagraphseparator\",\"li\"]] \"foo[bar]baz\" queryCommandValue(\"defaultparagraphseparator\") before":true,
|
||||
"[[\"defaultparagraphseparator\",\"li\"]] \"foo[bar]baz\" queryCommandValue(\"defaultparagraphseparator\") after":true,
|
||||
"[[\"defaultparagraphseparator\",\"blockquote\"]] \"foo[bar]baz\": execCommand(\"defaultparagraphseparator\", false, \"blockquote\") return value":true,
|
||||
"[[\"defaultparagraphseparator\",\"blockquote\"]] \"foo[bar]baz\" queryCommandValue(\"defaultparagraphseparator\") before":true,
|
||||
"[[\"defaultparagraphseparator\",\"blockquote\"]] \"foo[bar]baz\" queryCommandValue(\"defaultparagraphseparator\") after":true,
|
||||
"[[\"bold\",\"\"],[\"formatblock\",\"<div>\"]] \"foo[]bar\" queryCommandValue(\"formatblock\") after":true,
|
||||
|
Loading…
Reference in New Issue
Block a user