diff --git a/b2g/config/dolphin/sources.xml b/b2g/config/dolphin/sources.xml
index 85a947e8d3b..fb50bd7498f 100644
--- a/b2g/config/dolphin/sources.xml
+++ b/b2g/config/dolphin/sources.xml
@@ -15,7 +15,7 @@
-
+
diff --git a/b2g/config/emulator-ics/sources.xml b/b2g/config/emulator-ics/sources.xml
index e72b2c1bc6f..98e826f3134 100644
--- a/b2g/config/emulator-ics/sources.xml
+++ b/b2g/config/emulator-ics/sources.xml
@@ -19,7 +19,7 @@
-
+
diff --git a/b2g/config/emulator-jb/sources.xml b/b2g/config/emulator-jb/sources.xml
index f3100eea956..c6863bc3960 100644
--- a/b2g/config/emulator-jb/sources.xml
+++ b/b2g/config/emulator-jb/sources.xml
@@ -17,7 +17,7 @@
-
+
diff --git a/b2g/config/emulator-kk/sources.xml b/b2g/config/emulator-kk/sources.xml
index 67940d3949b..32e8d3981ef 100644
--- a/b2g/config/emulator-kk/sources.xml
+++ b/b2g/config/emulator-kk/sources.xml
@@ -15,7 +15,7 @@
-
+
diff --git a/b2g/config/emulator/sources.xml b/b2g/config/emulator/sources.xml
index e72b2c1bc6f..98e826f3134 100644
--- a/b2g/config/emulator/sources.xml
+++ b/b2g/config/emulator/sources.xml
@@ -19,7 +19,7 @@
-
+
diff --git a/b2g/config/flame-kk/sources.xml b/b2g/config/flame-kk/sources.xml
index 6c1380b4cb1..76b53aa6efa 100644
--- a/b2g/config/flame-kk/sources.xml
+++ b/b2g/config/flame-kk/sources.xml
@@ -15,7 +15,7 @@
-
+
diff --git a/b2g/config/flame/sources.xml b/b2g/config/flame/sources.xml
index 4734af2d2df..60e5ab9012a 100644
--- a/b2g/config/flame/sources.xml
+++ b/b2g/config/flame/sources.xml
@@ -17,7 +17,7 @@
-
+
diff --git a/b2g/config/gaia.json b/b2g/config/gaia.json
index 271b736e1b8..758a1534c30 100644
--- a/b2g/config/gaia.json
+++ b/b2g/config/gaia.json
@@ -4,6 +4,6 @@
"remote": "",
"branch": ""
},
- "revision": "e7a7c126f48f4ea3bded1f2e9ee5e4f79ae1be9e",
+ "revision": "c1fd0c75afd4ccbc7f32465d50d3022eaa55e7b6",
"repo_path": "/integration/gaia-central"
}
diff --git a/b2g/config/hamachi/sources.xml b/b2g/config/hamachi/sources.xml
index 42b12e9bb44..86adf88687b 100644
--- a/b2g/config/hamachi/sources.xml
+++ b/b2g/config/hamachi/sources.xml
@@ -17,7 +17,7 @@
-
+
diff --git a/b2g/config/helix/sources.xml b/b2g/config/helix/sources.xml
index 66530c8e182..fc05afddfbf 100644
--- a/b2g/config/helix/sources.xml
+++ b/b2g/config/helix/sources.xml
@@ -15,7 +15,7 @@
-
+
diff --git a/b2g/config/nexus-4/sources.xml b/b2g/config/nexus-4/sources.xml
index 8b0d19d9fb6..a5586e3ebcb 100644
--- a/b2g/config/nexus-4/sources.xml
+++ b/b2g/config/nexus-4/sources.xml
@@ -17,7 +17,7 @@
-
+
diff --git a/b2g/config/wasabi/sources.xml b/b2g/config/wasabi/sources.xml
index 4d8749579ee..aac51f2a3c6 100644
--- a/b2g/config/wasabi/sources.xml
+++ b/b2g/config/wasabi/sources.xml
@@ -17,7 +17,7 @@
-
+
diff --git a/b2g/dev/app/moz.build b/b2g/dev/app/moz.build
index bdb19346930..6fbe8159b2d 100644
--- a/b2g/dev/app/moz.build
+++ b/b2g/dev/app/moz.build
@@ -1,6 +1,3 @@
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
-
-DIST_SUBDIR = 'browser'
-export('DIST_SUBDIR')
diff --git a/browser/devtools/framework/sidebar.js b/browser/devtools/framework/sidebar.js
index 3c17276eb05..073c3ae2af4 100644
--- a/browser/devtools/framework/sidebar.js
+++ b/browser/devtools/framework/sidebar.js
@@ -70,12 +70,16 @@ ToolSidebar.prototype = {
let tab = this._tabbox.tabs.appendItem();
tab.setAttribute("label", ""); // Avoid showing "undefined" while the tab is loading
+ tab.setAttribute("id", "sidebar-tab-" + id);
+
+ let onIFrameLoaded = (event) => {
+ let doc = event.target;
+ let win = doc.defaultView;
+ tab.setAttribute("label", doc.title);
- let onIFrameLoaded = () => {
- tab.setAttribute("label", iframe.contentDocument.title);
iframe.removeEventListener("load", onIFrameLoaded, true);
- if ("setPanel" in iframe.contentWindow) {
- iframe.contentWindow.setPanel(this._toolPanel, iframe);
+ if ("setPanel" in win) {
+ win.setPanel(this._toolPanel, iframe);
}
this.emit(id + "-ready");
};
@@ -109,6 +113,27 @@ ToolSidebar.prototype = {
this.emit("new-tab-registered", id);
},
+ /**
+ * Remove an existing tab.
+ */
+ removeTab: function(id) {
+ let tab = this._tabbox.tabs.querySelector("tab#sidebar-tab-" + id);
+ if (!tab) {
+ return;
+ }
+
+ tab.remove();
+
+ let panel = this.getTab(id);
+ if (panel) {
+ panel.remove();
+ }
+
+ this._tabs.delete(id);
+
+ this.emit("tab-unregistered", id);
+ },
+
/**
* Select a specific tab.
*/
diff --git a/browser/devtools/framework/test/browser_toolbox_sidebar.js b/browser/devtools/framework/test/browser_toolbox_sidebar.js
index f9ec0611179..752580da995 100644
--- a/browser/devtools/framework/test/browser_toolbox_sidebar.js
+++ b/browser/devtools/framework/test/browser_toolbox_sidebar.js
@@ -108,6 +108,7 @@ function test() {
for (let tab of tabs) {
is(tab.getAttribute("label"), label++, "Tab has the right title");
}
+
is(label, 4, "Found the right amount of tabs.");
is(panel.sidebar._tabbox.selectedPanel, panels[0], "First tab is selected");
ok(panel.sidebar.getCurrentTabID(), "tab1", "getCurrentTabID() is correct");
@@ -119,13 +120,32 @@ function test() {
panel.sidebar.hide();
is(panel.sidebar._tabbox.getAttribute("hidden"), "true", "Sidebar hidden");
is(panel.sidebar.getWindowForTab("tab1").location.href, tab1URL, "Window is accessible");
- testWidth(panel);
+ testRemoval(panel);
});
});
panel.sidebar.select("tab2");
}
+ function testRemoval(panel) {
+ panel.sidebar.once("tab-unregistered", function(event, id) {
+ info(event);
+ registeredTabs[id] = false;
+
+ is(id, "tab3", "The right tab must be removed");
+
+ let tabs = panel.sidebar._tabbox.querySelectorAll("tab");
+ let panels = panel.sidebar._tabbox.querySelectorAll("tabpanel");
+
+ is(tabs.length, 2, "There is the right number of tabs");
+ is(panels.length, 2, "There is the right number of panels");
+
+ testWidth(panel);
+ });
+
+ panel.sidebar.removeTab("tab3");
+ }
+
function testWidth(panel) {
let tabbox = panel.panelDoc.getElementById("sidebar");
tabbox.width = 420;
diff --git a/browser/devtools/inspector/inspector-panel.js b/browser/devtools/inspector/inspector-panel.js
index db742577381..b3e343ce01c 100644
--- a/browser/devtools/inspector/inspector-panel.js
+++ b/browser/devtools/inspector/inspector-panel.js
@@ -736,6 +736,19 @@ InspectorPanel.prototype = {
}
},
+ /**
+ * Show DOM properties
+ */
+ showDOMProperties: function InspectorPanel_showDOMProperties() {
+ this._toolbox.openSplitConsole().then(() => {
+ let panel = this._toolbox.getPanel("webconsole");
+ let jsterm = panel.hud.jsterm;
+
+ jsterm.execute("inspect($0)");
+ jsterm.focusInput();
+ });
+ },
+
/**
* Clear any pseudo-class locks applied to the current hierarchy.
*/
diff --git a/browser/devtools/inspector/inspector.xul b/browser/devtools/inspector/inspector.xul
index dfae344d029..f4be54f26ea 100644
--- a/browser/devtools/inspector/inspector.xul
+++ b/browser/devtools/inspector/inspector.xul
@@ -55,6 +55,9 @@
+