diff --git a/b2g/app/b2g.js b/b2g/app/b2g.js index efcaa03e970..4402d03c539 100644 --- a/b2g/app/b2g.js +++ b/b2g/app/b2g.js @@ -1124,8 +1124,10 @@ pref("dom.requestSync.enabled", true); pref("gfx.vsync.hw-vsync.enabled", true); pref("gfx.vsync.compositor", true); pref("gfx.touch.resample", true); +pref("gfx.vsync.refreshdriver", true); #else pref("gfx.vsync.hw-vsync.enabled", false); pref("gfx.vsync.compositor", false); pref("gfx.touch.resample", false); +pref("gfx.vsync.refreshdriver", false); #endif diff --git a/b2g/config/dolphin/sources.xml b/b2g/config/dolphin/sources.xml index 2cfd5a33018..389c31f56ee 100644 --- a/b2g/config/dolphin/sources.xml +++ b/b2g/config/dolphin/sources.xml @@ -15,7 +15,7 @@ - + @@ -23,7 +23,7 @@ - + diff --git a/b2g/config/emulator-ics/sources.xml b/b2g/config/emulator-ics/sources.xml index 6e1b7677d2f..03630ef4cd3 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 053a32aaa65..47587bc2b83 100644 --- a/b2g/config/emulator-jb/sources.xml +++ b/b2g/config/emulator-jb/sources.xml @@ -17,10 +17,10 @@ - + - + diff --git a/b2g/config/emulator-kk/sources.xml b/b2g/config/emulator-kk/sources.xml index ac17c45aa4d..dfd6eb77c78 100644 --- a/b2g/config/emulator-kk/sources.xml +++ b/b2g/config/emulator-kk/sources.xml @@ -15,7 +15,7 @@ - + @@ -23,7 +23,7 @@ - + diff --git a/b2g/config/emulator-l/sources.xml b/b2g/config/emulator-l/sources.xml index 485aebe5221..9fb90115ade 100644 --- a/b2g/config/emulator-l/sources.xml +++ b/b2g/config/emulator-l/sources.xml @@ -15,7 +15,7 @@ - + @@ -23,7 +23,7 @@ - + diff --git a/b2g/config/emulator/sources.xml b/b2g/config/emulator/sources.xml index 6e1b7677d2f..03630ef4cd3 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 a5c5db15bbd..7712167ece2 100644 --- a/b2g/config/flame-kk/sources.xml +++ b/b2g/config/flame-kk/sources.xml @@ -15,7 +15,7 @@ - + @@ -23,7 +23,7 @@ - + diff --git a/b2g/config/flame/sources.xml b/b2g/config/flame/sources.xml index ca73b17ff99..21e478aa8a8 100644 --- a/b2g/config/flame/sources.xml +++ b/b2g/config/flame/sources.xml @@ -17,10 +17,10 @@ - + - + diff --git a/b2g/config/gaia.json b/b2g/config/gaia.json index 188af9b6521..afb734df345 100644 --- a/b2g/config/gaia.json +++ b/b2g/config/gaia.json @@ -1,9 +1,9 @@ { "git": { - "git_revision": "8837f94418d69a0b06c1f4843b0779e2bb72165a", + "git_revision": "66558ce7f36809a20d1c721fd4d457913b09c5c7", "remote": "https://git.mozilla.org/releases/gaia.git", "branch": "" }, - "revision": "e034a24fa2dcff4623dce2d91f7828d582abf50d", + "revision": "73b67adb48cdfbba7a520d3499e9759757c8b3c5", "repo_path": "integration/gaia-central" } diff --git a/b2g/config/nexus-4/sources.xml b/b2g/config/nexus-4/sources.xml index dee5391e631..4b148d9c2ea 100644 --- a/b2g/config/nexus-4/sources.xml +++ b/b2g/config/nexus-4/sources.xml @@ -17,10 +17,10 @@ - + - + diff --git a/b2g/config/nexus-5-l/sources.xml b/b2g/config/nexus-5-l/sources.xml index dff5dcde175..d729cbcab84 100644 --- a/b2g/config/nexus-5-l/sources.xml +++ b/b2g/config/nexus-5-l/sources.xml @@ -15,7 +15,7 @@ - + @@ -23,7 +23,7 @@ - + diff --git a/browser/app/profile/firefox.js b/browser/app/profile/firefox.js index 24fdc05d44a..8fa1f7bad0a 100644 --- a/browser/app/profile/firefox.js +++ b/browser/app/profile/firefox.js @@ -1698,6 +1698,7 @@ pref("loop.debug.loglevel", "Error"); pref("loop.debug.dispatcher", false); pref("loop.debug.websocket", false); pref("loop.debug.sdk", false); +pref("loop.debug.twoWayMediaTelemetry", false); #ifdef DEBUG pref("loop.CSP", "default-src 'self' about: file: chrome: http://localhost:*; img-src 'self' data: https://www.gravatar.com/ about: file: chrome:; font-src 'none'; connect-src wss://*.tokbox.com https://*.opentok.com https://*.tokbox.com wss://*.mozilla.com https://*.mozilla.org wss://*.mozaws.net http://localhost:* ws://localhost:*; media-src blob:"); #else @@ -1878,5 +1879,7 @@ pref("dom.ipc.reportProcessHangs", true); pref("reader.parse-on-load.enabled", false); #endif -// Disable ReadingList by default. +// Disable ReadingList browser UI by default. pref("browser.readinglist.enabled", false); +// Enable the readinglist engine by default. +pref("readinglist.scheduler.enabled", true); diff --git a/browser/base/content/browser-context.inc b/browser/base/content/browser-context.inc index 1d651e95dc7..b542b5afac6 100644 --- a/browser/base/content/browser-context.inc +++ b/browser/base/content/browser-context.inc @@ -312,7 +312,7 @@ + oncommand="gContextMenu.shareSelect();"/> diff --git a/browser/base/content/browser-readinglist.js b/browser/base/content/browser-readinglist.js index 851fef307cb..b3cda23a73c 100644 --- a/browser/base/content/browser-readinglist.js +++ b/browser/base/content/browser-readinglist.js @@ -232,12 +232,22 @@ let ReadingListUI = { // nothing to do if we have no button. return; } - if (!this.enabled || state == "invalid") { + + let uri; + if (this.enabled && state == "valid") { + uri = gBrowser.currentURI; + if (uri.schemeIs("about")) + uri = ReaderParent.parseReaderUrl(uri.spec); + else if (!uri.schemeIs("http") && !uri.schemeIs("https")) + uri = null; + } + + if (!uri) { this.toolbarButton.setAttribute("hidden", true); return; } - let isInList = yield ReadingList.containsURL(gBrowser.currentURI); + let isInList = yield ReadingList.containsURL(uri); this.setToolbarButtonState(isInList); }), @@ -268,11 +278,17 @@ let ReadingListUI = { * @returns {Promise} Promise resolved when operation has completed. */ togglePageByBrowser: Task.async(function* (browser) { - let item = yield ReadingList.getItemForURL(browser.currentURI); + let uri = browser.currentURI; + if (uri.spec.startsWith("about:reader?")) + uri = ReaderParent.parseReaderUrl(uri.spec); + if (!uri) + return; + + let item = yield ReadingList.getItemForURL(uri); if (item) { yield item.delete(); } else { - yield ReadingList.addItemFromBrowser(browser); + yield ReadingList.addItemFromBrowser(browser, uri); } }), @@ -284,6 +300,9 @@ let ReadingListUI = { */ isItemForCurrentBrowser(item) { let currentURL = gBrowser.currentURI.spec; + if (currentURL.startsWith("about:reader?")) + currentURL = ReaderParent.parseReaderUrl(currentURL); + if (item.url == currentURL || item.resolvedURL == currentURL) { return true; } diff --git a/browser/base/content/browser-social.js b/browser/base/content/browser-social.js index 8c4a82e9aad..80a187216a5 100644 --- a/browser/base/content/browser-social.js +++ b/browser/base/content/browser-social.js @@ -658,7 +658,7 @@ SocialShare = { pageData.microdata = msg.data; this.sharePage(providerOrigin, pageData, target); }); - gBrowser.selectedBrowser.messageManager.sendAsyncMessage("PageMetadata:GetMicrodata", null, target); + gBrowser.selectedBrowser.messageManager.sendAsyncMessage("PageMetadata:GetMicrodata", null, { target }); return; } this.currentShare = pageData; diff --git a/browser/base/content/content.js b/browser/base/content/content.js index a82c4a1767b..e8d2f768755 100644 --- a/browser/base/content/content.js +++ b/browser/base/content/content.js @@ -486,6 +486,7 @@ let AboutReaderListener = { init: function() { addEventListener("AboutReaderContentLoaded", this, false, true); addEventListener("DOMContentLoaded", this, false); + addEventListener("pageshow", this, false); addEventListener("pagehide", this, false); addMessageListener("Reader:ParseDocument", this); }, @@ -525,6 +526,13 @@ let AboutReaderListener = { sendAsyncMessage("Reader:UpdateReaderButton", { isArticle: false }); break; + case "pageshow": + // If a page is loaded from the bfcache, we won't get a "DOMContentLoaded" + // event, so we need to rely on "pageshow" in this case. + if (!aEvent.persisted) { + break; + } + // Fall through. case "DOMContentLoaded": if (!ReaderMode.isEnabledForParseOnLoad || this.isAboutReader) { return; @@ -1016,7 +1024,7 @@ let PageMetadataMessenger = { } case "PageMetadata:GetMicrodata": { - let target = message.objects; + let target = message.objects.target; let result = PageMetadata.getMicrodata(content.document, target); sendAsyncMessage("PageMetadata:MicrodataResult", result); break; diff --git a/browser/base/content/nsContextMenu.js b/browser/base/content/nsContextMenu.js index 5b2d62cb62b..7028e849c1a 100644 --- a/browser/base/content/nsContextMenu.js +++ b/browser/base/content/nsContextMenu.js @@ -151,6 +151,7 @@ nsContextMenu.prototype = { if (uri && uri.host) { this.linkURI = uri; this.linkURL = this.linkURI.spec; + this.linkText = linkText; this.onPlainTextLink = true; } } @@ -576,6 +577,7 @@ nsContextMenu.prototype = { this.link = null; this.linkURL = ""; this.linkURI = null; + this.linkText = ""; this.linkProtocol = ""; this.linkHasNoReferrer = false; this.onMathML = false; @@ -737,6 +739,7 @@ nsContextMenu.prototype = { this.link = elem; this.linkURL = this.getLinkURL(); this.linkURI = this.getLinkURI(); + this.linkText = this.getLinkText(); this.linkProtocol = this.getLinkProtocol(); this.onMailtoLink = (this.linkProtocol == "mailto"); this.onSaveableLink = this.isLinkSaveable( this.link ); @@ -1302,15 +1305,8 @@ nsContextMenu.prototype = { // Save URL of clicked-on link. saveLink: function() { var doc = this.target.ownerDocument; - var linkText; - // If selected text is found to match valid URL pattern. - if (this.onPlainTextLink) - linkText = this.focusedWindow.getSelection().toString().trim(); - else - linkText = this.linkText(); urlSecurityCheck(this.linkURL, this.principal); - - this.saveHelper(this.linkURL, linkText, null, true, doc); + this.saveHelper(this.linkURL, this.linkText, null, true, doc); }, // Backwards-compatibility wrapper @@ -1503,7 +1499,7 @@ nsContextMenu.prototype = { }, // Get text of link. - linkText: function() { + getLinkText: function() { var text = gatherTextUnder(this.link); if (!text || !text.match(/\S/)) { text = this.link.getAttribute("title"); @@ -1598,14 +1594,8 @@ nsContextMenu.prototype = { }, bookmarkLink: function CM_bookmarkLink() { - var linkText; - // If selected text is found to match valid URL pattern. - if (this.onPlainTextLink) - linkText = this.focusedWindow.getSelection().toString().trim(); - else - linkText = this.linkText(); - window.top.PlacesCommandHook.bookmarkLink(PlacesUtils.bookmarksMenuFolderId, this.linkURL, - linkText); + window.top.PlacesCommandHook.bookmarkLink(PlacesUtils.bookmarksMenuFolderId, + this.linkURL, this.linkText); }, addBookmarkForFrame: function CM_addBookmarkForFrame() { @@ -1650,8 +1640,8 @@ nsContextMenu.prototype = { SocialShare.sharePage(null, { url: this.mediaURL, source: this.mediaURL }, this.target); }, - shareSelect: function CM_shareSelect(selection) { - SocialShare.sharePage(null, { url: this.browser.currentURI.spec, text: selection }, this.target); + shareSelect: function CM_shareSelect() { + SocialShare.sharePage(null, { url: this.browser.currentURI.spec, text: this.textSelected }, this.target); }, savePageAs: function CM_savePageAs() { @@ -1699,7 +1689,7 @@ nsContextMenu.prototype = { // Formats the 'Search for ""' context menu. formatSearchContextItem: function() { var menuItem = document.getElementById("context-searchselect"); - var selectedText = this.isTextSelected ? this.textSelected : this.linkText(); + let selectedText = this.isTextSelected ? this.textSelected : this.linkText; // Store searchTerms in context menu item so we know what to search onclick menuItem.searchTerms = selectedText; diff --git a/browser/base/content/popup-notifications.inc b/browser/base/content/popup-notifications.inc index e4bdea72a36..4082f4a36c0 100644 --- a/browser/base/content/popup-notifications.inc +++ b/browser/base/content/popup-notifications.inc @@ -60,6 +60,14 @@ + + #ifdef E10S_TESTING_ONLY