From f00e055b734fb5c175144f43cb9287355f8cd3ba Mon Sep 17 00:00:00 2001 From: Gijs Kruitbosch Date: Wed, 15 Apr 2015 10:28:16 +0100 Subject: [PATCH 01/38] Bug 1154472 - fix expiry dates in IE cookie imports, r=mak --- .../components/migration/IEProfileMigrator.js | 28 +++++++++++-------- 1 file changed, 16 insertions(+), 12 deletions(-) diff --git a/browser/components/migration/IEProfileMigrator.js b/browser/components/migration/IEProfileMigrator.js index 284239edc8b..d39ec2c406f 100644 --- a/browser/components/migration/IEProfileMigrator.js +++ b/browser/components/migration/IEProfileMigrator.js @@ -85,15 +85,17 @@ let CtypesHelpers = { }, /** - * Converts a FILETIME struct (2 DWORDS), to a SYSTEMTIME struct. + * Converts a FILETIME struct (2 DWORDS), to a SYSTEMTIME struct, + * and then deduces the number of seconds since the epoch (which + * is the data we want for the cookie expiry date). * * @param aTimeHi * Least significant DWORD. * @param aTimeLo * Most significant DWORD. - * @return a Date object representing the converted datetime. + * @return the number of seconds since the epoch */ - fileTimeToDate: function CH_fileTimeToDate(aTimeHi, aTimeLo) { + fileTimeToSecondsSinceEpoch(aTimeHi, aTimeLo) { let fileTime = this._structs.FILETIME(); fileTime.dwLowDateTime = aTimeLo; fileTime.dwHighDateTime = aTimeHi; @@ -103,13 +105,15 @@ let CtypesHelpers = { if (result == 0) throw new Error(ctypes.winLastError); - return new Date(systemTime.wYear, - systemTime.wMonth - 1, - systemTime.wDay, - systemTime.wHour, - systemTime.wMinute, - systemTime.wSecond, - systemTime.wMilliseconds); + // System time is in UTC, so we use Date.UTC to get milliseconds from epoch, + // then divide by 1000 to get seconds, and round down: + return Math.floor(Date.UTC(systemTime.wYear, + systemTime.wMonth - 1, + systemTime.wDay, + systemTime.wHour, + systemTime.wMinute, + systemTime.wSecond, + systemTime.wMilliseconds) / 1000); } }; @@ -458,8 +462,8 @@ Cookies.prototype = { host = "." + host; } - let expireTime = CtypesHelpers.fileTimeToDate(Number(expireTimeHi), - Number(expireTimeLo)); + let expireTime = CtypesHelpers.fileTimeToSecondsSinceEpoch(Number(expireTimeHi), + Number(expireTimeLo)); Services.cookies.add(host, path, name, From 87a9c9a5803c7adeccd59b9c336a95ee5aba934e Mon Sep 17 00:00:00 2001 From: Keita Mimura Date: Thu, 16 Apr 2015 10:16:15 +0200 Subject: [PATCH 02/38] Bug 1149198 - Increase bookmark description field minimum number of rows. r=mak --- browser/components/places/content/editBookmarkOverlay.xul | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/browser/components/places/content/editBookmarkOverlay.xul b/browser/components/places/content/editBookmarkOverlay.xul index 5ce0bbcd5ce..4ef95ccc4ae 100644 --- a/browser/components/places/content/editBookmarkOverlay.xul +++ b/browser/components/places/content/editBookmarkOverlay.xul @@ -167,7 +167,8 @@ accesskey="&editBookmarkOverlay.description.accesskey;" control="editBMPanel_descriptionField"/> + multiline="true" + rows="4"/> From 24165193a126e09f846b71c2c8201c2b1234e3dc Mon Sep 17 00:00:00 2001 From: Marco Bonardo Date: Thu, 16 Apr 2015 10:16:19 +0200 Subject: [PATCH 03/38] Bug 1154294 - write a test for IE cookies migration. r=Gijs --- .../migration/tests/unit/head_migration.js | 67 ++++++------------- .../migration/tests/unit/test_IE_bookmarks.js | 48 ++++--------- .../migration/tests/unit/test_IE_cookies.js | 67 +++++++++++++++++++ .../migration/tests/unit/xpcshell.ini | 5 +- testing/modules/AppInfo.jsm | 16 ++++- 5 files changed, 118 insertions(+), 85 deletions(-) create mode 100644 browser/components/migration/tests/unit/test_IE_cookies.js diff --git a/browser/components/migration/tests/unit/head_migration.js b/browser/components/migration/tests/unit/head_migration.js index 1c47a7f94f6..f3a72991700 100644 --- a/browser/components/migration/tests/unit/head_migration.js +++ b/browser/components/migration/tests/unit/head_migration.js @@ -1,11 +1,6 @@ -/* 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/. */ +const { classes: Cc, interfaces: Ci, results: Cr, utils: Cu } = Components; -const Cc = Components.classes; -const Ci = Components.interfaces; -const Cu = Components.utils; -const Cr = Components.results; +Cu.importGlobalProperties([ "URL" ]); Cu.import("resource://gre/modules/XPCOMUtils.jsm"); Cu.import("resource://gre/modules/Services.jsm"); @@ -16,49 +11,27 @@ XPCOMUtils.defineLazyModuleGetter(this, "FileUtils", "resource://gre/modules/FileUtils.jsm"); XPCOMUtils.defineLazyModuleGetter(this, "MigrationUtils", "resource:///modules/MigrationUtils.jsm"); + // Initialize profile. let gProfD = do_get_profile(); -// Create a fake XULAppInfo to satisfy the eventual needs of the migrators. -let XULAppInfo = { - // nsIXUlAppInfo - get vendor() "Mozilla", - get name() "XPCShell", - get ID() "xpcshell@tests.mozilla.org", - get version() "1", - get appBuildID() "2007010101", - get platformVersion() "1.0", - get platformBuildID() "2007010101", +Cu.import("resource://testing-common/AppInfo.jsm"); +updateAppInfo(); - // nsIXUlRuntime (partial) - get inSafeMode() false, - logConsoleErrors: true, - get OS() "XPCShell", - get XPCOMABI() "noarch-spidermonkey", - invalidateCachesOnRestart: function () {}, +/** + * Migrates the requested resource and waits for the migration to be complete. + */ +function promiseMigration(migrator, resourceType) { + // Ensure resource migration is available. + let availableSources = migrator.getMigrateData(null, false); + Assert.ok((availableSources & resourceType) > 0); - // nsIWinAppHelper - get userCanElevate() false, + return new Promise (resolve => { + Services.obs.addObserver(function onMigrationEnded() { + Services.obs.removeObserver(onMigrationEnded, "Migration:Ended"); + resolve(); + }, "Migration:Ended", false); - QueryInterface: function (aIID) { - let interfaces = [Ci.nsIXULAppInfo, Ci.nsIXULRuntime]; - if ("nsIWinAppHelper" in Ci) - interfaces.push(Ci.nsIWinAppHelper); - if (!interfaces.some(function (v) aIID.equals(v))) - throw Cr.NS_ERROR_NO_INTERFACE; - return this; - } -}; - -const CONTRACT_ID = "@mozilla.org/xre/app-info;1"; -const CID = Components.ID("7685dac8-3637-4660-a544-928c5ec0e714}"); - -let registrar = Components.manager.QueryInterface(Ci.nsIComponentRegistrar); -registrar.registerFactory(CID, "XULAppInfo", CONTRACT_ID, { - createInstance: function (aOuter, aIID) { - if (aOuter != null) - throw Cr.NS_ERROR_NO_AGGREGATION; - return XULAppInfo.QueryInterface(aIID); - }, - QueryInterface: XPCOMUtils.generateQI(Ci.nsIFactory) -}); + migrator.migrate(resourceType, null, null); + }); +} diff --git a/browser/components/migration/tests/unit/test_IE_bookmarks.js b/browser/components/migration/tests/unit/test_IE_bookmarks.js index b2f3bbe9cc0..1697da17bbf 100644 --- a/browser/components/migration/tests/unit/test_IE_bookmarks.js +++ b/browser/components/migration/tests/unit/test_IE_bookmarks.js @@ -1,18 +1,7 @@ -/* 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/. */ - -function run_test() { - do_test_pending(); - +add_task(function* () { let migrator = MigrationUtils.getMigrator("ie"); - // Sanity check for the source. - do_check_true(migrator.sourceExists); - - // Ensure bookmarks migration is available. - let availableSources = migrator.getMigrateData(null, false); - do_check_true((availableSources & MigrationUtils.resourceTypes.BOOKMARKS) > 0); + Assert.ok(migrator.sourceExists); // Wait for the imported bookmarks. Check that "From Internet Explorer" // folders are created in the menu and on the toolbar. @@ -23,34 +12,25 @@ function run_test() { PlacesUtils.toolbarFolderId ]; PlacesUtils.bookmarks.addObserver({ - onItemAdded: function onItemAdded(aItemId, aParentId, aIndex, aItemType, - aURI, aTitle) { + onItemAdded(aItemId, aParentId, aIndex, aItemType, aURI, aTitle) { if (aTitle == label) { let index = expectedParents.indexOf(aParentId); - do_check_neq(index, -1); + Assert.notEqual(index, -1); expectedParents.splice(index, 1); if (expectedParents.length == 0) PlacesUtils.bookmarks.removeObserver(this); } }, - onBeginUpdateBatch: function () {}, - onEndUpdateBatch: function () {}, - onItemRemoved: function () {}, - onItemChanged: function () {}, - onItemVisited: function () {}, - onItemMoved: function () {}, + onBeginUpdateBatch() {}, + onEndUpdateBatch() {}, + onItemRemoved() {}, + onItemChanged() {}, + onItemVisited() {}, + onItemMoved() {}, }, false); - // Wait for migration. - Services.obs.addObserver(function onMigrationEnded() { - Services.obs.removeObserver(onMigrationEnded, "Migration:Ended"); + yield promiseMigration(migrator, MigrationUtils.resourceTypes.BOOKMARKS); - // Check the bookmarks have been imported to all the expected parents. - do_check_eq(expectedParents.length, 0); - - do_test_finished(); - }, "Migration:Ended", false); - - migrator.migrate(MigrationUtils.resourceTypes.BOOKMARKS, null, - null); -} + // Check the bookmarks have been imported to all the expected parents. + Assert.equal(expectedParents.length, 0); +}); diff --git a/browser/components/migration/tests/unit/test_IE_cookies.js b/browser/components/migration/tests/unit/test_IE_cookies.js new file mode 100644 index 00000000000..597d8d2fdb4 --- /dev/null +++ b/browser/components/migration/tests/unit/test_IE_cookies.js @@ -0,0 +1,67 @@ +XPCOMUtils.defineLazyModuleGetter(this, "ctypes", + "resource://gre/modules/ctypes.jsm"); + +add_task(function* () { + let migrator = MigrationUtils.getMigrator("ie"); + // Sanity check for the source. + Assert.ok(migrator.sourceExists); + + const BOOL = ctypes.bool; + const LPCTSTR = ctypes.char16_t.ptr; + + let wininet = ctypes.open("Wininet"); + do_register_cleanup(() => { + try { + wininet.close(); + } catch (ex) {} + }); + + /* + BOOL InternetSetCookie( + _In_ LPCTSTR lpszUrl, + _In_ LPCTSTR lpszCookieName, + _In_ LPCTSTR lpszCookieData + ); + */ + let setIECookie = wininet.declare("InternetSetCookieW", + ctypes.default_abi, + BOOL, + LPCTSTR, + LPCTSTR, + LPCTSTR); + + let expiry = new Date(); + expiry.setDate(expiry.getDate() + 7); + const COOKIE = { + host: "mycookietest.com", + name: "testcookie", + value: "testvalue", + expiry + }; + + // Sanity check. + Assert.equal(Services.cookies.countCookiesFromHost(COOKIE.host), 0, + "There are no cookies initially"); + + // Create the persistent cookie in IE. + let value = COOKIE.name + " = " + COOKIE.value +"; expires = " + + COOKIE.expiry.toUTCString(); + let rv = setIECookie(new URL("http://" + COOKIE.host).href, null, value); + Assert.ok(rv, "Added a persistent IE cookie"); + + // Migrate cookies. + yield promiseMigration(migrator, MigrationUtils.resourceTypes.COOKIES); + + Assert.equal(Services.cookies.countCookiesFromHost(COOKIE.host), 1, + "Migrated the expected number of cookies"); + + // Now check the cookie details. + let enumerator = Services.cookies.getCookiesFromHost(COOKIE.host); + Assert.ok(enumerator.hasMoreElements()); + let foundCookie = enumerator.getNext().QueryInterface(Ci.nsICookie2); + + Assert.equal(foundCookie.name, COOKIE.name); + Assert.equal(foundCookie.value, COOKIE.value); + Assert.equal(foundCookie.host, "." + COOKIE.host); + Assert.equal(foundCookie.expiry, Math.floor(COOKIE.expiry / 1000)); +}); diff --git a/browser/components/migration/tests/unit/xpcshell.ini b/browser/components/migration/tests/unit/xpcshell.ini index d3000b28408..a6a80cb93be 100644 --- a/browser/components/migration/tests/unit/xpcshell.ini +++ b/browser/components/migration/tests/unit/xpcshell.ini @@ -4,7 +4,8 @@ tail = firefox-appdir = browser skip-if = toolkit == 'android' || toolkit == 'gonk' +[test_fx_fhr.js] [test_IE_bookmarks.js] skip-if = os != "win" - -[test_fx_fhr.js] +[test_IE_cookies.js] +skip-if = os != "win" diff --git a/testing/modules/AppInfo.jsm b/testing/modules/AppInfo.jsm index ef5b0994bef..d07f36e3eef 100644 --- a/testing/modules/AppInfo.jsm +++ b/testing/modules/AppInfo.jsm @@ -26,8 +26,20 @@ let APP_INFO = { logConsoleErrors: true, OS: "XPCShell", XPCOMABI: "noarch-spidermonkey", - QueryInterface: XPCOMUtils.generateQI([Ci.nsIXULAppInfo, Ci.nsIXULRuntime]), - invalidateCachesOnRestart: function() {}, + + invalidateCachesOnRestart() {}, + + // nsIWinAppHelper + get userCanElevate() false, + + QueryInterface(iid) { + let interfaces = [ Ci.nsIXULAppInfo, Ci.nsIXULRuntime ]; + if ("nsIWinAppHelper" in Ci) + interfaces.push(Ci.nsIWinAppHelper); + if (!interfaces.some(v => iid.equals(v))) + throw Cr.NS_ERROR_NO_INTERFACE; + return this; + } }; From b2ac788793cc9b4b300699f2b7a42f242d3b38aa Mon Sep 17 00:00:00 2001 From: Marco Bonardo Date: Thu, 16 Apr 2015 10:56:34 +0200 Subject: [PATCH 04/38] Bug 1094844 - Use new keywords API in search service. r=jaws --- .../preferences/in-content/search.js | 27 +++++++++---------- browser/components/preferences/search.js | 27 +++++++++---------- .../search/content/engineManager.js | 17 ++++++------ .../search/content/engineManager.xul | 2 +- 4 files changed, 34 insertions(+), 39 deletions(-) diff --git a/browser/components/preferences/in-content/search.js b/browser/components/preferences/in-content/search.js index a622518978d..f25f65c48ba 100644 --- a/browser/components/preferences/in-content/search.js +++ b/browser/components/preferences/in-content/search.js @@ -3,7 +3,10 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ Components.utils.import("resource://gre/modules/XPCOMUtils.jsm"); -Components.utils.import("resource://gre/modules/PlacesUtils.jsm"); +XPCOMUtils.defineLazyModuleGetter(this, "PlacesUtils", + "resource://gre/modules/PlacesUtils.jsm"); +XPCOMUtils.defineLazyModuleGetter(this, "Task", + "resource://gre/modules/Task.jsm"); const ENGINE_FLAVOR = "text/x-moz-search-engine"; @@ -191,19 +194,13 @@ var gSearchPane = { document.getElementById("engineList").focus(); }, - editKeyword: function(aEngine, aNewKeyword) { + editKeyword: Task.async(function* (aEngine, aNewKeyword) { if (aNewKeyword) { - let bduplicate = false; let eduplicate = false; let dupName = ""; - try { - let bmserv = - Components.classes["@mozilla.org/browser/nav-bookmarks-service;1"] - .getService(Components.interfaces.nsINavBookmarksService); - if (bmserv.getURIForKeyword(aNewKeyword)) - bduplicate = true; - } catch(ex) {} + // Check for duplicates in Places keywords. + let bduplicate = !!(yield PlacesUtils.keywords.fetch(aNewKeyword)); // Check for duplicates in changes we haven't committed yet let engines = gEngineView._engineStore.engines; @@ -231,7 +228,7 @@ var gSearchPane = { gEngineView._engineStore.changeEngine(aEngine, "alias", aNewKeyword); gEngineView.invalidate(); return true; - }, + }), saveOneClickEnginesList: function () { let hiddenList = []; @@ -519,11 +516,11 @@ EngineView.prototype = { }, setCellText: function(index, column, value) { if (column.id == "engineKeyword") { - if (!gSearchPane.editKeyword(this._engineStore.engines[index], value)) { - setTimeout(() => { + gSearchPane.editKeyword(this._engineStore.engines[index], value) + .then(valid => { + if (!valid) document.getElementById("engineList").startEditing(index, column); - }, 0); - } + }); } }, performAction: function(action) { }, diff --git a/browser/components/preferences/search.js b/browser/components/preferences/search.js index 9af4068c270..78e216e6ff4 100644 --- a/browser/components/preferences/search.js +++ b/browser/components/preferences/search.js @@ -3,7 +3,10 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ Components.utils.import("resource://gre/modules/XPCOMUtils.jsm"); -Components.utils.import("resource://gre/modules/PlacesUtils.jsm"); +XPCOMUtils.defineLazyModuleGetter(this, "PlacesUtils", + "resource://gre/modules/PlacesUtils.jsm"); +XPCOMUtils.defineLazyModuleGetter(this, "Task", + "resource://gre/modules/Task.jsm"); const ENGINE_FLAVOR = "text/x-moz-search-engine"; @@ -123,19 +126,13 @@ var gSearchPane = { document.getElementById("engineList").focus(); }, - editKeyword: function(aEngine, aNewKeyword) { + editKeyword: Task.async(function* (aEngine, aNewKeyword) { if (aNewKeyword) { - let bduplicate = false; let eduplicate = false; let dupName = ""; - try { - let bmserv = - Components.classes["@mozilla.org/browser/nav-bookmarks-service;1"] - .getService(Components.interfaces.nsINavBookmarksService); - if (bmserv.getURIForKeyword(aNewKeyword)) - bduplicate = true; - } catch(ex) {} + // Check for duplicates in Places keywords. + let bduplicate = !!(yield PlacesUtils.keywords.fetch(aNewKeyword)); // Check for duplicates in changes we haven't committed yet let engines = gEngineView._engineStore.engines; @@ -163,7 +160,7 @@ var gSearchPane = { gEngineView._engineStore.changeEngine(aEngine, "alias", aNewKeyword); gEngineView.invalidate(); return true; - }, + }), saveOneClickEnginesList: function () { let hiddenList = []; @@ -534,11 +531,11 @@ EngineView.prototype = { }, setCellText: function(index, column, value) { if (column.id == "engineKeyword") { - if (!gSearchPane.editKeyword(this._engineStore.engines[index], value)) { - setTimeout(() => { + gSearchPane.editKeyword(this._engineStore.engines[index], value) + .then(valid => { + if (!valid) document.getElementById("engineList").startEditing(index, column); - }, 0); - } + }); } }, performAction: function(action) { }, diff --git a/browser/components/search/content/engineManager.js b/browser/components/search/content/engineManager.js index 92b6d59b778..e6c22fee0b1 100644 --- a/browser/components/search/content/engineManager.js +++ b/browser/components/search/content/engineManager.js @@ -2,7 +2,12 @@ * 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/. */ +Components.utils.import("resource://gre/modules/XPCOMUtils.jsm"); Components.utils.import("resource://gre/modules/Services.jsm"); +XPCOMUtils.defineLazyModuleGetter(this, "PlacesUtils", + "resource://gre/modules/PlacesUtils.jsm"); +XPCOMUtils.defineLazyModuleGetter(this, "Task", + "resource://gre/modules/Task.jsm"); const Ci = Components.interfaces; const Cc = Components.classes; @@ -105,7 +110,7 @@ var gEngineManagerDialog = { document.getElementById("engineList").focus(); }, - editKeyword: function engineManager_editKeyword() { + editKeyword: Task.async(function* () { var selectedEngine = gEngineView.selectedEngine; if (!selectedEngine) return; @@ -121,12 +126,8 @@ var gEngineManagerDialog = { var dupName = ""; if (alias.value != "") { - try { - let bmserv = Cc["@mozilla.org/browser/nav-bookmarks-service;1"]. - getService(Ci.nsINavBookmarksService); - if (bmserv.getURIForKeyword(alias.value)) - bduplicate = true; - } catch(ex) {} + // Check for duplicates in Places keywords. + bduplicate = !!(yield PlacesUtils.keywords.fetch(alias.value)); // Check for duplicates in changes we haven't committed yet let engines = gEngineView._engineStore.engines; @@ -154,7 +155,7 @@ var gEngineManagerDialog = { break; } } - }, + }), onSelect: function engineManager_onSelect() { // Buttons only work if an engine is selected and it's not the last engine, diff --git a/browser/components/search/content/engineManager.xul b/browser/components/search/content/engineManager.xul index 50181c066e0..1152ef8db38 100644 --- a/browser/components/search/content/engineManager.xul +++ b/browser/components/search/content/engineManager.xul @@ -36,7 +36,7 @@ oncommand="gEngineManagerDialog.bump(-1);" disabled="true"/> From 004ca4b03e9c2bb940a7eb91204a971ac78f61a2 Mon Sep 17 00:00:00 2001 From: Gijs Kruitbosch Date: Thu, 16 Apr 2015 10:12:46 +0100 Subject: [PATCH 05/38] Bug 1135545 - disable test on Win8 for frequent failures with no plausible explanation (showing start screen), rs=me --- layout/xul/test/chrome.ini | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/layout/xul/test/chrome.ini b/layout/xul/test/chrome.ini index 90bb78cf7ae..04a8b2dd336 100644 --- a/layout/xul/test/chrome.ini +++ b/layout/xul/test/chrome.ini @@ -16,7 +16,7 @@ skip-if = buildapp == 'mulet' [test_bug703150.xul] skip-if = buildapp == 'mulet' [test_bug987230.xul] -skip-if = os == 'linux' # No native mousedown event +skip-if = os == 'linux' || (os == 'win' && (os_version == '6.2' || os_version == '6.3')) # No native mousedown event on Linux, bug 1135545 for win8 intermittent failures [test_popupReflowPos.xul] [test_popupSizeTo.xul] [test_popupZoom.xul] From d12343a2ece31fba67746c0f48ea78a07b6d4a05 Mon Sep 17 00:00:00 2001 From: Gijs Kruitbosch Date: Wed, 15 Apr 2015 07:57:00 +0100 Subject: [PATCH 06/38] Bug 1148923 - min-width the font menulists, r=jaws --- .../themes/shared/incontentprefs/preferences.inc.css | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/browser/themes/shared/incontentprefs/preferences.inc.css b/browser/themes/shared/incontentprefs/preferences.inc.css index 70e05d7182a..7d46d5ea71a 100644 --- a/browser/themes/shared/incontentprefs/preferences.inc.css +++ b/browser/themes/shared/incontentprefs/preferences.inc.css @@ -355,6 +355,17 @@ description > html|a { * End Dialog */ +/** + * Font dialog menulist fixes + */ + +#defaultFontType, +#serif, +#sans-serif, +#monospace { + min-width: 30ch; +} + /** * Sync migration */ From 929f8f5da2278ad8043e4d661269a45a8fc12348 Mon Sep 17 00:00:00 2001 From: Marco Bonardo Date: Thu, 16 Apr 2015 12:13:43 +0200 Subject: [PATCH 07/38] Bug 1148466 - Use new keywords API in BookmarkHTMLUtils and BookmarkJSONUtils. r=ttaubert --- browser/components/places/PlacesUIUtils.jsm | 5 +- .../components/places/BookmarkHTMLUtils.jsm | 91 ++--- .../components/places/BookmarkJSONUtils.jsm | 94 ++--- toolkit/components/places/PlacesUtils.jsm | 79 ++-- .../places/tests/unit/test_384370.js | 353 +++++++----------- .../places/tests/unit/test_bookmarks_html.js | 13 +- .../tests/unit/test_bookmarks_html_corrupt.js | 207 ++++------ .../places/tests/unit/test_bookmarks_json.js | 12 +- .../places/tests/unit/test_placesTxn.js | 1 - 9 files changed, 345 insertions(+), 510 deletions(-) diff --git a/browser/components/places/PlacesUIUtils.jsm b/browser/components/places/PlacesUIUtils.jsm index e89fb913979..166181cf9b3 100644 --- a/browser/components/places/PlacesUIUtils.jsm +++ b/browser/components/places/PlacesUIUtils.jsm @@ -137,7 +137,6 @@ this.PlacesUIUtils = { get _copyableAnnotations() [ this.DESCRIPTION_ANNO, this.LOAD_IN_SIDEBAR_ANNO, - PlacesUtils.POST_DATA_ANNO, PlacesUtils.READ_ONLY_ANNO, ], @@ -172,7 +171,6 @@ this.PlacesUIUtils = { ); } - let keyword = aData.keyword || null; let annos = []; if (aData.annos) { annos = aData.annos.filter(function (aAnno) { @@ -180,9 +178,10 @@ this.PlacesUIUtils = { }, this); } + // There's no need to copy the keyword since it's bound to the bookmark url. return new PlacesCreateBookmarkTransaction(PlacesUtils._uri(aData.uri), aContainer, aIndex, aData.title, - keyword, annos, transactions); + null, annos, transactions); }, /** diff --git a/toolkit/components/places/BookmarkHTMLUtils.jsm b/toolkit/components/places/BookmarkHTMLUtils.jsm index 7af7c14cc91..9c099510775 100644 --- a/toolkit/components/places/BookmarkHTMLUtils.jsm +++ b/toolkit/components/places/BookmarkHTMLUtils.jsm @@ -68,7 +68,6 @@ Cu.import("resource://gre/modules/NetUtil.jsm"); Cu.import("resource://gre/modules/osfile.jsm"); Cu.import("resource://gre/modules/FileUtils.jsm"); Cu.import("resource://gre/modules/PlacesUtils.jsm"); -Cu.import("resource://gre/modules/Promise.jsm"); Cu.import("resource://gre/modules/Task.jsm"); XPCOMUtils.defineLazyModuleGetter(this, "PlacesBackups", @@ -126,13 +125,6 @@ function notifyObservers(aTopic, aInitialImport) { : "html"); } -function promiseSoon() { - let deferred = Promise.defer(); - Services.tm.mainThread.dispatch(deferred.resolve, - Ci.nsIThread.DISPATCH_NORMAL); - return deferred.promise; -} - this.BookmarkHTMLUtils = Object.freeze({ /** * Loads the current bookmarks hierarchy from a "bookmarks.html" file. @@ -602,17 +594,10 @@ BookmarkImporter.prototype = { // Save the keyword. if (keyword) { - try { - PlacesUtils.bookmarks.setKeywordForBookmark(frame.previousId, keyword); - if (postData) { - PlacesUtils.annotations.setItemAnnotation(frame.previousId, - PlacesUtils.POST_DATA_ANNO, - postData, - 0, - PlacesUtils.annotations.EXPIRE_NEVER); - } - } catch(e) { - } + let kwPromise = PlacesUtils.keywords.insert({ keyword, + url: frame.previousLink.spec, + postData }); + this._importPromises.push(kwPromise); } // Set load-in-sidebar annotation for the bookmark. @@ -629,7 +614,8 @@ BookmarkImporter.prototype = { // Import last charset. if (lastCharset) { - PlacesUtils.setCharsetForURI(frame.previousLink, lastCharset); + let chPromise = PlacesUtils.setCharsetForURI(frame.previousLink, lastCharset); + this._importPromises.push(chPromise); } }, @@ -934,33 +920,35 @@ BookmarkImporter.prototype = { PlacesUtils.bookmarks.runInBatchMode(this, aDoc); }, - importFromURL: function importFromURL(aSpec) { - let deferred = Promise.defer(); - let xhr = Cc["@mozilla.org/xmlextras/xmlhttprequest;1"] - .createInstance(Ci.nsIXMLHttpRequest); - xhr.onload = () => { - try { - this._walkTreeForImport(xhr.responseXML); - deferred.resolve(); - } catch(e) { - deferred.reject(e); - throw e; - } - }; - xhr.onabort = xhr.onerror = xhr.ontimeout = () => { - deferred.reject(new Error("xmlhttprequest failed")); - }; - try { - xhr.open("GET", aSpec); + importFromURL: Task.async(function* (href) { + this._importPromises = []; + yield new Promise((resolve, reject) => { + let xhr = Cc["@mozilla.org/xmlextras/xmlhttprequest;1"] + .createInstance(Ci.nsIXMLHttpRequest); + xhr.onload = () => { + try { + this._walkTreeForImport(xhr.responseXML); + resolve(); + } catch(e) { + reject(e); + } + }; + xhr.onabort = xhr.onerror = xhr.ontimeout = () => { + reject(new Error("xmlhttprequest failed")); + }; + xhr.open("GET", href); xhr.responseType = "document"; xhr.overrideMimeType("text/html"); xhr.send(); - } catch (e) { - deferred.reject(e); + }); + // TODO (bug 1095427) once converted to the new bookmarks API, methods will + // yield, so this hack should not be needed anymore. + try { + yield Promise.all(this._importPromises); + } finally { + delete this._importPromises; } - return deferred.promise; - }, - + }), }; function BookmarkExporter(aBookmarksTree) { @@ -1104,10 +1092,6 @@ BookmarkExporter.prototype = { }, _writeItem: function (aItem, aIndent) { - // This is a workaround for "too much recursion" error, due to the fact - // Task.jsm still uses old on-same-tick promises. It may be removed as - // soon as bug 887923 is fixed. - yield promiseSoon(); let uri = null; try { uri = NetUtil.newURI(aItem.uri); @@ -1121,14 +1105,11 @@ BookmarkExporter.prototype = { this._writeDateAttributes(aItem); yield this._writeFaviconAttribute(aItem); - let keyword = PlacesUtils.bookmarks.getKeywordForBookmark(aItem.id); - if (aItem.keyword) - this._writeAttribute("SHORTCUTURL", escapeHtmlEntities(keyword)); - - let postDataAnno = aItem.annos && - aItem.annos.find(anno => anno.name == PlacesUtils.POST_DATA_ANNO); - if (postDataAnno) - this._writeAttribute("POST_DATA", escapeHtmlEntities(postDataAnno.value)); + if (aItem.keyword) { + this._writeAttribute("SHORTCUTURL", escapeHtmlEntities(aItem.keyword)); + if (aItem.postData) + this._writeAttribute("POST_DATA", escapeHtmlEntities(aItem.postData)); + } if (aItem.annos && aItem.annos.some(anno => anno.name == LOAD_IN_SIDEBAR_ANNO)) this._writeAttribute("WEB_PANEL", "true"); diff --git a/toolkit/components/places/BookmarkJSONUtils.jsm b/toolkit/components/places/BookmarkJSONUtils.jsm index 2dbd50106c0..eadb06227d0 100644 --- a/toolkit/components/places/BookmarkJSONUtils.jsm +++ b/toolkit/components/places/BookmarkJSONUtils.jsm @@ -14,7 +14,7 @@ Cu.import("resource://gre/modules/Services.jsm"); Cu.import("resource://gre/modules/NetUtil.jsm"); Cu.import("resource://gre/modules/osfile.jsm"); Cu.import("resource://gre/modules/PlacesUtils.jsm"); -Cu.import("resource://gre/modules/Promise.jsm"); +Cu.import("resource://gre/modules/PromiseUtils.jsm"); Cu.import("resource://gre/modules/Task.jsm"); XPCOMUtils.defineLazyModuleGetter(this, "PlacesBackups", @@ -188,47 +188,35 @@ BookmarkImporter.prototype = { * @resolves When the new bookmarks have been created. * @rejects JavaScript exception. */ - importFromURL: function BI_importFromURL(aSpec) { - let deferred = Promise.defer(); - - let streamObserver = { - onStreamComplete: function (aLoader, aContext, aStatus, aLength, - aResult) { - let converter = Cc["@mozilla.org/intl/scriptableunicodeconverter"]. - createInstance(Ci.nsIScriptableUnicodeConverter); - converter.charset = "UTF-8"; - - try { - let jsonString = converter.convertFromByteArray(aResult, - aResult.length); - deferred.resolve(this.importFromJSON(jsonString)); - } catch (ex) { - Cu.reportError("Failed to import from URL: " + ex); - deferred.reject(ex); - throw ex; + importFromURL(spec) { + return new Promise((resolve, reject) => { + let streamObserver = { + onStreamComplete: (aLoader, aContext, aStatus, aLength, aResult) => { + let converter = Cc["@mozilla.org/intl/scriptableunicodeconverter"]. + createInstance(Ci.nsIScriptableUnicodeConverter); + converter.charset = "UTF-8"; + try { + let jsonString = converter.convertFromByteArray(aResult, + aResult.length); + resolve(this.importFromJSON(jsonString)); + } catch (ex) { + Cu.reportError("Failed to import from URL: " + ex); + reject(ex); + } } - }.bind(this) - }; - - try { - var uri = NetUtil.newURI(aSpec); - let principal = Services.scriptSecurityManager.getNoAppCodebasePrincipal(uri); - let channel = Services.io.newChannelFromURI2(uri, - null, // aLoadingNode - principal, - null, // aTriggeringPrincipal - Ci.nsILoadInfo.SEC_NORMAL, - Ci.nsIContentPolicy.TYPE_DATAREQUEST); - let streamLoader = Cc["@mozilla.org/network/stream-loader;1"]. - createInstance(Ci.nsIStreamLoader); + }; + let uri = NetUtil.newURI(spec); + let channel = NetUtil.newChannel({ + uri, + loadingPrincipal: Services.scriptSecurityManager.getNoAppCodebasePrincipal(uri), + contentPolicyType: Ci.nsIContentPolicy.TYPE_DATAREQUEST + }); + let streamLoader = Cc["@mozilla.org/network/stream-loader;1"] + .createInstance(Ci.nsIStreamLoader); streamLoader.init(streamObserver); channel.asyncOpen(streamLoader, channel); - } catch (ex) { - deferred.reject(ex); - } - - return deferred.promise; + }); }, /** @@ -256,8 +244,9 @@ BookmarkImporter.prototype = { * @param aString * JSON string of serialized bookmark data. */ - importFromJSON: function BI_importFromJSON(aString) { - let deferred = Promise.defer(); + importFromJSON: Task.async(function* (aString) { + this._importPromises = []; + let deferred = PromiseUtils.defer(); let nodes = PlacesUtils.unwrapNodes(aString, PlacesUtils.TYPE_X_MOZ_PLACE_CONTAINER); @@ -360,8 +349,15 @@ BookmarkImporter.prototype = { PlacesUtils.bookmarks.runInBatchMode(batch, null); } - return deferred.promise; - }, + yield deferred.promise; + // TODO (bug 1095426) once converted to the new bookmarks API, methods will + // yield, so this hack should not be needed anymore. + try { + yield Promise.all(this._importPromises); + } finally { + delete this._importPromises; + } + }), /** * Takes a JSON-serialized node and inserts it into the db. @@ -452,8 +448,18 @@ BookmarkImporter.prototype = { case PlacesUtils.TYPE_X_MOZ_PLACE: id = PlacesUtils.bookmarks.insertBookmark( aContainer, NetUtil.newURI(aData.uri), aIndex, aData.title); - if (aData.keyword) - PlacesUtils.bookmarks.setKeywordForBookmark(id, aData.keyword); + if (aData.keyword) { + // POST data could be set in 2 ways: + // 1. new backups have a postData property + // 2. old backups have an item annotation + let postDataAnno = aData.annos && + aData.annos.find(anno => anno.name == PlacesUtils.POST_DATA_ANNO); + let postData = aData.postData || (postDataAnno && postDataAnno.value); + let kwPromise = PlacesUtils.keywords.insert({ keyword: aData.keyword, + url: aData.uri, + postData }); + this._importPromises.push(kwPromise); + } if (aData.tags) { // TODO (bug 967196) the tagging service should trim by itself. let tags = aData.tags.split(",").map(tag => tag.trim()); diff --git a/toolkit/components/places/PlacesUtils.jsm b/toolkit/components/places/PlacesUtils.jsm index 2d8ec8fe881..21c78c62ed9 100644 --- a/toolkit/components/places/PlacesUtils.jsm +++ b/toolkit/components/places/PlacesUtils.jsm @@ -1679,6 +1679,7 @@ this.PlacesUtils = { * - tags (string): csv string of the bookmark's tags. * - charset (string): the last known charset of the bookmark. * - keyword (string): the bookmark's keyword (unset if none). + * - postData (string): the bookmark's keyword postData (unset if none). * - iconuri (string): the bookmark's favicon url. * The last four properties are not set at all if they're irrelevant (e.g. * |charset| is not set if no charset was previously set for the bookmark @@ -1693,7 +1694,7 @@ this.PlacesUtils = { * resolved to null. */ promiseBookmarksTree: Task.async(function* (aItemGuid = "", aOptions = {}) { - let createItemInfoObject = (aRow, aIncludeParentGuid) => { + let createItemInfoObject = function* (aRow, aIncludeParentGuid) { let item = {}; let copyProps = (...props) => { for (let prop of props) { @@ -1732,9 +1733,11 @@ this.PlacesUtils = { // If this throws due to an invalid url, the item will be skipped. item.uri = NetUtil.newURI(aRow.getResultByName("url")).spec; // Keywords are cached, so this should be decently fast. - let keyword = PlacesUtils.bookmarks.getKeywordForBookmark(itemId); - if (keyword) - item.keyword = keyword; + let entry = yield PlacesUtils.keywords.fetch({ url: item.uri }); + if (entry) { + item.keyword = entry.keyword; + item.postData = entry.postData; + } break; case Ci.nsINavBookmarksService.TYPE_FOLDER: item.type = PlacesUtils.TYPE_X_MOZ_PLACE_CONTAINER; @@ -1756,7 +1759,7 @@ this.PlacesUtils = { break; } return item; - }; + }.bind(this); const QUERY_STR = `WITH RECURSIVE @@ -1809,40 +1812,34 @@ this.PlacesUtils = { return exclude; }; - let rootItem = null, rootItemCreationEx = null; + let rootItem = null; let parentsMap = new Map(); - try { - let conn = yield this.promiseDBConnection(); - yield conn.executeCached(QUERY_STR, - { tags_folder: PlacesUtils.tagsFolderId, - charset_anno: PlacesUtils.CHARSET_ANNO, - item_guid: aItemGuid }, (aRow) => { - let item; - if (!rootItem) { + let conn = yield this.promiseDBConnection(); + let rows = yield conn.executeCached(QUERY_STR, + { tags_folder: PlacesUtils.tagsFolderId, + charset_anno: PlacesUtils.CHARSET_ANNO, + item_guid: aItemGuid }); + for (let row of rows) { + let item; + if (!rootItem) { + try { // This is the first row. - try { - rootItem = item = createItemInfoObject(aRow, true); - } - catch(ex) { - // If we couldn't figure out the root item, that is just as bad - // as a failed query. Bail out. - rootItemCreationEx = ex; - throw StopIteration; - } - - Object.defineProperty(rootItem, "itemsCount", - { value: 1 - , writable: true - , enumerable: false - , configurable: false }); + rootItem = item = yield createItemInfoObject(row, true); + Object.defineProperty(rootItem, "itemsCount", { value: 1 + , writable: true + , enumerable: false + , configurable: false }); + } catch(ex) { + throw new Error("Failed to fetch the data for the root item " + ex); } - else { + } else { + try { // Our query guarantees that we always visit parents ahead of their // children. - item = createItemInfoObject(aRow, false); - let parentGuid = aRow.getResultByName("parentGuid"); + item = yield createItemInfoObject(row, false); + let parentGuid = row.getResultByName("parentGuid"); if (hasExcludeItemsCallback && shouldExcludeItem(item, parentGuid)) - return; + continue; let parentItem = parentsMap.get(parentGuid); if ("children" in parentItem) @@ -1851,17 +1848,15 @@ this.PlacesUtils = { parentItem.children = [item]; rootItem.itemsCount++; + } catch(ex) { + // This is a bogus child, report and skip it. + Cu.reportError("Failed to fetch the data for an item " + ex); + continue; } + } - if (item.type == this.TYPE_X_MOZ_PLACE_CONTAINER) - parentsMap.set(item.guid, item); - }); - } catch(e) { - throw new Error("Unable to query the database " + e); - } - if (rootItemCreationEx) { - throw new Error("Failed to fetch the data for the root item" + - rootItemCreationEx); + if (item.type == this.TYPE_X_MOZ_PLACE_CONTAINER) + parentsMap.set(item.guid, item); } return rootItem; diff --git a/toolkit/components/places/tests/unit/test_384370.js b/toolkit/components/places/tests/unit/test_384370.js index e796adbd506..7446516d459 100644 --- a/toolkit/components/places/tests/unit/test_384370.js +++ b/toolkit/components/places/tests/unit/test_384370.js @@ -1,270 +1,173 @@ -/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */ -/* vim:set ts=2 sw=2 sts=2 et: */ -/* 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/. */ - const LOAD_IN_SIDEBAR_ANNO = "bookmarkProperties/loadInSidebar"; const DESCRIPTION_ANNO = "bookmarkProperties/description"; -const POST_DATA_ANNO = "bookmarkProperties/POSTData"; -do_check_eq(typeof PlacesUtils, "object"); - -// main -function run_test() { - do_test_pending(); - - /* - HTML+FEATURES SUMMARY: - - import legacy bookmarks - - export as json, import, test (tests integrity of html > json) - - export as html, import, test (tests integrity of json > html) - - BACKUP/RESTORE SUMMARY: - - create a bookmark in each root - - tag multiple URIs with multiple tags - - export as json, import, test - */ - - // import the importer - Cu.import("resource://gre/modules/BookmarkHTMLUtils.jsm"); - - // file pointer to legacy bookmarks file - var bookmarksFileOld = OS.Path.join(do_get_cwd().path, "bookmarks.preplaces.html"); - // file pointer to a new places-exported json file - var jsonFile = OS.Path.join(OS.Constants.Path.profileDir, "bookmarks.exported.json"); - Task.spawn(function () { - // create bookmarks.exported.json - if ((yield OS.File.exists(jsonFile))) - yield OS.File.remove(jsonFile); - - // Test importing a pre-Places canonical bookmarks file. - // 1. import bookmarks.preplaces.html - // Note: we do not empty the db before this import to catch bugs like 380999 - try { - BookmarkHTMLUtils.importFromFile(bookmarksFileOld, true) - .then(after_import, do_report_unexpected_exception); - } catch(ex) { do_throw("couldn't import legacy bookmarks file: " + ex); } - }); - - function after_import() { - populate(); - - // 2. run the test-suite - Task.spawn(function() { - yield validate(); - yield PlacesTestUtils.promiseAsyncUpdates(); - - // Test exporting a Places canonical json file. - // 1. export to bookmarks.exported.json - try { - yield BookmarkJSONUtils.exportToFile(jsonFile); - } catch(ex) { do_throw("couldn't export to file: " + ex); } - LOG("exported json"); - - // 2. empty bookmarks db - // 3. import bookmarks.exported.json - try { - yield BookmarkJSONUtils.importFromFile(jsonFile, true); - } catch(ex) { do_throw("couldn't import the exported file: " + ex); } - LOG("imported json"); - - // 4. run the test-suite - yield validate(); - LOG("validated import"); - - yield PlacesTestUtils.promiseAsyncUpdates(); - do_test_finished(); - }); - } -} - -var tagData = [ +let tagData = [ { uri: uri("http://slint.us"), tags: ["indie", "kentucky", "music"] }, { uri: uri("http://en.wikipedia.org/wiki/Diplodocus"), tags: ["dinosaur", "dj", "rad word"] } ]; -var bookmarkData = [ +let bookmarkData = [ { uri: uri("http://slint.us"), title: "indie, kentucky, music" }, { uri: uri("http://en.wikipedia.org/wiki/Diplodocus"), title: "dinosaur, dj, rad word" } ]; -/* -populate data in each folder -(menu is populated via the html import) -*/ -function populate() { - // add tags - for each(let {uri: u, tags: t} in tagData) - PlacesUtils.tagging.tagURI(u, t); - - // add unfiled bookmarks - for each(let {uri: u, title: t} in bookmarkData) { - PlacesUtils.bookmarks.insertBookmark(PlacesUtils.bookmarks.unfiledBookmarksFolder, - u, PlacesUtils.bookmarks.DEFAULT_INDEX, t); - } - - // add to the toolbar - for each(let {uri: u, title: t} in bookmarkData) { - PlacesUtils.bookmarks.insertBookmark(PlacesUtils.bookmarks.toolbarFolder, - u, PlacesUtils.bookmarks.DEFAULT_INDEX, t); - } +function run_test() { + run_next_test(); } -function validate() { - yield testCanonicalBookmarks(); - yield testToolbarFolder(); +/* + HTML+FEATURES SUMMARY: + - import legacy bookmarks + - export as json, import, test (tests integrity of html > json) + - export as html, import, test (tests integrity of json > html) + + BACKUP/RESTORE SUMMARY: + - create a bookmark in each root + - tag multiple URIs with multiple tags + - export as json, import, test +*/ +add_task(function* () { + // Remove eventual bookmarks.exported.json. + let jsonFile = OS.Path.join(OS.Constants.Path.profileDir, "bookmarks.exported.json"); + if ((yield OS.File.exists(jsonFile))) + yield OS.File.remove(jsonFile); + + // Test importing a pre-Places canonical bookmarks file. + // Note: we do not empty the db before this import to catch bugs like 380999 + let htmlFile = OS.Path.join(do_get_cwd().path, "bookmarks.preplaces.html"); + yield BookmarkHTMLUtils.importFromFile(htmlFile, true); + + // Populate the database. + for (let { uri, tags } of tagData) { + PlacesUtils.tagging.tagURI(uri, tags); + } + for (let { uri, title } of bookmarkData) { + yield PlacesUtils.bookmarks.insert({ parentGuid: PlacesUtils.bookmarks.unfiledGuid, + url: uri, + title }); + } + for (let { uri, title } of bookmarkData) { + yield PlacesUtils.bookmarks.insert({ parentGuid: PlacesUtils.bookmarks.toolbarGuid, + url: uri, + title }); + } + + yield validate(); + + // Test exporting a Places canonical json file. + // 1. export to bookmarks.exported.json + yield BookmarkJSONUtils.exportToFile(jsonFile); + do_print("exported json"); + + // 2. empty bookmarks db + // 3. import bookmarks.exported.json + yield BookmarkJSONUtils.importFromFile(jsonFile, true); + do_print("imported json"); + + // 4. run the test-suite + yield validate(); + do_print("validated import"); +}); + +function* validate() { + yield testMenuBookmarks(); + yield testToolbarBookmarks(); testUnfiledBookmarks(); testTags(); + yield PlacesTestUtils.promiseAsyncUpdates(); } // Tests a bookmarks datastore that has a set of bookmarks, etc // that flex each supported field and feature. -function testCanonicalBookmarks() { - // query to see if the deleted folder and items have been imported - var query = PlacesUtils.history.getNewQuery(); - query.setFolders([PlacesUtils.bookmarksMenuFolderId], 1); - var result = PlacesUtils.history.executeQuery(query, PlacesUtils.history.getNewQueryOptions()); - var rootNode = result.root; - rootNode.containerOpen = true; +function* testMenuBookmarks() { + let root = PlacesUtils.getFolderContents(PlacesUtils.bookmarksMenuFolderId).root; + Assert.equal(root.childCount, 3); - // Count expected bookmarks in the menu root. - do_check_eq(rootNode.childCount, 3); + let separatorNode = root.getChild(1); + Assert.equal(separatorNode.type, separatorNode.RESULT_TYPE_SEPARATOR); - // check separator - var testSeparator = rootNode.getChild(1); - do_check_eq(testSeparator.type, testSeparator.RESULT_TYPE_SEPARATOR); + let folderNode = root.getChild(2); + Assert.equal(folderNode.type, folderNode.RESULT_TYPE_FOLDER); + Assert.equal(folderNode.title, "test"); + let folder = yield PlacesUtils.bookmarks.fetch(folderNode.bookmarkGuid); + Assert.equal(folder.dateAdded.getTime(), 1177541020000); - // get test folder - var testFolder = rootNode.getChild(2); - do_check_eq(testFolder.type, testFolder.RESULT_TYPE_FOLDER); - do_check_eq(testFolder.title, "test"); + Assert.equal(PlacesUtils.asQuery(folderNode).hasChildren, true); - /* - // add date - do_check_eq(PlacesUtils.bookmarks.getItemDateAdded(testFolder.itemId)/1000000, 1177541020); - // last modified - do_check_eq(PlacesUtils.bookmarks.getItemLastModified(testFolder.itemId)/1000000, 1177541050); - */ - - testFolder = testFolder.QueryInterface(Ci.nsINavHistoryQueryResultNode); - do_check_eq(testFolder.hasChildren, true); - // folder description - do_check_true(PlacesUtils.annotations.itemHasAnnotation(testFolder.itemId, - DESCRIPTION_ANNO)); - do_check_eq("folder test comment", - PlacesUtils.annotations.getItemAnnotation(testFolder.itemId, DESCRIPTION_ANNO)); - // open test folder, and test the children - testFolder.containerOpen = true; - var cc = testFolder.childCount; - // XXX Bug 380468 - // do_check_eq(cc, 2); - do_check_eq(cc, 1); - - // test bookmark 1 - var testBookmark1 = testFolder.getChild(0); - // url - do_check_eq("http://test/post", testBookmark1.uri); - // title - do_check_eq("test post keyword", testBookmark1.title); - // keyword - do_check_eq("test", PlacesUtils.bookmarks.getKeywordForBookmark(testBookmark1.itemId)); - // sidebar - do_check_true(PlacesUtils.annotations.itemHasAnnotation(testBookmark1.itemId, - LOAD_IN_SIDEBAR_ANNO)); - /* - // add date - do_check_eq(testBookmark1.dateAdded/1000000, 1177375336); - - // last modified - do_check_eq(testBookmark1.lastModified/1000000, 1177375423); - */ - - // post data - do_check_true(PlacesUtils.annotations.itemHasAnnotation(testBookmark1.itemId, POST_DATA_ANNO)); - do_check_eq("hidden1%3Dbar&text1%3D%25s", - PlacesUtils.annotations.getItemAnnotation(testBookmark1.itemId, POST_DATA_ANNO)); - - // last charset - var testURI = PlacesUtils._uri(testBookmark1.uri); - do_check_eq("ISO-8859-1", (yield PlacesUtils.getCharsetForURI(testURI))); - - // description - do_check_true(PlacesUtils.annotations.itemHasAnnotation(testBookmark1.itemId, - DESCRIPTION_ANNO)); - do_check_eq("item description", - PlacesUtils.annotations.getItemAnnotation(testBookmark1.itemId, + Assert.equal("folder test comment", + PlacesUtils.annotations.getItemAnnotation(folderNode.itemId, DESCRIPTION_ANNO)); - // clean up - testFolder.containerOpen = false; - rootNode.containerOpen = false; + // open test folder, and test the children + folderNode.containerOpen = true; + Assert.equal(folderNode.childCount, 1); + + let bookmarkNode = folderNode.getChild(0); + Assert.equal("http://test/post", bookmarkNode.uri); + Assert.equal("test post keyword", bookmarkNode.title); + Assert.ok(PlacesUtils.annotations.itemHasAnnotation(bookmarkNode.itemId, + LOAD_IN_SIDEBAR_ANNO)); + Assert.equal(bookmarkNode.dateAdded, 1177375336000000); + + let entry = yield PlacesUtils.keywords.fetch({ url: bookmarkNode.uri }); + Assert.equal("test", entry.keyword); + Assert.equal("hidden1%3Dbar&text1%3D%25s", entry.postData); + + Assert.equal("ISO-8859-1", + (yield PlacesUtils.getCharsetForURI(NetUtil.newURI(bookmarkNode.uri)))); + Assert.equal("item description", + PlacesUtils.annotations.getItemAnnotation(bookmarkNode.itemId, + DESCRIPTION_ANNO)); + + folderNode.containerOpen = false; + root.containerOpen = false; } -function testToolbarFolder() { - var query = PlacesUtils.history.getNewQuery(); - query.setFolders([PlacesUtils.toolbarFolderId], 1); - var result = PlacesUtils.history.executeQuery(query, PlacesUtils.history.getNewQueryOptions()); - - var toolbar = result.root; - toolbar.containerOpen = true; +function* testToolbarBookmarks() { + let root = PlacesUtils.getFolderContents(PlacesUtils.toolbarFolderId).root; // child count (add 2 for pre-existing items) - do_check_eq(toolbar.childCount, bookmarkData.length + 2); + Assert.equal(root.childCount, bookmarkData.length + 2); - // livemark - var livemark = toolbar.getChild(1); - // title - do_check_eq("Latest Headlines", livemark.title); + let livemarkNode = root.getChild(1); + Assert.equal("Latest Headlines", livemarkNode.title); - let foundLivemark = yield PlacesUtils.livemarks.getLivemark({ id: livemark.itemId }); - do_check_eq("http://en-us.fxfeeds.mozilla.com/en-US/firefox/livebookmarks/", - foundLivemark.siteURI.spec); - do_check_eq("http://en-us.fxfeeds.mozilla.com/en-US/firefox/headlines.xml", - foundLivemark.feedURI.spec); + let livemark = yield PlacesUtils.livemarks.getLivemark({ id: livemarkNode.itemId }); + Assert.equal("http://en-us.fxfeeds.mozilla.com/en-US/firefox/livebookmarks/", + livemark.siteURI.spec); + Assert.equal("http://en-us.fxfeeds.mozilla.com/en-US/firefox/headlines.xml", + livemark.feedURI.spec); // test added bookmark data - var child = toolbar.getChild(2); - do_check_eq(child.uri, bookmarkData[0].uri.spec); - do_check_eq(child.title, bookmarkData[0].title); - child = toolbar.getChild(3); - do_check_eq(child.uri, bookmarkData[1].uri.spec); - do_check_eq(child.title, bookmarkData[1].title); + let bookmarkNode = root.getChild(2); + Assert.equal(bookmarkNode.uri, bookmarkData[0].uri.spec); + Assert.equal(bookmarkNode.title, bookmarkData[0].title); + bookmarkNode = root.getChild(3); + Assert.equal(bookmarkNode.uri, bookmarkData[1].uri.spec); + Assert.equal(bookmarkNode.title, bookmarkData[1].title); - toolbar.containerOpen = false; + root.containerOpen = false; } function testUnfiledBookmarks() { - var query = PlacesUtils.history.getNewQuery(); - query.setFolders([PlacesUtils.unfiledBookmarksFolderId], 1); - var result = PlacesUtils.history.executeQuery(query, PlacesUtils.history.getNewQueryOptions()); - var rootNode = result.root; - rootNode.containerOpen = true; + let root = PlacesUtils.getFolderContents(PlacesUtils.unfiledBookmarksFolderId).root; // child count (add 1 for pre-existing item) - do_check_eq(rootNode.childCount, bookmarkData.length + 1); - for (var i = 1; i < rootNode.childCount; i++) { - var child = rootNode.getChild(i); - dump(bookmarkData[i - 1].uri.spec + " == " + child.uri + "?\n"); - do_check_true(bookmarkData[i - 1].uri.equals(uri(child.uri))); - do_check_eq(child.title, bookmarkData[i - 1].title); - /* WTF + Assert.equal(root.childCount, bookmarkData.length + 1); + for (let i = 1; i < root.childCount; ++i) { + let child = root.getChild(i); + Assert.equal(child.uri, bookmarkData[i - 1].uri.spec); + Assert.equal(child.title, bookmarkData[i - 1].title); if (child.tags) - do_check_eq(child.tags, bookmarkData[i].title); - */ + Assert.equal(child.tags, bookmarkData[i - 1].title); } - rootNode.containerOpen = false; + root.containerOpen = false; } function testTags() { - for each(let {uri: u, tags: t} in tagData) { - var i = 0; - dump("test tags for " + u.spec + ": " + t + "\n"); - var tt = PlacesUtils.tagging.getTagsForURI(u); - dump("true tags for " + u.spec + ": " + tt + "\n"); - do_check_true(t.every(function(el) { - i++; - return tt.indexOf(el) > -1; - })); - do_check_eq(i, t.length); + for (let { uri, tags } of tagData) { + do_print("Test tags for " + uri.spec + ": " + tags + "\n"); + let foundTags = PlacesUtils.tagging.getTagsForURI(uri); + Assert.equal(foundTags.length, tags.length); + Assert.ok(tags.every(tag => foundTags.indexOf(tag) != -1)); } } diff --git a/toolkit/components/places/tests/unit/test_bookmarks_html.js b/toolkit/components/places/tests/unit/test_bookmarks_html.js index d0a2a8382de..34efc095d8a 100644 --- a/toolkit/components/places/tests/unit/test_bookmarks_html.js +++ b/toolkit/components/places/tests/unit/test_bookmarks_html.js @@ -322,18 +322,21 @@ function* checkItem(aExpected, aNode) base64EncodeString(String.fromCharCode.apply(String, data)); do_check_true(base64Icon == aExpected.icon); break; - case "keyword": + case "keyword": { + let entry = yield PlacesUtils.keywords.fetch({ url: aNode.uri }); + Assert.equal(entry.keyword, aExpected.keyword); break; + } case "sidebar": do_check_eq(PlacesUtils.annotations .itemHasAnnotation(id, LOAD_IN_SIDEBAR_ANNO), aExpected.sidebar); break; - case "postData": - do_check_eq(PlacesUtils.annotations - .getItemAnnotation(id, PlacesUtils.POST_DATA_ANNO), - aExpected.postData); + case "postData": { + let entry = yield PlacesUtils.keywords.fetch({ url: aNode.uri }); + Assert.equal(entry.postData, aExpected.postData); break; + } case "charset": let testURI = NetUtil.newURI(aNode.uri); do_check_eq((yield PlacesUtils.getCharsetForURI(testURI)), aExpected.charset); diff --git a/toolkit/components/places/tests/unit/test_bookmarks_html_corrupt.js b/toolkit/components/places/tests/unit/test_bookmarks_html_corrupt.js index db93d419603..91ad65a28db 100644 --- a/toolkit/components/places/tests/unit/test_bookmarks_html_corrupt.js +++ b/toolkit/components/places/tests/unit/test_bookmarks_html_corrupt.js @@ -1,32 +1,10 @@ -/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */ -/* vim:set ts=2 sw=2 sts=2 et: */ -/* 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/. */ - /* * This test ensures that importing/exporting to HTML does not stop * if a malformed uri is found. */ -// Get Services -var hs = Cc["@mozilla.org/browser/nav-history-service;1"]. - getService(Ci.nsINavHistoryService); -var dbConn = hs.QueryInterface(Ci.nsPIPlacesDatabase).DBConnection; -var bs = Cc["@mozilla.org/browser/nav-bookmarks-service;1"]. - getService(Ci.nsINavBookmarksService); -var as = Cc["@mozilla.org/browser/annotation-service;1"]. - getService(Ci.nsIAnnotationService); -var icos = Cc["@mozilla.org/browser/favicon-service;1"]. - getService(Ci.nsIFaviconService); -var ps = Cc["@mozilla.org/preferences-service;1"]. - getService(Ci.nsIPrefBranch); - -Cu.import("resource://gre/modules/BookmarkHTMLUtils.jsm"); - const DESCRIPTION_ANNO = "bookmarkProperties/description"; const LOAD_IN_SIDEBAR_ANNO = "bookmarkProperties/loadInSidebar"; -const POST_DATA_ANNO = "bookmarkProperties/POSTData"; const TEST_FAVICON_PAGE_URL = "http://en-US.www.mozilla.com/en-US/firefox/central/"; const TEST_FAVICON_DATA_SIZE = 580; @@ -35,27 +13,27 @@ function run_test() { run_next_test(); } -add_task(function test_corrupt_file() { +add_task(function* test_corrupt_file() { // avoid creating the places smart folder during tests - ps.setIntPref("browser.places.smartBookmarksVersion", -1); + Services.prefs.setIntPref("browser.places.smartBookmarksVersion", -1); // Import bookmarks from the corrupt file. - yield BookmarkHTMLUtils.importFromFile(OS.Path.join(do_get_cwd().path, "bookmarks.corrupt.html"), - true); + let corruptHtml = OS.Path.join(do_get_cwd().path, "bookmarks.corrupt.html"); + yield BookmarkHTMLUtils.importFromFile(corruptHtml, true); // Check that bookmarks that are not corrupt have been imported. + yield PlacesTestUtils.promiseAsyncUpdates(); yield database_check(); }); -add_task(function test_corrupt_database() { +add_task(function* test_corrupt_database() { // Create corruption in the database, then export. - var corruptItemId = bs.insertBookmark(bs.toolbarFolder, - uri("http://test.mozilla.org"), - bs.DEFAULT_INDEX, "We love belugas"); - var stmt = dbConn.createStatement("UPDATE moz_bookmarks SET fk = NULL WHERE id = :itemId"); - stmt.params.itemId = corruptItemId; - stmt.execute(); - stmt.finalize(); + let corruptBookmark = yield PlacesUtils.bookmarks.insert({ parentGuid: PlacesUtils.bookmarks.toolbarGuid, + url: "http://test.mozilla.org", + title: "We love belugas" }); + let db = yield PlacesUtils.promiseWrappedConnection(); + yield db.execute("UPDATE moz_bookmarks SET fk = NULL WHERE guid = :guid", + { guid: corruptBookmark.guid }); let bookmarksFile = OS.Path.join(OS.Constants.Path.profileDir, "bookmarks.exported.html"); if ((yield OS.File.exists(bookmarksFile))) @@ -65,6 +43,7 @@ add_task(function test_corrupt_database() { // Import again and check for correctness. remove_all_bookmarks(); yield BookmarkHTMLUtils.importFromFile(bookmarksFile, true); + yield PlacesTestUtils.promiseAsyncUpdates(); yield database_check(); }); @@ -75,115 +54,81 @@ add_task(function test_corrupt_database() { * @resolves When the checks are finished. * @rejects Never. */ -function database_check() { - return Task.spawn(function() { - // BOOKMARKS MENU - var query = hs.getNewQuery(); - query.setFolders([bs.bookmarksMenuFolder], 1); - var options = hs.getNewQueryOptions(); - options.queryType = Ci.nsINavHistoryQueryOptions.QUERY_TYPE_BOOKMARKS; - var result = hs.executeQuery(query, options); - var rootNode = result.root; - rootNode.containerOpen = true; - do_check_eq(rootNode.childCount, 2); +let database_check = Task.async(function* () { + // BOOKMARKS MENU + let root = PlacesUtils.getFolderContents(PlacesUtils.bookmarksMenuFolderId).root; + Assert.equal(root.childCount, 2); - // get test folder - var testFolder = rootNode.getChild(1); - do_check_eq(testFolder.type, testFolder.RESULT_TYPE_FOLDER); - do_check_eq(testFolder.title, "test"); - // add date - do_check_eq(bs.getItemDateAdded(testFolder.itemId)/1000000, 1177541020); - // last modified - do_check_eq(bs.getItemLastModified(testFolder.itemId)/1000000, 1177541050); - testFolder = testFolder.QueryInterface(Ci.nsINavHistoryQueryResultNode); - do_check_eq(testFolder.hasChildren, true); - // folder description - do_check_true(as.itemHasAnnotation(testFolder.itemId, - DESCRIPTION_ANNO)); - do_check_eq("folder test comment", - as.getItemAnnotation(testFolder.itemId, DESCRIPTION_ANNO)); - // open test folder, and test the children - testFolder.containerOpen = true; - var cc = testFolder.childCount; - do_check_eq(cc, 1); + let folderNode = root.getChild(1); + Assert.equal(folderNode.type, folderNode.RESULT_TYPE_FOLDER); + Assert.equal(folderNode.title, "test"); + Assert.equal(PlacesUtils.bookmarks.getItemDateAdded(folderNode.itemId), 1177541020000000); + Assert.equal(PlacesUtils.bookmarks.getItemLastModified(folderNode.itemId), 1177541050000000); + Assert.equal("folder test comment", + PlacesUtils.annotations.getItemAnnotation(folderNode.itemId, + DESCRIPTION_ANNO)); + // open test folder, and test the children + PlacesUtils.asQuery(folderNode); + Assert.equal(folderNode.hasChildren, true); + folderNode.containerOpen = true; + Assert.equal(folderNode.childCount, 1); - // test bookmark 1 - var testBookmark1 = testFolder.getChild(0); - // url - do_check_eq("http://test/post", testBookmark1.uri); - // title - do_check_eq("test post keyword", testBookmark1.title); - // keyword - do_check_eq("test", bs.getKeywordForBookmark(testBookmark1.itemId)); - // sidebar - do_check_true(as.itemHasAnnotation(testBookmark1.itemId, - LOAD_IN_SIDEBAR_ANNO)); - // add date - do_check_eq(testBookmark1.dateAdded/1000000, 1177375336); - // last modified - do_check_eq(testBookmark1.lastModified/1000000, 1177375423); - // post data - do_check_true(as.itemHasAnnotation(testBookmark1.itemId, - POST_DATA_ANNO)); - do_check_eq("hidden1%3Dbar&text1%3D%25s", - as.getItemAnnotation(testBookmark1.itemId, POST_DATA_ANNO)); - // last charset - var testURI = uri(testBookmark1.uri); - do_check_eq((yield PlacesUtils.getCharsetForURI(testURI)), "ISO-8859-1"); + let bookmarkNode = folderNode.getChild(0); + Assert.equal("http://test/post", bookmarkNode.uri); + Assert.equal("test post keyword", bookmarkNode.title); - // description - do_check_true(as.itemHasAnnotation(testBookmark1.itemId, - DESCRIPTION_ANNO)); - do_check_eq("item description", - as.getItemAnnotation(testBookmark1.itemId, - DESCRIPTION_ANNO)); + let entry = yield PlacesUtils.keywords.fetch({ url: bookmarkNode.uri }); + Assert.equal("test", entry.keyword); + Assert.equal("hidden1%3Dbar&text1%3D%25s", entry.postData); - // clean up - testFolder.containerOpen = false; - rootNode.containerOpen = false; + Assert.ok(PlacesUtils.annotations.itemHasAnnotation(bookmarkNode.itemId, + LOAD_IN_SIDEBAR_ANNO)); + Assert.equal(bookmarkNode.dateAdded, 1177375336000000); + Assert.equal(bookmarkNode.lastModified, 1177375423000000); - // BOOKMARKS TOOLBAR - query.setFolders([bs.toolbarFolder], 1); - result = hs.executeQuery(query, hs.getNewQueryOptions()); - var toolbar = result.root; - toolbar.containerOpen = true; - do_check_eq(toolbar.childCount, 3); + Assert.equal((yield PlacesUtils.getCharsetForURI(NetUtil.newURI(bookmarkNode.uri))), + "ISO-8859-1"); - // livemark - var livemark = toolbar.getChild(1); - // title - do_check_eq("Latest Headlines", livemark.title); + Assert.equal("item description", + PlacesUtils.annotations.getItemAnnotation(bookmarkNode.itemId, + DESCRIPTION_ANNO)); - let foundLivemark = yield PlacesUtils.livemarks.getLivemark({ id: livemark.itemId }); - do_check_eq("http://en-us.fxfeeds.mozilla.com/en-US/firefox/livebookmarks/", - foundLivemark.siteURI.spec); - do_check_eq("http://en-us.fxfeeds.mozilla.com/en-US/firefox/headlines.xml", - foundLivemark.feedURI.spec); + // clean up + folderNode.containerOpen = false; + root.containerOpen = false; - // cleanup - toolbar.containerOpen = false; + // BOOKMARKS TOOLBAR + root = PlacesUtils.getFolderContents(PlacesUtils.toolbarFolderId).root; + Assert.equal(root.childCount, 3); - // UNFILED BOOKMARKS - query.setFolders([bs.unfiledBookmarksFolder], 1); - result = hs.executeQuery(query, hs.getNewQueryOptions()); - var unfiledBookmarks = result.root; - unfiledBookmarks.containerOpen = true; - do_check_eq(unfiledBookmarks.childCount, 1); - unfiledBookmarks.containerOpen = false; + let livemarkNode = root.getChild(1); + Assert.equal("Latest Headlines", livemarkNode.title); - // favicons - let deferGetFaviconData = Promise.defer(); - icos.getFaviconDataForPage(uri(TEST_FAVICON_PAGE_URL), - function DC_onComplete(aURI, aDataLen, aData, aMimeType) { + let livemark = yield PlacesUtils.livemarks.getLivemark({ id: livemarkNode.itemId }); + Assert.equal("http://en-us.fxfeeds.mozilla.com/en-US/firefox/livebookmarks/", + livemark.siteURI.spec); + Assert.equal("http://en-us.fxfeeds.mozilla.com/en-US/firefox/headlines.xml", + livemark.feedURI.spec); + + // cleanup + root.containerOpen = false; + + // UNFILED BOOKMARKS + root = PlacesUtils.getFolderContents(PlacesUtils.unfiledBookmarksFolderId).root; + Assert.equal(root.childCount, 1); + root.containerOpen = false; + + // favicons + yield new Promise(resolve => { + PlacesUtils.favicons.getFaviconDataForPage(uri(TEST_FAVICON_PAGE_URL), + (aURI, aDataLen, aData, aMimeType) => { // aURI should never be null when aDataLen > 0. - do_check_neq(aURI, null); + Assert.notEqual(aURI, null); // Favicon data is stored in the bookmarks file as a "data:" URI. For // simplicity, instead of converting the data we receive to a "data:" URI // and comparing it, we just check the data size. - do_check_eq(TEST_FAVICON_DATA_SIZE, aDataLen); - deferGetFaviconData.resolve(); - } - ); - yield deferGetFaviconData.promise; + Assert.equal(TEST_FAVICON_DATA_SIZE, aDataLen); + resolve(); + }); }); -} +}); diff --git a/toolkit/components/places/tests/unit/test_bookmarks_json.js b/toolkit/components/places/tests/unit/test_bookmarks_json.js index f756c38e710..20b121342b0 100644 --- a/toolkit/components/places/tests/unit/test_bookmarks_json.js +++ b/toolkit/components/places/tests/unit/test_bookmarks_json.js @@ -182,16 +182,20 @@ function checkItem(aExpected, aNode) { base64EncodeString(String.fromCharCode.apply(String, data)); do_check_true(base64Icon == aExpected.icon); break; - case "keyword": + case "keyword": { + let entry = yield PlacesUtils.keywords.fetch({ url: aNode.uri }); + Assert.equal(entry.keyword, aExpected.keyword); break; + } case "sidebar": do_check_eq(PlacesUtils.annotations.itemHasAnnotation( id, LOAD_IN_SIDEBAR_ANNO), aExpected.sidebar); break; - case "postData": - do_check_eq(PlacesUtils.annotations.getItemAnnotation( - id, PlacesUtils.POST_DATA_ANNO), aExpected.postData); + case "postData": { + let entry = yield PlacesUtils.keywords.fetch({ url: aNode.uri }); + Assert.equal(entry.postData, aExpected.postData); break; + } case "charset": let testURI = NetUtil.newURI(aNode.uri); do_check_eq((yield PlacesUtils.getCharsetForURI(testURI)), aExpected.charset); diff --git a/toolkit/components/places/tests/unit/test_placesTxn.js b/toolkit/components/places/tests/unit/test_placesTxn.js index 55b80f20d2a..d8a2d98bf98 100644 --- a/toolkit/components/places/tests/unit/test_placesTxn.js +++ b/toolkit/components/places/tests/unit/test_placesTxn.js @@ -729,7 +729,6 @@ add_test(function test_edit_postData() { } Task.spawn(function* () { - const POST_DATA_ANNO = "bookmarkProperties/POSTData"; let postData = "post-test_edit_postData"; let testURI = NetUtil.newURI("http://test_edit_postData.com"); From f937fa97cb105da5e2a86e7009b4e9d01af6c8f1 Mon Sep 17 00:00:00 2001 From: Mike de Boer Date: Thu, 16 Apr 2015 14:09:37 +0200 Subject: [PATCH 08/38] Bug 1152197: update share_button2 label to the updated share_button3 in the Loop conversation window. r=Standard8 --- browser/components/loop/content/js/conversationViews.js | 2 +- browser/components/loop/content/js/conversationViews.jsx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/browser/components/loop/content/js/conversationViews.js b/browser/components/loop/content/js/conversationViews.js index 546e83d5807..d28bd60b4c5 100644 --- a/browser/components/loop/content/js/conversationViews.js +++ b/browser/components/loop/content/js/conversationViews.js @@ -560,7 +560,7 @@ loop.conversationViews = (function(mozL10n) { React.createElement("button", {className: emailClasses, onClick: this.emailLink, disabled: this.state.emailLinkButtonDisabled}, - mozL10n.get("share_button2") + mozL10n.get("share_button3") ) ) ) diff --git a/browser/components/loop/content/js/conversationViews.jsx b/browser/components/loop/content/js/conversationViews.jsx index 12aebd568d6..d9db8839bcc 100644 --- a/browser/components/loop/content/js/conversationViews.jsx +++ b/browser/components/loop/content/js/conversationViews.jsx @@ -560,7 +560,7 @@ loop.conversationViews = (function(mozL10n) { From 79cdfe75fc1784568601cccf81528334b89dca6a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florian=20Qu=C3=A8ze?= Date: Thu, 16 Apr 2015 17:09:20 +0200 Subject: [PATCH 09/38] Bug 1152908 - Middle-clicking on a reading list item should open it in a new tab, r=Gijs. --- browser/components/readinglist/sidebar.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/browser/components/readinglist/sidebar.js b/browser/components/readinglist/sidebar.js index 2df7e4e5a0a..6fd44c70d64 100644 --- a/browser/components/readinglist/sidebar.js +++ b/browser/components/readinglist/sidebar.js @@ -57,7 +57,9 @@ let RLSidebar = { this.emptyListInfo = document.getElementById("emptyListInfo"); this.itemTemplate = document.getElementById("item-template"); - this.list.addEventListener("click", event => this.onListClick(event)); + // click events for middle-clicks are not sent to DOM nodes, only to the document. + document.addEventListener("click", event => this.onClick(event)); + this.list.addEventListener("mousemove", event => this.onListMouseMove(event)); this.list.addEventListener("keydown", event => this.onListKeyDown(event), true); @@ -384,10 +386,10 @@ let RLSidebar = { }, /** - * Handle a click event on the list box. + * Handle a click event on the sidebar. * @param {Event} event - Triggering event. */ - onListClick(event) { + onClick(event) { let itemNode = this.findParentItemNode(event.target); if (!itemNode) return; From 034ae03c57295005997b276c749111439cb69867 Mon Sep 17 00:00:00 2001 From: Iaroslav Sheptykin Date: Thu, 16 Apr 2015 17:10:36 +0200 Subject: [PATCH 10/38] Bug 1153509 - Clipping translation notification bar on small screens. r=florian --- browser/themes/shared/translation/infobar.inc.css | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/browser/themes/shared/translation/infobar.inc.css b/browser/themes/shared/translation/infobar.inc.css index 7c5f3afbf72..2b8a25ff7c2 100644 --- a/browser/themes/shared/translation/infobar.inc.css +++ b/browser/themes/shared/translation/infobar.inc.css @@ -26,6 +26,10 @@ notification[value="translation"][state="translating"] .messageImage { } } +notification[value="translation"] hbox[anonid="details"] { + overflow: hidden; +} + notification[value="translation"] button, notification[value="translation"] menulist { -moz-appearance: none; From baa02018787c7e807b3b4d84f22232a047c1b690 Mon Sep 17 00:00:00 2001 From: Dan Mosedale Date: Thu, 16 Apr 2015 08:32:41 -0700 Subject: [PATCH 11/38] Bug 1155036-standalone display unusable at 640x500, r=mikedeboer --- browser/components/loop/content/shared/css/conversation.css | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/browser/components/loop/content/shared/css/conversation.css b/browser/components/loop/content/shared/css/conversation.css index 5c438ba2bef..92468dd2cad 100644 --- a/browser/components/loop/content/shared/css/conversation.css +++ b/browser/components/loop/content/shared/css/conversation.css @@ -1103,6 +1103,12 @@ body[dir=rtl] .share-service-dropdown .share-panel-header { position: absolute; width: 100%; right: 0px; + + /* Override the 100% specified in the .standalone-room-info selector + block so that this div doesn't take over the _whole_ screen and + transparently occlude UI widgetry (like the Join button), making + it unusable. */ + height: auto; } .standalone-context-url { From 28f9f304bc216cbd00bcb38380818d16f07842dc Mon Sep 17 00:00:00 2001 From: Jared Wein Date: Wed, 15 Apr 2015 23:45:50 -0400 Subject: [PATCH 12/38] Bug 1134501 - UITour: Force page into Reader View automatically whenever the ReaderView/ReadingList tour page is loaded. r=gijs --- browser/app/profile/firefox.js | 2 + browser/base/content/browser.js | 1 + browser/components/uitour/UITour-lib.js | 6 ++- browser/components/uitour/UITour.jsm | 41 ++++++++++++++++++ browser/components/uitour/test/browser.ini | 28 ++++++------ .../test/browser_UITour_availableTargets.js | 3 ++ .../test/browser_UITour_toggleReaderMode.js | 20 +++++++++ browser/modules/ReaderParent.jsm | 18 ++++++++ browser/themes/linux/jar.mn | 1 + browser/themes/osx/jar.mn | 1 + browser/themes/shared/reader/reader-tour.png | Bin 0 -> 12172 bytes browser/themes/windows/jar.mn | 1 + 12 files changed, 108 insertions(+), 14 deletions(-) create mode 100644 browser/components/uitour/test/browser_UITour_toggleReaderMode.js create mode 100644 browser/themes/shared/reader/reader-tour.png diff --git a/browser/app/profile/firefox.js b/browser/app/profile/firefox.js index 8225051ea3c..fd100ed4819 100644 --- a/browser/app/profile/firefox.js +++ b/browser/app/profile/firefox.js @@ -251,6 +251,8 @@ pref("browser.uitour.loglevel", "Error"); pref("browser.uitour.requireSecure", true); pref("browser.uitour.themeOrigin", "https://addons.mozilla.org/%LOCALE%/firefox/themes/"); pref("browser.uitour.url", "https://www.mozilla.org/%LOCALE%/firefox/%VERSION%/tour/"); +// This is used as a regexp match against the page's URL. +pref("browser.uitour.readerViewTrigger", "^https:\/\/www\.mozilla\.org\/[^\/]+\/firefox\/reading\/start"); pref("browser.customizemode.tip0.shown", false); pref("browser.customizemode.tip0.learnMoreUrl", "https://support.mozilla.org/1/firefox/%VERSION%/%OS%/%LOCALE%/customize"); diff --git a/browser/base/content/browser.js b/browser/base/content/browser.js index 45afd13c443..f5fe439aa7f 100644 --- a/browser/base/content/browser.js +++ b/browser/base/content/browser.js @@ -4203,6 +4203,7 @@ var XULBrowserWindow = { BookmarkingUI.onLocationChange(); SocialUI.updateState(location); + UITour.onLocationChange(location); } // Utility functions for disabling find diff --git a/browser/components/uitour/UITour-lib.js b/browser/components/uitour/UITour-lib.js index 673ddb3f34b..7d621342e88 100644 --- a/browser/components/uitour/UITour-lib.js +++ b/browser/components/uitour/UITour-lib.js @@ -285,9 +285,13 @@ if (typeof Mozilla == 'undefined') { _sendEvent('forceShowReaderIcon'); }; + Mozilla.UITour.toggleReaderMode = function(feature) { + _sendEvent('toggleReaderMode'); + }; + })(); // Make this library Require-able. if (typeof module !== 'undefined' && module.exports) { - module.exports = Mozilla.UITour; + module.exports = Mozilla.UITour; } diff --git a/browser/components/uitour/UITour.jsm b/browser/components/uitour/UITour.jsm index f3a889268ca..0fcc15367f3 100644 --- a/browser/components/uitour/UITour.jsm +++ b/browser/components/uitour/UITour.jsm @@ -27,12 +27,15 @@ XPCOMUtils.defineLazyModuleGetter(this, "BrowserUITelemetry", "resource:///modules/BrowserUITelemetry.jsm"); XPCOMUtils.defineLazyModuleGetter(this, "Metrics", "resource://gre/modules/Metrics.jsm"); +XPCOMUtils.defineLazyModuleGetter(this, "ReaderMode", + "resource://gre/modules/ReaderMode.jsm"); XPCOMUtils.defineLazyModuleGetter(this, "ReaderParent", "resource:///modules/ReaderParent.jsm"); // See LOG_LEVELS in Console.jsm. Common examples: "All", "Info", "Warn", & "Error". const PREF_LOG_LEVEL = "browser.uitour.loglevel"; const PREF_SEENPAGEIDS = "browser.uitour.seenPageIDs"; +const PREF_READERVIEW_TRIGGER = "browser.uitour.readerViewTrigger"; const BACKGROUND_PAGE_ACTIONS_ALLOWED = new Set([ "endUrlbarCapture", @@ -190,6 +193,7 @@ this.UITour = { }], ["privateWindow", {query: "#privatebrowsing-button"}], ["quit", {query: "#PanelUI-quit"}], + ["readerMode-urlBar", {query: "#reader-mode-button"}], ["search", { infoPanelOffsetX: 18, infoPanelPosition: "after_start", @@ -344,6 +348,22 @@ this.UITour = { JSON.stringify([...this.seenPageIDs])); }, + get _readerViewTriggerRegEx() { + delete this._readerViewTriggerRegEx; + let readerViewUITourTrigger = Services.prefs.getCharPref(PREF_READERVIEW_TRIGGER); + return this._readerViewTriggerRegEx = new RegExp(readerViewUITourTrigger, "i"); + }, + + onLocationChange: function(aLocation) { + // The ReadingList/ReaderView tour page is expected to run in Reader View, + // which disables JavaScript on the page. To get around that, we + // automatically start a pre-defined tour on page load. + let originalUrl = ReaderMode.getOriginalUrl(aLocation); + if (this._readerViewTriggerRegEx.test(originalUrl)) { + this.startSubTour("readinglist"); + } + }, + onPageEvent: function(aMessage, aEvent) { let browser = aMessage.target; let window = browser.ownerDocument.defaultView; @@ -685,6 +705,13 @@ this.UITour = { ReaderParent.forceShowReaderIcon(browser); break; } + + case "toggleReaderMode": { + let targetPromise = this.getTarget(window, "readerMode-urlBar"); + targetPromise.then(target => { + ReaderParent.toggleReaderMode({target: target.node}); + }); + } } if (!this.tourBrowsersByWindow.has(window)) { @@ -1720,6 +1747,20 @@ this.UITour = { }); }, + startSubTour: function (aFeature) { + if (aFeature != "string") { + log.error("startSubTour: No feature option specified"); + return; + } + + if (aFeature == "readinglist") { + ReaderParent.showReaderModeInfoPanel(browser); + } else { + log.error("startSubTour: Unknown feature option specified"); + return; + } + }, + addNavBarWidget: function (aTarget, aMessageManager, aCallbackID) { if (aTarget.node) { log.error("addNavBarWidget: can't add a widget already present:", aTarget); diff --git a/browser/components/uitour/test/browser.ini b/browser/components/uitour/test/browser.ini index 02144a7797d..9e0a851f0ca 100644 --- a/browser/components/uitour/test/browser.ini +++ b/browser/components/uitour/test/browser.ini @@ -9,30 +9,32 @@ support-files = [browser_UITour.js] skip-if = os == "linux" || e10s # Intermittent failures, bug 951965 [browser_UITour2.js] -skip-if = e10s # Bug 941428 - UITour.jsm not e10s friendly +skip-if = e10s # Bug 1073247 - UITour.jsm not e10s friendly # [browser_UITour3.js] Bug 1113038 -# skip-if = os == "linux" || e10s # Linux: Bug 986760, Bug 989101; e10s: Bug 941428 - UITour.jsm not e10s friendly +# skip-if = os == "linux" || e10s # Linux: Bug 986760, Bug 989101; e10s: Bug 1073247 - UITour.jsm not e10s friendly [browser_UITour_availableTargets.js] -skip-if = e10s # Bug 941428 - UITour.jsm not e10s friendly +skip-if = e10s # Bug 1073247 - UITour.jsm not e10s friendly [browser_UITour_detach_tab.js] -skip-if = e10s # Bug 941428 - UITour.jsm not e10s friendly +skip-if = e10s # Bug 1073247 - UITour.jsm not e10s friendly [browser_UITour_annotation_size_attributes.js] -skip-if = e10s # Bug 941428 - UITour.jsm not e10s friendly. +skip-if = e10s # Bug 1073247 - UITour.jsm not e10s friendly. [browser_UITour_forceReaderMode.js] -skip-if = e10s # Bug 941428 - UITour.jsm not e10s friendly. +skip-if = e10s # Bug 1073247 - UITour.jsm not e10s friendly. +[browser_UITour_toggleReaderMode.js] +skip-if = e10s # Bug 1073247 - UITour.jsm not e10s friendly [browser_UITour_heartbeat.js] -skip-if = e10s # Bug 941428 - UITour.jsm not e10s friendly. +skip-if = e10s # Bug 1073247 - UITour.jsm not e10s friendly. [browser_UITour_loop.js] -skip-if = os == "linux" || e10s # Bug 941428 - UITour.jsm not e10s friendly. +skip-if = os == "linux" || e10s # Bug 1073247 - UITour.jsm not e10s friendly. [browser_UITour_modalDialog.js] -skip-if = os != "mac" || e10s # modal dialog disabling only working on OS X.Bug 941428 - UITour.jsm not e10s friendly +skip-if = os != "mac" || e10s # modal dialog disabling only working on OS X.Bug 1073247 - UITour.jsm not e10s friendly [browser_UITour_observe.js] -skip-if = e10s # Bug 941428 - UITour.jsm not e10s friendly. +skip-if = e10s # Bug 1073247 - UITour.jsm not e10s friendly. [browser_UITour_panel_close_annotation.js] skip-if = true # Disabled due to frequent failures, bugs 1026310 and 1032137 [browser_UITour_registerPageID.js] -skip-if = e10s # Bug 941428 - UITour.jsm not e10s friendly +skip-if = e10s # Bug 1073247 - UITour.jsm not e10s friendly [browser_UITour_sync.js] -skip-if = e10s # Bug 941428 - UITour.jsm not e10s friendly +skip-if = e10s # Bug 1073247 - UITour.jsm not e10s friendly [browser_UITour_resetProfile.js] -skip-if = e10s # Bug 941428 - UITour.jsm not e10s friendly +skip-if = e10s # Bug 1073247 - UITour.jsm not e10s friendly diff --git a/browser/components/uitour/test/browser_UITour_availableTargets.js b/browser/components/uitour/test/browser_UITour_availableTargets.js index 6c12916b575..301e5c5b0ca 100644 --- a/browser/components/uitour/test/browser_UITour_availableTargets.js +++ b/browser/components/uitour/test/browser_UITour_availableTargets.js @@ -39,6 +39,7 @@ let tests = [ "devtools", "privateWindow", "quit", + "readerMode-urlBar", "search", "searchIcon", "urlbar", @@ -69,6 +70,7 @@ let tests = [ "home", "privateWindow", "quit", + "readerMode-urlBar", "search", "searchIcon", "urlbar", @@ -104,6 +106,7 @@ let tests = [ "devtools", "privateWindow", "quit", + "readerMode-urlBar", "urlbar", ...(hasWebIDE ? ["webide"] : []) ]); diff --git a/browser/components/uitour/test/browser_UITour_toggleReaderMode.js b/browser/components/uitour/test/browser_UITour_toggleReaderMode.js new file mode 100644 index 00000000000..f4c7109dd82 --- /dev/null +++ b/browser/components/uitour/test/browser_UITour_toggleReaderMode.js @@ -0,0 +1,20 @@ +"use strict"; + +let gTestTab; +let gContentAPI; +let gContentWindow; + +Components.utils.import("resource:///modules/UITour.jsm"); + +function test() { + UITourTest(); +} + +let tests = [ + taskify(function*() { + ok(!gBrowser.selectedBrowser.currentURI.spec.startsWith("about:reader"), "Should not be in reader mode at start of test."); + gContentAPI.toggleReaderMode(); + yield waitForConditionPromise(() => gBrowser.selectedBrowser.currentURI.spec.startsWith("about:reader")); + ok(gBrowser.selectedBrowser.currentURI.spec.startsWith("about:reader"), "Should be in reader mode now."); + }) +]; diff --git a/browser/modules/ReaderParent.jsm b/browser/modules/ReaderParent.jsm index 5f0f12c4c01..9c051803913 100644 --- a/browser/modules/ReaderParent.jsm +++ b/browser/modules/ReaderParent.jsm @@ -16,6 +16,7 @@ Cu.import("resource://gre/modules/Task.jsm"); XPCOMUtils.defineLazyModuleGetter(this, "PlacesUtils","resource://gre/modules/PlacesUtils.jsm"); XPCOMUtils.defineLazyModuleGetter(this, "ReaderMode", "resource://gre/modules/ReaderMode.jsm"); XPCOMUtils.defineLazyModuleGetter(this, "ReadingList", "resource:///modules/readinglist/ReadingList.jsm"); +XPCOMUtils.defineLazyModuleGetter(this, "UITour", "resource:///modules/UITour.jsm"); const gStringBundle = Services.strings.createBundle("chrome://global/locale/aboutReader.properties"); @@ -188,6 +189,23 @@ let ReaderParent = { } }, + /** + * Shows an info panel from the UITour for Reader Mode. + * + * @param browser The that the tour should be started for. + */ + showReaderModeInfoPanel(browser) { + let win = browser.ownerDocument.defaultView; + let targetPromise = UITour.getTarget(win, "readerMode-urlBar"); + targetPromise.then(target => { + let browserBundle = Services.strings.createBundle("chrome://browser/locale/browser.properties"); + UITour.showInfo(win, browser.messageManager, target, + browserBundle.GetStringFromName("readerView.promo.firstDetectedArticle.title"), + browserBundle.GetStringFromName("readerView.promo.firstDetectedArticle.body"), + "chrome://browser/skin/reader-tour.png"); + }); + }, + /** * Gets an article for a given URL. This method will download and parse a document. * diff --git a/browser/themes/linux/jar.mn b/browser/themes/linux/jar.mn index 40dcd398400..c605e51a6b0 100644 --- a/browser/themes/linux/jar.mn +++ b/browser/themes/linux/jar.mn @@ -93,6 +93,7 @@ browser.jar: skin/classic/browser/session-restore.svg (../shared/incontent-icons/session-restore.svg) skin/classic/browser/tab-crashed.svg (../shared/incontent-icons/tab-crashed.svg) skin/classic/browser/welcome-back.svg (../shared/incontent-icons/welcome-back.svg) + skin/classic/browser/reader-tour.png (../shared/reader/reader-tour.png) skin/classic/browser/readerMode.svg (../shared/reader/readerMode.svg) skin/classic/browser/readinglist/icons.svg (../shared/readinglist/icons.svg) skin/classic/browser/readinglist/readinglist-icon.svg (../shared/readinglist/readinglist-icon.svg) diff --git a/browser/themes/osx/jar.mn b/browser/themes/osx/jar.mn index c52ffd0943c..11398a9d60e 100644 --- a/browser/themes/osx/jar.mn +++ b/browser/themes/osx/jar.mn @@ -145,6 +145,7 @@ browser.jar: skin/classic/browser/session-restore.svg (../shared/incontent-icons/session-restore.svg) skin/classic/browser/tab-crashed.svg (../shared/incontent-icons/tab-crashed.svg) skin/classic/browser/welcome-back.svg (../shared/incontent-icons/welcome-back.svg) + skin/classic/browser/reader-tour.png (../shared/reader/reader-tour.png) skin/classic/browser/readerMode.svg (../shared/reader/readerMode.svg) skin/classic/browser/readinglist/icons.svg (../shared/readinglist/icons.svg) skin/classic/browser/readinglist/readinglist-icon.svg (../shared/readinglist/readinglist-icon.svg) diff --git a/browser/themes/shared/reader/reader-tour.png b/browser/themes/shared/reader/reader-tour.png new file mode 100644 index 0000000000000000000000000000000000000000..8e557e03821219211c19f65a90ca03d2f0b3b03f GIT binary patch literal 12172 zcmV;7FLTg|P)PyPMoC0LRCodHeF=OOMYew5EjKs&0ttZtA|NP&g18|dqoM+W2#Cv{=Q1v%v%Hx% zqdxa#6dfIB9Cg&Ejxq?$2yUndsHlJ&ZiomXipai0LbjXb-rV9Z8 z1C^?-I(4e*e08c$S9dxd>;GT!#C1LXI*cn+j%KrVj~HIQUYnE%s9G>EpK(KJ6Hv-iIZPikiXYs;=m`4|9~2lL%Hq>z zo|dt`0?0AwxKzoi{CIGp;ALKXtUzk4^)+T22ZeNC2cvNlBvrh|1ckxx#PMk@SALCk zJQ|yTnP8a!G0hNh;`p@k#)Aj;18;Ry$bqIrKq&wU4Eq&8U|c8NxpU{_U;gfQU5`8d zq@D!@9gfV*&gzzy9BSwDdz1YhPm;%q`2#+$*Mn9fwXxc0trd;LYOABsSarC%W=C0R z=?|MXZ(6zht1rKuI%V>AA1+w18*L~^HAoXU1~biaGjJjhKqZ|RdcEIbor(Lc0Yh*@ zKq)8+41r2QU>xYsp+jim0}md5(!jx|=eKElQbx$%7HG6qzhfoUk+PjTix+>h?CW>$ zzU`*>Kl$X7Vzf)JG*mlj1=6%cwb}!=RJPW@F{TDd+u*Xrv|5t_r2r8m3Awqs$&;U- zaYp|WPM**vExCtJ?8TKIE3K}L7FX4l?W&6I*b=VYu)3sX?UwS$uI*Kk(zT`0;%|3^ zcb7$Ck=}VJS)Ee+8SO&8%(fv<=HZ!1oeER^9dnX>ZL^X*8JR&}lGo$zcUBBk6t3R3 z;@fXu_}wqAeChMgKPPwu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qs%(vbq*kbdAy@`Lr{)FQ zj_R7;t7n$KdqIl7FhAsLmzUy8#}j`6h}CFK+e^bMKmYXOsh3_jeja||kWK`_F@r9B z1WSQ3!9w=_A-ALZN4zUl+hI)56gagyf~NbN0vN#GA_@Kdsb@|(w*T>Gw9UymAtUI| zhH6!oE1ZA1wFZi&GZ2ZzqBXT1oNM6Io;bq@cs)J@F9ROD)T>J&`~#vpic7xwe#MIS z?!5ixcRpOOfM22^C=6;zdaWQ4CBoz#8Mod&@uaTZdmMw`itL`2lF}(T;LX9`MrPe63HN`s{8Nx+72%EW?pCc|_v4Dm zPd@#@)Txv4?xO5J1VgRI1V}+*OmH+1APq?Fe^LeR|CZ{uz;?|LZ*>H~1W?mvtYCYw z|AqSW>6=m5xpP{(_U+T!=I5scyj~xE@40;Irp=|BH?AxFdc}(Jj}|WE3!AEJwGfR7 zh6xPw^_q2f%~%1_7+D974i;cKLTz8cQ{XfvKne`g=C$%@tTHHDb^g$tWUn9ZJv Date: Wed, 15 Apr 2015 21:57:40 -0700 Subject: [PATCH 13/38] Bumping gaia.json for 2 gaia revision(s) a=gaia-bump ======== https://hg.mozilla.org/integration/gaia-central/rev/b78b327fdb9f Author: autolander Desc: Bug 1150798 - merge pull request #29516 from crh0716:1150798 to mozilla-b2g:master ======== https://hg.mozilla.org/integration/gaia-central/rev/87fa3b1c6e39 Author: Arthur Chen Desc: Bug 1150798 - Disable the alameda loading timeout in the production build --- b2g/config/gaia.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/b2g/config/gaia.json b/b2g/config/gaia.json index b682caeaf71..c1e36a215b7 100644 --- a/b2g/config/gaia.json +++ b/b2g/config/gaia.json @@ -1,9 +1,9 @@ { "git": { - "git_revision": "29fde3db031b910f1c9d1a35a3aab022872de205", + "git_revision": "57fade7eed933aac78af0d840cac6206f0019b34", "remote": "https://git.mozilla.org/releases/gaia.git", "branch": "" }, - "revision": "2511908f59de62fbba1461a6dd0b23c16ba0be63", + "revision": "b78b327fdb9f9f7cf06473f1f1254a469e089b9f", "repo_path": "integration/gaia-central" } From 4e6106670a00a7f8c3394e056d9a7e4a8f10e945 Mon Sep 17 00:00:00 2001 From: B2G Bumper Bot Date: Wed, 15 Apr 2015 21:59:51 -0700 Subject: [PATCH 14/38] Bumping manifests a=b2g-bump --- b2g/config/dolphin/sources.xml | 2 +- b2g/config/emulator-ics/sources.xml | 2 +- b2g/config/emulator-jb/sources.xml | 2 +- b2g/config/emulator-kk/sources.xml | 2 +- b2g/config/emulator-l/sources.xml | 2 +- b2g/config/emulator/sources.xml | 2 +- b2g/config/flame-kk/sources.xml | 2 +- b2g/config/flame/sources.xml | 2 +- b2g/config/nexus-4/sources.xml | 2 +- b2g/config/nexus-5-l/sources.xml | 2 +- 10 files changed, 10 insertions(+), 10 deletions(-) diff --git a/b2g/config/dolphin/sources.xml b/b2g/config/dolphin/sources.xml index 3b84e151195..71f2286f14c 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 c8b26f44e6c..c14b1e6dbfb 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 ad6ec65d7b4..d149191b67e 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 c9f0cdb4aa9..e2c2befb2ae 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-l/sources.xml b/b2g/config/emulator-l/sources.xml index 7e0698c1a72..4610b871066 100644 --- a/b2g/config/emulator-l/sources.xml +++ b/b2g/config/emulator-l/sources.xml @@ -15,7 +15,7 @@ - + diff --git a/b2g/config/emulator/sources.xml b/b2g/config/emulator/sources.xml index c8b26f44e6c..c14b1e6dbfb 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 e721c256bb2..da179b83831 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 9a7e54c560d..f38c9d472fc 100644 --- a/b2g/config/flame/sources.xml +++ b/b2g/config/flame/sources.xml @@ -17,7 +17,7 @@ - + diff --git a/b2g/config/nexus-4/sources.xml b/b2g/config/nexus-4/sources.xml index f702845d04f..c43dad82b04 100644 --- a/b2g/config/nexus-4/sources.xml +++ b/b2g/config/nexus-4/sources.xml @@ -17,7 +17,7 @@ - + diff --git a/b2g/config/nexus-5-l/sources.xml b/b2g/config/nexus-5-l/sources.xml index ea8c8af4930..60ed76b981b 100644 --- a/b2g/config/nexus-5-l/sources.xml +++ b/b2g/config/nexus-5-l/sources.xml @@ -15,7 +15,7 @@ - + From 30572a8d557e2706958560257a333f92eddb2ed8 Mon Sep 17 00:00:00 2001 From: Thomas Zimmermann Date: Thu, 16 Apr 2015 10:48:21 +0200 Subject: [PATCH 15/38] Bug 1154235: Use |BroadcastSystemMessage| in |BluetoothService::Notify|, r=btian |BluetoothService::Notify| re-implements |BroadcastSystemMessage|. This patch replaces this code with a call to the function. --- dom/bluetooth/bluetooth1/BluetoothService.cpp | 17 +---------------- 1 file changed, 1 insertion(+), 16 deletions(-) diff --git a/dom/bluetooth/bluetooth1/BluetoothService.cpp b/dom/bluetooth/bluetooth1/BluetoothService.cpp index c3a0c042269..57afeb4f619 100644 --- a/dom/bluetooth/bluetooth1/BluetoothService.cpp +++ b/dom/bluetooth/bluetooth1/BluetoothService.cpp @@ -729,15 +729,6 @@ BluetoothService::Notify(const BluetoothSignal& aData) { nsString type = NS_LITERAL_STRING("bluetooth-pairing-request"); - AutoSafeJSContext cx; - JS::Rooted obj(cx, JS_NewPlainObject(cx)); - NS_ENSURE_TRUE_VOID(obj); - - if (!SetJsObject(cx, aData.value(), obj)) { - BT_WARNING("Failed to set properties of system message!"); - return; - } - BT_LOGD("[S] %s: %s", __FUNCTION__, NS_ConvertUTF16toUTF8(aData.name()).get()); if (aData.name().EqualsLiteral("RequestConfirmation")) { @@ -765,13 +756,7 @@ BluetoothService::Notify(const BluetoothSignal& aData) return; } - nsCOMPtr systemMessenger = - do_GetService("@mozilla.org/system-message-internal;1"); - NS_ENSURE_TRUE_VOID(systemMessenger); - - JS::Rooted value(cx, JS::ObjectValue(*obj)); - systemMessenger->BroadcastMessage(type, value, - JS::UndefinedHandleValue); + BroadcastSystemMessage(type, aData.value()); } void From b80a5c01c0dbc55fd97287091cc2cd74a6b61d34 Mon Sep 17 00:00:00 2001 From: Thomas Zimmermann Date: Thu, 16 Apr 2015 10:48:21 +0200 Subject: [PATCH 16/38] Bug 1154235: Move dom/bluetooth/bluetooth2/BluetoothUtils.{cpp,h} to /dom/bluetooth, r=btian --- dom/bluetooth/{bluetooth2 => }/BluetoothUtils.cpp | 0 dom/bluetooth/{bluetooth2 => }/BluetoothUtils.h | 0 2 files changed, 0 insertions(+), 0 deletions(-) rename dom/bluetooth/{bluetooth2 => }/BluetoothUtils.cpp (100%) rename dom/bluetooth/{bluetooth2 => }/BluetoothUtils.h (100%) diff --git a/dom/bluetooth/bluetooth2/BluetoothUtils.cpp b/dom/bluetooth/BluetoothUtils.cpp similarity index 100% rename from dom/bluetooth/bluetooth2/BluetoothUtils.cpp rename to dom/bluetooth/BluetoothUtils.cpp diff --git a/dom/bluetooth/bluetooth2/BluetoothUtils.h b/dom/bluetooth/BluetoothUtils.h similarity index 100% rename from dom/bluetooth/bluetooth2/BluetoothUtils.h rename to dom/bluetooth/BluetoothUtils.h From 243bb2a554e80ccfaf9120da1b8d2909a2bd10b7 Mon Sep 17 00:00:00 2001 From: Thomas Zimmermann Date: Thu, 16 Apr 2015 10:48:21 +0200 Subject: [PATCH 17/38] Bug 1154235: Share BluetoothUtils.{cpp,h} between Bluetooth v1 and v2, r=btian With this patch, Bluetooth v1 and v2 share the same files for BluetoothUtils.{cpp,h}. Some of the functions are still version specific and cannot be shared. The v1 variants can be removed after switching to v2. --- CLOBBER | 6 +- dom/bluetooth/BluetoothUtils.cpp | 45 ++++- dom/bluetooth/BluetoothUtils.h | 14 ++ dom/bluetooth/bluetooth1/BluetoothUtils.cpp | 178 -------------------- dom/bluetooth/bluetooth1/BluetoothUtils.h | 44 ----- dom/bluetooth/moz.build | 5 +- 6 files changed, 65 insertions(+), 227 deletions(-) delete mode 100644 dom/bluetooth/bluetooth1/BluetoothUtils.cpp delete mode 100644 dom/bluetooth/bluetooth1/BluetoothUtils.h diff --git a/CLOBBER b/CLOBBER index cb3fc6c4c7c..670615407d4 100644 --- a/CLOBBER +++ b/CLOBBER @@ -22,4 +22,8 @@ # changes to stick? As of bug 928195, this shouldn't be necessary! Please # don't change CLOBBER for WebIDL changes any more. -Bug 1153796: Merge Bluetooth backend interfaces +Bug 1154235: Merge BluetoothUtils.{cpp,h} variants into single file + +This patch set renames and removes source files. This requires updating +the build system's dependency information from scratch. The issue has +been reported in bug 1154232. diff --git a/dom/bluetooth/BluetoothUtils.cpp b/dom/bluetooth/BluetoothUtils.cpp index e1e0994b601..be41257fa73 100644 --- a/dom/bluetooth/BluetoothUtils.cpp +++ b/dom/bluetooth/BluetoothUtils.cpp @@ -98,7 +98,7 @@ GeneratePathFromGattId(const BluetoothGattId& aId, /** * |SetJsObject| is an internal function used by |BroadcastSystemMessage| only */ -bool +static bool SetJsObject(JSContext* aContext, const BluetoothValue& aValue, JS::Handle aObj) @@ -219,6 +219,7 @@ BroadcastSystemMessage(const nsAString& aType, return true; } +#ifdef MOZ_B2G_BT_API_V2 void DispatchReplySuccess(BluetoothReplyRunnable* aRunnable) { @@ -281,6 +282,48 @@ DispatchStatusChangedEvent(const nsAString& aType, NS_ENSURE_TRUE_VOID(bs); bs->DistributeSignal(aType, NS_LITERAL_STRING(KEY_ADAPTER), data); } +#else +// TODO: remove with bluetooth1 +void +DispatchBluetoothReply(BluetoothReplyRunnable* aRunnable, + const BluetoothValue& aValue, + const nsAString& aErrorStr) +{ + // Reply will be deleted by the runnable after running on main thread + BluetoothReply* reply; + if (!aErrorStr.IsEmpty()) { + nsString err(aErrorStr); + reply = new BluetoothReply(BluetoothReplyError(err)); + } else { + MOZ_ASSERT(aValue.type() != BluetoothValue::T__None); + reply = new BluetoothReply(BluetoothReplySuccess(aValue)); + } + + aRunnable->SetReply(reply); + if (NS_FAILED(NS_DispatchToMainThread(aRunnable))) { + BT_WARNING("Failed to dispatch to main thread!"); + } +} + +// TODO: remove with bluetooth1 +void +DispatchStatusChangedEvent(const nsAString& aType, + const nsAString& aAddress, + bool aStatus) +{ + MOZ_ASSERT(NS_IsMainThread()); + + InfallibleTArray data; + BT_APPEND_NAMED_VALUE(data, "address", nsString(aAddress)); + BT_APPEND_NAMED_VALUE(data, "status", aStatus); + + BluetoothSignal signal(nsString(aType), NS_LITERAL_STRING(KEY_ADAPTER), data); + + BluetoothService* bs = BluetoothService::Get(); + NS_ENSURE_TRUE_VOID(bs); + bs->DistributeSignal(signal); +} +#endif bool IsMainProcess() diff --git a/dom/bluetooth/BluetoothUtils.h b/dom/bluetooth/BluetoothUtils.h index 9a0e24bbede..917a476eb1a 100644 --- a/dom/bluetooth/BluetoothUtils.h +++ b/dom/bluetooth/BluetoothUtils.h @@ -93,6 +93,7 @@ BroadcastSystemMessage(const nsAString& aType, // Dispatch bluetooth reply to main thread // +#ifdef MOZ_B2G_BT_API_V2 /** * Dispatch successful bluetooth reply with NO value to reply request. * @@ -142,6 +143,19 @@ DispatchReplyError(BluetoothReplyRunnable* aRunnable, void DispatchReplyError(BluetoothReplyRunnable* aRunnable, const enum BluetoothStatus aStatus); +#else +// TODO: remove with bluetooth1 +void +DispatchBluetoothReply(BluetoothReplyRunnable* aRunnable, + const BluetoothValue& aValue, + const nsAString& aErrorStr); + +// TODO: remove with bluetooth1 +void +DispatchStatusChangedEvent(const nsAString& aType, + const nsAString& aDeviceAddress, + bool aStatus); +#endif void DispatchStatusChangedEvent(const nsAString& aType, diff --git a/dom/bluetooth/bluetooth1/BluetoothUtils.cpp b/dom/bluetooth/bluetooth1/BluetoothUtils.cpp deleted file mode 100644 index f4066c97bba..00000000000 --- a/dom/bluetooth/bluetooth1/BluetoothUtils.cpp +++ /dev/null @@ -1,178 +0,0 @@ -/* -*- Mode: c++; c-basic-offset: 2; indent-tabs-mode: nil; tab-width: 40 -*- */ -/* vim: set ts=2 et sw=2 tw=80: */ -/* 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/. */ - -#include "BluetoothUtils.h" -#include "BluetoothReplyRunnable.h" -#include "BluetoothService.h" -#include "jsapi.h" -#include "mozilla/dom/bluetooth/BluetoothTypes.h" -#include "nsContentUtils.h" -#include "nsISystemMessagesInternal.h" -#include "nsServiceManagerUtils.h" - -BEGIN_BLUETOOTH_NAMESPACE - -bool -SetJsObject(JSContext* aContext, - const BluetoothValue& aValue, - JS::Handle aObj) -{ - MOZ_ASSERT(aContext && aObj); - - if (aValue.type() != BluetoothValue::TArrayOfBluetoothNamedValue) { - BT_WARNING("SetJsObject: Invalid parameter type"); - return false; - } - - const nsTArray& arr = - aValue.get_ArrayOfBluetoothNamedValue(); - - for (uint32_t i = 0; i < arr.Length(); i++) { - JS::Rooted val(aContext); - const BluetoothValue& v = arr[i].value(); - - switch(v.type()) { - case BluetoothValue::TnsString: { - JSString* jsData = JS_NewUCStringCopyN(aContext, - v.get_nsString().BeginReading(), - v.get_nsString().Length()); - NS_ENSURE_TRUE(jsData, false); - val = STRING_TO_JSVAL(jsData); - break; - } - case BluetoothValue::Tuint32_t: - val = INT_TO_JSVAL(v.get_uint32_t()); - break; - case BluetoothValue::Tbool: - val = BOOLEAN_TO_JSVAL(v.get_bool()); - break; - default: - BT_WARNING("SetJsObject: Parameter is not handled"); - break; - } - - if (!JS_SetProperty(aContext, aObj, - NS_ConvertUTF16toUTF8(arr[i].name()).get(), - val)) { - BT_WARNING("Failed to set property"); - return false; - } - } - - return true; -} - -bool -BroadcastSystemMessage(const nsAString& aType, - const BluetoothValue& aData) -{ - mozilla::AutoSafeJSContext cx; - NS_ASSERTION(!::JS_IsExceptionPending(cx), - "Shouldn't get here when an exception is pending!"); - - nsCOMPtr systemMessenger = - do_GetService("@mozilla.org/system-message-internal;1"); - NS_ENSURE_TRUE(systemMessenger, false); - - JS::Rooted value(cx); - if (aData.type() == BluetoothValue::TnsString) { - JSString* jsData = JS_NewUCStringCopyN(cx, - aData.get_nsString().BeginReading(), - aData.get_nsString().Length()); - value = STRING_TO_JSVAL(jsData); - } else if (aData.type() == BluetoothValue::TArrayOfBluetoothNamedValue) { - JS::Rooted obj(cx, JS_NewPlainObject(cx)); - if (!obj) { - BT_WARNING("Failed to new JSObject for system message!"); - return false; - } - - if (!SetJsObject(cx, aData, obj)) { - BT_WARNING("Failed to set properties of system message!"); - return false; - } - value = JS::ObjectValue(*obj); - } else { - BT_WARNING("Not support the unknown BluetoothValue type"); - return false; - } - - systemMessenger->BroadcastMessage(aType, value, - JS::UndefinedHandleValue); - - return true; -} - -bool -BroadcastSystemMessage(const nsAString& aType, - const InfallibleTArray& aData) -{ - mozilla::AutoSafeJSContext cx; - NS_ASSERTION(!::JS_IsExceptionPending(cx), - "Shouldn't get here when an exception is pending!"); - - JS::Rooted obj(cx, JS_NewPlainObject(cx)); - if (!obj) { - BT_WARNING("Failed to new JSObject for system message!"); - return false; - } - - if (!SetJsObject(cx, aData, obj)) { - BT_WARNING("Failed to set properties of system message!"); - return false; - } - - nsCOMPtr systemMessenger = - do_GetService("@mozilla.org/system-message-internal;1"); - NS_ENSURE_TRUE(systemMessenger, false); - - JS::Rooted value(cx, JS::ObjectValue(*obj)); - systemMessenger->BroadcastMessage(aType, value, - JS::UndefinedHandleValue); - - return true; -} - -void -DispatchBluetoothReply(BluetoothReplyRunnable* aRunnable, - const BluetoothValue& aValue, - const nsAString& aErrorStr) -{ - // Reply will be deleted by the runnable after running on main thread - BluetoothReply* reply; - if (!aErrorStr.IsEmpty()) { - nsString err(aErrorStr); - reply = new BluetoothReply(BluetoothReplyError(err)); - } else { - MOZ_ASSERT(aValue.type() != BluetoothValue::T__None); - reply = new BluetoothReply(BluetoothReplySuccess(aValue)); - } - - aRunnable->SetReply(reply); - if (NS_FAILED(NS_DispatchToMainThread(aRunnable))) { - BT_WARNING("Failed to dispatch to main thread!"); - } -} - -void -DispatchStatusChangedEvent(const nsAString& aType, - const nsAString& aAddress, - bool aStatus) -{ - MOZ_ASSERT(NS_IsMainThread()); - - InfallibleTArray data; - BT_APPEND_NAMED_VALUE(data, "address", nsString(aAddress)); - BT_APPEND_NAMED_VALUE(data, "status", aStatus); - - BluetoothSignal signal(nsString(aType), NS_LITERAL_STRING(KEY_ADAPTER), data); - - BluetoothService* bs = BluetoothService::Get(); - NS_ENSURE_TRUE_VOID(bs); - bs->DistributeSignal(signal); -} - -END_BLUETOOTH_NAMESPACE diff --git a/dom/bluetooth/bluetooth1/BluetoothUtils.h b/dom/bluetooth/bluetooth1/BluetoothUtils.h deleted file mode 100644 index 41449762e55..00000000000 --- a/dom/bluetooth/bluetooth1/BluetoothUtils.h +++ /dev/null @@ -1,44 +0,0 @@ -/* -*- Mode: c++; c-basic-offset: 2; indent-tabs-mode: nil; tab-width: 40 -*- */ -/* vim: set ts=2 et sw=2 tw=80: */ -/* 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/. */ - -#ifndef mozilla_dom_bluetooth_bluetoothutils_h -#define mozilla_dom_bluetooth_bluetoothutils_h - -#include "BluetoothCommon.h" -#include "js/TypeDecls.h" - -BEGIN_BLUETOOTH_NAMESPACE - -class BluetoothNamedValue; -class BluetoothValue; -class BluetoothReplyRunnable; - -bool -SetJsObject(JSContext* aContext, - const BluetoothValue& aValue, - JS::Handle aObj); - -bool -BroadcastSystemMessage(const nsAString& aType, - const BluetoothValue& aData); - -bool -BroadcastSystemMessage(const nsAString& aType, - const InfallibleTArray& aData); - -void -DispatchBluetoothReply(BluetoothReplyRunnable* aRunnable, - const BluetoothValue& aValue, - const nsAString& aErrorStr); - -void -DispatchStatusChangedEvent(const nsAString& aType, - const nsAString& aDeviceAddress, - bool aStatus); - -END_BLUETOOTH_NAMESPACE - -#endif diff --git a/dom/bluetooth/moz.build b/dom/bluetooth/moz.build index 6a75242a50f..16e4c5976a2 100644 --- a/dom/bluetooth/moz.build +++ b/dom/bluetooth/moz.build @@ -12,7 +12,8 @@ if CONFIG['MOZ_B2G_BT']: SOURCES += [ 'BluetoothInterface.cpp', - 'BluetoothInterfaceHelpers.cpp' + 'BluetoothInterfaceHelpers.cpp', + 'BluetoothUtils.cpp' ] if CONFIG['MOZ_B2G_BT_API_V2']: @@ -32,7 +33,6 @@ if CONFIG['MOZ_B2G_BT']: 'bluetooth2/BluetoothProfileController.cpp', 'bluetooth2/BluetoothReplyRunnable.cpp', 'bluetooth2/BluetoothService.cpp', - 'bluetooth2/BluetoothUtils.cpp', 'bluetooth2/BluetoothUuid.cpp', 'bluetooth2/ipc/BluetoothChild.cpp', 'bluetooth2/ipc/BluetoothParent.cpp', @@ -58,7 +58,6 @@ if CONFIG['MOZ_B2G_BT']: 'bluetooth1/BluetoothPropertyContainer.cpp', 'bluetooth1/BluetoothReplyRunnable.cpp', 'bluetooth1/BluetoothService.cpp', - 'bluetooth1/BluetoothUtils.cpp', 'bluetooth1/BluetoothUuid.cpp', 'bluetooth1/ipc/BluetoothChild.cpp', 'bluetooth1/ipc/BluetoothParent.cpp', From ed60a0b3d04f5c48c05a9e976e516df0dcded461 Mon Sep 17 00:00:00 2001 From: Thomas Zimmermann Date: Thu, 16 Apr 2015 10:48:21 +0200 Subject: [PATCH 18/38] Bug 1154235: Use |snprintf| in Bluetooth utililities, r=btian The use of |sprintf| is unsafe and generally deprecated. This patch replaces |sprintf| in the Bluetooth utilities with |snprintf|. --- dom/bluetooth/BluetoothUtils.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/dom/bluetooth/BluetoothUtils.cpp b/dom/bluetooth/BluetoothUtils.cpp index be41257fa73..6d3d4e1632a 100644 --- a/dom/bluetooth/BluetoothUtils.cpp +++ b/dom/bluetooth/BluetoothUtils.cpp @@ -31,10 +31,11 @@ UuidToString(const BluetoothUuid& aUuid, nsAString& aString) memcpy(&uuid4, &aUuid.mUuid[10], sizeof(uint32_t)); memcpy(&uuid5, &aUuid.mUuid[14], sizeof(uint16_t)); - sprintf(uuidStr, "%.8x-%.4x-%.4x-%.4x-%.8x%.4x", - ntohl(uuid0), ntohs(uuid1), - ntohs(uuid2), ntohs(uuid3), - ntohl(uuid4), ntohs(uuid5)); + snprintf(uuidStr, sizeof(uuidStr), + "%.8x-%.4x-%.4x-%.4x-%.8x%.4x", + ntohl(uuid0), ntohs(uuid1), + ntohs(uuid2), ntohs(uuid3), + ntohl(uuid4), ntohs(uuid5)); aString.Truncate(); aString.AssignLiteral(uuidStr); From bc7f4d1738b7eb69196903940db3462e5a41f12d Mon Sep 17 00:00:00 2001 From: B2G Bumper Bot Date: Thu, 16 Apr 2015 01:54:10 -0700 Subject: [PATCH 19/38] Bumping gaia.json for 2 gaia revision(s) a=gaia-bump ======== https://hg.mozilla.org/integration/gaia-central/rev/3eb2d272915c Author: autolander Desc: Bug 1141973 - merge pull request #29192 from EragonJ:bug-1141973 to mozilla-b2g:master ======== https://hg.mozilla.org/integration/gaia-central/rev/4beaebecad93 Author: EragonJ Desc: Bug 1141973 - make sure we will update the sim security r=Arthur --- b2g/config/gaia.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/b2g/config/gaia.json b/b2g/config/gaia.json index c1e36a215b7..9afd920a506 100644 --- a/b2g/config/gaia.json +++ b/b2g/config/gaia.json @@ -1,9 +1,9 @@ { "git": { - "git_revision": "57fade7eed933aac78af0d840cac6206f0019b34", + "git_revision": "0bfa1219536af541d55d59ed00359f95a8698623", "remote": "https://git.mozilla.org/releases/gaia.git", "branch": "" }, - "revision": "b78b327fdb9f9f7cf06473f1f1254a469e089b9f", + "revision": "3eb2d272915c7681f329be3faf333e083b5fcf1c", "repo_path": "integration/gaia-central" } From 5f19c54908f0c605b07c7db835f1d03923220f92 Mon Sep 17 00:00:00 2001 From: B2G Bumper Bot Date: Thu, 16 Apr 2015 01:54:30 -0700 Subject: [PATCH 20/38] Bumping manifests a=b2g-bump --- b2g/config/dolphin/sources.xml | 2 +- b2g/config/emulator-ics/sources.xml | 2 +- b2g/config/emulator-jb/sources.xml | 2 +- b2g/config/emulator-kk/sources.xml | 2 +- b2g/config/emulator-l/sources.xml | 2 +- b2g/config/emulator/sources.xml | 2 +- b2g/config/flame-kk/sources.xml | 2 +- b2g/config/flame/sources.xml | 2 +- b2g/config/nexus-4/sources.xml | 2 +- b2g/config/nexus-5-l/sources.xml | 2 +- 10 files changed, 10 insertions(+), 10 deletions(-) diff --git a/b2g/config/dolphin/sources.xml b/b2g/config/dolphin/sources.xml index 71f2286f14c..7009a9df066 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 c14b1e6dbfb..03dc1fa3811 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 d149191b67e..0848266a1f7 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 e2c2befb2ae..45a18e2c9e2 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-l/sources.xml b/b2g/config/emulator-l/sources.xml index 4610b871066..61ade45683a 100644 --- a/b2g/config/emulator-l/sources.xml +++ b/b2g/config/emulator-l/sources.xml @@ -15,7 +15,7 @@ - + diff --git a/b2g/config/emulator/sources.xml b/b2g/config/emulator/sources.xml index c14b1e6dbfb..03dc1fa3811 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 da179b83831..9d501880a5f 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 f38c9d472fc..51c119b211d 100644 --- a/b2g/config/flame/sources.xml +++ b/b2g/config/flame/sources.xml @@ -17,7 +17,7 @@ - + diff --git a/b2g/config/nexus-4/sources.xml b/b2g/config/nexus-4/sources.xml index c43dad82b04..c47ca83d029 100644 --- a/b2g/config/nexus-4/sources.xml +++ b/b2g/config/nexus-4/sources.xml @@ -17,7 +17,7 @@ - + diff --git a/b2g/config/nexus-5-l/sources.xml b/b2g/config/nexus-5-l/sources.xml index 60ed76b981b..563d6509180 100644 --- a/b2g/config/nexus-5-l/sources.xml +++ b/b2g/config/nexus-5-l/sources.xml @@ -15,7 +15,7 @@ - + From 9cb4786fbd7e50e94c2586bf30ac05ca91337394 Mon Sep 17 00:00:00 2001 From: B2G Bumper Bot Date: Thu, 16 Apr 2015 02:05:19 -0700 Subject: [PATCH 21/38] Bumping gaia.json for 2 gaia revision(s) a=gaia-bump ======== https://hg.mozilla.org/integration/gaia-central/rev/a59ed592f8c2 Author: autolander Desc: Bug 1153779 - merge pull request #29525 from albertopq:1153779-sim-dialog to mozilla-b2g:master ======== https://hg.mozilla.org/integration/gaia-central/rev/c5d99aa43c05 Author: albertopq Desc: Bug 1153779 - Wrong dialog size with SHB on --- b2g/config/gaia.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/b2g/config/gaia.json b/b2g/config/gaia.json index 9afd920a506..eb467e9fac1 100644 --- a/b2g/config/gaia.json +++ b/b2g/config/gaia.json @@ -1,9 +1,9 @@ { "git": { - "git_revision": "0bfa1219536af541d55d59ed00359f95a8698623", + "git_revision": "7281c3ef59ecf2cf966580102e0f658a0c8bea92", "remote": "https://git.mozilla.org/releases/gaia.git", "branch": "" }, - "revision": "3eb2d272915c7681f329be3faf333e083b5fcf1c", + "revision": "a59ed592f8c2456ab19a789f7250ea54ece71fe9", "repo_path": "integration/gaia-central" } From e382acb61f6ac9b8ed6410d379fda4b46f03e01a Mon Sep 17 00:00:00 2001 From: B2G Bumper Bot Date: Thu, 16 Apr 2015 02:07:30 -0700 Subject: [PATCH 22/38] Bumping manifests a=b2g-bump --- b2g/config/dolphin/sources.xml | 2 +- b2g/config/emulator-ics/sources.xml | 2 +- b2g/config/emulator-jb/sources.xml | 2 +- b2g/config/emulator-kk/sources.xml | 2 +- b2g/config/emulator-l/sources.xml | 2 +- b2g/config/emulator/sources.xml | 2 +- b2g/config/flame-kk/sources.xml | 2 +- b2g/config/flame/sources.xml | 2 +- b2g/config/nexus-4/sources.xml | 2 +- b2g/config/nexus-5-l/sources.xml | 2 +- 10 files changed, 10 insertions(+), 10 deletions(-) diff --git a/b2g/config/dolphin/sources.xml b/b2g/config/dolphin/sources.xml index 7009a9df066..848b7ebd5c7 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 03dc1fa3811..a6e3fbf585a 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 0848266a1f7..95389774567 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 45a18e2c9e2..47c002fab22 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-l/sources.xml b/b2g/config/emulator-l/sources.xml index 61ade45683a..1983d071925 100644 --- a/b2g/config/emulator-l/sources.xml +++ b/b2g/config/emulator-l/sources.xml @@ -15,7 +15,7 @@ - + diff --git a/b2g/config/emulator/sources.xml b/b2g/config/emulator/sources.xml index 03dc1fa3811..a6e3fbf585a 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 9d501880a5f..070810ca283 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 51c119b211d..1b71186d904 100644 --- a/b2g/config/flame/sources.xml +++ b/b2g/config/flame/sources.xml @@ -17,7 +17,7 @@ - + diff --git a/b2g/config/nexus-4/sources.xml b/b2g/config/nexus-4/sources.xml index c47ca83d029..ad338443bbc 100644 --- a/b2g/config/nexus-4/sources.xml +++ b/b2g/config/nexus-4/sources.xml @@ -17,7 +17,7 @@ - + diff --git a/b2g/config/nexus-5-l/sources.xml b/b2g/config/nexus-5-l/sources.xml index 563d6509180..996823f9fd0 100644 --- a/b2g/config/nexus-5-l/sources.xml +++ b/b2g/config/nexus-5-l/sources.xml @@ -15,7 +15,7 @@ - + From 572a5ce05fb2a4287821032ff859a0228cf0461b Mon Sep 17 00:00:00 2001 From: B2G Bumper Bot Date: Thu, 16 Apr 2015 03:30:20 -0700 Subject: [PATCH 23/38] Bumping gaia.json for 2 gaia revision(s) a=gaia-bump ======== https://hg.mozilla.org/integration/gaia-central/rev/7311315b339f Author: Rex KM Lee Desc: Merge pull request #29497 from rexboy7/1152713-folder-list-temp Bug 1152173 - [Stingray][Home] Implement folder list. r=dwi2 ======== https://hg.mozilla.org/integration/gaia-central/rev/afa581d214f6 Author: Rex Lee Desc: Bug 1152173 - [Stingray][Home] Implement folder list --- b2g/config/gaia.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/b2g/config/gaia.json b/b2g/config/gaia.json index eb467e9fac1..3644e09e6a3 100644 --- a/b2g/config/gaia.json +++ b/b2g/config/gaia.json @@ -1,9 +1,9 @@ { "git": { - "git_revision": "7281c3ef59ecf2cf966580102e0f658a0c8bea92", + "git_revision": "ec07401d4dc5597f792b5bd4a91e5d32ca2ee3a7", "remote": "https://git.mozilla.org/releases/gaia.git", "branch": "" }, - "revision": "a59ed592f8c2456ab19a789f7250ea54ece71fe9", + "revision": "7311315b339fddfc30389a0e7a4a76294b4c5da1", "repo_path": "integration/gaia-central" } From 2d9ad5bc9236e825e62e65134066117844ba992a Mon Sep 17 00:00:00 2001 From: B2G Bumper Bot Date: Thu, 16 Apr 2015 03:32:31 -0700 Subject: [PATCH 24/38] Bumping manifests a=b2g-bump --- b2g/config/dolphin/sources.xml | 2 +- b2g/config/emulator-ics/sources.xml | 2 +- b2g/config/emulator-jb/sources.xml | 2 +- b2g/config/emulator-kk/sources.xml | 2 +- b2g/config/emulator-l/sources.xml | 2 +- b2g/config/emulator/sources.xml | 2 +- b2g/config/flame-kk/sources.xml | 2 +- b2g/config/flame/sources.xml | 2 +- b2g/config/nexus-4/sources.xml | 2 +- b2g/config/nexus-5-l/sources.xml | 2 +- 10 files changed, 10 insertions(+), 10 deletions(-) diff --git a/b2g/config/dolphin/sources.xml b/b2g/config/dolphin/sources.xml index 848b7ebd5c7..17af5459cf1 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 a6e3fbf585a..3e0bf88e782 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 95389774567..fa920410c34 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 47c002fab22..e6d075aa3ff 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-l/sources.xml b/b2g/config/emulator-l/sources.xml index 1983d071925..bb5d0203a68 100644 --- a/b2g/config/emulator-l/sources.xml +++ b/b2g/config/emulator-l/sources.xml @@ -15,7 +15,7 @@ - + diff --git a/b2g/config/emulator/sources.xml b/b2g/config/emulator/sources.xml index a6e3fbf585a..3e0bf88e782 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 070810ca283..34b2ae67d1f 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 1b71186d904..860e1fcaa7c 100644 --- a/b2g/config/flame/sources.xml +++ b/b2g/config/flame/sources.xml @@ -17,7 +17,7 @@ - + diff --git a/b2g/config/nexus-4/sources.xml b/b2g/config/nexus-4/sources.xml index ad338443bbc..b5c9d77f652 100644 --- a/b2g/config/nexus-4/sources.xml +++ b/b2g/config/nexus-4/sources.xml @@ -17,7 +17,7 @@ - + diff --git a/b2g/config/nexus-5-l/sources.xml b/b2g/config/nexus-5-l/sources.xml index 996823f9fd0..d706607d568 100644 --- a/b2g/config/nexus-5-l/sources.xml +++ b/b2g/config/nexus-5-l/sources.xml @@ -15,7 +15,7 @@ - + From 5977bbf7dbd738ae18d69ed3cd82db309ea24b99 Mon Sep 17 00:00:00 2001 From: B2G Bumper Bot Date: Thu, 16 Apr 2015 06:47:40 -0700 Subject: [PATCH 25/38] Bumping gaia.json for 2 gaia revision(s) a=gaia-bump ======== https://hg.mozilla.org/integration/gaia-central/rev/41e8ee5438c4 Author: autolander Desc: Bug 1154695 - merge pull request #29524 from andreastt:remove_invalid_response to mozilla-b2g:master ======== https://hg.mozilla.org/integration/gaia-central/rev/1ac170a15c24 Author: Andreas Tolfsen Desc: Bug 1154695 - Remove import of InvalidResponseException r=davehunt --- b2g/config/gaia.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/b2g/config/gaia.json b/b2g/config/gaia.json index 3644e09e6a3..1da780a0c77 100644 --- a/b2g/config/gaia.json +++ b/b2g/config/gaia.json @@ -1,9 +1,9 @@ { "git": { - "git_revision": "ec07401d4dc5597f792b5bd4a91e5d32ca2ee3a7", + "git_revision": "5e533bd39e8fb7b9daa750e2e94635e0d40a179e", "remote": "https://git.mozilla.org/releases/gaia.git", "branch": "" }, - "revision": "7311315b339fddfc30389a0e7a4a76294b4c5da1", + "revision": "41e8ee5438c4b8528780001219c0bc8b0d1a9130", "repo_path": "integration/gaia-central" } From ecc5d3d803d38b32e6ebea145f117386cce53c81 Mon Sep 17 00:00:00 2001 From: B2G Bumper Bot Date: Thu, 16 Apr 2015 06:49:51 -0700 Subject: [PATCH 26/38] Bumping manifests a=b2g-bump --- b2g/config/dolphin/sources.xml | 2 +- b2g/config/emulator-ics/sources.xml | 2 +- b2g/config/emulator-jb/sources.xml | 2 +- b2g/config/emulator-kk/sources.xml | 2 +- b2g/config/emulator-l/sources.xml | 2 +- b2g/config/emulator/sources.xml | 2 +- b2g/config/flame-kk/sources.xml | 2 +- b2g/config/flame/sources.xml | 2 +- b2g/config/nexus-4/sources.xml | 2 +- b2g/config/nexus-5-l/sources.xml | 2 +- 10 files changed, 10 insertions(+), 10 deletions(-) diff --git a/b2g/config/dolphin/sources.xml b/b2g/config/dolphin/sources.xml index 17af5459cf1..dd1ab27848e 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 3e0bf88e782..4ad9da1af47 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 fa920410c34..01476818831 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 e6d075aa3ff..437acd656d0 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-l/sources.xml b/b2g/config/emulator-l/sources.xml index bb5d0203a68..8e1713f4833 100644 --- a/b2g/config/emulator-l/sources.xml +++ b/b2g/config/emulator-l/sources.xml @@ -15,7 +15,7 @@ - + diff --git a/b2g/config/emulator/sources.xml b/b2g/config/emulator/sources.xml index 3e0bf88e782..4ad9da1af47 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 34b2ae67d1f..daeac2344b4 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 860e1fcaa7c..44f6a6a34c7 100644 --- a/b2g/config/flame/sources.xml +++ b/b2g/config/flame/sources.xml @@ -17,7 +17,7 @@ - + diff --git a/b2g/config/nexus-4/sources.xml b/b2g/config/nexus-4/sources.xml index b5c9d77f652..100c6561d84 100644 --- a/b2g/config/nexus-4/sources.xml +++ b/b2g/config/nexus-4/sources.xml @@ -17,7 +17,7 @@ - + diff --git a/b2g/config/nexus-5-l/sources.xml b/b2g/config/nexus-5-l/sources.xml index d706607d568..902bf3aff15 100644 --- a/b2g/config/nexus-5-l/sources.xml +++ b/b2g/config/nexus-5-l/sources.xml @@ -15,7 +15,7 @@ - + From 3777707a1de5677ed0e148bc7d0dc097a0a2f20b Mon Sep 17 00:00:00 2001 From: B2G Bumper Bot Date: Thu, 16 Apr 2015 08:10:21 -0700 Subject: [PATCH 27/38] Bumping gaia.json for 2 gaia revision(s) a=gaia-bump ======== https://hg.mozilla.org/integration/gaia-central/rev/bb6964c12998 Author: autolander Desc: Bug 1154250 - merge pull request #29520 from mozfreddyb:bug_1154250_mozsettings_mock_races_n_deadlocks to mozilla-b2g:master ======== https://hg.mozilla.org/integration/gaia-central/rev/92543162b33b Author: Frederik Braun Desc: Bug 1154250 - Deadlocks and races in mozsettings mock r=julienw --- b2g/config/gaia.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/b2g/config/gaia.json b/b2g/config/gaia.json index 1da780a0c77..7c470df7cc6 100644 --- a/b2g/config/gaia.json +++ b/b2g/config/gaia.json @@ -1,9 +1,9 @@ { "git": { - "git_revision": "5e533bd39e8fb7b9daa750e2e94635e0d40a179e", + "git_revision": "406242fa5ce4d0fed23d2e54e60182b83af43988", "remote": "https://git.mozilla.org/releases/gaia.git", "branch": "" }, - "revision": "41e8ee5438c4b8528780001219c0bc8b0d1a9130", + "revision": "bb6964c12998b618c13a1ae67a40632612119a79", "repo_path": "integration/gaia-central" } From 8d2427db48bb1480085d568a19833275958d39d4 Mon Sep 17 00:00:00 2001 From: B2G Bumper Bot Date: Thu, 16 Apr 2015 08:12:56 -0700 Subject: [PATCH 28/38] Bumping manifests a=b2g-bump --- b2g/config/dolphin/sources.xml | 2 +- b2g/config/emulator-ics/sources.xml | 2 +- b2g/config/emulator-jb/sources.xml | 2 +- b2g/config/emulator-kk/sources.xml | 2 +- b2g/config/emulator-l/sources.xml | 2 +- b2g/config/emulator/sources.xml | 2 +- b2g/config/flame-kk/sources.xml | 2 +- b2g/config/flame/sources.xml | 2 +- b2g/config/nexus-4/sources.xml | 2 +- b2g/config/nexus-5-l/sources.xml | 2 +- 10 files changed, 10 insertions(+), 10 deletions(-) diff --git a/b2g/config/dolphin/sources.xml b/b2g/config/dolphin/sources.xml index dd1ab27848e..2433676a2f2 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 4ad9da1af47..5539e714017 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 01476818831..fd2ac3c7386 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 437acd656d0..23660a0e7ca 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-l/sources.xml b/b2g/config/emulator-l/sources.xml index 8e1713f4833..3564703424d 100644 --- a/b2g/config/emulator-l/sources.xml +++ b/b2g/config/emulator-l/sources.xml @@ -15,7 +15,7 @@ - + diff --git a/b2g/config/emulator/sources.xml b/b2g/config/emulator/sources.xml index 4ad9da1af47..5539e714017 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 daeac2344b4..b3e561e2305 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 44f6a6a34c7..215ce68ce18 100644 --- a/b2g/config/flame/sources.xml +++ b/b2g/config/flame/sources.xml @@ -17,7 +17,7 @@ - + diff --git a/b2g/config/nexus-4/sources.xml b/b2g/config/nexus-4/sources.xml index 100c6561d84..51a6c03b0b6 100644 --- a/b2g/config/nexus-4/sources.xml +++ b/b2g/config/nexus-4/sources.xml @@ -17,7 +17,7 @@ - + diff --git a/b2g/config/nexus-5-l/sources.xml b/b2g/config/nexus-5-l/sources.xml index 902bf3aff15..653eb6214d6 100644 --- a/b2g/config/nexus-5-l/sources.xml +++ b/b2g/config/nexus-5-l/sources.xml @@ -15,7 +15,7 @@ - + From 170cabc52f8bb3f556836c8bb84b272ed42e0638 Mon Sep 17 00:00:00 2001 From: B2G Bumper Bot Date: Thu, 16 Apr 2015 08:30:21 -0700 Subject: [PATCH 29/38] Bumping gaia.json for 2 gaia revision(s) a=gaia-bump ======== https://hg.mozilla.org/integration/gaia-central/rev/d178bf2468b9 Author: autolander Desc: Bug 1153873 - merge pull request #29477 from davehunt:bug1153873 to mozilla-b2g:master ======== https://hg.mozilla.org/integration/gaia-central/rev/a3d54e9dd5c9 Author: Dave Hunt Desc: Bug 1153873 - Bump marionette_client dependency to 0.10. r=gmealer --- b2g/config/gaia.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/b2g/config/gaia.json b/b2g/config/gaia.json index 7c470df7cc6..023262cb13c 100644 --- a/b2g/config/gaia.json +++ b/b2g/config/gaia.json @@ -1,9 +1,9 @@ { "git": { - "git_revision": "406242fa5ce4d0fed23d2e54e60182b83af43988", + "git_revision": "fe2d3eacf6d4a83d86d1e64e7925cd2078e81bfd", "remote": "https://git.mozilla.org/releases/gaia.git", "branch": "" }, - "revision": "bb6964c12998b618c13a1ae67a40632612119a79", + "revision": "d178bf2468b9ef3cd30dff44b0c5c1867779e08e", "repo_path": "integration/gaia-central" } From 2a67f0385e19659a2de51384a386e1b5aab095e7 Mon Sep 17 00:00:00 2001 From: B2G Bumper Bot Date: Thu, 16 Apr 2015 08:32:31 -0700 Subject: [PATCH 30/38] Bumping manifests a=b2g-bump --- b2g/config/dolphin/sources.xml | 2 +- b2g/config/emulator-ics/sources.xml | 2 +- b2g/config/emulator-jb/sources.xml | 2 +- b2g/config/emulator-kk/sources.xml | 2 +- b2g/config/emulator-l/sources.xml | 2 +- b2g/config/emulator/sources.xml | 2 +- b2g/config/flame-kk/sources.xml | 2 +- b2g/config/flame/sources.xml | 2 +- b2g/config/nexus-4/sources.xml | 2 +- b2g/config/nexus-5-l/sources.xml | 2 +- 10 files changed, 10 insertions(+), 10 deletions(-) diff --git a/b2g/config/dolphin/sources.xml b/b2g/config/dolphin/sources.xml index 2433676a2f2..eaa2cf8cb4c 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 5539e714017..e36c609e1d6 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 fd2ac3c7386..ccf95961f82 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 23660a0e7ca..845b643ee31 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-l/sources.xml b/b2g/config/emulator-l/sources.xml index 3564703424d..290d90a03e5 100644 --- a/b2g/config/emulator-l/sources.xml +++ b/b2g/config/emulator-l/sources.xml @@ -15,7 +15,7 @@ - + diff --git a/b2g/config/emulator/sources.xml b/b2g/config/emulator/sources.xml index 5539e714017..e36c609e1d6 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 b3e561e2305..0b59a76f4fa 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 215ce68ce18..8e2b26d8497 100644 --- a/b2g/config/flame/sources.xml +++ b/b2g/config/flame/sources.xml @@ -17,7 +17,7 @@ - + diff --git a/b2g/config/nexus-4/sources.xml b/b2g/config/nexus-4/sources.xml index 51a6c03b0b6..51126031f71 100644 --- a/b2g/config/nexus-4/sources.xml +++ b/b2g/config/nexus-4/sources.xml @@ -17,7 +17,7 @@ - + diff --git a/b2g/config/nexus-5-l/sources.xml b/b2g/config/nexus-5-l/sources.xml index 653eb6214d6..6f8aa11739d 100644 --- a/b2g/config/nexus-5-l/sources.xml +++ b/b2g/config/nexus-5-l/sources.xml @@ -15,7 +15,7 @@ - + From b43440cd468f03c915146d82a3a6a3238a324273 Mon Sep 17 00:00:00 2001 From: B2G Bumper Bot Date: Thu, 16 Apr 2015 09:00:36 -0700 Subject: [PATCH 31/38] Bumping gaia.json for 2 gaia revision(s) a=gaia-bump ======== https://hg.mozilla.org/integration/gaia-central/rev/6e8822d06035 Author: Kevin Grandon Desc: Merge pull request #29363 from tedders1/bug-1150749-fix Bug 1150749 - Use bidi-isolate tags around track and artist names. r=djf ======== https://hg.mozilla.org/integration/gaia-central/rev/7b278add50cd Author: Ted Clancy Desc: Bug 1150749 - Use bidi-isolate tags around track and artist names. r=etienne --- b2g/config/gaia.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/b2g/config/gaia.json b/b2g/config/gaia.json index 023262cb13c..5987bf960c9 100644 --- a/b2g/config/gaia.json +++ b/b2g/config/gaia.json @@ -1,9 +1,9 @@ { "git": { - "git_revision": "fe2d3eacf6d4a83d86d1e64e7925cd2078e81bfd", + "git_revision": "a68db278aa7f792c7e9f22b20ca6f160214d6360", "remote": "https://git.mozilla.org/releases/gaia.git", "branch": "" }, - "revision": "d178bf2468b9ef3cd30dff44b0c5c1867779e08e", + "revision": "6e8822d06035a595ee1d957c09d19ab57bb3b132", "repo_path": "integration/gaia-central" } From 0639fe08b98e8675a063ee77c3855e453d47c0bd Mon Sep 17 00:00:00 2001 From: B2G Bumper Bot Date: Thu, 16 Apr 2015 09:02:48 -0700 Subject: [PATCH 32/38] Bumping manifests a=b2g-bump --- b2g/config/dolphin/sources.xml | 2 +- b2g/config/emulator-ics/sources.xml | 2 +- b2g/config/emulator-jb/sources.xml | 2 +- b2g/config/emulator-kk/sources.xml | 2 +- b2g/config/emulator-l/sources.xml | 2 +- b2g/config/emulator/sources.xml | 2 +- b2g/config/flame-kk/sources.xml | 2 +- b2g/config/flame/sources.xml | 2 +- b2g/config/nexus-4/sources.xml | 2 +- b2g/config/nexus-5-l/sources.xml | 2 +- 10 files changed, 10 insertions(+), 10 deletions(-) diff --git a/b2g/config/dolphin/sources.xml b/b2g/config/dolphin/sources.xml index eaa2cf8cb4c..0d3841c9d55 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 e36c609e1d6..e72031e6013 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 ccf95961f82..b2fabd38633 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 845b643ee31..55281ce18ea 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-l/sources.xml b/b2g/config/emulator-l/sources.xml index 290d90a03e5..61bc54b3710 100644 --- a/b2g/config/emulator-l/sources.xml +++ b/b2g/config/emulator-l/sources.xml @@ -15,7 +15,7 @@ - + diff --git a/b2g/config/emulator/sources.xml b/b2g/config/emulator/sources.xml index e36c609e1d6..e72031e6013 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 0b59a76f4fa..454acc9fe5c 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 8e2b26d8497..da0cdf483f9 100644 --- a/b2g/config/flame/sources.xml +++ b/b2g/config/flame/sources.xml @@ -17,7 +17,7 @@ - + diff --git a/b2g/config/nexus-4/sources.xml b/b2g/config/nexus-4/sources.xml index 51126031f71..cd1d4583bef 100644 --- a/b2g/config/nexus-4/sources.xml +++ b/b2g/config/nexus-4/sources.xml @@ -17,7 +17,7 @@ - + diff --git a/b2g/config/nexus-5-l/sources.xml b/b2g/config/nexus-5-l/sources.xml index 6f8aa11739d..fd7c4f88370 100644 --- a/b2g/config/nexus-5-l/sources.xml +++ b/b2g/config/nexus-5-l/sources.xml @@ -15,7 +15,7 @@ - + From 4cc6d065adda8c4ee4543af349ea78e46cb00c50 Mon Sep 17 00:00:00 2001 From: Dan Mosedale Date: Thu, 16 Apr 2015 09:18:30 -0700 Subject: [PATCH 33/38] Bug 1154862-Add forgotten param to VideoDimensionsChanged action, r=mikedeboer --- browser/components/loop/content/shared/js/actions.js | 1 + 1 file changed, 1 insertion(+) diff --git a/browser/components/loop/content/shared/js/actions.js b/browser/components/loop/content/shared/js/actions.js index faf6461b2b3..746c6250063 100644 --- a/browser/components/loop/content/shared/js/actions.js +++ b/browser/components/loop/content/shared/js/actions.js @@ -200,6 +200,7 @@ loop.shared.actions = (function() { * dispatched when a stream connects for the first time. */ VideoDimensionsChanged: Action.define("videoDimensionsChanged", { + isLocal: Boolean, videoType: String, dimensions: Object }), From b903d84270833185467c832706843ff393486c02 Mon Sep 17 00:00:00 2001 From: Patrick Brosset Date: Thu, 16 Apr 2015 18:40:40 +0200 Subject: [PATCH 34/38] Bug 1151956 - Add tooltips with refs to source css rules in the layout-view; r=miker --- browser/devtools/layoutview/test/browser.ini | 1 + .../test/browser_layoutview_tooltips.js | 126 ++++++++++++++++++ browser/devtools/layoutview/view.js | 35 +++++ browser/devtools/layoutview/view.xhtml | 6 +- 4 files changed, 165 insertions(+), 3 deletions(-) create mode 100644 browser/devtools/layoutview/test/browser_layoutview_tooltips.js diff --git a/browser/devtools/layoutview/test/browser.ini b/browser/devtools/layoutview/test/browser.ini index 611e808b1bb..a1c2c071a45 100644 --- a/browser/devtools/layoutview/test/browser.ini +++ b/browser/devtools/layoutview/test/browser.ini @@ -15,6 +15,7 @@ support-files = [browser_layoutview_editablemodel_stylerules.js] [browser_layoutview_guides.js] [browser_layoutview_rotate-labels-on-sides.js] +[browser_layoutview_tooltips.js] [browser_layoutview_update-after-navigation.js] [browser_layoutview_update-after-reload.js] # [browser_layoutview_update-in-iframes.js] diff --git a/browser/devtools/layoutview/test/browser_layoutview_tooltips.js b/browser/devtools/layoutview/test/browser_layoutview_tooltips.js new file mode 100644 index 00000000000..e8af63f0bb5 --- /dev/null +++ b/browser/devtools/layoutview/test/browser_layoutview_tooltips.js @@ -0,0 +1,126 @@ +/* vim: set ts=2 et sw=2 tw=80: */ +/* Any copyright is dedicated to the Public Domain. + http://creativecommons.org/publicdomain/zero/1.0/ */ + +"use strict"; + +// Test that the regions in the layout-view have tooltips, and that individual +// values too. Also test that values that are set from a css rule have tooltips +// referencing the rule. + +const TEST_URI = "" + + "
"; + +// Test data for the tooltips over individual values. +// Each entry should contain: +// - selector: The selector for the node to be selected before starting to test +// - values: An array containing objects for each of the values that are defined +// by css rules. Each entry should contain: +// - name: the name of the property that is set by the css rule +// - ruleSelector: the selector of the rule +// - styleSheetLocation: the fileName:lineNumber +const VALUES_TEST_DATA = [{ + selector: "#div1", + values: [{ + name: "margin-top", + ruleSelector: "#div1", + styleSheetLocation: "null:1" + }, { + name: "margin-right", + ruleSelector: "#div1", + styleSheetLocation: "null:1" + }, { + name: "margin-bottom", + ruleSelector: "#div1", + styleSheetLocation: "null:1" + }, { + name: "margin-left", + ruleSelector: "#div1", + styleSheetLocation: "null:1" + }] +},{ + selector: "#div2", + values: [{ + name: "border-bottom-width", + ruleSelector: "#div2", + styleSheetLocation: "null:2" + }] +},{ + selector: "#div3", + values: [{ + name: "padding-top", + ruleSelector: "html, body, #div3", + styleSheetLocation: "null:3" + }, { + name: "padding-right", + ruleSelector: "html, body, #div3", + styleSheetLocation: "null:3" + }, { + name: "padding-bottom", + ruleSelector: "html, body, #div3", + styleSheetLocation: "null:3" + }, { + name: "padding-left", + ruleSelector: "html, body, #div3", + styleSheetLocation: "null:3" + }] +}]; + +add_task(function*() { + yield addTab("data:text/html;charset=utf-8," + encodeURIComponent(TEST_URI)); + let {toolbox, inspector, view} = yield openLayoutView(); + + info("Checking the regions tooltips"); + + ok(view.doc.querySelector("#margins").hasAttribute("title"), + "The margin region has a tooltip"); + is(view.doc.querySelector("#margins").getAttribute("title"), "margin", + "The margin region has the correct tooltip content"); + + ok(view.doc.querySelector("#borders").hasAttribute("title"), + "The border region has a tooltip"); + is(view.doc.querySelector("#borders").getAttribute("title"), "border", + "The border region has the correct tooltip content"); + + ok(view.doc.querySelector("#padding").hasAttribute("title"), + "The padding region has a tooltip"); + is(view.doc.querySelector("#padding").getAttribute("title"), "padding", + "The padding region has the correct tooltip content"); + + ok(view.doc.querySelector("#content").hasAttribute("title"), + "The content region has a tooltip"); + is(view.doc.querySelector("#content").getAttribute("title"), "content", + "The content region has the correct tooltip content"); + + for (let {selector, values} of VALUES_TEST_DATA) { + info("Selecting " + selector + " and checking the values tooltips"); + yield selectNode(selector, inspector); + + info("Iterate over all values"); + for (let key in view.map) { + if (key === "position") { + continue; + } + + let name = view.map[key].property; + let expectedTooltipData = values.find(o => o.name === name); + let el = view.doc.querySelector(view.map[key].selector); + + ok(el.hasAttribute("title"), "The " + name + " value has a tooltip"); + + if (expectedTooltipData) { + info("The " + name + " value comes from a css rule"); + let expectedTooltip = name + "\n" + expectedTooltipData.ruleSelector + + "\n" + expectedTooltipData.styleSheetLocation; + is(el.getAttribute("title"), expectedTooltip, "The tooltip is correct"); + } else { + info("The " + name + " isn't set by a css rule"); + is(el.getAttribute("title"), name, "The tooltip is correct"); + } + } + } +}); diff --git a/browser/devtools/layoutview/view.js b/browser/devtools/layoutview/view.js index 131ce2c8f26..995236dcaab 100644 --- a/browser/devtools/layoutview/view.js +++ b/browser/devtools/layoutview/view.js @@ -441,6 +441,7 @@ LayoutView.prototype = { for (let i in this.map) { let selector = this.map[i].selector; let span = this.doc.querySelector(selector); + this.updateSourceRuleTooltip(span, this.map[i].property, styleEntries); if (span.textContent.length > 0 && span.textContent == this.map[i].value) { continue; @@ -469,6 +470,40 @@ LayoutView.prototype = { return this._lastRequest = lastRequest; }, + /** + * Update the text in the tooltip shown when hovering over a value to provide + * information about the source CSS rule that sets this value. + * @param {DOMNode} el The element that will receive the tooltip. + * @param {String} property The name of the CSS property for the tooltip. + * @param {Array} rules An array of applied rules retrieved by + * styleActor.getApplied. + */ + updateSourceRuleTooltip: function(el, property, rules) { + // Dummy element used to parse the cssText of applied rules. + let dummyEl = this.doc.createElement("div"); + + // Rules are in order of priority so iterate until we find the first that + // defines a value for the property. + let sourceRule, value; + for (let {rule} of rules) { + dummyEl.style.cssText = rule.cssText; + value = dummyEl.style.getPropertyValue(property); + if (value !== "") { + sourceRule = rule; + break; + } + } + + let title = property; + if (sourceRule && sourceRule.selectors) { + title += "\n" + sourceRule.selectors.join(", "); + } + if (sourceRule && sourceRule.parentStyleSheet) { + title += "\n" + sourceRule.parentStyleSheet.href + ":" + sourceRule.line; + } + el.setAttribute("title", title); + }, + /** * Show the box-model highlighter on the currently selected element * @param {Object} options Options passed to the highlighter actor diff --git a/browser/devtools/layoutview/view.xhtml b/browser/devtools/layoutview/view.xhtml index 85ce1fce456..4fefd0faa8d 100644 --- a/browser/devtools/layoutview/view.xhtml +++ b/browser/devtools/layoutview/view.xhtml @@ -30,11 +30,11 @@
- &margin.tooltip; + &margin.tooltip;
- &border.tooltip; + &border.tooltip;
- &padding.tooltip; + &padding.tooltip;
From 66a974627ff73f6233110454ba97679e2272f3d3 Mon Sep 17 00:00:00 2001 From: B2G Bumper Bot Date: Thu, 16 Apr 2015 09:50:09 -0700 Subject: [PATCH 35/38] Bumping gaia.json for 2 gaia revision(s) a=gaia-bump ======== https://hg.mozilla.org/integration/gaia-central/rev/c5c31cccfb22 Author: Gareth Aye Desc: Merge pull request #29529 from gaye/bug-1154901 Bug 1154901 - mozilla-download never thinks /b2g is up-to-date ======== https://hg.mozilla.org/integration/gaia-central/rev/23c8774e87f0 Author: gaye Desc: Bug 1154901 - mozilla-download never thinks /b2g is up-to-date --- b2g/config/gaia.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/b2g/config/gaia.json b/b2g/config/gaia.json index 5987bf960c9..a2bc171566d 100644 --- a/b2g/config/gaia.json +++ b/b2g/config/gaia.json @@ -1,9 +1,9 @@ { "git": { - "git_revision": "a68db278aa7f792c7e9f22b20ca6f160214d6360", + "git_revision": "3cd0a9facce26c2acc7be3755a17131a6358e33f", "remote": "https://git.mozilla.org/releases/gaia.git", "branch": "" }, - "revision": "6e8822d06035a595ee1d957c09d19ab57bb3b132", + "revision": "c5c31cccfb22048626664d063643ae1fb1e2facc", "repo_path": "integration/gaia-central" } From 1d84c0fbfc2934dfa9f0bac8a984c3ea16a2f4c9 Mon Sep 17 00:00:00 2001 From: B2G Bumper Bot Date: Thu, 16 Apr 2015 09:52:20 -0700 Subject: [PATCH 36/38] Bumping manifests a=b2g-bump --- b2g/config/dolphin/sources.xml | 2 +- b2g/config/emulator-ics/sources.xml | 2 +- b2g/config/emulator-jb/sources.xml | 2 +- b2g/config/emulator-kk/sources.xml | 2 +- b2g/config/emulator-l/sources.xml | 2 +- b2g/config/emulator/sources.xml | 2 +- b2g/config/flame-kk/sources.xml | 2 +- b2g/config/flame/sources.xml | 2 +- b2g/config/nexus-4/sources.xml | 2 +- b2g/config/nexus-5-l/sources.xml | 2 +- 10 files changed, 10 insertions(+), 10 deletions(-) diff --git a/b2g/config/dolphin/sources.xml b/b2g/config/dolphin/sources.xml index 0d3841c9d55..273d3138d5d 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 e72031e6013..0f2e1806816 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 b2fabd38633..1f5c58e02cf 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 55281ce18ea..09d1d067160 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-l/sources.xml b/b2g/config/emulator-l/sources.xml index 61bc54b3710..c632f37c255 100644 --- a/b2g/config/emulator-l/sources.xml +++ b/b2g/config/emulator-l/sources.xml @@ -15,7 +15,7 @@ - + diff --git a/b2g/config/emulator/sources.xml b/b2g/config/emulator/sources.xml index e72031e6013..0f2e1806816 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 454acc9fe5c..51fd1c3cc08 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 da0cdf483f9..9a1988c06d1 100644 --- a/b2g/config/flame/sources.xml +++ b/b2g/config/flame/sources.xml @@ -17,7 +17,7 @@ - + diff --git a/b2g/config/nexus-4/sources.xml b/b2g/config/nexus-4/sources.xml index cd1d4583bef..3641bc54711 100644 --- a/b2g/config/nexus-4/sources.xml +++ b/b2g/config/nexus-4/sources.xml @@ -17,7 +17,7 @@ - + diff --git a/b2g/config/nexus-5-l/sources.xml b/b2g/config/nexus-5-l/sources.xml index fd7c4f88370..cc4a1e26f04 100644 --- a/b2g/config/nexus-5-l/sources.xml +++ b/b2g/config/nexus-5-l/sources.xml @@ -15,7 +15,7 @@ - + From a0b97f863164615d9e7e80b1e84313bd731b6307 Mon Sep 17 00:00:00 2001 From: Brian Grinstead Date: Thu, 16 Apr 2015 09:54:04 -0700 Subject: [PATCH 37/38] Bug 1153903 - Get rid of logspam during devtools talos test runs;r=pbrosset --- .../animationinspector/animation-controller.js | 16 ++++++++++------ .../animationinspector/animation-panel.js | 4 ++++ browser/devtools/inspector/inspector-panel.js | 4 ++++ toolkit/devtools/server/actors/inspector.js | 2 +- 4 files changed, 19 insertions(+), 7 deletions(-) diff --git a/browser/devtools/animationinspector/animation-controller.js b/browser/devtools/animationinspector/animation-controller.js index aac2d32ecb1..22234456b9a 100644 --- a/browser/devtools/animationinspector/animation-controller.js +++ b/browser/devtools/animationinspector/animation-controller.js @@ -55,7 +55,7 @@ let shutdown = Task.async(function*() { yield AnimationsController.destroy(); // Don't assume that AnimationsPanel is defined here, it's in another file. if (typeof AnimationsPanel !== "undefined") { - yield AnimationsPanel.destroy() + yield AnimationsPanel.destroy(); } gToolbox = gInspector = null; }); @@ -97,8 +97,11 @@ let AnimationsController = { } this.initialized = promise.defer(); + this.onPanelVisibilityChange = this.onPanelVisibilityChange.bind(this); + this.onNewNodeFront = this.onNewNodeFront.bind(this); + this.onAnimationMutations = this.onAnimationMutations.bind(this); + let target = gToolbox.target; - this.animationsFront = new AnimationsFront(target.client, target.form); // Expose actor capabilities. this.hasToggleAll = yield target.actorHasMethod("animations", "toggleAll"); @@ -109,12 +112,13 @@ let AnimationsController = { this.hasSetPlaybackRate = yield target.actorHasMethod("animationplayer", "setPlaybackRate"); - this.onPanelVisibilityChange = this.onPanelVisibilityChange.bind(this); - this.onNewNodeFront = this.onNewNodeFront.bind(this); - this.onAnimationMutations = this.onAnimationMutations.bind(this); + if (this.destroyed) { + console.warn("Could not fully initialize the AnimationsController"); + return; + } + this.animationsFront = new AnimationsFront(target.client, target.form); this.startListeners(); - yield this.onNewNodeFront(); this.initialized.resolve(); diff --git a/browser/devtools/animationinspector/animation-panel.js b/browser/devtools/animationinspector/animation-panel.js index 7964719d559..7bbc9f0dbcb 100644 --- a/browser/devtools/animationinspector/animation-panel.js +++ b/browser/devtools/animationinspector/animation-panel.js @@ -14,6 +14,10 @@ let AnimationsPanel = { PANEL_INITIALIZED: "panel-initialized", initialize: Task.async(function*() { + if (AnimationsController.destroyed) { + console.warn("Could not initialize the animation-panel, controller was destroyed"); + return; + } if (this.initialized) { return this.initialized.promise; } diff --git a/browser/devtools/inspector/inspector-panel.js b/browser/devtools/inspector/inspector-panel.js index 7d187a79334..7510e31613b 100644 --- a/browser/devtools/inspector/inspector-panel.js +++ b/browser/devtools/inspector/inspector-panel.js @@ -409,6 +409,10 @@ InspectorPanel.prototype = { * reload */ set selectionCssSelector(cssSelector = null) { + if (this._panelDestroyer) { + return; + } + this._selectionCssSelector = { selector: cssSelector, url: this._target.url diff --git a/toolkit/devtools/server/actors/inspector.js b/toolkit/devtools/server/actors/inspector.js index 7aae760d176..8adef7cab89 100644 --- a/toolkit/devtools/server/actors/inspector.js +++ b/toolkit/devtools/server/actors/inspector.js @@ -3106,7 +3106,7 @@ var WalkerFront = exports.WalkerFront = protocol.FrontClass(WalkerActor, { */ onMutations: protocol.preEvent("new-mutations", function() { // Fetch and process the mutations. - this.getMutations({cleanup: this.autoCleanup}).then(null, console.error); + this.getMutations({cleanup: this.autoCleanup}).catch(() => {}); }), isLocal: function() { From 464cf5515dc12a50799423f58d7e23719a7e2f1e Mon Sep 17 00:00:00 2001 From: Martyn Haigh Date: Thu, 16 Apr 2015 10:29:08 -0700 Subject: [PATCH 38/38] Bug 1132508 - Last tab is cut off in tab tray after rotation (r=rnewman) --- mobile/android/base/tabs/TabsPanel.java | 39 ++++++++++++++++++++----- 1 file changed, 32 insertions(+), 7 deletions(-) diff --git a/mobile/android/base/tabs/TabsPanel.java b/mobile/android/base/tabs/TabsPanel.java index 53593688f02..f74e413ba70 100644 --- a/mobile/android/base/tabs/TabsPanel.java +++ b/mobile/android/base/tabs/TabsPanel.java @@ -9,11 +9,11 @@ import org.mozilla.gecko.AppConstants.Versions; import org.mozilla.gecko.GeckoApp; import org.mozilla.gecko.GeckoApplication; import org.mozilla.gecko.R; +import org.mozilla.gecko.Tab; +import org.mozilla.gecko.Tabs; import org.mozilla.gecko.Telemetry; import org.mozilla.gecko.TelemetryContract; import org.mozilla.gecko.animation.PropertyAnimator; -import org.mozilla.gecko.Tab; -import org.mozilla.gecko.Tabs; import org.mozilla.gecko.animation.ViewHelper; import org.mozilla.gecko.lwt.LightweightTheme; import org.mozilla.gecko.lwt.LightweightThemeDrawable; @@ -31,6 +31,7 @@ import android.view.Menu; import android.view.MenuItem; import android.view.View; import android.view.ViewStub; +import android.view.ViewTreeObserver; import android.widget.Button; import android.widget.FrameLayout; import android.widget.ImageButton; @@ -377,9 +378,19 @@ public class TabsPanel extends LinearLayout public void show(Panel panelToShow) { prepareToShow(panelToShow); - int height = getVerticalPanelHeight(); - dispatchLayoutChange(getWidth(), height); - mHeaderVisible = true; + + final ViewTreeObserver vto = mTabsContainer.getViewTreeObserver(); + if (vto.isAlive()) { + vto.addOnGlobalLayoutListener(new ViewTreeObserver.OnGlobalLayoutListener() { + @Override + public void onGlobalLayout() { + vto.removeGlobalOnLayoutListener(this); + int height = getVerticalPanelHeight(); + dispatchLayoutChange(getWidth(), height); + mHeaderVisible = true; + } + }); + } } public void prepareToDrag() { @@ -460,8 +471,22 @@ public class TabsPanel extends LinearLayout inflateLayout(mContext); initialize(); - if (mVisible) - show(mCurrentPanel); + if (mVisible) { + final ViewTreeObserver vto = getViewTreeObserver(); + if (vto.isAlive()) { + vto.addOnGlobalLayoutListener(new ViewTreeObserver.OnGlobalLayoutListener() { + @Override + public void onGlobalLayout() { + vto.removeGlobalOnLayoutListener(this); + + // If we've just inflated the tabs panel, only show it once the current + // layout pass is done to avoid displayed temporary UI states during + // relayout. + show(mCurrentPanel); + } + }); + } + } } public void autoHidePanel() {