|
|
|
|
| 66 |
* so request and force redraws to get the chance to check for scrolling at |
66 |
* so request and force redraws to get the chance to check for scrolling at |
| 67 |
* all. |
67 |
* all. |
| 68 |
*/ |
68 |
*/ |
| 69 |
window.mozRequestAnimationFrame(); |
69 |
window.mozRequestAnimationFrame(); |
| 70 |
} |
70 |
} |
| 71 |
|
71 |
|
| 72 |
waitForExplicitFinish(); |
72 |
waitForExplicitFinish(); |
| 73 |
var dataUri = 'data:text/html,<body><style type="text/css">div { display: inline-block; }</style>\ |
73 |
var dataUri = 'data:text/html,<body><style type="text/css">div { display: inline-block; }</style>\ |
| 74 |
<div id="forceredraw" style="height: 1px"></div>\ |
|
|
| 75 |
<div id="a" style="width: 100px; height: 100px; overflow: hidden;"><div style="width: 200px; height: 200px;"></div></div>\ |
74 |
<div id="a" style="width: 100px; height: 100px; overflow: hidden;"><div style="width: 200px; height: 200px;"></div></div>\ |
| 76 |
<div id="b" style="width: 100px; height: 100px; overflow: auto;"><div style="width: 200px; height: 200px;"></div></div>\ |
75 |
<div id="b" style="width: 100px; height: 100px; overflow: auto;"><div style="width: 200px; height: 200px;"></div></div>\ |
| 77 |
<div id="c" style="width: 100px; height: 100px; overflow-x: auto; overflow-y: hidden;"><div style="width: 200px; height: 200px;"></div></div>\ |
76 |
<div id="c" style="width: 100px; height: 100px; overflow-x: auto; overflow-y: hidden;"><div style="width: 200px; height: 200px;"></div></div>\ |
| 78 |
<div id="d" style="width: 100px; height: 100px; overflow-y: auto; overflow-x: hidden;"><div style="width: 200px; height: 200px;"></div></div>\ |
77 |
<div id="d" style="width: 100px; height: 100px; overflow-y: auto; overflow-x: hidden;"><div style="width: 200px; height: 200px;"></div></div>\ |
| 79 |
<select id="e" style="width: 100px; height: 100px;" multiple="multiple"><option>aaaaaaaaaaaaaaaaaaaaaaaa</option><option>a</option><option>a</option>\ |
78 |
<select id="e" style="width: 100px; height: 100px;" multiple="multiple"><option>aaaaaaaaaaaaaaaaaaaaaaaa</option><option>a</option><option>a</option>\ |
| 80 |
<option>a</option><option>a</option><option>a</option><option>a</option><option>a</option><option>a</option><option>a</option>\ |
79 |
<option>a</option><option>a</option><option>a</option><option>a</option><option>a</option><option>a</option><option>a</option>\ |
| 81 |
<option>a</option><option>a</option><option>a</option><option>a</option><option>a</option><option>a</option><option>a</option></select>\ |
80 |
<option>a</option><option>a</option><option>a</option><option>a</option><option>a</option><option>a</option><option>a</option></select>\ |
| 82 |
<select id="f" style="width: 100px; height: 100px;"><option>a</option><option>aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa</option><option>a</option>\ |
81 |
<select id="f" style="width: 100px; height: 100px;"><option>a</option><option>aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa</option><option>a</option>\ |
|
|
| 93 |
gBrowser.selectedBrowser.removeEventListener("pageshow", onLoad, false); |
92 |
gBrowser.selectedBrowser.removeEventListener("pageshow", onLoad, false); |
| 94 |
waitForFocus(onFocus, content); |
93 |
waitForFocus(onFocus, content); |
| 95 |
} |
94 |
} |
| 96 |
|
95 |
|
| 97 |
function onFocus() { |
96 |
function onFocus() { |
| 98 |
doc = gBrowser.contentDocument; |
97 |
doc = gBrowser.contentDocument; |
| 99 |
// force redraws, so we actually get AfterPaint events |
98 |
// force redraws, so we actually get AfterPaint events |
| 100 |
window.addEventListener("MozBeforePaint", function(ev) { |
99 |
window.addEventListener("MozBeforePaint", function(ev) { |
| 101 |
doc.getElementById("forceredraw").style.left = ev.timeStamp % 100; |
100 |
doc.body.appendChild(doc.createTextNode('.')); |
| 102 |
}, false); |
101 |
}, false); |
| 103 |
nextTest(); |
102 |
nextTest(); |
| 104 |
} |
103 |
} |
| 105 |
|
104 |
|
| 106 |
function endTest() { |
105 |
function endTest() { |
| 107 |
// restore the changed prefs |
106 |
// restore the changed prefs |
| 108 |
if (Services.prefs.prefHasUserValue(kPrefName_AutoScroll)) |
107 |
if (Services.prefs.prefHasUserValue(kPrefName_AutoScroll)) |
| 109 |
Services.prefs.clearUserPref(kPrefName_AutoScroll); |
108 |
Services.prefs.clearUserPref(kPrefName_AutoScroll); |