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 | |
7 function runNonFastScrollableRegionTest(scale) { | 1 function runNonFastScrollableRegionTest(scale) { |
8 var invScale; | 2 var invScale; |
| 3 window.internals.settings.setMockScrollbarsEnabled(true); |
9 if (scale != undefined) { | 4 if (scale != undefined) { |
10 if (window.eventSender) | 5 if (window.eventSender) |
11 eventSender.setPageScaleFactor(scale, 0, 0); | 6 eventSender.setPageScaleFactor(scale, 0, 0); |
12 // FIXME: This is a hack for applyPageScaleFactorInCompositor() == false
. | 7 // FIXME: This is a hack for applyPageScaleFactorInCompositor() == false
. |
13 invScale = 1 / scale; | 8 invScale = 1 / scale; |
14 } else { | 9 } else { |
15 invScale = 1; | 10 invScale = 1; |
16 } | 11 } |
17 | 12 |
18 var overlay = document.createElement("div"); | 13 var overlay = document.createElement("div"); |
(...skipping 12 matching lines...) Expand all Loading... |
31 patch.style.top = rect.top * invScale + "px"; | 26 patch.style.top = rect.top * invScale + "px"; |
32 patch.style.width = rect.width * invScale + "px"; | 27 patch.style.width = rect.width * invScale + "px"; |
33 patch.style.height = rect.height * invScale + "px"; | 28 patch.style.height = rect.height * invScale + "px"; |
34 | 29 |
35 overlay.appendChild(patch); | 30 overlay.appendChild(patch); |
36 } | 31 } |
37 | 32 |
38 document.body.appendChild(overlay); | 33 document.body.appendChild(overlay); |
39 } | 34 } |
40 | 35 |
OLD | NEW |