mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-18 14:56:07 +00:00
Bug 1322609 - use getTabBrowser() instead of a type attribute check in marionette, r=ato
MozReview-Commit-ID: 9iIJyGgoJRU --HG-- extra : rebase_source : c883354c3fc4de494981049734c60128c737913a
This commit is contained in:
parent
130d95f581
commit
359efd2e81
@ -1092,7 +1092,7 @@
|
||||
var oldBrowser = this.mCurrentBrowser;
|
||||
|
||||
if (!gMultiProcessBrowser) {
|
||||
oldBrowser.setAttribute("type", "content-targetable");
|
||||
oldBrowser.setAttribute("type", "content");
|
||||
oldBrowser.docShellIsActive = false;
|
||||
newBrowser.setAttribute("type", "content-primary");
|
||||
newBrowser.docShellIsActive =
|
||||
@ -1940,7 +1940,7 @@
|
||||
|
||||
let b = document.createElementNS(NS_XUL, "browser");
|
||||
b.permanentKey = aParams.permanentKey || {};
|
||||
b.setAttribute("type", "content-targetable");
|
||||
b.setAttribute("type", "content");
|
||||
b.setAttribute("message", "true");
|
||||
b.setAttribute("messagemanagergroup", "browsers");
|
||||
b.setAttribute("contextmenu", this.getAttribute("contentcontextmenu"));
|
||||
@ -2622,7 +2622,7 @@
|
||||
}
|
||||
|
||||
// We are no longer the primary content area.
|
||||
browser.setAttribute("type", "content-targetable");
|
||||
browser.setAttribute("type", "content");
|
||||
|
||||
// Remove this tab as the owner of any other tabs, since it's going away.
|
||||
for (let tab of this.tabs) {
|
||||
@ -3766,7 +3766,7 @@
|
||||
// before we were able to finalize, in which case, fromBrowser
|
||||
// doesn't exist.
|
||||
if (fromBrowser) {
|
||||
fromBrowser.setAttribute("type", "content-targetable");
|
||||
fromBrowser.setAttribute("type", "content");
|
||||
}
|
||||
|
||||
let event = new CustomEvent("TabSwitchDone", {
|
||||
|
@ -43,6 +43,8 @@ const BROWSER_STARTUP_FINISHED = "browser-delayed-startup-finished";
|
||||
const CLICK_TO_START_PREF = "marionette.debugging.clicktostart";
|
||||
const CONTENT_LISTENER_PREF = "marionette.contentListener";
|
||||
|
||||
const XUL_NS = "http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul";
|
||||
|
||||
const SUPPORTED_STRATEGIES = new Set([
|
||||
element.Strategy.ClassName,
|
||||
element.Strategy.Selector,
|
||||
@ -427,7 +429,13 @@ GeckoDriver.prototype.registerBrowser = function (id, be) {
|
||||
let reg = {};
|
||||
// this will be sent to tell the content process if it is the main content
|
||||
let mainContent = this.curBrowser.mainContentId === null;
|
||||
if (be.getAttribute("type") != "content") {
|
||||
// We want to ignore frames that are XUL browsers that aren't in the "main"
|
||||
// tabbrowser, but accept things on Fennec (which doesn't have a
|
||||
// xul:tabbrowser), and accept HTML iframes (because tests depend on it),
|
||||
// as well as XUL frames. Ideally this should be cleaned up and we should
|
||||
// keep track of browsers a different way.
|
||||
if (this.appName != "Firefox" || be.namespaceURI != XUL_NS ||
|
||||
be.nodeName != "browser" || be.getTabBrowser()) {
|
||||
// curBrowser holds all the registered frames in knownFrames
|
||||
let uid = this.generateFrameId(id);
|
||||
reg.id = uid;
|
||||
|
Loading…
x
Reference in New Issue
Block a user