| Index: LayoutTests/scrollingcoordinator/resources/non-fast-scrollable-region-testing.js
|
| diff --git a/LayoutTests/scrollingcoordinator/resources/non-fast-scrollable-region-testing.js b/LayoutTests/scrollingcoordinator/resources/non-fast-scrollable-region-testing.js
|
| index 594662b2f74d9db57abdc6c42c0881b1c338bfbe..ede3b04478da60f937dbb07e2481c66e1e17f7fa 100644
|
| --- a/LayoutTests/scrollingcoordinator/resources/non-fast-scrollable-region-testing.js
|
| +++ b/LayoutTests/scrollingcoordinator/resources/non-fast-scrollable-region-testing.js
|
| @@ -4,17 +4,9 @@
|
| if (window.internals)
|
| window.internals.settings.setMockScrollbarsEnabled(true);
|
|
|
| -function runNonFastScrollableRegionTest(scale) {
|
| - var invScale;
|
| - if (scale != undefined) {
|
| - if (window.eventSender)
|
| - eventSender.setPageScaleFactor(scale, 0, 0);
|
| - // FIXME: This is a hack for applyPageScaleFactorInCompositor() == false.
|
| - invScale = 1 / scale;
|
| - } else {
|
| - invScale = 1;
|
| - }
|
| -
|
| +// Draws green overlays for non-fast scrollable regions. This provides a visual
|
| +// feedback that is useful when running the test interactively.
|
| +function drawNonFastScrollableRegionOverlays() {
|
| var overlay = document.createElement("div");
|
| overlay.style.position = "absolute";
|
| overlay.style.left = 0;
|
| @@ -27,10 +19,10 @@ function runNonFastScrollableRegionTest(scale) {
|
| var patch = document.createElement("div");
|
| patch.style.position = "absolute";
|
| patch.style.backgroundColor = "#00ff00";
|
| - patch.style.left = rect.left * invScale + "px";
|
| - patch.style.top = rect.top * invScale + "px";
|
| - patch.style.width = rect.width * invScale + "px";
|
| - patch.style.height = rect.height * invScale + "px";
|
| + patch.style.left = rect.left + "px";
|
| + patch.style.top = rect.top + "px";
|
| + patch.style.width = rect.width + "px";
|
| + patch.style.height = rect.height + "px";
|
|
|
| overlay.appendChild(patch);
|
| }
|
| @@ -38,3 +30,12 @@ function runNonFastScrollableRegionTest(scale) {
|
| document.body.appendChild(overlay);
|
| }
|
|
|
| +// Waits for one RAF call to ensure compositing update has occurred and invokes task.
|
| +function awaitCompsitingUpdate(task) {
|
| + window.requestAnimationFrame(task);
|
| +}
|
| +
|
| +function rectToString(rect) {
|
| + return '[' + [rect.left, rect.top, rect.width, rect.height].join(', ') + ']';
|
| +}
|
| +
|
|
|