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

Unified 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, 10 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/LayoutTests/virtual/threaded/fast/compositorworker/root-scroller.html
diff --git a/third_party/WebKit/LayoutTests/virtual/threaded/fast/compositorworker/root-scroller.html b/third_party/WebKit/LayoutTests/virtual/threaded/fast/compositorworker/root-scroller.html
new file mode 100644
index 0000000000000000000000000000000000000000..ca55b2c4a8184816d955eaade226057ad5327f32
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/virtual/threaded/fast/compositorworker/root-scroller.html
@@ -0,0 +1,51 @@
+<!DOCTYPE html>
+
+<style>
+body {
+ width: 100px;
+ height: 100px;
+ overflow: scroll;
flackr 2017/03/01 16:31:26 Why do we need to apply overflow: scroll / limit t
+}
+
+#green {
+ width: 1000px;
+ height: 1000px;
+
+ position: relative;
+ left: 500px;
+ top: 500px;
+
+ background-color: #00ff00;
+}
+</style>
+
+<body>
+ <div id="green"></div>
+</body>
+
+<script src='../../../../resources/testharness.js'></script>
+<script src='../../../../resources/testharnessreport.js'></script>
+
+<script>
+if (window.internals) {
+ internals.settings.setCompositorWorkerEnabled(true);
+ internals.settings.setPreferCompositingToLCDTextEnabled(true);
flackr 2017/03/01 16:31:26 The root scroller is always composited isn't it? I
+}
+
+async_test(function(test){
+ var cw = new CompositorWorker('resources/root-scroller.js');
+ cw.onmessage = test.step_func(function(){
+ requestAnimationFrame(test.step_func(function() {
+ assert_equals(document.scrollingElement.scrollTop, 500);
+ assert_equals(document.scrollingElement.scrollLeft, 500);
+ test.done();
+ }));
+ });
+
+ cw.postMessage({'proxy': new CompositorProxy(document.scrollingElement,
+ ['scrollLeft', 'scrollTop'])});
+}, 'Check that mutating scroll offset of a proxied document.scrollingElement scrolls the root layer');
+
+
+
flackr 2017/03/01 16:31:26 nit: collapse newlines
+</script>

Powered by Google App Engine
This is Rietveld 408576698