blob: 2ede103785421436826b3f07a14534d0b6264c20 [file] [log] [blame]
<html>
<body>
<p>This tests removing underline which is applied outside of unsplittable element. We shouldn't be removing underline.</p>
<div id="e">
<table style="text-decoration: underline;">
<tr>
<td id="test" contenteditable="true">hello</td>
<td>world</td>
</tr>
<tr>
<td>webkit</td>
<td>rocks</td>
</tr>
</table>
</div>
<ul>
<li>Before:<span id="c1"></span></li>
<li>After:<span id="c2"></span></li>
</ul>
<script type="text/javascript">
if (window.testRunner)
testRunner.dumpAsText();
var e = document.getElementById('e');
document.getElementById('c1').appendChild(document.createTextNode(e.innerHTML));
var s = window.getSelection();
var r = document.createRange();
r.setStart(document.getElementById('test'),0);
r.setEnd(document.getElementById('test'),1);
s.removeAllRanges();
s.addRange(r);
document.execCommand("underline", false, null);
document.getElementById('c2').appendChild(document.createTextNode(e.innerHTML));
</script>