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..0816754259a52fb063627e2ce336227136076043 |
| --- /dev/null |
| +++ b/third_party/WebKit/LayoutTests/compositing/overflow/non-composited-sticky-element-in-main-thread-scrolled-composited-ancestor.html |
| @@ -0,0 +1,53 @@ |
| +<!DOCTYPE html> |
| +<style> |
| +.scroller { |
| + overflow: scroll; |
| + width: 200px; |
| + height: 600px; |
| +} |
| + |
| +.composited { |
| + will-change: transform; |
| +} |
| + |
| +.box { |
| + background: rgba(255, 0, 0, 0.5); |
|
flackr
2017/04/27 14:22:56
nit: Use a greenish color - i.e. rgba(0, 255, 0, 0
yigu
2017/04/27 15:20:10
Done.
|
| + position: sticky; |
| + width: 100%; |
| + height: 50px; |
| + top: 0px; |
| +} |
| + |
| +.container { |
| + width: 100%; |
| + height: 1000px; |
| + background: green; |
|
flackr
2017/04/27 14:22:56
nit: Let's just make this gray or something simila
yigu
2017/04/27 15:20:10
Done.
|
| +} |
| +</style> |
| + |
| +<div id="scroller" class="scroller"> |
| + <div class="composited container"> |
| + <div class="box"></div> |
|
flackr
2017/04/27 14:22:56
While not necessary, the nice way to represent thi
yigu
2017/04/27 15:20:10
Done.
|
| + </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> |
| + |