| OLD | NEW |
| (Empty) | |
| 1 <!DOCTYPE html> |
| 2 <!-- |
| 3 Scrollbar layer geometry stress test. |
| 4 |
| 5 A is a stacking context; its scrollbars are not re-parented. |
| 6 |
| 7 B gets re-parented, but isn't clipped by any ancestor. |
| 8 |
| 9 C and D are re-parented, and clipped by two non-stacking ancestors. |
| 10 |
| 11 One of D's clipping ancestors is positioned, triggering the |
| 12 "compositingStackingContext != compositingContainer" path |
| 13 in CLM::updateOverflowControlsHostLayerGeometry. |
| 14 |
| 15 The scrollers, stacking contexts, and outer clipping ancestors |
| 16 all have borders (creating non-zero clip offsets) and box shadows |
| 17 (causing main GraphicsLayer to be offset from its LayoutObject), |
| 18 with varying thicknesses. |
| 19 --> |
| 20 <script> |
| 21 if (window.internals) { |
| 22 window.internals.settings.setOverlayScrollbarsEnabled(true); |
| 23 window.internals.settings.setPreferCompositingToLCDTextEnabled(true); |
| 24 } |
| 25 </script> |
| 26 <style> |
| 27 .outer { |
| 28 position: absolute; |
| 29 z-index: 0; |
| 30 will-change: transform; |
| 31 left: 21px; |
| 32 top: 21px; |
| 33 width: 300px; |
| 34 height: 242px; |
| 35 box-shadow: 0 0 12px 3px #feb; |
| 36 border: 5px solid #eda; |
| 37 } |
| 38 .C, .D { top: 312px; } |
| 39 .B, .D { left: 370px; } |
| 40 .clipper { |
| 41 overflow: hidden; |
| 42 margin-left: 11px; |
| 43 margin-top: 11px; |
| 44 width: 272px; |
| 45 height: 180px; |
| 46 border: 3px solid #aaa; |
| 47 box-shadow: 0 0 0 7px #afa; |
| 48 } |
| 49 .D .clipper { |
| 50 position: relative; |
| 51 } |
| 52 .clipper2 { |
| 53 overflow: hidden; |
| 54 margin-left: 3px; |
| 55 margin-top: 3px; |
| 56 width: 260px; |
| 57 height: 100px; |
| 58 border: 3px solid #fac; |
| 59 } |
| 60 .scroller { |
| 61 overflow: auto; |
| 62 margin-left: 36px; |
| 63 margin-top: 36px; |
| 64 width: 220px; |
| 65 height: 160px; |
| 66 box-shadow: 0 0 12px 12px #aaf; |
| 67 border: 5px solid blue; |
| 68 background-color: white; |
| 69 } |
| 70 .clipper .scroller { |
| 71 margin-left: 15px; |
| 72 margin-top: 15px; |
| 73 } |
| 74 .A .scroller { |
| 75 position: relative; |
| 76 z-index: 0; |
| 77 } |
| 78 .content { |
| 79 position: relative; |
| 80 height: 200px; |
| 81 margin: 12px; |
| 82 padding: 6px; |
| 83 background-color: #ddd; |
| 84 } |
| 85 </style> |
| 86 <div class="outer A"> |
| 87 <div class="scroller"> |
| 88 <div class="content"></div> |
| 89 </div> |
| 90 </div> |
| 91 <div class="outer B"> |
| 92 <div class="scroller"> |
| 93 <div class="content"></div> |
| 94 </div> |
| 95 </div> |
| 96 <div class="outer C"> |
| 97 <div class="clipper"> |
| 98 <div class="clipper2"> |
| 99 <div class="scroller"> |
| 100 <div class="content"></div> |
| 101 </div> |
| 102 </div> |
| 103 </div> |
| 104 </div> |
| 105 <div class="outer D"> |
| 106 <div class="clipper"> |
| 107 <div class="clipper2"> |
| 108 <div class="scroller"> |
| 109 <div class="content"></div> |
| 110 </div> |
| 111 </div> |
| 112 </div> |
| 113 </div> |
| 114 <script> |
| 115 if (window.testRunner) { |
| 116 testRunner.dumpAsTextWithPixelResults(); |
| 117 testRunner.setCustomTextOutput(internals.layerTreeAsText(document)); |
| 118 } |
| 119 </script> |
| OLD | NEW |