зеркало из https://github.com/mozilla/gecko-dev.git
Merge mozilla-central to autoland. a=merge CLOSED TREE
This commit is contained in:
Коммит
10a8cd5f4e
|
@ -1,6 +1,4 @@
|
|||
/* Any copyright is dedicated to the Public Domain.
|
||||
* http://creativecommons.org/publicdomain/zero/1.0/ */
|
||||
|
||||
/* eslint-disable mozilla/no-arbitrary-setTimeout */
|
||||
"use strict";
|
||||
|
||||
// The purpose of this test is to test the urlbar popup's add-on iframe. It has
|
||||
|
@ -135,14 +133,13 @@ add_task(async function() {
|
|||
// urlbar.setPanelHeight
|
||||
let newHeight = height + 100;
|
||||
await promiseUrlbarFunctionCall("setPanelHeight", newHeight);
|
||||
// The height change is animated, so give it time to complete.
|
||||
await TestUtils.waitForCondition(
|
||||
() => Math.round(iframe.getBoundingClientRect().height) == newHeight,
|
||||
"Wait for panel height change after setPanelHeight"
|
||||
).catch(ex => {
|
||||
info("Last detected height: " + Math.round(iframe.getBoundingClientRect().height));
|
||||
throw ex;
|
||||
await new Promise(resolve => {
|
||||
// The height change is animated, so give it time to complete. Again, wait
|
||||
// a sec to be safe.
|
||||
setTimeout(resolve, 1000);
|
||||
});
|
||||
Assert.equal(iframe.getBoundingClientRect().height, newHeight,
|
||||
"setPanelHeight");
|
||||
});
|
||||
|
||||
function promiseIframeLoad() {
|
||||
|
|
|
@ -93,7 +93,6 @@ file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
|||
this.inputField.addEventListener("overflow", this);
|
||||
this.inputField.addEventListener("underflow", this);
|
||||
this.inputField.addEventListener("scrollend", this);
|
||||
window.addEventListener("resize", this);
|
||||
|
||||
var textBox = document.getAnonymousElementByAttribute(this,
|
||||
"anonid", "moz-input-box");
|
||||
|
@ -159,7 +158,6 @@ file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
|||
this.inputField.removeEventListener("overflow", this);
|
||||
this.inputField.removeEventListener("underflow", this);
|
||||
this.inputField.removeEventListener("scrollend", this);
|
||||
window.removeEventListener("resize", this);
|
||||
|
||||
if (this._deferredKeyEventTimeout) {
|
||||
clearTimeout(this._deferredKeyEventTimeout);
|
||||
|
@ -1420,25 +1418,6 @@ file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
|||
// Ensure to clear those internal caches when switching tabs.
|
||||
this.controller.resetInternalState();
|
||||
break;
|
||||
case "resize":
|
||||
// Throttle resize handling for performance reasons.
|
||||
if (aEvent.target == window && !this._resizeThrottleTimeout) {
|
||||
this._resizeThrottleTimeout = setTimeout(() => {
|
||||
window.requestAnimationFrame(() => {
|
||||
delete this._resizeThrottleTimeout;
|
||||
|
||||
// Close the popup since it would be wrongly sized, we'll
|
||||
// recalculate a proper size on reopening. For example, this may
|
||||
// happen when using special OS resize functions like Win+Arrow.
|
||||
this.closePopup();
|
||||
|
||||
// Ensure the host remains visible when the input field is not
|
||||
// focused.
|
||||
this.formatValue();
|
||||
});
|
||||
}, 30);
|
||||
}
|
||||
break;
|
||||
}
|
||||
]]></body>
|
||||
</method>
|
||||
|
|
Загрузка…
Ссылка в новой задаче