Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(7)

Side by Side Diff: third_party/WebKit/LayoutTests/virtual/threaded/fast/compositorworker/root-scroller.html

Issue 2292133002: [compositor-worker] root scrolling layer is associated with document scrolling element
Patch Set: Use document instead of documentElement() Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 <!DOCTYPE html>
2
3 <style>
4 body {
5 width: 100px;
6 height: 100px;
7 overflow: scroll;
flackr 2017/03/01 16:31:26 Why do we need to apply overflow: scroll / limit t
8 }
9
10 #green {
11 width: 1000px;
12 height: 1000px;
13
14 position: relative;
15 left: 500px;
16 top: 500px;
17
18 background-color: #00ff00;
19 }
20 </style>
21
22 <body>
23 <div id="green"></div>
24 </body>
25
26 <script src='../../../../resources/testharness.js'></script>
27 <script src='../../../../resources/testharnessreport.js'></script>
28
29 <script>
30 if (window.internals) {
31 internals.settings.setCompositorWorkerEnabled(true);
32 internals.settings.setPreferCompositingToLCDTextEnabled(true);
flackr 2017/03/01 16:31:26 The root scroller is always composited isn't it? I
33 }
34
35 async_test(function(test){
36 var cw = new CompositorWorker('resources/root-scroller.js');
37 cw.onmessage = test.step_func(function(){
38 requestAnimationFrame(test.step_func(function() {
39 assert_equals(document.scrollingElement.scrollTop, 500);
40 assert_equals(document.scrollingElement.scrollLeft, 500);
41 test.done();
42 }));
43 });
44
45 cw.postMessage({'proxy': new CompositorProxy(document.scrollingElement,
46 ['scrollLeft', 'scrollTop'])});
47 }, 'Check that mutating scroll offset of a proxied document.scrollingElement scr olls the root layer');
48
49
50
flackr 2017/03/01 16:31:26 nit: collapse newlines
51 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698