diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 09:22:09 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 09:22:09 +0000 |
commit | 43a97878ce14b72f0981164f87f2e35e14151312 (patch) | |
tree | 620249daf56c0258faa40cbdcf9cfba06de2a846 /testing/web-platform/tests/editing/data/superscript.js | |
parent | Initial commit. (diff) | |
download | firefox-43a97878ce14b72f0981164f87f2e35e14151312.tar.xz firefox-43a97878ce14b72f0981164f87f2e35e14151312.zip |
Adding upstream version 110.0.1.upstream/110.0.1upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'testing/web-platform/tests/editing/data/superscript.js')
-rw-r--r-- | testing/web-platform/tests/editing/data/superscript.js | 443 |
1 files changed, 443 insertions, 0 deletions
diff --git a/testing/web-platform/tests/editing/data/superscript.js b/testing/web-platform/tests/editing/data/superscript.js new file mode 100644 index 0000000000..310f471a97 --- /dev/null +++ b/testing/web-platform/tests/editing/data/superscript.js @@ -0,0 +1,443 @@ +// For documentation of the format, see README in this directory. +var browserTests = [ +["foo[]bar", + [["superscript",""]], + "foo[]bar", + [true], + {"superscript":[false,false,"",false,true,""]}], +// <sup> should be used instead of <span style="text-align: super"> because +// <sup> changes font-size too, thus, they are not equivalent. Additionally, +// even if specifying `font-size`, it'd be removed by the other commands. +// Therefore, it's hard to maintain <sup> only with CSS. +// See also <https://bugzilla.mozilla.org/show_bug.cgi?id=394304#c2>. +["<p>[foo</p> <p>bar]</p>", + [["stylewithcss","true"],["superscript",""]], + "<p><sup>[foo</sup></p> <p><sup>bar]</sup></p>", + [true,true], + {"stylewithcss":[false,false,"",false,true,""],"superscript":[false,false,"",false,true,""]}], +["<p>[foo</p> <p>bar]</p>", + [["stylewithcss","false"],["superscript",""]], + "<p><sup>[foo</sup></p> <p><sup>bar]</sup></p>", + [true,true], + {"stylewithcss":[false,true,"",false,false,""],"superscript":[false,false,"",false,true,""]}], +["<span>[foo</span> <span>bar]</span>", + [["stylewithcss","true"],["superscript",""]], + "<sup><span>[foo</span> <span>bar]</span></sup>", + [true,true], + {"stylewithcss":[false,false,"",false,true,""],"superscript":[false,false,"",false,true,""]}], +["<span>[foo</span> <span>bar]</span>", + [["stylewithcss","false"],["superscript",""]], + "<sup><span>[foo</span> <span>bar]</span></sup>", + [true,true], + {"stylewithcss":[false,true,"",false,false,""],"superscript":[false,false,"",false,true,""]}], +["<p>[foo</p><p> <span>bar</span> </p><p>baz]</p>", + [["stylewithcss","true"],["superscript",""]], + "<p><sup>[foo</sup></p><p> <sup><span>bar</span></sup> </p><p><sup>baz]</sup></p>", + [true,true], + {"stylewithcss":[false,false,"",false,true,""],"superscript":[false,false,"",false,true,""]}], +["<p>[foo</p><p> <span>bar</span> </p><p>baz]</p>", + [["stylewithcss","false"],["superscript",""]], + "<p><sup>[foo</sup></p><p> <sup><span>bar</span></sup> </p><p><sup>baz]</sup></p>", + [true,true], + {"stylewithcss":[false,true,"",false,false,""],"superscript":[false,false,"",false,true,""]}], +["<p>[foo<p><br><p>bar]", + [["stylewithcss","true"],["superscript",""]], + "<p><sup>[foo</sup></p><p><sup><br></sup></p><p><sup>bar]</sup></p>", + [true,true], + {"stylewithcss":[false,false,"",false,true,""],"superscript":[false,false,"",false,true,""]}], +["<p>[foo<p><br><p>bar]", + [["stylewithcss","false"],["superscript",""]], + "<p><sup>[foo</sup></p><p><sup><br></sup></p><p><sup>bar]</sup></p>", + [true,true], + {"stylewithcss":[false,true,"",false,false,""],"superscript":[false,false,"",false,true,""]}], +["<b>foo[]bar</b>", + [["superscript",""]], + "<b>foo[]bar</b>", + [true], + {"superscript":[false,false,"",false,true,""]}], +["<i>foo[]bar</i>", + [["superscript",""]], + "<i>foo[]bar</i>", + [true], + {"superscript":[false,false,"",false,true,""]}], +["<span>foo</span>{}<span>bar</span>", + [["superscript",""]], + "<span>foo</span>{}<span>bar</span>", + [true], + {"superscript":[false,false,"",false,true,""]}], +["<span>foo[</span><span>]bar</span>", + [["superscript",""]], + "<span>foo[</span><span>]bar</span>", + [true], + {"superscript":[false,false,"",false,true,""]}], +["foo[bar]baz", + [["stylewithcss","true"],["superscript",""]], + "foo<sup>[bar]</sup>baz", + [true,true], + {"stylewithcss":[false,false,"",false,true,""],"superscript":[false,false,"",false,true,""]}], +["foo[bar]baz", + [["stylewithcss","false"],["superscript",""]], + "foo<sup>[bar]</sup>baz", + [true,true], + {"stylewithcss":[false,true,"",false,false,""],"superscript":[false,false,"",false,true,""]}], +["foo[bar<b>baz]qoz</b>quz", + [["stylewithcss","true"],["superscript",""]], + "foo<sup>[bar</sup><b><sup>baz]</sup>qoz</b>quz", + [true,true], + {"stylewithcss":[false,false,"",false,true,""],"superscript":[false,false,"",false,true,""]}], +["foo[bar<b>baz]qoz</b>quz", + [["stylewithcss","false"],["superscript",""]], + "foo<sup>[bar</sup><b><sup>baz]</sup>qoz</b>quz", + [true,true], + {"stylewithcss":[false,true,"",false,false,""],"superscript":[false,false,"",false,true,""]}], +["foo[bar<i>baz]qoz</i>quz", + [["stylewithcss","true"],["superscript",""]], + "foo<sup>[bar</sup><i><sup>baz]</sup>qoz</i>quz", + [true,true], + {"stylewithcss":[false,false,"",false,true,""],"superscript":[false,false,"",false,true,""]}], +["foo[bar<i>baz]qoz</i>quz", + [["stylewithcss","false"],["superscript",""]], + "foo<sup>[bar</sup><i><sup>baz]</sup>qoz</i>quz", + [true,true], + {"stylewithcss":[false,true,"",false,false,""],"superscript":[false,false,"",false,true,""]}], +["{<p><p> <p>foo</p>}", + [["stylewithcss","true"],["superscript",""]], + "{<p></p><p> </p><p><sup>foo</sup></p>}", + [true,true], + {"stylewithcss":[false,false,"",false,true,""],"superscript":[false,false,"",false,true,""]}], +["{<p><p> <p>foo</p>}", + [["stylewithcss","false"],["superscript",""]], + "{<p></p><p> </p><p><sup>foo</sup></p>}", + [true,true], + {"stylewithcss":[false,true,"",false,false,""],"superscript":[false,false,"",false,true,""]}], +["<table><tbody><tr><td>foo<td>b[a]r<td>baz</table>", + [["stylewithcss","true"],["superscript",""]], + "<table><tbody><tr><td>foo</td><td>b<sup>[a]</sup>r</td><td>baz</td></tr></tbody></table>", + [true,true], + {"stylewithcss":[false,false,"",false,true,""],"superscript":[false,false,"",false,true,""]}], +["<table><tbody><tr><td>foo<td>b[a]r<td>baz</table>", + [["stylewithcss","false"],["superscript",""]], + "<table><tbody><tr><td>foo</td><td>b<sup>[a]</sup>r</td><td>baz</td></tr></tbody></table>", + [true,true], + {"stylewithcss":[false,true,"",false,false,""],"superscript":[false,false,"",false,true,""]}], +["<table><tbody><tr data-start=1 data-end=2><td>foo<td>bar<td>baz</table>", + [["stylewithcss","true"],["superscript",""]], + "<table><tbody><tr><td>foo</td>{<td><sup>bar</sup></td>}<td>baz</td></tr></tbody></table>", + [true,true], + {"stylewithcss":[false,false,"",false,true,""],"superscript":[false,false,"",false,true,""]}], +["<table><tbody><tr data-start=1 data-end=2><td>foo<td>bar<td>baz</table>", + [["stylewithcss","false"],["superscript",""]], + "<table><tbody><tr><td>foo</td>{<td><sup>bar</sup></td>}<td>baz</td></tr></tbody></table>", + [true,true], + {"stylewithcss":[false,true,"",false,false,""],"superscript":[false,false,"",false,true,""]}], +["<table><tbody><tr data-start=0 data-end=2><td>foo<td>bar<td>baz</table>", + [["stylewithcss","true"],["superscript",""]], + "<table><tbody><tr>{<td><sup>foo</sup></td><td><sup>bar</sup></td>}<td>baz</td></tr></tbody></table>", + [true,true], + {"stylewithcss":[false,false,"",false,true,""],"superscript":[false,false,"",false,true,""]}], +["<table><tbody><tr data-start=0 data-end=2><td>foo<td>bar<td>baz</table>", + [["stylewithcss","false"],["superscript",""]], + "<table><tbody><tr>{<td><sup>foo</sup></td><td><sup>bar</sup></td>}<td>baz</td></tr></tbody></table>", + [true,true], + {"stylewithcss":[false,true,"",false,false,""],"superscript":[false,false,"",false,true,""]}], +["<table><tbody data-start=0 data-end=1><tr><td>foo<td>bar<td>baz</table>", + [["stylewithcss","true"],["superscript",""]], + "<table><tbody>{<tr><td><sup>foo</sup></td><td><sup>bar</sup></td><td><sup>baz</sup></td></tr>}</tbody></table>", + [true,true], + {"stylewithcss":[false,false,"",false,true,""],"superscript":[false,false,"",false,true,""]}], +["<table><tbody data-start=0 data-end=1><tr><td>foo<td>bar<td>baz</table>", + [["stylewithcss","false"],["superscript",""]], + "<table><tbody>{<tr><td><sup>foo</sup></td><td><sup>bar</sup></td><td><sup>baz</sup></td></tr>}</tbody></table>", + [true,true], + {"stylewithcss":[false,true,"",false,false,""],"superscript":[false,false,"",false,true,""]}], +["<table data-start=0 data-end=1><tbody><tr><td>foo<td>bar<td>baz</table>", + [["stylewithcss","true"],["superscript",""]], + "<table>{<tbody><tr><td><sup>foo</sup></td><td><sup>bar</sup></td><td><sup>baz</sup></td></tr></tbody>}</table>", + [true,true], + {"stylewithcss":[false,false,"",false,true,""],"superscript":[false,false,"",false,true,""]}], +["<table data-start=0 data-end=1><tbody><tr><td>foo<td>bar<td>baz</table>", + [["stylewithcss","false"],["superscript",""]], + "<table>{<tbody><tr><td><sup>foo</sup></td><td><sup>bar</sup></td><td><sup>baz</sup></td></tr></tbody>}</table>", + [true,true], + {"stylewithcss":[false,true,"",false,false,""],"superscript":[false,false,"",false,true,""]}], +["{<table><tr><td>foo<td>bar<td>baz</table>}", + [["stylewithcss","true"],["superscript",""]], + "{<table><tbody><tr><td><sup>foo</sup></td><td><sup>bar</sup></td><td><sup>baz</sup></td></tr></tbody></table>}", + [true,true], + {"stylewithcss":[false,false,"",false,true,""],"superscript":[false,false,"",false,true,""]}], +["{<table><tr><td>foo<td>bar<td>baz</table>}", + [["stylewithcss","false"],["superscript",""]], + "{<table><tbody><tr><td><sup>foo</sup></td><td><sup>bar</sup></td><td><sup>baz</sup></td></tr></tbody></table>}", + [true,true], + {"stylewithcss":[false,true,"",false,false,""],"superscript":[false,false,"",false,true,""]}], +["foo<sub>[bar]</sub>baz", + [["stylewithcss","true"],["superscript",""]], + "foo<sup>[bar]</sup>baz", + [true,true], + {"stylewithcss":[false,false,"",false,true,""],"superscript":[false,false,"",false,true,""]}], +["foo<sub>[bar]</sub>baz", + [["stylewithcss","false"],["superscript",""]], + "foo<sup>[bar]</sup>baz", + [true,true], + {"stylewithcss":[false,true,"",false,false,""],"superscript":[false,false,"",false,true,""]}], +["foo<sub>b[a]r</sub>baz", + [["stylewithcss","true"],["superscript",""]], + "foo<sub>b</sub><sup>[a]</sup><sub>r</sub>baz", + [true,true], + {"stylewithcss":[false,false,"",false,true,""],"superscript":[false,false,"",false,true,""]}], +["foo<sub>b[a]r</sub>baz", + [["stylewithcss","false"],["superscript",""]], + "foo<sub>b</sub><sup>[a]</sup><sub>r</sub>baz", + [true,true], + {"stylewithcss":[false,true,"",false,false,""],"superscript":[false,false,"",false,true,""]}], +["foo<sup>b[a]r</sup>baz", + [["stylewithcss","true"],["superscript",""]], + "foo<sup>b</sup>[a]<sup>r</sup>baz", + [true,true], + {"stylewithcss":[false,false,"",false,true,""],"superscript":[false,true,"",false,false,""]}], +["foo<sup>b[a]r</sup>baz", + [["stylewithcss","false"],["superscript",""]], + "foo<sup>b</sup>[a]<sup>r</sup>baz", + [true,true], + {"stylewithcss":[false,true,"",false,false,""],"superscript":[false,true,"",false,false,""]}], +// Although <sup> is not equivalent to `vertical-align: super` as mentioned +// above, they are obviously conflict. Therefore, `vertical-align` style of +// ancestor and descendants elements of selection should be removed to make +// <sup> work. +["foo<span style=vertical-align:sub>[bar]</span>baz", + [["stylewithcss","true"],["superscript",""]], + "foo<sup>[bar]</sup>baz", + [true,true], + {"stylewithcss":[false,false,"",false,true,""],"superscript":[false,false,"",false,true,""]}], +["foo<span style=vertical-align:sub>[bar]</span>baz", + [["stylewithcss","false"],["superscript",""]], + "foo<sup>[bar]</sup>baz", + [true,true], + {"stylewithcss":[false,true,"",false,false,""],"superscript":[false,false,"",false,true,""]}], +["foo<span style=vertical-align:super>[bar]</span>baz", + [["stylewithcss","true"],["superscript",""]], + "foo<sup>[bar]</sup>baz", + [true,true], + {"stylewithcss":[false,false,"",false,true,""],"superscript":[false,false,"",false,true,""]}], +["foo<span style=vertical-align:super>[bar]</span>baz", + [["stylewithcss","false"],["superscript",""]], + "foo<sup>[bar]</sup>baz", + [true,true], + {"stylewithcss":[false,true,"",false,false,""],"superscript":[false,false,"",false,true,""]}], +["foo<sub><sub>[bar]</sub></sub>baz", + [["stylewithcss","true"],["superscript",""]], + "foo<sup>[bar]</sup>baz", + [true,true], + {"stylewithcss":[false,false,"",false,true,""],"superscript":[false,false,"",false,true,""]}], +["foo<sub><sub>[bar]</sub></sub>baz", + [["stylewithcss","false"],["superscript",""]], + "foo<sup>[bar]</sup>baz", + [true,true], + {"stylewithcss":[false,true,"",false,false,""],"superscript":[false,false,"",false,true,""]}], +["foo<sub><sub>b[a]r</sub></sub>baz", + [["stylewithcss","true"],["superscript",""]], + "foo<sub>b</sub><sup>[a]</sup><sub>r</sub>baz", + [true,true], + {"stylewithcss":[false,false,"",false,true,""],"superscript":[false,false,"",false,true,""]}], +["foo<sub><sub>b[a]r</sub></sub>baz", + [["stylewithcss","false"],["superscript",""]], + "foo<sub>b</sub><sup>[a]</sup><sub>r</sub>baz", + [true,true], + {"stylewithcss":[false,true,"",false,false,""],"superscript":[false,false,"",false,true,""]}], +["foo<sub>b<sub>[a]</sub>r</sub>baz", + [["stylewithcss","true"],["superscript",""]], + "foo<sub>b</sub><sup>[a]</sup><sub>r</sub>baz", + [true,true], + {"stylewithcss":[false,false,"",false,true,""],"superscript":[false,false,"",false,true,""]}], +["foo<sub>b<sub>[a]</sub>r</sub>baz", + [["stylewithcss","false"],["superscript",""]], + "foo<sub>b</sub><sup>[a]</sup><sub>r</sub>baz", + [true,true], + {"stylewithcss":[false,true,"",false,false,""],"superscript":[false,false,"",false,true,""]}], +["foo<sup><sup>[bar]</sup></sup>baz", + [["stylewithcss","true"],["superscript",""]], + "foo[bar]baz", + [true,true], + {"stylewithcss":[false,false,"",false,true,""],"superscript":[false,true,"",false,false,""]}], +["foo<sup><sup>[bar]</sup></sup>baz", + [["stylewithcss","false"],["superscript",""]], + "foo[bar]baz", + [true,true], + {"stylewithcss":[false,true,"",false,false,""],"superscript":[false,true,"",false,false,""]}], +["foo<sup><sup>b[a]r</sup></sup>baz", + [["superscript",""]], + "foo<sup>b</sup>[a]<sup>r</sup>baz", + [true], + {"superscript":[false,true,"",false,false,""]}], +["foo<sup>b<sup>[a]</sup>r</sup>baz", + [["superscript",""]], + "foo<sup>b</sup>[a]<sup>r</sup>baz", + [true], + {"superscript":[false,true,"",false,false,""]}], +["foo<sub><sup>[bar]</sup></sub>baz", + [["stylewithcss","true"],["superscript",""]], + "foo<sup>[bar]</sup>baz", + [true,true], + {"stylewithcss":[false,false,"",false,true,""],"superscript":[true,false,"",false,true,""]}], +["foo<sub><sup>[bar]</sup></sub>baz", + [["stylewithcss","false"],["superscript",""]], + "foo<sup>[bar]</sup>baz", + [true,true], + {"stylewithcss":[false,true,"",false,false,""],"superscript":[true,false,"",false,true,""]}], +["foo<sub><sup>b[a]r</sup></sub>baz", + [["stylewithcss","true"],["superscript",""]], + "foo<sup>b[a]r</sup>baz", + [true,true], + {"stylewithcss":[false,false,"",false,true,""],"superscript":[true,false,"",false,true,""]}], +["foo<sub><sup>b[a]r</sup></sub>baz", + [["stylewithcss","false"],["superscript",""]], + "foo<sup>b[a]r</sup>baz", + [true,true], + {"stylewithcss":[false,true,"",false,false,""],"superscript":[true,false,"",false,true,""]}], +["foo<sub>b<sup>[a]</sup>r</sub>baz", + [["stylewithcss","true"],["superscript",""]], + "foo<sub>b</sub><sup>[a]</sup><sub>r</sub>baz", + [true,true], + {"stylewithcss":[false,false,"",false,true,""],"superscript":[true,false,"",false,true,""]}], +["foo<sub>b<sup>[a]</sup>r</sub>baz", + [["stylewithcss","false"],["superscript",""]], + "foo<sub>b</sub><sup>[a]</sup><sub>r</sub>baz", + [true,true], + {"stylewithcss":[false,true,"",false,false,""],"superscript":[true,false,"",false,true,""]}], +["foo<sup><sub>[bar]</sub></sup>baz", + [["stylewithcss","true"],["superscript",""]], + "foo<sup>[bar]</sup>baz", + [true,true], + {"stylewithcss":[false,false,"",false,true,""],"superscript":[true,false,"",false,true,""]}], +["foo<sup><sub>[bar]</sub></sup>baz", + [["stylewithcss","false"],["superscript",""]], + "foo<sup>[bar]</sup>baz", + [true,true], + {"stylewithcss":[false,true,"",false,false,""],"superscript":[true,false,"",false,true,""]}], +["foo<sup><sub>b[a]r</sub></sup>baz", + [["stylewithcss","true"],["superscript",""]], + "foo<sub>b</sub><sup>[a]</sup><sub>r</sub>baz", + [true,true], + {"stylewithcss":[false,false,"",false,true,""],"superscript":[true,false,"",false,true,""]}], +["foo<sup><sub>b[a]r</sub></sup>baz", + [["stylewithcss","false"],["superscript",""]], + "foo<sub>b</sub><sup>[a]</sup><sub>r</sub>baz", + [true,true], + {"stylewithcss":[false,true,"",false,false,""],"superscript":[true,false,"",false,true,""]}], +["foo<sup>b<sub>[a]</sub>r</sup>baz", + [["stylewithcss","true"],["superscript",""]], + "foo<sup>b[a]r</sup>baz", + [true,true], + {"stylewithcss":[false,false,"",false,true,""],"superscript":[true,false,"",false,true,""]}], +["foo<sup>b<sub>[a]</sub>r</sup>baz", + [["stylewithcss","false"],["superscript",""]], + "foo<sup>b[a]r</sup>baz", + [true,true], + {"stylewithcss":[false,true,"",false,false,""],"superscript":[true,false,"",false,true,""]}], +["fo[o<sup>b]ar</sup>baz", + [["superscript",""]], + "fo<sup>[ob]ar</sup>baz", + [true], + {"superscript":[true,false,"",false,true,""]}], +["foo<sup>ba[r</sup>b]az", + [["superscript",""]], + "foo<sup>ba[rb]</sup>az", + [true], + {"superscript":[true,false,"",false,true,""]}], +["fo[o<sup>bar</sup>b]az", + [["superscript",""]], + "fo<sup>[obarb]</sup>az", + [true], + {"superscript":[true,false,"",false,true,""]}], +["foo[<sup>b]ar</sup>baz", + [["superscript",""]], + "foo[b]<sup>ar</sup>baz", + [true], + {"superscript":[false,true,"",false,false,""]}], +["foo<sup>ba[r</sup>]baz", + [["superscript",""]], + "foo<sup>ba</sup>[r]baz", + [true], + {"superscript":[false,true,"",false,false,""]}], +["foo[<sup>bar</sup>]baz", + [["stylewithcss","true"],["superscript",""]], + "foo[bar]baz", + [true,true], + {"stylewithcss":[false,false,"",false,true,""],"superscript":[false,true,"",false,false,""]}], +["foo[<sup>bar</sup>]baz", + [["stylewithcss","false"],["superscript",""]], + "foo[bar]baz", + [true,true], + {"stylewithcss":[false,true,"",false,false,""],"superscript":[false,true,"",false,false,""]}], +["foo<sup>[bar]</sup>baz", + [["stylewithcss","true"],["superscript",""]], + "foo[bar]baz", + [true,true], + {"stylewithcss":[false,false,"",false,true,""],"superscript":[false,true,"",false,false,""]}], +["foo<sup>[bar]</sup>baz", + [["stylewithcss","false"],["superscript",""]], + "foo[bar]baz", + [true,true], + {"stylewithcss":[false,true,"",false,false,""],"superscript":[false,true,"",false,false,""]}], +["foo{<sup>bar</sup>}baz", + [["stylewithcss","true"],["superscript",""]], + "foo{bar}baz", + [true,true], + {"stylewithcss":[false,false,"",false,true,""],"superscript":[false,true,"",false,false,""]}], +["foo{<sup>bar</sup>}baz", + [["stylewithcss","false"],["superscript",""]], + "foo{bar}baz", + [true,true], + {"stylewithcss":[false,true,"",false,false,""],"superscript":[false,true,"",false,false,""]}], +// The selected text not in <sup> should be moved into the existing <sup>. +["<sup>fo[o</sup><sub>b]ar</sub>", + [["superscript",""]], + "<sup>fo[ob]</sup><sub>ar</sub>", + [true], + {"superscript":[true,false,"",false,true,""]}], +// In the following cases, the vertical-align style in the range should be +// removed first, then, apply <sup>. +["<sup>fo[o</sup><span style=vertical-align:super>b]ar</span>", + [["stylewithcss","true"],["superscript",""]], + "<sup>fo[ob]</sup><span style=\"vertical-align:super\">ar</span>", + [true,true], + {"stylewithcss":[false,false,"",false,true,""],"superscript":[true,false,"",false,true,""]}], +["<sup>fo[o</sup><span style=vertical-align:super>b]ar</span>", + [["stylewithcss","false"],["superscript",""]], + "<sup>fo[ob]</sup><span style=\"vertical-align:super\">ar</span>", + [true,true], + {"stylewithcss":[false,true,"",false,false,""],"superscript":[true,false,"",false,true,""]}], +["<sup>fo[o</sup><span style=vertical-align:bottom>b]ar</span>", + [["stylewithcss","true"],["superscript",""]], + "<sup>fo[ob]</sup><span style=\"vertical-align:bottom\">ar</span>", + [true,true], + {"stylewithcss":[false,false,"",false,true,""],"superscript":[true,false,"",false,true,""]}], +["<sup>fo[o</sup><span style=vertical-align:bottom>b]ar</span>", + [["stylewithcss","false"],["superscript",""]], + "<sup>fo[ob]</sup><span style=\"vertical-align:bottom\">ar</span>", + [true,true], + {"stylewithcss":[false,true,"",false,false,""],"superscript":[true,false,"",false,true,""]}], +// Even if a vertical-align value is not related to <sub>/<sup>, it should be +// removed to make new <sub> work cleanly. +["foo<span style=vertical-align:bottom>[bar]</span>baz", + [["stylewithcss","true"],["superscript",""]], + "foo<sup>[bar]</sup>baz", + [true,true], + {"stylewithcss":[false,false,"",false,true,""],"superscript":[false,false,"",false,true,""]}], +["foo<span style=vertical-align:bottom>[bar]</span>baz", + [["stylewithcss","false"],["superscript",""]], + "foo<sup>[bar]</sup>baz", + [true,true], + {"stylewithcss":[false,true,"",false,false,""],"superscript":[false,false,"",false,true,""]}], +// Remove <sup> when it becomes only having an invisible <br> element. +["foo<sup>[bar]<br></sup>", + [["stylewithcss","true"],["superscript",""]], + "foo[bar]<br>", + [true,true], + {"stylewithcss":[false,false,"",false,true,""],"superscript":[false,true,"",false,false,""]}], +["foo<sup>[bar]<br></sup>", + [["stylewithcss","false"],["superscript",""]], + "foo[bar]<br>", + [true,true], + {"stylewithcss":[false,true,"",false,false,""],"superscript":[false,true,"",false,false,""]}] +] |