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

Unified Diff: third_party/WebKit/LayoutTests/scrollingcoordinator/resources/non-fast-scrollable-region-testing.js

Issue 2659183002: [RootLayerScrolls] Fix frame scrolling layer in ScrollingCoordinator (Closed)
Patch Set: Created 3 years, 11 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/scrollingcoordinator/resources/non-fast-scrollable-region-testing.js
diff --git a/third_party/WebKit/LayoutTests/scrollingcoordinator/resources/non-fast-scrollable-region-testing.js b/third_party/WebKit/LayoutTests/scrollingcoordinator/resources/non-fast-scrollable-region-testing.js
index 51500d2f7478cfb76e2bcbde6e613db83b69e1c7..c556ecc903f1a7976cddb9105ac6d45d4546cab7 100644
--- a/third_party/WebKit/LayoutTests/scrollingcoordinator/resources/non-fast-scrollable-region-testing.js
+++ b/third_party/WebKit/LayoutTests/scrollingcoordinator/resources/non-fast-scrollable-region-testing.js
@@ -34,3 +34,11 @@ function rectToString(rect) {
return '[' + [rect.left, rect.top, rect.width, rect.height].join(', ') + ']';
}
+function sortRects(rects) {
+ Array.prototype.sort.call(rects, (a, b) => {
skobes 2017/01/28 02:00:04 I thought of an easier way :) Array.prototype.sor
+ return [
+ a.height - b.height, a.width - b.width, a.top - b.top, a.left - b.left
+ ].reduce((acc, val) => val || acc, 0);
+ });
+ return rects;
+}

Powered by Google App Engine
This is Rietveld 408576698