layout/reftests/bugs/495385-2c.html

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/layout/reftests/bugs/495385-2c.html	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,36 @@
     1.4 +<!DOCTYPE HTML>
     1.5 +<html>
     1.6 +<head>
     1.7 +<!-- Test that insertions work in the presence of display:none elements that
     1.8 +      separate whitespace from block boundaries -->
     1.9 +<style>
    1.10 +body > div { border:1px solid black; margin:1em;
    1.11 +             font-family:sans-serif; letter-spacing:2px; }
    1.12 +em { display:none; }
    1.13 +</style>
    1.14 +<script>
    1.15 +function makeSpan(text) {
    1.16 +  var e = document.createElement("span");
    1.17 +  e.textContent = text;
    1.18 +  return e;
    1.19 +}
    1.20 +function loaded() {
    1.21 +  document.body.offsetHeight;
    1.22 +  var d1 = document.getElementById("d1");
    1.23 +  d1.insertBefore(makeSpan("Hello"), d1.firstChild);
    1.24 +  var d2 = document.getElementById("d2");
    1.25 +  d2.appendChild(makeSpan("Kitty"));
    1.26 +  var d3 = document.getElementById("d3");
    1.27 +  d3.insertBefore(makeSpan("Hello"), d3.firstChild.nextSibling);
    1.28 +  var d4 = document.getElementById("d4");
    1.29 +  d4.insertBefore(makeSpan("Kitty"), d4.lastChild);
    1.30 +}
    1.31 +</script>
    1.32 +</head>
    1.33 +<body onload="loaded()">
    1.34 +  <div id="d1"><em>X</em> <span>Kitty</span></div>
    1.35 +  <div id="d2"><span>Hello</span> <em>X</em></div>
    1.36 +  <div id="d3"><div></div><em>X</em> <span>Kitty</span></div>
    1.37 +  <div id="d4"><span>Hello</span> <em>X</em><div></div></div>
    1.38 +</body>
    1.39 +</html>

mercurial