blob: 787b629621f8af906d5b699d58ac2d654b14cca5 [file] [log] [blame]
<!DOCTYPE html>
<html>
<head>
<script>
function performTest()
{
// Have to set the selection manually here, since putting in [ and ] is invalid HTML and
// WebKit's parser will move the selection to cover the whole table if we do that
var table = document.getElementsByTagName("TABLE")[0];
var trs = document.getElementsByTagName("TR");
var tr1Offset = DOM_nodeOffset(trs[1]);
var tr2Offset = DOM_nodeOffset(trs[2]);
// The table is not the parent of the TRs - the parser automatically inserts a TBODY
// between them
Selection_set(trs[1].parentNode,tr1Offset,trs[2].parentNode,tr2Offset+1);
Formatting_applyFormattingChanges(".test",null);
}
</script>
</head>
<body>
<p>Paragraph one</p>
<p>Paragraph two</p>
<table border="1">
<tr>
<td><p>One</p></td>
<td><p>Two</p></td>
</tr>
<tr>
<td><p>Three</p></td>
<td><p>Four</p></td>
</tr>
<tr>
<td><p>Five</p></td>
<td><p>Six</p></td>
</tr>
<tr>
<td><p>Seven</p></td>
<td><p>Eight</p></td>
</tr>
</table>
<p>Paragraph three</p>
<p>Paragraph four</p>
</body>
</html>