summaryrefslogtreecommitdiffstats
path: root/third_party/WebKit/LayoutTests/fast/css/first-letter-nested.html
blob: 3afd3007e1fb8b8da017b853148abceaacd4b04f (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
36
37
38
39
<!doctype html>
<html>
<head>
<title>Test for first-letter for nested elements</title>
<style>
.test:first-letter { color: green; }
.boxed { border: solid 1px; }
</style>
<script src="../../resources/js-test.js"></script>
</head>
<body>
<div id="description"></div>

<p class="test" id="test_p_1">
    <span class="boxed" id="test_span_1">Span</span>
</p>
<p class="test">
    <span class="boxed" id="test_span_2" class="boxed">Span</span>
</p>
<p>
    <span class="boxed" id="ref_span" style="font-size:32px"><span style="color:green">S</span>pan</span>
</p>

<div id="console"></div>

<script>
document.body.offsetTop;

document.getElementById('test_p_1').style.fontSize = '32px';
document.getElementById('test_span_2').style.fontSize = '32px';

document.body.offsetTop;

description("The three spans below should look the same.");
shouldBe("document.getElementById('test_span_1').offsetWidth", "document.getElementById('ref_span').offsetWidth");
shouldBe("document.getElementById('test_span_2').offsetWidth", "document.getElementById('ref_span').offsetWidth");
</script>
</body>
</html>