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

Unified Diff: third_party/WebKit/LayoutTests/virtual/threaded/fast/compositorworker/resources/root-scroller.js

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/resources/root-scroller.js
diff --git a/third_party/WebKit/LayoutTests/virtual/threaded/fast/compositorworker/resources/root-scroller.js b/third_party/WebKit/LayoutTests/virtual/threaded/fast/compositorworker/resources/root-scroller.js
new file mode 100644
index 0000000000000000000000000000000000000000..0caf2ba09917b39740317b7a3c39a8b0655929eb
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/virtual/threaded/fast/compositorworker/resources/root-scroller.js
@@ -0,0 +1,19 @@
+self.onmessage = function(msg) {
+ awaitProxyInit(msg.data.proxy).then((proxy) => {
+ proxy.scrollLeft = 500;
+ proxy.scrollTop = 500;
+ postMessage({});
+ });
+}
+
+function awaitProxyInit(proxy) {
+ return new Promise((resolve, reject) => {
+ function check() {
+ if (proxy.initialized)
+ resolve(proxy);
+ else
+ requestAnimationFrame(check);
+ }
+ requestAnimationFrame(check);
+ });
+}

Powered by Google App Engine
This is Rietveld 408576698