summaryrefslogtreecommitdiffstats
path: root/third_party/WebKit/LayoutTests/fast/css/first-letter-detach.html
blob: 95b5bb5a42eb3e8e906e28ad012bb94125b0ef9a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title></title>
<style type="text/css">
#targeta:first-letter { color: blue; }
#targetb:first-letter { color: blue; }
#targetc:first-letter { color: blue; }
</style>

<script type="text/javascript">
function test()
{
    document.body.offsetTop;
    document.getElementById("targeta").innerHTML = "PASS";
    document.getElementById("targetb").firstChild.data = "PASS";
    document.getElementById("targetc").replaceChild(document.createTextNode("PASS"), document.getElementById("targetc").firstChild);
}
</script>

</head>
<body onload="test()">
<p>
Test for <i><a href="https://bugs.webkit.org/show_bug.cgi?id=3560">http://bugzilla.opendarwin.org/show_bug.cgi?id=3560</a>
page with use of first-letter crashes reproducibly in LayoutObject::renderArena()</i>.
</p>
<p>
The next three lines should all read &ldquo;<span style="color: blue;">P</span>ASS&rdquo;, with nothing before the P.
</p>
<hr>
<p id="targeta">didn&rsquo;t run</p>
<p id="targetb">didn&rsquo;t run</p>
<p id="targetc">didn&rsquo;t run</p>
</body>
</html>