Chromium Code Reviews| Index: third_party/WebKit/LayoutTests/compositing/overflow/non-composited-sticky-element-in-main-thread-scrolled-composited-ancestor.html |
| diff --git a/third_party/WebKit/LayoutTests/compositing/overflow/non-composited-sticky-element-in-main-thread-scrolled-composited-ancestor.html b/third_party/WebKit/LayoutTests/compositing/overflow/non-composited-sticky-element-in-main-thread-scrolled-composited-ancestor.html |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..057006477ece65b0c008dd2c8c69ea56b7cbe567 |
| --- /dev/null |
| +++ b/third_party/WebKit/LayoutTests/compositing/overflow/non-composited-sticky-element-in-main-thread-scrolled-composited-ancestor.html |
| @@ -0,0 +1,66 @@ |
| +<!DOCTYPE html> |
| +<style> |
| +body { |
| + margin: 0px; |
| +} |
| + |
| +.scroller { |
| + overflow: scroll; |
| + width: 200px; |
| + height: 600px; |
| +} |
| + |
| +.composited { |
| + will-change: transform; |
| +} |
| + |
| +.box { |
| + background: rgba(0, 255, 0, 0.9); |
| + position: sticky; |
| + width: 100%; |
|
flackr
2017/04/28 17:14:57
nit: Shouldn't this be the same width as the indic
yigu
2017/04/28 20:01:29
Done.
|
| + height: 50px; |
| + top: 0px; |
| +} |
| + |
| +.indicator { |
| + position: absolute; |
| + width: 185px; |
| + height: 50px; |
| + top: 200px; |
| + background: red; /* covered up by .box when working */ |
| +} |
| + |
| +.container { |
| + width: 100%; |
| + height: 1000px; |
| + background: grey; |
| +} |
| +</style> |
| + |
| +<div id="scroller" class="scroller"> |
| + <div class="composited container"> |
| + <div class="indicator"></div> |
| + <div class="box"></div> |
| + </div> |
| +</div> |
| + |
| +<script> |
| + if (window.testRunner) |
| + testRunner.waitUntilDone() |
| + |
| + function doTest() { |
| + let scroller = document.getElementById('scroller'); |
| + window.requestAnimationFrame(function() { |
| + scroller.scrollTop = 200; |
| + if (window.testRunner) |
| + testRunner.notifyDone(); |
| + }); |
| + } |
| + |
| + window.addEventListener('load', function() { |
| + window.requestAnimationFrame(function() { |
| + window.requestAnimationFrame(doTest); |
| + }) |
| + }); |
| +</script> |
| + |