column-balancing-break-inside-avoid-2.html 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. <html class="reftest-wait">
  2. <head>
  3. <link rel="author" title="Mats Palmgren" href="https://bugzilla.mozilla.org/show_bug.cgi?id=685012">
  4. <link rel="help" href="http://www.w3.org/TR/CSS21/page.html#propdef-page-break-inside">
  5. <meta name="flags" content="paged">
  6. <meta charset="utf-8">
  7. <title>Balancing Overflow, page-break-inside:avoid</title>
  8. <style>
  9. /* Sets of heights that trigger crash:
  10. 100px/50px/51+px
  11. 100px/30px/74+px
  12. Get only an assert unless you set ".d { position: absolute; }".
  13. Trigger hang (separate issue, absolute not needed):
  14. 10px/10px/9999px
  15. 10px/10px/999999px --> "bad height" notreached
  16. */
  17. /* Note: The -moz-column-gap and the backgrounds
  18. are just added here for easier visualization */
  19. #colset { width: 200px;
  20. padding: 2px;
  21. -moz-column-count: 3;
  22. -moz-column-gap: 2px; }
  23. #a { height: 100px; background: lightblue;}
  24. #b { height: 50px; background: lightblue;}
  25. #c { height: 51px; background: orange;}
  26. div {page-break-inside:avoid; }
  27. </style>
  28. <script>
  29. function boom() {
  30. document.getElementById('colset').offsetHeight;
  31. document.getElementById('a').style.height = 'auto';
  32. document.documentElement.className = ''
  33. }
  34. </script>
  35. </head>
  36. <!-- Removing whitespace in body for simpler frame trees -->
  37. <body onload="boom()"
  38. ><div id="colset"
  39. ><div
  40. ><div id="a"></div
  41. ><div id="b"
  42. ><div id="c"></div
  43. ><div id="d"></div
  44. ></div
  45. ></div
  46. ></div
  47. ></body>
  48. </html>