Merge mozilla-central to inbound. a=merge CLOSED TREE

This commit is contained in:
Noemi Erli 2018-10-01 12:46:24 +03:00
Родитель 163d5851d1 05d24a8ad0
Коммит 986858ee7f
6 изменённых файлов: 68 добавлений и 17 удалений

Просмотреть файл

@ -41,3 +41,4 @@ skip-if = (os == "linux") # Bug 1024734
[test_zoom.html]
[test_toolbox.html]
[test_app_validator.html]
[test_performance_panel.html]

Просмотреть файл

@ -0,0 +1,60 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf8">
<title></title>
<script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
<script type="application/javascript" src="chrome://mochikit/content/chrome-harness.js"></script>
<script type="application/javascript" src="head.js"></script>
<link rel="stylesheet" type="text/css" href="chrome://mochikit/content/tests/SimpleTest/test.css">
</head>
<body>
<script type="application/javascript">
window.onload = async function() {
SimpleTest.waitForExplicitFinish();
try {
Services.prefs.setBoolPref("devtools.performance.new-panel-enabled", true);
DebuggerServer.init();
DebuggerServer.registerAllActors();
const win = await openWebIDE();
const perfIframe = win.document.querySelector("#deck-panel-performance");
const docRuntime = getRuntimeDocument(win);
win.AppManager.update("runtime-list");
await connectToLocalRuntime(win);
const prefs = docRuntime.querySelector("#runtime-performance");
ok(!prefs.hidden, "performance button is displayed");
ok(!prefs.hasAttribute("disabled"), "performance cmd enabled");
const deck = win.document.querySelector("#deck");
win.Cmds.showPerformancePanel();
is(deck.selectedPanel, perfIframe, "performance iframe selected");
await nextTick();
await lazyIframeIsLoaded(perfIframe);
await SimpleTest.promiseWaitForCondition(
() => perfIframe.contentDocument.querySelector(".perf"),
"Waited for the react rendering that never came."
);
ok(true, "The perf interface was correctly rendered.");
await closeWebIDE(win);
} catch (e) {
ok(false, "Exception: " + e + "\nStack: " + e.stack);
} finally {
Services.prefs.clearUserPref("devtools.performance.new-panel-enabled");
SimpleTest.finish();
}
};
</script>
</body>
</html>

Просмотреть файл

@ -3766,7 +3766,6 @@ Tab.prototype = {
this.browser.addEventListener("DOMWindowFocus", this, true);
this.browser.addEventListener("focusin", this, true);
this.browser.addEventListener("focusout", this, true);
this.browser.addEventListener("TabSelect", this, true);
// Note that the XBL binding is untrusted
this.browser.addEventListener("VideoBindingAttached", this, true, true);
@ -3905,7 +3904,6 @@ Tab.prototype = {
this.browser.removeEventListener("DOMWindowFocus", this, true);
this.browser.removeEventListener("focusin", this, true);
this.browser.removeEventListener("focusout", this, true);
this.browser.removeEventListener("TabSelect", this, true);
this.browser.removeEventListener("VideoBindingAttached", this, true, true);
this.browser.removeEventListener("VideoBindingCast", this, true, true);
@ -4435,38 +4433,28 @@ Tab.prototype = {
}
case "focusin": {
if (BrowserApp.selectedTab === this &&
aEvent.composedTarget instanceof HTMLInputElement) {
if (aEvent.composedTarget instanceof HTMLInputElement) {
this._autoFill.onFocus(aEvent.composedTarget);
}
break;
}
case "focusout": {
if (BrowserApp.selectedTab === this &&
aEvent.composedTarget instanceof HTMLInputElement) {
if (aEvent.composedTarget instanceof HTMLInputElement) {
this._autoFill.onFocus(null);
}
break;
}
case "TabSelect": {
this._autoFill.clearElements();
this._autoFill.scanDocument(this.browser.contentDocument);
break;
}
case "pagehide": {
if (BrowserApp.selectedTab === this &&
aEvent.target === this.browser.contentDocument) {
if (aEvent.target === this.browser.contentDocument) {
this._autoFill.clearElements();
}
break;
}
case "pageshow": {
if (BrowserApp.selectedTab === this &&
aEvent.target === this.browser.contentDocument && aEvent.persisted) {
if (aEvent.target === this.browser.contentDocument && aEvent.persisted) {
this._autoFill.scanDocument(aEvent.target);
}

Просмотреть файл

@ -777,6 +777,7 @@ public class SessionAccessibility {
final int id;
if (message != null) {
id = message.getInt("id");
mAutoFillNodes.put(id, message);
} else {
id = View.NO_ID;
}

Просмотреть файл

@ -734,6 +734,7 @@ public final class SessionTextInput {
final int id;
if (message != null) {
id = message.getInt("id");
mAutoFillNodes.put(id, message);
} else {
id = View.NO_ID;
}

Просмотреть файл

@ -67,7 +67,7 @@ class GeckoViewAutoFill {
return;
}
debug `Adding auto-fill ${aFormLike.rootElement.tagName}`;
debug `Adding auto-fill ${aFormLike}`;
this._autoFillTasks.delete(aFormLike.rootElement);