зеркало из https://github.com/mozilla/gecko-dev.git
Merge mozilla-central to inbound. a=merge CLOSED TREE
This commit is contained in:
Коммит
986858ee7f
|
@ -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);
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче