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

Side by Side 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, 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 unified diff | Download patch
OLDNEW
1 // setMockScrollbarsEnabled doesn't actually invalidate scrollbars 1 // setMockScrollbarsEnabled doesn't actually invalidate scrollbars
2 // so if we don't set it immediately, they won't repaint/relayout 2 // so if we don't set it immediately, they won't repaint/relayout
3 // correctly! http://crbug.com/365509 3 // correctly! http://crbug.com/365509
4 if (window.internals) 4 if (window.internals)
5 window.internals.settings.setMockScrollbarsEnabled(true); 5 window.internals.settings.setMockScrollbarsEnabled(true);
6 6
7 // Draws green overlays for non-fast scrollable regions. This provides a visual 7 // Draws green overlays for non-fast scrollable regions. This provides a visual
8 // feedback that is useful when running the test interactively. 8 // feedback that is useful when running the test interactively.
9 function drawNonFastScrollableRegionOverlays() { 9 function drawNonFastScrollableRegionOverlays() {
10 var overlay = document.createElement("div"); 10 var overlay = document.createElement("div");
(...skipping 16 matching lines...) Expand all
27 overlay.appendChild(patch); 27 overlay.appendChild(patch);
28 } 28 }
29 29
30 document.body.appendChild(overlay); 30 document.body.appendChild(overlay);
31 } 31 }
32 32
33 function rectToString(rect) { 33 function rectToString(rect) {
34 return '[' + [rect.left, rect.top, rect.width, rect.height].join(', ') + ']' ; 34 return '[' + [rect.left, rect.top, rect.width, rect.height].join(', ') + ']' ;
35 } 35 }
36 36
37 function sortRects(rects) {
38 Array.prototype.sort.call(rects, (a, b) => {
skobes 2017/01/28 02:00:04 I thought of an easier way :) Array.prototype.sor
39 return [
40 a.height - b.height, a.width - b.width, a.top - b.top, a.left - b.left
41 ].reduce((acc, val) => val || acc, 0);
42 });
43 return rects;
44 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698