diff --git a/b2g/config/dolphin/sources.xml b/b2g/config/dolphin/sources.xml
index 589e421d0ff0..fed4fcb52ad9 100644
--- a/b2g/config/dolphin/sources.xml
+++ b/b2g/config/dolphin/sources.xml
@@ -15,9 +15,9 @@
-
+
-
+
diff --git a/b2g/config/emulator-ics/sources.xml b/b2g/config/emulator-ics/sources.xml
index 94bfaec2bedd..be43c4707d76 100644
--- a/b2g/config/emulator-ics/sources.xml
+++ b/b2g/config/emulator-ics/sources.xml
@@ -19,8 +19,8 @@
-
-
+
+
diff --git a/b2g/config/emulator-jb/sources.xml b/b2g/config/emulator-jb/sources.xml
index 1299fae5155c..fea13f5549f4 100644
--- a/b2g/config/emulator-jb/sources.xml
+++ b/b2g/config/emulator-jb/sources.xml
@@ -17,8 +17,8 @@
-
-
+
+
diff --git a/b2g/config/emulator-kk/sources.xml b/b2g/config/emulator-kk/sources.xml
index 0635fbcfa3ce..5ca3f3fa0b8d 100644
--- a/b2g/config/emulator-kk/sources.xml
+++ b/b2g/config/emulator-kk/sources.xml
@@ -15,9 +15,9 @@
-
+
-
+
diff --git a/b2g/config/emulator-l/sources.xml b/b2g/config/emulator-l/sources.xml
index b4ba509c01c8..8bc274892010 100644
--- a/b2g/config/emulator-l/sources.xml
+++ b/b2g/config/emulator-l/sources.xml
@@ -15,9 +15,9 @@
-
+
-
+
diff --git a/b2g/config/emulator/sources.xml b/b2g/config/emulator/sources.xml
index 94bfaec2bedd..be43c4707d76 100644
--- a/b2g/config/emulator/sources.xml
+++ b/b2g/config/emulator/sources.xml
@@ -19,8 +19,8 @@
-
-
+
+
diff --git a/b2g/config/flame-kk/sources.xml b/b2g/config/flame-kk/sources.xml
index 5edd3cdfbc14..9c0ff9b26a19 100644
--- a/b2g/config/flame-kk/sources.xml
+++ b/b2g/config/flame-kk/sources.xml
@@ -15,9 +15,9 @@
-
+
-
+
diff --git a/b2g/config/flame/sources.xml b/b2g/config/flame/sources.xml
index f19a741df2b7..bac70c844218 100644
--- a/b2g/config/flame/sources.xml
+++ b/b2g/config/flame/sources.xml
@@ -17,8 +17,8 @@
-
-
+
+
diff --git a/b2g/config/gaia.json b/b2g/config/gaia.json
index cea9594f2a8e..a39cba98c4ad 100644
--- a/b2g/config/gaia.json
+++ b/b2g/config/gaia.json
@@ -1,9 +1,9 @@
{
"git": {
- "git_revision": "a290b11627ec2b7c25980f5687a98da86641cfe4",
+ "git_revision": "5dfd0460eb6e616205154b0d219aa5123bf1abb3",
"remote": "https://git.mozilla.org/releases/gaia.git",
"branch": ""
},
- "revision": "dbc540265f837510772bbcfdc7e9181b280b2551",
+ "revision": "d8cd51229d334a6e9ae46951a7e0555a01d0cb1c",
"repo_path": "integration/gaia-central"
}
diff --git a/b2g/config/nexus-4/sources.xml b/b2g/config/nexus-4/sources.xml
index 52a06a9ad057..60e6b551f181 100644
--- a/b2g/config/nexus-4/sources.xml
+++ b/b2g/config/nexus-4/sources.xml
@@ -17,8 +17,8 @@
-
-
+
+
diff --git a/b2g/config/nexus-5-l/sources.xml b/b2g/config/nexus-5-l/sources.xml
index aacd64978374..5c6348edb7f2 100644
--- a/b2g/config/nexus-5-l/sources.xml
+++ b/b2g/config/nexus-5-l/sources.xml
@@ -15,9 +15,9 @@
-
+
-
+
diff --git a/browser/base/content/content.js b/browser/base/content/content.js
index e46053c75c7a..15be08c8dc3f 100644
--- a/browser/base/content/content.js
+++ b/browser/base/content/content.js
@@ -164,6 +164,9 @@ let handleContentContextMenu = function (event) {
let baseURI = doc.baseURI;
let referrer = doc.referrer;
let referrerPolicy = doc.referrerPolicy;
+ let frameOuterWindowID = doc.defaultView.QueryInterface(Ci.nsIInterfaceRequestor)
+ .getInterface(Ci.nsIDOMWindowUtils)
+ .outerWindowID;
// Media related cache info parent needs for saving
let contentType = null;
@@ -199,7 +202,8 @@ let handleContentContextMenu = function (event) {
sendSyncMessage("contextmenu",
{ editFlags, spellInfo, customMenuItems, addonInfo,
principal, docLocation, charSet, baseURI, referrer,
- referrerPolicy, contentType, contentDisposition },
+ referrerPolicy, contentType, contentDisposition,
+ frameOuterWindowID },
{ event, popupNode: event.target });
}
else {
diff --git a/browser/base/content/nsContextMenu.js b/browser/base/content/nsContextMenu.js
index c937cd5fd8fd..c418626af9e2 100644
--- a/browser/base/content/nsContextMenu.js
+++ b/browser/base/content/nsContextMenu.js
@@ -599,24 +599,31 @@ nsContextMenu.prototype = {
this.focusedWindow = win;
this.focusedElement = elt;
+ let ownerDoc = this.target.ownerDocument;
+
// If this is a remote context menu event, use the information from
// gContextMenuContentData instead.
if (this.isRemote) {
this.browser = gContextMenuContentData.browser;
this.principal = gContextMenuContentData.principal;
+ this.frameOuterWindowID = gContextMenuContentData.frameOuterWindowID;
} else {
editFlags = SpellCheckHelper.isEditable(this.target, window);
- this.browser = this.target.ownerDocument.defaultView
- .QueryInterface(Ci.nsIInterfaceRequestor)
- .getInterface(Ci.nsIWebNavigation)
- .QueryInterface(Ci.nsIDocShell)
- .chromeEventHandler;
- this.principal = this.target.ownerDocument.nodePrincipal;
+ this.browser = ownerDoc.defaultView
+ .QueryInterface(Ci.nsIInterfaceRequestor)
+ .getInterface(Ci.nsIWebNavigation)
+ .QueryInterface(Ci.nsIDocShell)
+ .chromeEventHandler;
+ this.principal = ownerDoc.nodePrincipal;
+ this.frameOuterWindowID = ownerDoc.defaultView
+ .QueryInterface(Ci.nsIInterfaceRequestor)
+ .getInterface(Ci.nsIDOMWindowUtils)
+ .outerWindowID;
}
this.onSocial = !!this.browser.getAttribute("origin");
// Check if we are in a synthetic document (stand alone image, video, etc.).
- this.inSyntheticDoc = this.target.ownerDocument.mozSyntheticDocument;
+ this.inSyntheticDoc = ownerDoc.mozSyntheticDocument;
// First, do checks for nodes that never have children.
if (this.target.nodeType == Node.ELEMENT_NODE) {
// See if the user clicked on an image.
@@ -635,7 +642,7 @@ nsContextMenu.prototype = {
var descURL = this.target.getAttribute("longdesc");
if (descURL) {
- this.imageDescURL = makeURLAbsolute(this.target.ownerDocument.body.baseURI, descURL);
+ this.imageDescURL = makeURLAbsolute(ownerDoc.body.baseURI, descURL);
}
}
else if (this.target instanceof HTMLCanvasElement) {
@@ -685,7 +692,7 @@ nsContextMenu.prototype = {
this.onKeywordField = (editFlags & SpellCheckHelper.KEYWORD);
}
else if (this.target instanceof HTMLHtmlElement) {
- var bodyElt = this.target.ownerDocument.body;
+ var bodyElt = ownerDoc.body;
if (bodyElt) {
let computedURL;
try {
@@ -776,11 +783,11 @@ nsContextMenu.prototype = {
this.onMathML = true;
// See if the user clicked in a frame.
- var docDefaultView = this.target.ownerDocument.defaultView;
+ var docDefaultView = ownerDoc.defaultView;
if (docDefaultView != docDefaultView.top) {
this.inFrame = true;
- if (this.target.ownerDocument.isSrcdocDocument) {
+ if (ownerDoc.isSrcdocDocument) {
this.inSrcdocFrame = true;
}
}
@@ -805,7 +812,7 @@ nsContextMenu.prototype = {
InlineSpellCheckerUI.initFromRemote(gContextMenuContentData.spellInfo);
}
else {
- var targetWin = this.target.ownerDocument.defaultView;
+ var targetWin = ownerDoc.defaultView;
var editingSession = targetWin.QueryInterface(Ci.nsIInterfaceRequestor)
.getInterface(Ci.nsIWebNavigation)
.QueryInterface(Ci.nsIInterfaceRequestor)
diff --git a/browser/base/content/tabbrowser.xml b/browser/base/content/tabbrowser.xml
index fb8563658f3a..f9cc65462e70 100644
--- a/browser/base/content/tabbrowser.xml
+++ b/browser/base/content/tabbrowser.xml
@@ -3776,6 +3776,7 @@
referrerPolicy: aMessage.data.referrerPolicy,
contentType: aMessage.data.contentType,
contentDisposition: aMessage.data.contentDisposition,
+ frameOuterWindowID: aMessage.data.frameOuterWindowID,
};
let popup = browser.ownerDocument.getElementById("contentAreaContextMenu");
let event = gContextMenuContentData.event;
diff --git a/browser/base/content/test/general/browser_bug553455.js b/browser/base/content/test/general/browser_bug553455.js
index c468d45f910c..269137b9abaa 100644
--- a/browser/base/content/test/general/browser_bug553455.js
+++ b/browser/base/content/test/general/browser_bug553455.js
@@ -5,6 +5,7 @@
const TESTROOT = "http://example.com/browser/toolkit/mozapps/extensions/test/xpinstall/";
const TESTROOT2 = "http://example.org/browser/toolkit/mozapps/extensions/test/xpinstall/";
const SECUREROOT = "https://example.com/browser/toolkit/mozapps/extensions/test/xpinstall/";
+const XPINSTALL_URL = "chrome://mozapps/content/xpinstall/xpinstallConfirm.xul";
const PREF_INSTALL_REQUIREBUILTINCERTS = "extensions.install.requireBuiltInCerts";
const PROGRESS_NOTIFICATION = "addon-progress";
@@ -86,6 +87,52 @@ function wait_for_notification_close(aCallback) {
}, false);
}
+function wait_for_install_dialog(aCallback) {
+ if (Preferences.get("xpinstall.customConfirmationUI", false)) {
+ wait_for_notification("addon-install-confirmation", function(aPanel) {
+ aCallback();
+ });
+ return;
+ }
+
+ info("Waiting for install dialog");
+
+ Services.wm.addListener({
+ onOpenWindow: function(aXULWindow) {
+ info("Install dialog opened, waiting for focus");
+ Services.wm.removeListener(this);
+
+ var domwindow = aXULWindow.QueryInterface(Ci.nsIInterfaceRequestor)
+ .getInterface(Ci.nsIDOMWindow);
+ waitForFocus(function() {
+ info("Saw install dialog");
+ is(domwindow.document.location.href, XPINSTALL_URL, "Should have seen the right window open");
+
+ // Override the countdown timer on the accept button
+ var button = domwindow.document.documentElement.getButton("accept");
+ button.disabled = false;
+
+ aCallback();
+ }, domwindow);
+ },
+
+ onCloseWindow: function(aXULWindow) {
+ },
+
+ onWindowTitleChange: function(aXULWindow, aNewTitle) {
+ }
+ });
+}
+
+function accept_install_dialog() {
+ if (Preferences.get("xpinstall.customConfirmationUI", false)) {
+ document.getElementById("addon-install-confirmation-accept").click();
+ } else {
+ let win = Services.wm.getMostRecentWindow("Addons:Install");
+ win.document.documentElement.acceptDialog();
+ }
+}
+
function wait_for_single_notification(aCallback) {
function inner_waiter() {
info("Waiting for single notification");
@@ -165,7 +212,7 @@ function test_blocked_install() {
"Should have seen the right message");
// Wait for the install confirmation dialog
- wait_for_notification("addon-install-confirmation", function(aPanel) {
+ wait_for_install_dialog(function() {
// Wait for the complete notification
wait_for_notification("addon-install-complete", function(aPanel) {
let notification = aPanel.childNodes[0];
@@ -183,7 +230,7 @@ function test_blocked_install() {
});
});
- document.getElementById("addon-install-confirmation-accept").click();
+ accept_install_dialog();
});
// Click on Allow
@@ -208,7 +255,7 @@ function test_whitelisted_install() {
gBrowser.selectedTab = originalTab;
// Wait for the install confirmation dialog
- wait_for_notification("addon-install-confirmation", function(aPanel) {
+ wait_for_install_dialog(function() {
is(gBrowser.selectedTab, tab,
"tab selected in response to the addon-install-confirmation notification");
@@ -230,7 +277,7 @@ function test_whitelisted_install() {
});
});
- document.getElementById("addon-install-confirmation-accept").click();
+ accept_install_dialog();
});
});
@@ -331,7 +378,7 @@ function test_restartless() {
// Wait for the progress notification
wait_for_progress_notification(function(aPanel) {
// Wait for the install confirmation dialog
- wait_for_notification("addon-install-confirmation", function(aPanel) {
+ wait_for_install_dialog(function() {
// Wait for the complete notification
wait_for_notification("addon-install-complete", function(aPanel) {
let notification = aPanel.childNodes[0];
@@ -352,7 +399,7 @@ function test_restartless() {
});
});
- document.getElementById("addon-install-confirmation-accept").click();
+ accept_install_dialog();
});
});
@@ -370,7 +417,7 @@ function test_multiple() {
// Wait for the progress notification
wait_for_progress_notification(function(aPanel) {
// Wait for the install confirmation dialog
- wait_for_notification("addon-install-confirmation", function(aPanel) {
+ wait_for_install_dialog(function() {
// Wait for the complete notification
wait_for_notification("addon-install-complete", function(aPanel) {
let notification = aPanel.childNodes[0];
@@ -393,7 +440,7 @@ function test_multiple() {
});
});
- document.getElementById("addon-install-confirmation-accept").click();
+ accept_install_dialog();
});
});
@@ -412,7 +459,7 @@ function test_url() {
// Wait for the progress notification
wait_for_progress_notification(function(aPanel) {
// Wait for the install confirmation dialog
- wait_for_notification("addon-install-confirmation", function(aPanel) {
+ wait_for_install_dialog(function() {
// Wait for the complete notification
wait_for_notification("addon-install-complete", function(aPanel) {
let notification = aPanel.childNodes[0];
@@ -430,7 +477,7 @@ function test_url() {
});
});
- document.getElementById("addon-install-confirmation-accept").click();
+ accept_install_dialog();
});
});
@@ -499,7 +546,7 @@ function test_reload() {
// Wait for the progress notification
wait_for_progress_notification(function(aPanel) {
// Wait for the install confirmation dialog
- wait_for_notification("addon-install-confirmation", function(aPanel) {
+ wait_for_install_dialog(function() {
// Wait for the complete notification
wait_for_notification("addon-install-complete", function(aPanel) {
let notification = aPanel.childNodes[0];
@@ -534,7 +581,7 @@ function test_reload() {
gBrowser.loadURI(TESTROOT2 + "enabled.html");
});
- document.getElementById("addon-install-confirmation-accept").click();
+ accept_install_dialog();
});
});
@@ -552,7 +599,7 @@ function test_theme() {
// Wait for the progress notification
wait_for_progress_notification(function(aPanel) {
// Wait for the install confirmation dialog
- wait_for_notification("addon-install-confirmation", function(aPanel) {
+ wait_for_install_dialog(function() {
// Wait for the complete notification
wait_for_notification("addon-install-complete", function(aPanel) {
let notification = aPanel.childNodes[0];
@@ -577,7 +624,7 @@ function test_theme() {
});
});
- document.getElementById("addon-install-confirmation-accept").click();
+ accept_install_dialog();
});
});
@@ -630,7 +677,7 @@ function test_renotify_installed() {
// Wait for the progress notification
wait_for_progress_notification(function(aPanel) {
// Wait for the install confirmation dialog
- wait_for_notification("addon-install-confirmation", function(aPanel) {
+ wait_for_install_dialog(function() {
// Wait for the complete notification
wait_for_notification("addon-install-complete", function(aPanel) {
// Dismiss the notification
@@ -640,7 +687,7 @@ function test_renotify_installed() {
// Wait for the progress notification
wait_for_progress_notification(function(aPanel) {
// Wait for the install confirmation dialog
- wait_for_notification("addon-install-confirmation", function(aPanel) {
+ wait_for_install_dialog(function() {
info("Timeouts after this probably mean bug 589954 regressed");
// Wait for the complete notification
@@ -655,7 +702,7 @@ function test_renotify_installed() {
});
});
- document.getElementById("addon-install-confirmation-accept").click();
+ accept_install_dialog();
});
});
@@ -667,7 +714,7 @@ function test_renotify_installed() {
aPanel.hidePopup();
});
- document.getElementById("addon-install-confirmation-accept").click();
+ accept_install_dialog();
});
});
diff --git a/browser/components/loop/LoopCalls.jsm b/browser/components/loop/LoopCalls.jsm
index 9574bff83f80..5b34cd44d591 100644
--- a/browser/components/loop/LoopCalls.jsm
+++ b/browser/components/loop/LoopCalls.jsm
@@ -282,7 +282,10 @@ let LoopCallsInternal = {
*/
_startCall: function(callData) {
const openChat = () => {
- this.conversationInProgress.id = MozLoopService.openChatWindow(callData);
+ let windowId = MozLoopService.openChatWindow(callData);
+ if (windowId) {
+ this.conversationInProgress.id = windowId;
+ }
};
if (callData.type == "incoming" && ("callerId" in callData) &&
diff --git a/browser/components/loop/LoopRooms.jsm b/browser/components/loop/LoopRooms.jsm
index 0035756bee2d..7925e3ae57fe 100644
--- a/browser/components/loop/LoopRooms.jsm
+++ b/browser/components/loop/LoopRooms.jsm
@@ -62,11 +62,7 @@ const extend = function(target, source) {
*/
const containsParticipant = function(room, participant) {
for (let user of room.participants) {
- // XXX until a bug 1100318 is implemented and deployed,
- // we need to check the "id" field here as well - roomConnectionId is the
- // official value for the interface.
- if (user.roomConnectionId == participant.roomConnectionId &&
- user.id == participant.id) {
+ if (user.roomConnectionId == participant.roomConnectionId) {
return true;
}
}
@@ -451,10 +447,7 @@ let LoopRoomsInternal = {
let origRoom = this.rooms.get(roomToken);
let patchData = {
- roomName: newRoomName,
- // XXX We have to supply the max size and room owner due to bug 1099063.
- maxSize: origRoom.maxSize,
- roomOwner: origRoom.roomOwner
+ roomName: newRoomName
};
MozLoopService.hawkRequest(this.sessionType, url, "PATCH", patchData)
.then(response => {
diff --git a/browser/components/loop/MozLoopService.jsm b/browser/components/loop/MozLoopService.jsm
index 75fb315885a7..40071cee4f62 100644
--- a/browser/components/loop/MozLoopService.jsm
+++ b/browser/components/loop/MozLoopService.jsm
@@ -827,7 +827,8 @@ let MozLoopServiceInternal = {
*
* @param {Object} conversationWindowData The data to be obtained by the
* window when it opens.
- * @returns {Number} The id of the window.
+ * @returns {Number} The id of the window, null if a window could not
+ * be opened.
*/
openChatWindow: function(conversationWindowData) {
// So I guess the origin is the loop server!?
@@ -913,7 +914,9 @@ let MozLoopServiceInternal = {
}.bind(this), true);
};
- Chat.open(null, origin, "", url, undefined, undefined, callback);
+ if (!Chat.open(null, origin, "", url, undefined, undefined, callback)) {
+ return null;
+ }
return windowId;
},
diff --git a/browser/components/loop/content/conversation.html b/browser/components/loop/content/conversation.html
index 1af5d33365bf..9a7f9d15169c 100644
--- a/browser/components/loop/content/conversation.html
+++ b/browser/components/loop/content/conversation.html
@@ -33,7 +33,6 @@
-
@@ -46,6 +45,7 @@
+