Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / css / first-letter-nested.html
blob3afd3007e1fb8b8da017b853148abceaacd4b04f
1 <!doctype html>
2 <html>
3 <head>
4 <title>Test for first-letter for nested elements</title>
5 <style>
6 .test:first-letter { color: green; }
7 .boxed { border: solid 1px; }
8 </style>
9 <script src="../../resources/js-test.js"></script>
10 </head>
11 <body>
12 <div id="description"></div>
14 <p class="test" id="test_p_1">
15 <span class="boxed" id="test_span_1">Span</span>
16 </p>
17 <p class="test">
18 <span class="boxed" id="test_span_2" class="boxed">Span</span>
19 </p>
20 <p>
21 <span class="boxed" id="ref_span" style="font-size:32px"><span style="color:green">S</span>pan</span>
22 </p>
24 <div id="console"></div>
26 <script>
27 document.body.offsetTop;
29 document.getElementById('test_p_1').style.fontSize = '32px';
30 document.getElementById('test_span_2').style.fontSize = '32px';
32 document.body.offsetTop;
34 description("The three spans below should look the same.");
35 shouldBe("document.getElementById('test_span_1').offsetWidth", "document.getElementById('ref_span').offsetWidth");
36 shouldBe("document.getElementById('test_span_2').offsetWidth", "document.getElementById('ref_span').offsetWidth");
37 </script>
38 </body>
39 </html>