|
Line 0
a/LayoutTests/fast/css/first-letter-removed-added.html_sec1
|
|
|
1 |
<!doctype html> |
| 2 |
<html> |
| 3 |
<head> |
| 4 |
<title>Test for first-letter that is removed or added by style change</title> |
| 5 |
<style> |
| 6 |
.test:first-letter { color: green; font-size:64px; float:inherit; } |
| 7 |
.test { clear:both; } |
| 8 |
.boxed { border: solid 1px; } |
| 9 |
.bef:before { content:"Before "; } |
| 10 |
.test_b:first-letter { color: green; font-size:64px; float:left; } |
| 11 |
.ref_b:first-letter { color: green; font-size:64px; float:none; } |
| 12 |
</style> |
| 13 |
<link rel="stylesheet" href="../js/resources/js-test-style.css"/> |
| 14 |
<script src="../js/resources/js-test-pre.js"></script> |
| 15 |
</head> |
| 16 |
<body> |
| 17 |
<div id="description"></div> |
| 18 |
|
| 19 |
Test 1:<br/> |
| 20 |
<div class="test boxed" id="test1">Block to Inline</div><br/> |
| 21 |
<div class="test boxed" id="ref1" style="display:inline">Block to Inline</div><br/> |
| 22 |
<hr/> |
| 23 |
|
| 24 |
Test 2:<br/> |
| 25 |
<span class="test boxed" id="test2">Inline to Block</span> |
| 26 |
<span class="test boxed" id="ref2" style="display:block">Inline to Block</span> |
| 27 |
<hr/> |
| 28 |
|
| 29 |
Test 3:<br/> |
| 30 |
<div class="test"><span id="test3" class="boxed bef">pseudo</span></div> |
| 31 |
<div class="test"><span id="ref3" class="boxed">pseudo</span></div> |
| 32 |
<hr/> |
| 33 |
|
| 34 |
Test 4: (Currently failing)<br/> |
| 35 |
<div class="test"><span id="test4" class="boxed">pseudo</span></div> |
| 36 |
<div class="test"><span id="ref4" class="boxed bef">pseudo</span></div> |
| 37 |
<hr/> |
| 38 |
|
| 39 |
Test 5:<br/> |
| 40 |
<div class="test"><span id="test5" class="boxed" style="float:none">To Float</span></div> |
| 41 |
<div class="test"><span id="ref5" class="boxed" style="float:left">To Float</span></div> |
| 42 |
<br/> |
| 43 |
<hr/> |
| 44 |
|
| 45 |
Test 6:<br/> |
| 46 |
<div class="test"><span id="test6" class="boxed" style="float:left">To Non Float</span></div> |
| 47 |
<div class="test"><span id="ref6" class="boxed" style="float:none">To Non Float</span></div> |
| 48 |
<hr/> |
| 49 |
|
| 50 |
Test 7: (Currently failing)<br/> |
| 51 |
<div class="test"><div id="test7" class="boxed" style="float:none">To Float</div></div> |
| 52 |
<div class="test"><div id="ref7" class="boxed" style="float:left">To Float</div></div> |
| 53 |
<br/> |
| 54 |
<hr/> |
| 55 |
|
| 56 |
Test 8:<br/> |
| 57 |
<div class="test"><div id="test8" class="boxed" style="float:left">To Non Float</div></div> |
| 58 |
<div class="test"><div id="ref8" class="boxed" style="float:none">To Non Float</div></div> |
| 59 |
<hr/> |
| 60 |
|
| 61 |
<div id="console"></div> |
| 62 |
|
| 63 |
<script> |
| 64 |
description("The following pairs should look the same."); |
| 65 |
|
| 66 |
document.body.offsetTop; // Force layout |
| 67 |
|
| 68 |
document.getElementById("test1").style.display = "inline"; |
| 69 |
document.getElementById("test2").style.display = "block"; |
| 70 |
document.getElementById("test3").className = "boxed"; |
| 71 |
document.getElementById("test4").className = "boxed bef"; |
| 72 |
document.getElementById("test5").style.float = "left"; |
| 73 |
document.getElementById("test6").style.float = "none"; |
| 74 |
document.getElementById("test7").style.float = "left"; |
| 75 |
document.getElementById("test8").style.float = "none"; |
| 76 |
|
| 77 |
shouldBeTrue("document.getElementById('test1').offsetWidth == document.getElementById('ref1').offsetWidth"); |
| 78 |
shouldBeTrue("document.getElementById('test2').offsetHeight == document.getElementById('ref2').offsetHeight"); |
| 79 |
shouldBeTrue("document.getElementById('test3').offsetWidth == document.getElementById('ref3').offsetWidth"); |
| 80 |
shouldBeTrue("document.getElementById('test4').offsetWidth == document.getElementById('ref4').offsetWidth"); |
| 81 |
shouldBeTrue("document.getElementById('test5').offsetWidth == document.getElementById('ref5').offsetWidth"); |
| 82 |
shouldBeTrue("document.getElementById('test6').offsetWidth == document.getElementById('ref6').offsetWidth"); |
| 83 |
shouldBeTrue("document.getElementById('test7').offsetWidth == document.getElementById('ref7').offsetWidth"); |
| 84 |
shouldBeTrue("document.getElementById('test8').offsetWidth == document.getElementById('ref8').offsetWidth"); |
| 85 |
|
| 86 |
var successfullyParsed = true; |
| 87 |
</script> |
| 88 |
<script src="../js/resources/js-test-post.js"></script> |
| 89 |
</body> |
| 90 |
</html> |