OLD | NEW |
| 1 // setMockScrollbarsEnabled doesn't actually invalidate scrollbars |
| 2 // so if we don't set it immediately, they won't repaint/relayout |
| 3 // correctly! http://crbug.com/365509 |
| 4 if (window.internals) |
| 5 window.internals.settings.setMockScrollbarsEnabled(true); |
| 6 |
1 function runNonFastScrollableRegionTest(scale) { | 7 function runNonFastScrollableRegionTest(scale) { |
2 var invScale; | 8 var invScale; |
3 window.internals.settings.setMockScrollbarsEnabled(true); | |
4 if (scale != undefined) { | 9 if (scale != undefined) { |
5 if (window.eventSender) | 10 if (window.eventSender) |
6 eventSender.setPageScaleFactor(scale, 0, 0); | 11 eventSender.setPageScaleFactor(scale, 0, 0); |
7 // FIXME: This is a hack for applyPageScaleFactorInCompositor() == false
. | 12 // FIXME: This is a hack for applyPageScaleFactorInCompositor() == false
. |
8 invScale = 1 / scale; | 13 invScale = 1 / scale; |
9 } else { | 14 } else { |
10 invScale = 1; | 15 invScale = 1; |
11 } | 16 } |
12 | 17 |
13 var overlay = document.createElement("div"); | 18 var overlay = document.createElement("div"); |
(...skipping 12 matching lines...) Expand all Loading... |
26 patch.style.top = rect.top * invScale + "px"; | 31 patch.style.top = rect.top * invScale + "px"; |
27 patch.style.width = rect.width * invScale + "px"; | 32 patch.style.width = rect.width * invScale + "px"; |
28 patch.style.height = rect.height * invScale + "px"; | 33 patch.style.height = rect.height * invScale + "px"; |
29 | 34 |
30 overlay.appendChild(patch); | 35 overlay.appendChild(patch); |
31 } | 36 } |
32 | 37 |
33 document.body.appendChild(overlay); | 38 document.body.appendChild(overlay); |
34 } | 39 } |
35 | 40 |
OLD | NEW |