diff --git a/b2g/app/b2g.js b/b2g/app/b2g.js index 72ce3118e1d2..f6c4922a63e3 100644 --- a/b2g/app/b2g.js +++ b/b2g/app/b2g.js @@ -29,6 +29,7 @@ pref("browser.sessionstore.restore_on_demand", false); pref("browser.sessionstore.resume_from_crash", false); // No e10s on mulet pref("browser.tabs.remote.autostart.1", false); +pref("browser.tabs.remote.autostart.2", false); #endif // Bug 945235: Prevent all bars to be considered visible: @@ -1037,6 +1038,7 @@ pref("apz.fling_curve_function_y2", "1.0"); pref("apz.fling_curve_threshold_inches_per_ms", "0.01"); pref("apz.fling_friction", "0.0019"); pref("apz.max_velocity_inches_per_ms", "0.07"); +pref("apz.touch_start_tolerance", "0.1"); // Tweak default displayport values to reduce the risk of running out of // memory when zooming in diff --git a/b2g/chrome/content/settings.js b/b2g/chrome/content/settings.js index fab4f27501c9..61d92b24e6d2 100644 --- a/b2g/chrome/content/settings.js +++ b/b2g/chrome/content/settings.js @@ -196,19 +196,20 @@ SettingsListener.observe('devtools.overlay', false, (value) => { }); #ifdef MOZ_WIDGET_GONK + let LogShake; -SettingsListener.observe('devtools.logshake', false, (value) => { +(function() { + let scope = {}; + Cu.import('resource://gre/modules/LogShake.jsm', scope); + LogShake = scope.LogShake; + LogShake.init(); +})(); + +SettingsListener.observe('devtools.logshake', false, value => { if (value) { - if (!LogShake) { - let scope = {}; - Cu.import('resource://gre/modules/LogShake.jsm', scope); - LogShake = scope.LogShake; - } - LogShake.init(); + LogShake.enableDeviceMotionListener(); } else { - if (LogShake) { - LogShake.uninit(); - } + LogShake.disableDeviceMotionListener(); } }); #endif diff --git a/b2g/components/LogShake.jsm b/b2g/components/LogShake.jsm index fdfa4bc62383..05d67e69773c 100644 --- a/b2g/components/LogShake.jsm +++ b/b2g/components/LogShake.jsm @@ -56,6 +56,7 @@ function debug(msg) { const EXCITEMENT_THRESHOLD = 500; const DEVICE_MOTION_EVENT = "devicemotion"; const SCREEN_CHANGE_EVENT = "screenchange"; +const CAPTURE_LOGS_CONTENT_EVENT = "requestSystemLogs"; const CAPTURE_LOGS_START_EVENT = "capture-logs-start"; const CAPTURE_LOGS_ERROR_EVENT = "capture-logs-error"; const CAPTURE_LOGS_SUCCESS_EVENT = "capture-logs-success"; @@ -69,6 +70,18 @@ let LogShake = { */ deviceMotionEnabled: false, + /** + * We only listen to motion events when the screen is enabled, keep track + * of its state. + */ + screenEnabled: true, + + /** + * Flag monitoring if the preference to enable shake to capture is + * enabled in gaia. + */ + listenToDeviceMotion: true, + /** * If a capture has been requested and is waiting for reads/parsing. Used for * debouncing. @@ -109,6 +122,7 @@ let LogShake = { screenEnabled: true }}); + SystemAppProxy.addEventListener(CAPTURE_LOGS_CONTENT_EVENT, this, false); SystemAppProxy.addEventListener(SCREEN_CHANGE_EVENT, this, false); Services.obs.addObserver(this, "xpcom-shutdown", false); @@ -129,6 +143,10 @@ let LogShake = { case SCREEN_CHANGE_EVENT: this.handleScreenChangeEvent(event); break; + + case CAPTURE_LOGS_CONTENT_EVENT: + this.startCapture(); + break; } }, @@ -141,8 +159,20 @@ let LogShake = { } }, + enableDeviceMotionListener: function() { + this.listenToDeviceMotion = true; + this.startDeviceMotionListener(); + }, + + disableDeviceMotionListener: function() { + this.listenToDeviceMotion = false; + this.stopDeviceMotionListener(); + }, + startDeviceMotionListener: function() { - if (!this.deviceMotionEnabled) { + if (!this.deviceMotionEnabled && + this.listenToDeviceMotion && + this.screenEnabled) { SystemAppProxy.addEventListener(DEVICE_MOTION_EVENT, this, false); this.deviceMotionEnabled = true; } @@ -169,28 +199,33 @@ let LogShake = { var excitement = acc.x * acc.x + acc.y * acc.y + acc.z * acc.z; if (excitement > EXCITEMENT_THRESHOLD) { - if (!this.captureRequested) { - this.captureRequested = true; - SystemAppProxy._sendCustomEvent(CAPTURE_LOGS_START_EVENT, {}); - this.captureLogs().then(logResults => { - // On resolution send the success event to the requester - SystemAppProxy._sendCustomEvent(CAPTURE_LOGS_SUCCESS_EVENT, { - logFilenames: logResults.logFilenames, - logPrefix: logResults.logPrefix - }); - this.captureRequested = false; - }, - error => { - // On an error send the error event - SystemAppProxy._sendCustomEvent(CAPTURE_LOGS_ERROR_EVENT, {error: error}); - this.captureRequested = false; - }); - } + this.startCapture(); } }, + startCapture: function() { + if (this.captureRequested) { + return; + } + this.captureRequested = true; + SystemAppProxy._sendCustomEvent(CAPTURE_LOGS_START_EVENT, {}); + this.captureLogs().then(logResults => { + // On resolution send the success event to the requester + SystemAppProxy._sendCustomEvent(CAPTURE_LOGS_SUCCESS_EVENT, { + logFilenames: logResults.logFilenames, + logPrefix: logResults.logPrefix + }); + this.captureRequested = false; + }, error => { + // On an error send the error event + SystemAppProxy._sendCustomEvent(CAPTURE_LOGS_ERROR_EVENT, {error: error}); + this.captureRequested = false; + }); + }, + handleScreenChangeEvent: function(event) { - if (event.detail.screenEnabled) { + this.screenEnabled = event.detail.screenEnabled; + if (this.screenEnabled) { this.startDeviceMotionListener(); } else { this.stopDeviceMotionListener(); diff --git a/b2g/config/dolphin/sources.xml b/b2g/config/dolphin/sources.xml index 546d7ecd7882..b818f1e1d1c5 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 9b56a15ec122..27d85ceda467 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 f1aaa87386ad..01e447929006 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 4cac1293dac9..b9abdf950a38 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 97ccf7f3c2e9..4d8f9238b292 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 9b56a15ec122..27d85ceda467 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 6d747fa7fae7..01118481e00a 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 9876ae941f9a..f8342953a522 100644 --- a/b2g/config/flame/sources.xml +++ b/b2g/config/flame/sources.xml @@ -17,7 +17,7 @@ - + diff --git a/b2g/config/gaia.json b/b2g/config/gaia.json index 16fadb4b7988..f004aecd6724 100644 --- a/b2g/config/gaia.json +++ b/b2g/config/gaia.json @@ -1,9 +1,9 @@ { "git": { - "git_revision": "ef61ebbe5de8c2c9fc2a8f74a12455044c3b82e9", + "git_revision": "834385f4c834238a4306bf87cc4be41615d91ff0", "remote": "https://git.mozilla.org/releases/gaia.git", "branch": "" }, - "revision": "fceb69a8216d41525d5bec7efe4e97c140cc386d", + "revision": "e7a7a8c4f624820b810b33e098a3e7d941de53a1", "repo_path": "integration/gaia-central" } diff --git a/b2g/config/nexus-4/sources.xml b/b2g/config/nexus-4/sources.xml index eda5c6502698..3aac8a8b61fc 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 a2b7726a57fb..956b81b52e12 100644 --- a/b2g/config/nexus-5-l/sources.xml +++ b/b2g/config/nexus-5-l/sources.xml @@ -15,7 +15,7 @@ - + diff --git a/b2g/dev/app/mulet.js b/b2g/dev/app/mulet.js index ac3ff5430a9e..7be519855249 100644 --- a/b2g/dev/app/mulet.js +++ b/b2g/dev/app/mulet.js @@ -17,3 +17,4 @@ pref("devtools.toolbox.sidebar.width", 800); // nor the system app OOP, but only inner apps pref("browser.tabs.remote.autostart", false); pref("browser.tabs.remote.autostart.1", false); +pref("browser.tabs.remote.autostart.2", false); diff --git a/browser/app/profile/firefox.js b/browser/app/profile/firefox.js index bbec5ee4a3c9..e52f0c107170 100644 --- a/browser/app/profile/firefox.js +++ b/browser/app/profile/firefox.js @@ -1855,7 +1855,11 @@ pref("privacy.trackingprotection.ui.enabled", false); #endif #ifdef NIGHTLY_BUILD -pref("browser.tabs.remote.autostart.1", true); +// At the moment, autostart.2 is used, while autostart.1 is unused. +// We leave it here set to false to reset users' defaults and allow +// us to change everybody to true in the future, when desired. +pref("browser.tabs.remote.autostart.1", false); +pref("browser.tabs.remote.autostart.2", true); #endif #ifdef NIGHTLY_BUILD diff --git a/browser/base/content/browser.xul b/browser/base/content/browser.xul index 558d268e5794..16105c8270bc 100644 --- a/browser/base/content/browser.xul +++ b/browser/base/content/browser.xul @@ -834,7 +834,7 @@ + onclick="ReaderParent.buttonClick(event);"/> #endif diff --git a/browser/confvars.sh b/browser/confvars.sh index b8accd2f4cf3..064ce245a219 100755 --- a/browser/confvars.sh +++ b/browser/confvars.sh @@ -21,8 +21,13 @@ if test "$OS_ARCH" = "WINNT"; then fi fi fi +elif test "$OS_ARCH" = "Darwin"; then + MOZ_VERIFY_MAR_SIGNATURE=1 fi +# Enable building ./signmar and running libmar signature tests +MOZ_ENABLE_SIGNMAR=1 + MOZ_CHROME_FILE_FORMAT=omni MOZ_DISABLE_EXPORT_JS=1 MOZ_SAFE_BROWSING=1 diff --git a/browser/devtools/debugger/debugger-controller.js b/browser/devtools/debugger/debugger-controller.js index b15c8cdd9aff..cfd43ae7c017 100644 --- a/browser/devtools/debugger/debugger-controller.js +++ b/browser/devtools/debugger/debugger-controller.js @@ -125,6 +125,9 @@ XPCOMUtils.defineLazyModuleGetter(this, "DevToolsUtils", XPCOMUtils.defineLazyModuleGetter(this, "ShortcutUtils", "resource://gre/modules/ShortcutUtils.jsm"); +XPCOMUtils.defineLazyServiceGetter(this, "clipboardHelper", + "@mozilla.org/widget/clipboardhelper;1", "nsIClipboardHelper"); + Object.defineProperty(this, "NetworkHelper", { get: function() { return devtools.require("devtools/toolkit/webconsole/network-helper"); diff --git a/browser/devtools/debugger/debugger-panes.js b/browser/devtools/debugger/debugger-panes.js index 0e512791fa86..f3e7bb9e537e 100644 --- a/browser/devtools/debugger/debugger-panes.js +++ b/browser/devtools/debugger/debugger-panes.js @@ -40,6 +40,8 @@ function SourcesView() { this._onConditionalPopupShown = this._onConditionalPopupShown.bind(this); this._onConditionalPopupHiding = this._onConditionalPopupHiding.bind(this); this._onConditionalTextboxKeyPress = this._onConditionalTextboxKeyPress.bind(this); + this._onCopyUrlCommand = this._onCopyUrlCommand.bind(this); + this._onNewTabCommand = this._onNewTabCommand.bind(this); } SourcesView.prototype = Heritage.extend(WidgetMethods, { @@ -50,6 +52,7 @@ SourcesView.prototype = Heritage.extend(WidgetMethods, { dumpn("Initializing the SourcesView"); this.widget = new SideMenuWidget(document.getElementById("sources"), { + contextMenu: document.getElementById("debuggerSourcesContextMenu"), showArrows: true }); @@ -65,6 +68,8 @@ SourcesView.prototype = Heritage.extend(WidgetMethods, { this._stopBlackBoxButton = document.getElementById("black-boxed-message-button"); this._prettyPrintButton = document.getElementById("pretty-print"); this._toggleBreakpointsButton = document.getElementById("toggle-breakpoints"); + this._newTabMenuItem = document.getElementById("debugger-sources-context-newtab"); + this._copyUrlMenuItem = document.getElementById("debugger-sources-context-copyurl"); if (Prefs.prettyPrintEnabled) { this._prettyPrintButton.removeAttribute("hidden"); @@ -78,7 +83,10 @@ SourcesView.prototype = Heritage.extend(WidgetMethods, { this._cbPanel.addEventListener("popupshown", this._onConditionalPopupShown, false); this._cbPanel.addEventListener("popuphiding", this._onConditionalPopupHiding, false); this._cbTextbox.addEventListener("keypress", this._onConditionalTextboxKeyPress, false); + this._copyUrlMenuItem.addEventListener("command", this._onCopyUrlCommand, false); + this._newTabMenuItem.addEventListener("command", this._onNewTabCommand, false); + this.allowFocusOnRightClick = true; this.autoFocusOnSelection = false; // Sort the contents by the displayed label. @@ -112,6 +120,8 @@ SourcesView.prototype = Heritage.extend(WidgetMethods, { this._cbPanel.removeEventListener("popupshowing", this._onConditionalPopupShown, false); this._cbPanel.removeEventListener("popuphiding", this._onConditionalPopupHiding, false); this._cbTextbox.removeEventListener("keypress", this._onConditionalTextboxKeyPress, false); + this._copyUrlMenuItem.removeEventListener("command", this._onCopyUrlCommand, false); + this._newTabMenuItem.removeEventListener("command", this._onNewTabCommand, false); }, /** @@ -872,6 +882,26 @@ SourcesView.prototype = Heritage.extend(WidgetMethods, { } }, + /** + * Copy the source url from the currently selected item. + */ + _onCopyUrlCommand: function() { + let selected = this.selectedItem && this.selectedItem.attachment; + if (!selected) { + return; + } + clipboardHelper.copyString(selected.source.url, document); + }, + + /** + * Opens selected item source in a new tab. + */ + _onNewTabCommand: function() { + let win = Services.wm.getMostRecentWindow("navigator:browser"); + let selected = this.selectedItem.attachment; + win.openUILinkIn(selected.source.url, "tab", { relatedToCurrent: true }); + }, + /** * Function called each time a breakpoint item is removed. * diff --git a/browser/devtools/debugger/debugger.xul b/browser/devtools/debugger/debugger.xul index aca118bb4c3f..8e7160841d2a 100644 --- a/browser/devtools/debugger/debugger.xul +++ b/browser/devtools/debugger/debugger.xul @@ -156,6 +156,17 @@ + + + + + + + + { + gTab = aTab; + gPanel = aPanel; + gDebugger = gPanel.panelWin; + gSources = gDebugger.DebuggerView.Sources; + + waitForSourceShown(gPanel, "-01.js") + .then(openContextMenu) + .then(testCopyMenuItem) + .then(() => closeDebuggerAndFinish(gPanel)) + .then(null, aError => { + ok(false, "Got an error: " + aError.message + "\n" + aError.stack); + }); + }); + + function clickCopyURL() { + return new Promise((resolve, reject) => { + let copyURLMenuItem = gDebugger.document.getElementById("debugger-sources-context-copyurl"); + if (!copyURLMenuItem) { + reject(new Error("The Copy URL context menu item is not available.")); + } + + ok(copyURLMenuItem, "The Copy URL context menu item is available."); + EventUtils.synthesizeMouseAtCenter(copyURLMenuItem, {}, gDebugger); + resolve(); + }); + } + + function testCopyMenuItem() { + return waitForClipboardPromise(clickCopyURL, SCRIPT_URI); + } + + function openContextMenu() { + let contextMenu = gDebugger.document.getElementById("debuggerSourcesContextMenu"); + let contextMenuShown = once(contextMenu, "popupshown"); + EventUtils.synthesizeMouseAtCenter(gSources.selectedItem.prebuiltNode, {type: 'contextmenu'}, gDebugger); + return contextMenuShown; + } +} diff --git a/browser/devtools/debugger/test/browser_dbg_sources-contextmenu-02.js b/browser/devtools/debugger/test/browser_dbg_sources-contextmenu-02.js new file mode 100644 index 000000000000..1a1f00f4b906 --- /dev/null +++ b/browser/devtools/debugger/test/browser_dbg_sources-contextmenu-02.js @@ -0,0 +1,70 @@ +/* Any copyright is dedicated to the Public Domain. + http://creativecommons.org/publicdomain/zero/1.0/ */ + +/** + * Tests the "Open in New Tab" functionality of the sources panel context menu + */ + +const TAB_URL = EXAMPLE_URL + "doc_function-search.html"; +const SCRIPT_URI = EXAMPLE_URL + "code_function-search-01.js"; + +function test() { + let gTab, gPanel, gDebugger; + let gSources; + + initDebugger(TAB_URL).then(([aTab,, aPanel]) => { + gTab = aTab; + gPanel = aPanel; + gDebugger = gPanel.panelWin; + gSources = gDebugger.DebuggerView.Sources; + + waitForSourceShown(gPanel, "-01.js") + .then(openContextMenu) + .then(testNewTabMenuItem) + .then(testNewTabURI) + .then(() => closeDebuggerAndFinish(gPanel)) + .then(null, aError => { + ok(false, "Got an error: " + aError.message + "\n" + aError.stack); + }); + }); + + function testNewTabURI(tabUri) { + is(tabUri, SCRIPT_URI, "The tab contains the right script."); + gBrowser.removeCurrentTab(); + } + + function waitForTabOpen() { + return new Promise(resolve => { + gBrowser.tabContainer.addEventListener("TabOpen", function onOpen(e) { + gBrowser.tabContainer.removeEventListener("TabOpen", onOpen, false); + ok(true, "A new tab loaded"); + + gBrowser.addEventListener("DOMContentLoaded", function onTabLoad(e){ + gBrowser.removeEventListener("DOMContentLoaded", onTabLoad, false); + // Pass along the new tab's URI. + resolve(gBrowser.currentURI.spec); + }, false); + }, false); + }); + } + + function testNewTabMenuItem() { + return new Promise((resolve, reject) => { + let newTabMenuItem = gDebugger.document.getElementById("debugger-sources-context-newtab"); + if (!newTabMenuItem) { + reject(new Error("The Open in New Tab context menu item is not available.")); + } + + ok(newTabMenuItem, "The Open in New Tab context menu item is available."); + waitForTabOpen().then(resolve); + EventUtils.synthesizeMouseAtCenter(newTabMenuItem, {}, gDebugger); + }); + } + + function openContextMenu() { + let contextMenu = gDebugger.document.getElementById("debuggerSourcesContextMenu"); + let contextMenuShown = once(contextMenu, "popupshown"); + EventUtils.synthesizeMouseAtCenter(gSources.selectedItem.prebuiltNode, {type: 'contextmenu'}, gDebugger); + return contextMenuShown; + } +} diff --git a/browser/devtools/debugger/test/browser_dbg_sources-keybindings.js b/browser/devtools/debugger/test/browser_dbg_sources-keybindings.js new file mode 100644 index 000000000000..3eca64704589 --- /dev/null +++ b/browser/devtools/debugger/test/browser_dbg_sources-keybindings.js @@ -0,0 +1,35 @@ +/* Any copyright is dedicated to the Public Domain. + http://creativecommons.org/publicdomain/zero/1.0/ */ + +/** + * Tests related to source panel keyboard shortcut bindings + */ + +const TAB_URL = EXAMPLE_URL + "doc_function-search.html"; +const SCRIPT_URI = EXAMPLE_URL + "code_function-search-01.js"; + +function test() { + let gTab, gPanel, gDebugger, gSources; + + initDebugger(TAB_URL).then(([aTab,, aPanel]) => { + gTab = aTab; + gPanel = aPanel; + gDebugger = gPanel.panelWin; + gSources = gDebugger.DebuggerView.Sources; + + waitForSourceShown(gPanel, "-01.js") + .then(testCopyURLShortcut) + .then(() => closeDebuggerAndFinish(gPanel)) + .then(null, aError => { + ok(false, "Got an error: " + aError.message + "\n" + aError.stack); + }); + }); + + function testCopyURLShortcut() { + return waitForClipboardPromise(sendCopyShortcut, SCRIPT_URI); + } + + function sendCopyShortcut() { + EventUtils.synthesizeKey("C", { accelKey: true }, gDebugger); + } +} diff --git a/browser/devtools/debugger/test/head.js b/browser/devtools/debugger/test/head.js index 99c21efd7cce..d0bbedc2b00a 100644 --- a/browser/devtools/debugger/test/head.js +++ b/browser/devtools/debugger/test/head.js @@ -441,6 +441,12 @@ function waitForClientEvents(aPanel, aEventName, aEventRepeat = 1) { return deferred.promise; } +function waitForClipboardPromise(setup, expected) { + return new Promise((resolve, reject) => { + SimpleTest.waitForClipboard(expected, setup, resolve, reject); + }); +} + function ensureThreadClientState(aPanel, aState) { let thread = aPanel.panelWin.gThreadClient; let state = thread.state; diff --git a/browser/devtools/inspector/inspector-panel.js b/browser/devtools/inspector/inspector-panel.js index c396042a3240..7d187a79334d 100644 --- a/browser/devtools/inspector/inspector-panel.js +++ b/browser/devtools/inspector/inspector-panel.js @@ -11,6 +11,7 @@ Cu.import("resource://gre/modules/Services.jsm"); let promise = require("resource://gre/modules/Promise.jsm").Promise; let EventEmitter = require("devtools/toolkit/event-emitter"); let clipboard = require("sdk/clipboard"); +let {HostType} = require("devtools/framework/toolbox").Toolbox; loader.lazyGetter(this, "MarkupView", () => require("devtools/markupview/markup-view").MarkupView); loader.lazyGetter(this, "HTMLBreadcrumbs", () => require("devtools/inspector/breadcrumbs").HTMLBreadcrumbs); @@ -144,6 +145,9 @@ InspectorPanel.prototype = { this.breadcrumbs = new HTMLBreadcrumbs(this); + this.onToolboxHostChanged = this.onToolboxHostChanged.bind(this); + this._toolbox.on("host-changed", this.onToolboxHostChanged); + if (this.target.isLocalTab) { this.browser = this.target.tab.linkedBrowser; this.scheduleLayoutChange = this.scheduleLayoutChange.bind(this); @@ -350,6 +354,19 @@ InspectorPanel.prototype = { } this.sidebar.show(); + + this.setupSidebarToggle(); + }, + + /** + * Add the expand/collapse behavior for the sidebar panel. + */ + setupSidebarToggle: function() { + this._paneToggleButton = this.panelDoc.getElementById("inspector-pane-toggle"); + this.onPaneToggleButtonClicked = this.onPaneToggleButtonClicked.bind(this); + this._paneToggleButton.addEventListener("mousedown", + this.onPaneToggleButtonClicked); + this.updatePaneToggleButton(); }, /** @@ -553,6 +570,7 @@ InspectorPanel.prototype = { this.target.off("thread-paused", this.updateDebuggerPausedWarning); this.target.off("thread-resumed", this.updateDebuggerPausedWarning); this._toolbox.off("select", this.updateDebuggerPausedWarning); + this._toolbox.off("host-changed", this.onToolboxHostChanged); this.sidebar.off("select", this._setDefaultSidebar); let sidebarDestroyer = this.sidebar.destroy(); @@ -561,6 +579,9 @@ InspectorPanel.prototype = { this.nodemenu.removeEventListener("popupshowing", this._setupNodeMenu, true); this.nodemenu.removeEventListener("popuphiding", this._resetNodeMenu, true); this.breadcrumbs.destroy(); + this._paneToggleButton.removeEventListener("mousedown", + this.onPaneToggleButtonClicked); + this._paneToggleButton = null; this.searchSuggestions.destroy(); this.searchBox = null; this.selection.off("new-node-front", this.onNewSelection); @@ -784,6 +805,47 @@ InspectorPanel.prototype = { return destroyPromise; }, + /** + * When the type of toolbox host changes. + */ + onToolboxHostChanged: function() { + this.updatePaneToggleButton(); + }, + + /** + * When the pane toggle button is clicked, toggle the pane, change the button + * state and tooltip. + */ + onPaneToggleButtonClicked: function(e) { + let sidePane = this.panelDoc.querySelector("#inspector-sidebar"); + let button = this._paneToggleButton; + let isVisible = !button.hasAttribute("pane-collapsed"); + + ViewHelpers.togglePane({ + visible: !isVisible, + animated: true, + delayed: true + }, sidePane); + + if (isVisible) { + button.setAttribute("pane-collapsed", ""); + button.setAttribute("tooltiptext", + this.strings.GetStringFromName("inspector.expandPane")); + } else { + button.removeAttribute("pane-collapsed"); + button.setAttribute("tooltiptext", + this.strings.GetStringFromName("inspector.collapsePane")); + } + }, + + /** + * Update the pane toggle button visibility depending on the toolbox host type. + */ + updatePaneToggleButton: function() { + this._paneToggleButton.setAttribute("hidden", + this._toolbox.hostType === HostType.SIDE); + }, + /** * Toggle a pseudo class. */ diff --git a/browser/devtools/inspector/inspector.xul b/browser/devtools/inspector/inspector.xul index 5e04a212e675..92c4ab08cfe4 100644 --- a/browser/devtools/inspector/inspector.xul +++ b/browser/devtools/inspector/inspector.xul @@ -121,6 +121,9 @@ timeout="50" class="devtools-searchinput" placeholder="&inspectorSearchHTML.label2;"/> + diff --git a/browser/devtools/inspector/test/browser.ini b/browser/devtools/inspector/test/browser.ini index 919e59638c5c..865b841fa5b8 100644 --- a/browser/devtools/inspector/test/browser.ini +++ b/browser/devtools/inspector/test/browser.ini @@ -76,6 +76,9 @@ skip-if = e10s # GCLI isn't e10s compatible. See bug 1128988. [browser_inspector_menu-03-paste-items.js] [browser_inspector_menu-04-other.js] [browser_inspector_navigation.js] +[browser_inspector_pane-toggle-01.js] +[browser_inspector_pane-toggle-02.js] +[browser_inspector_pane-toggle-03.js] [browser_inspector_picker-stop-on-destroy.js] [browser_inspector_picker-stop-on-tool-change.js] [browser_inspector_pseudoclass-lock.js] diff --git a/browser/devtools/inspector/test/browser_inspector_pane-toggle-01.js b/browser/devtools/inspector/test/browser_inspector_pane-toggle-01.js new file mode 100644 index 000000000000..9cb591ebdd3e --- /dev/null +++ b/browser/devtools/inspector/test/browser_inspector_pane-toggle-01.js @@ -0,0 +1,23 @@ +/* vim: set ft=javascript 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 inspector panel has a sidebar pane toggle button, and that +// this button is hidden when the toolbox is in SIDE mode. + +add_task(function* () { + info("Open the inspector in a bottom toolbox host"); + let {toolbox, inspector} = yield openInspectorForURL("about:blank", "bottom"); + + let button = inspector.panelDoc.getElementById("inspector-pane-toggle"); + ok(button, "The toggle button exists in the DOM"); + is(button.parentNode.id, "inspector-toolbar", "The toggle button is in the toolbar"); + ok(!button.hasAttribute("pane-collapsed"), "The button is in expanded state"); + ok(!!button.getClientRects().length, "The button is visible"); + + info("Switch the host to side type"); + yield toolbox.switchHost("side"); + + ok(!button.getClientRects().length, "The button is hidden"); +}); diff --git a/browser/devtools/inspector/test/browser_inspector_pane-toggle-02.js b/browser/devtools/inspector/test/browser_inspector_pane-toggle-02.js new file mode 100644 index 000000000000..ce1792156de8 --- /dev/null +++ b/browser/devtools/inspector/test/browser_inspector_pane-toggle-02.js @@ -0,0 +1,24 @@ +/* vim: set ft=javascript 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 inspector panel has its toggle pane button hidden by default +// when it is opened in a "side" host, and that the button becomes visible when +// the toolbox is switched to a "bottom" host. + +add_task(function* () { + info("Open the inspector in a side toolbox host"); + let {toolbox, inspector} = yield openInspectorForURL("about:blank", "side"); + + let button = inspector.panelDoc.getElementById("inspector-pane-toggle"); + ok(button, "The toggle button exists in the DOM"); + is(button.parentNode.id, "inspector-toolbar", "The toggle button is in the toolbar"); + ok(!button.hasAttribute("pane-collapsed"), "The button is in expanded state"); + ok(!button.getClientRects().length, "The button is hidden"); + + info("Switch the host to bottom type"); + yield toolbox.switchHost("bottom"); + + ok(!!button.getClientRects().length, "The button is visible"); +}); diff --git a/browser/devtools/inspector/test/browser_inspector_pane-toggle-03.js b/browser/devtools/inspector/test/browser_inspector_pane-toggle-03.js new file mode 100644 index 000000000000..d4dd721422e4 --- /dev/null +++ b/browser/devtools/inspector/test/browser_inspector_pane-toggle-03.js @@ -0,0 +1,37 @@ +/* vim: set ft=javascript 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 sidebar panel toggle button actually works. + +add_task(function* () { + let {inspector} = yield openInspectorForURL("about:blank"); + + let button = inspector.panelDoc.getElementById("inspector-pane-toggle"); + let panel = inspector.panelDoc.querySelector("#inspector-sidebar"); + + ok(!button.hasAttribute("pane-collapsed"), "The button is in expanded state"); + + info("Listen to the end of the animation on the sidebar panel"); + let onTransitionEnd = once(panel, "transitionend"); + + info("Click on the toggle button"); + EventUtils.synthesizeMouseAtCenter(button, {type: "mousedown"}, + inspector.panelDoc.defaultView); + + yield onTransitionEnd; + ok(button.hasAttribute("pane-collapsed"), "The button is in collapsed state"); + ok(panel.hasAttribute("pane-collapsed"), "The panel is in collapsed state"); + + info("Listen again to the end of the animation on the sidebar panel"); + onTransitionEnd = once(panel, "transitionend"); + + info("Click on the toggle button again"); + EventUtils.synthesizeMouseAtCenter(button, {type: "mousedown"}, + inspector.panelDoc.defaultView); + + yield onTransitionEnd; + ok(!button.hasAttribute("pane-collapsed"), "The button is in expanded state"); + ok(!panel.hasAttribute("pane-collapsed"), "The panel is in expanded state"); +}); diff --git a/browser/devtools/inspector/test/head.js b/browser/devtools/inspector/test/head.js index 6b76f776b981..10b3102b075f 100644 --- a/browser/devtools/inspector/test/head.js +++ b/browser/devtools/inspector/test/head.js @@ -149,12 +149,13 @@ let selectNode = Task.async(function*(selector, inspector, reason="test") { /** * Open the inspector in a tab with given URL. * @param {string} url The URL to open. + * @param {String} hostType Optional hostType, as defined in Toolbox.HostType * @return A promise that is resolved once the tab and inspector have loaded * with an object: { tab, toolbox, inspector }. */ -let openInspectorForURL = Task.async(function* (url) { +let openInspectorForURL = Task.async(function*(url, hostType) { let tab = yield addTab(url); - let { inspector, toolbox } = yield openInspector(); + let { inspector, toolbox } = yield openInspector(null, hostType); return { tab, inspector, toolbox }; }); @@ -162,9 +163,10 @@ let openInspectorForURL = Task.async(function* (url) { * Open the toolbox, with the inspector tool visible. * @param {Function} cb Optional callback, if you don't want to use the returned * promise + * @param {String} hostType Optional hostType, as defined in Toolbox.HostType * @return a promise that resolves when the inspector is ready */ -let openInspector = Task.async(function*(cb) { +let openInspector = Task.async(function*(cb, hostType) { info("Opening the inspector"); let target = TargetFactory.forTab(gBrowser.selectedTab); @@ -190,7 +192,7 @@ let openInspector = Task.async(function*(cb) { } info("Opening the toolbox"); - toolbox = yield gDevTools.showToolbox(target, "inspector"); + toolbox = yield gDevTools.showToolbox(target, "inspector", hostType); yield waitForToolboxFrameFocus(toolbox); inspector = toolbox.getPanel("inspector"); diff --git a/browser/devtools/performance/modules/performance-graphs.js b/browser/devtools/performance/modules/performance-graphs.js new file mode 100644 index 000000000000..0178bfec7832 --- /dev/null +++ b/browser/devtools/performance/modules/performance-graphs.js @@ -0,0 +1,113 @@ +/* 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/. */ +"use strict"; + +/** + * This file contains the base line graph that all Performance line graphs use. + */ + +const {Cc, Ci, Cu, Cr} = require("chrome"); + +Cu.import("resource:///modules/devtools/Graphs.jsm"); +Cu.import("resource:///modules/devtools/ViewHelpers.jsm"); + +const { colorUtils: { setAlpha }} = require("devtools/css-color"); +const { getColor } = require("devtools/shared/theme"); + +loader.lazyRequireGetter(this, "ProfilerGlobal", + "devtools/shared/profiler/global"); +loader.lazyRequireGetter(this, "TimelineGlobal", + "devtools/shared/timeline/global"); + +const HEIGHT = 35; // px +const STROKE_WIDTH = 1; // px +const DAMPEN_VALUES = 0.95; +const CLIPHEAD_LINE_COLOR = "#666"; +const SELECTION_LINE_COLOR = "#555"; +const SELECTION_BACKGROUND_COLOR_NAME = "highlight-blue"; +const FRAMERATE_GRAPH_COLOR_NAME = "highlight-green"; +const MEMORY_GRAPH_COLOR_NAME = "highlight-blue"; + +/** + * A base class for performance graphs to inherit from. + * + * @param nsIDOMNode parent + * The parent node holding the overview. + * @param string metric + * The unit of measurement for this graph. + */ +function PerformanceGraph(parent, metric) { + LineGraphWidget.call(this, parent, { metric }); + this.setTheme(); +} + +PerformanceGraph.prototype = Heritage.extend(LineGraphWidget.prototype, { + strokeWidth: STROKE_WIDTH, + dampenValuesFactor: DAMPEN_VALUES, + fixedHeight: HEIGHT, + clipheadLineColor: CLIPHEAD_LINE_COLOR, + selectionLineColor: SELECTION_LINE_COLOR, + withTooltipArrows: false, + withFixedTooltipPositions: true, + + /** + * Disables selection and empties this graph. + */ + clearView: function() { + this.selectionEnabled = false; + this.dropSelection(); + this.setData([]); + }, + + /** + * Sets the theme via `theme` to either "light" or "dark", + * and updates the internal styling to match. Requires a redraw + * to see the effects. + */ + setTheme: function (theme) { + theme = theme || "light"; + let mainColor = getColor(this.mainColor || "highlight-blue", theme); + this.backgroundColor = getColor("body-background", theme); + this.strokeColor = mainColor; + this.backgroundGradientStart = setAlpha(mainColor, 0.2); + this.backgroundGradientEnd = setAlpha(mainColor, 0.2); + this.selectionBackgroundColor = setAlpha(getColor(SELECTION_BACKGROUND_COLOR_NAME, theme), 0.25); + this.selectionStripesColor = "rgba(255, 255, 255, 0.1)"; + this.maximumLineColor = setAlpha(mainColor, 0.4); + this.averageLineColor = setAlpha(mainColor, 0.7); + this.minimumLineColor = setAlpha(mainColor, 0.9); + } +}); + +/** + * Constructor for the framerate graph. Inherits from PerformanceGraph. + * + * @param nsIDOMNode parent + * The parent node holding the overview. + */ +function FramerateGraph(parent) { + PerformanceGraph.call(this, parent, ProfilerGlobal.L10N.getStr("graphs.fps")); +} + +FramerateGraph.prototype = Heritage.extend(PerformanceGraph.prototype, { + mainColor: FRAMERATE_GRAPH_COLOR_NAME +}); + +exports.FramerateGraph = FramerateGraph; + +/** + * Constructor for the memory graph. Inherits from PerformanceGraph. + * + * @param nsIDOMNode parent + * The parent node holding the overview. + */ +function MemoryGraph(parent) { + PerformanceGraph.call(this, parent, TimelineGlobal.L10N.getStr("graphs.memory")); +} + +MemoryGraph.prototype = Heritage.extend(PerformanceGraph.prototype, { + mainColor: MEMORY_GRAPH_COLOR_NAME +}); + +exports.MemoryGraph = MemoryGraph; diff --git a/browser/devtools/performance/moz.build b/browser/devtools/performance/moz.build index 54091e173499..301fa6d85c45 100644 --- a/browser/devtools/performance/moz.build +++ b/browser/devtools/performance/moz.build @@ -7,6 +7,7 @@ EXTRA_JS_MODULES.devtools.performance += [ 'modules/compatibility.js', 'modules/front.js', 'modules/io.js', + 'modules/performance-graphs.js', 'modules/recording-model.js', 'modules/recording-utils.js', 'panel.js' diff --git a/browser/devtools/performance/performance-controller.js b/browser/devtools/performance/performance-controller.js index a3e52bdc76ce..3f9f18682b25 100644 --- a/browser/devtools/performance/performance-controller.js +++ b/browser/devtools/performance/performance-controller.js @@ -27,10 +27,12 @@ devtools.lazyRequireGetter(this, "RecordingUtils", "devtools/performance/recording-utils", true); devtools.lazyRequireGetter(this, "RecordingModel", "devtools/performance/recording-model", true); +devtools.lazyRequireGetter(this, "FramerateGraph", + "devtools/performance/performance-graphs", true); +devtools.lazyRequireGetter(this, "MemoryGraph", + "devtools/performance/performance-graphs", true); devtools.lazyRequireGetter(this, "MarkersOverview", "devtools/shared/timeline/markers-overview", true); -devtools.lazyRequireGetter(this, "MemoryOverview", - "devtools/shared/timeline/memory-overview", true); devtools.lazyRequireGetter(this, "Waterfall", "devtools/shared/timeline/waterfall", true); devtools.lazyRequireGetter(this, "MarkerDetails", @@ -48,14 +50,14 @@ devtools.lazyRequireGetter(this, "OptionsView", devtools.lazyImporter(this, "CanvasGraphUtils", "resource:///modules/devtools/Graphs.jsm"); -devtools.lazyImporter(this, "LineGraphWidget", - "resource:///modules/devtools/Graphs.jsm"); devtools.lazyImporter(this, "FlameGraphUtils", "resource:///modules/devtools/FlameGraph.jsm"); devtools.lazyImporter(this, "FlameGraph", "resource:///modules/devtools/FlameGraph.jsm"); devtools.lazyImporter(this, "SideMenuWidget", "resource:///modules/devtools/SideMenuWidget.jsm"); +devtools.lazyImporter(this, "PluralForm", + "resource://gre/modules/PluralForm.jsm"); const BRANCH_NAME = "devtools.performance.ui."; diff --git a/browser/devtools/performance/test/browser.ini b/browser/devtools/performance/test/browser.ini index ab202744d90f..53258b788108 100644 --- a/browser/devtools/performance/test/browser.ini +++ b/browser/devtools/performance/test/browser.ini @@ -99,6 +99,7 @@ support-files = [browser_profiler_tree-model-04.js] [browser_profiler_tree-model-05.js] [browser_profiler_tree-model-06.js] +[browser_profiler_tree-model-07.js] [browser_profiler_tree-view-01.js] [browser_profiler_tree-view-02.js] [browser_profiler_tree-view-03.js] @@ -106,5 +107,6 @@ support-files = [browser_profiler_tree-view-05.js] [browser_profiler_tree-view-06.js] [browser_profiler_tree-view-07.js] +[browser_profiler_tree-view-08.js] [browser_timeline_blueprint.js] [browser_timeline_filters.js] diff --git a/browser/devtools/performance/test/browser_profiler_tree-model-07.js b/browser/devtools/performance/test/browser_profiler_tree-model-07.js new file mode 100644 index 000000000000..58960930e3d0 --- /dev/null +++ b/browser/devtools/performance/test/browser_profiler_tree-model-07.js @@ -0,0 +1,91 @@ +/* Any copyright is dedicated to the Public Domain. + http://creativecommons.org/publicdomain/zero/1.0/ */ + +/** + * Tests that when displaying only content nodes, platform nodes are generalized. + */ + +let { CATEGORY_MASK } = devtools.require("devtools/shared/profiler/global"); + +function test() { + let { ThreadNode } = devtools.require("devtools/shared/profiler/tree-model"); + let url = (n) => `http://content/${n}`; + + // Create a root node from a given samples array. + + let root = new ThreadNode(gSamples, { contentOnly: true }); + + /* + * should have a tree like: + * root + * - (JS) + * - A + * - (GC) + * - B + * - C + * - D + * - E + * - F + * - (JS) + */ + + // Test the root node. + + is(Object.keys(root.calls).length, 2, "root has 2 children"); + ok(root.calls[url("A")], "root has content child"); + ok(root.calls["64"], "root has platform generalized child"); + is(Object.keys(root.calls["64"].calls).length, 0, "platform generalized child is a leaf."); + + ok(root.calls[url("A")].calls["128"], "A has platform generalized child of another type"); + is(Object.keys(root.calls[url("A")].calls["128"].calls).length, 0, "second generalized type is a leaf."); + + ok(root.calls[url("A")].calls[url("E")].calls[url("F")].calls["64"], + "a second leaf of the first generalized type exists deep in the tree."); + ok(root.calls[url("A")].calls["128"], "A has platform generalized child of another type"); + + is(root.calls["64"].category, root.calls[url("A")].calls[url("E")].calls[url("F")].calls["64"].category, + "generalized frames of same type are duplicated in top-down view"); + finish(); +} + +let gSamples = [{ + time: 5, + frames: [ + { location: "(root)" }, + { location: "http://content/A" }, + { location: "http://content/B" }, + { location: "http://content/C" } + ] +}, { + time: 5 + 6, + frames: [ + { location: "(root)" }, + { location: "http://content/A" }, + { location: "http://content/B" }, + { location: "contentY", category: CATEGORY_MASK("css") }, + { location: "http://content/D" } + ] +}, { + time: 5 + 6 + 7, + frames: [ + { location: "(root)" }, + { location: "http://content/A" }, + { location: "contentY", category: CATEGORY_MASK("css") }, + { location: "http://content/E" }, + { location: "http://content/F" }, + { location: "contentY", category: CATEGORY_MASK("js") }, + ] +}, { + time: 5 + 20, + frames: [ + { location: "(root)" }, + { location: "contentX", category: CATEGORY_MASK("js") }, + ] +}, { + time: 5 + 25, + frames: [ + { location: "(root)" }, + { location: "http://content/A" }, + { location: "contentZ", category: CATEGORY_MASK("gc", 1) }, + ] +}]; diff --git a/browser/devtools/performance/test/browser_profiler_tree-view-08.js b/browser/devtools/performance/test/browser_profiler_tree-view-08.js new file mode 100644 index 000000000000..7403d28e4c0d --- /dev/null +++ b/browser/devtools/performance/test/browser_profiler_tree-view-08.js @@ -0,0 +1,104 @@ +/* Any copyright is dedicated to the Public Domain. + http://creativecommons.org/publicdomain/zero/1.0/ */ + +/** + * Tests that the profiler's tree view renders generalized platform data + * when `contentOnly` is on correctly. + */ + +let { CATEGORY_MASK } = devtools.require("devtools/shared/profiler/global"); + +function test() { + let { ThreadNode } = devtools.require("devtools/shared/profiler/tree-model"); + let { CallView } = devtools.require("devtools/shared/profiler/tree-view"); + + /* + * should have a tree like: + * root + * - A + * - B + * - C + * - D + * - E + * - F + * - (JS) + * - (GC) + * - (JS) + */ + + let threadNode = new ThreadNode(gSamples, { contentOnly: true }); + let treeRoot = new CallView({ frame: threadNode, autoExpandDepth: 10 }); + + let container = document.createElement("vbox"); + treeRoot.attachTo(container); + + let A = treeRoot.getChild(0); + let JS = treeRoot.getChild(1); + let GC = A.getChild(1); + let JS2 = A.getChild(2).getChild().getChild(); + + is(JS.target.getAttribute("category"), "js", + "Generalized JS node has correct category"); + is(JS.target.getAttribute("tooltiptext"), "JIT", + "Generalized JS node has correct category"); + is(JS.target.querySelector(".call-tree-name").getAttribute("value"), "JIT", + "Generalized JS node has correct display value as just the category name."); + + is(JS2.target.getAttribute("category"), "js", + "Generalized second JS node has correct category"); + is(JS2.target.getAttribute("tooltiptext"), "JIT", + "Generalized second JS node has correct category"); + is(JS2.target.querySelector(".call-tree-name").getAttribute("value"), "JIT", + "Generalized second JS node has correct display value as just the category name."); + + is(GC.target.getAttribute("category"), "gc", + "Generalized GC node has correct category"); + is(GC.target.getAttribute("tooltiptext"), "GC", + "Generalized GC node has correct category"); + is(GC.target.querySelector(".call-tree-name").getAttribute("value"), "GC", + "Generalized GC node has correct display value as just the category name."); + + finish(); +} + +let gSamples = [{ + time: 5, + frames: [ + { location: "(root)" }, + { location: "http://content/A" }, + { location: "http://content/B" }, + { location: "http://content/C" } + ] +}, { + time: 5 + 6, + frames: [ + { location: "(root)" }, + { location: "http://content/A" }, + { location: "http://content/B" }, + { location: "contentY", category: CATEGORY_MASK("css") }, + { location: "http://content/D" } + ] +}, { + time: 5 + 6 + 7, + frames: [ + { location: "(root)" }, + { location: "http://content/A" }, + { location: "contentY", category: CATEGORY_MASK("css") }, + { location: "http://content/E" }, + { location: "http://content/F" }, + { location: "contentY", category: CATEGORY_MASK("js") }, + ] +}, { + time: 5 + 20, + frames: [ + { location: "(root)" }, + { location: "contentX", category: CATEGORY_MASK("js") }, + ] +}, { + time: 5 + 25, + frames: [ + { location: "(root)" }, + { location: "http://content/A" }, + { location: "contentZ", category: CATEGORY_MASK("gc", 1) }, + ] +}]; diff --git a/browser/devtools/performance/test/browser_timeline_blueprint.js b/browser/devtools/performance/test/browser_timeline_blueprint.js index 81ea630d4cea..63810547928b 100644 --- a/browser/devtools/performance/test/browser_timeline_blueprint.js +++ b/browser/devtools/performance/test/browser_timeline_blueprint.js @@ -17,10 +17,8 @@ function spawnTest () { for (let [key, value] of Iterator(TIMELINE_BLUEPRINT)) { ok("group" in value, "Each entry in the timeline blueprint contains a `group` key."); - ok("fill" in value, - "Each entry in the timeline blueprint contains a `fill` key."); - ok("stroke" in value, - "Each entry in the timeline blueprint contains a `stroke` key."); + ok("colorName" in value, + "Each entry in the timeline blueprint contains a `colorName` key."); ok("label" in value, "Each entry in the timeline blueprint contains a `label` key."); } diff --git a/browser/devtools/performance/views/jit-optimizations.js b/browser/devtools/performance/views/jit-optimizations.js index 5a18fe376b8d..6bc68cdd02dc 100644 --- a/browser/devtools/performance/views/jit-optimizations.js +++ b/browser/devtools/performance/views/jit-optimizations.js @@ -5,7 +5,7 @@ const URL_LABEL_TOOLTIP = L10N.getStr("table.url.tooltiptext"); const OPTIMIZATION_FAILURE = L10N.getStr("jit.optimizationFailure"); -const JIT_SAMPLES = L10N.getStr("jit.samples"); +const JIT_SAMPLES = L10N.getStr("jit.samples2"); const JIT_EMPTY_TEXT = L10N.getStr("jit.empty"); /** @@ -209,7 +209,8 @@ let JITOptimizationsView = { node.appendChild(icon); } - desc.textContent = `${lastStrategy} - (${site.samples} ${JIT_SAMPLES})`; + let sampleString = PluralForm.get(site.samples, JIT_SAMPLES).replace("#1", site.samples); + desc.textContent = `${lastStrategy} – (${sampleString})`; line.textContent = site.data.line; line.className = "opt-line"; column.textContent = site.data.column; diff --git a/browser/devtools/performance/views/overview.js b/browser/devtools/performance/views/overview.js index 9d320f9ca1d2..cb70473a783b 100644 --- a/browser/devtools/performance/views/overview.js +++ b/browser/devtools/performance/views/overview.js @@ -11,11 +11,9 @@ const OVERVIEW_UPDATE_INTERVAL = 200; // ms const FRAMERATE_GRAPH_LOW_RES_INTERVAL = 100; // ms const FRAMERATE_GRAPH_HIGH_RES_INTERVAL = 16; // ms -const FRAMERATE_GRAPH_HEIGHT = 40; // px const MARKERS_GRAPH_HEADER_HEIGHT = 14; // px const MARKERS_GRAPH_ROW_HEIGHT = 10; // px const MARKERS_GROUP_VERTICAL_PADDING = 4; // px -const MEMORY_GRAPH_HEIGHT = 30; // px /** * View handler for the overview panel's time view, displaying @@ -101,6 +99,11 @@ let OverviewView = { setTheme: function (options={}) { let theme = options.theme || PerformanceController.getTheme(); + if (this.framerateGraph) { + this.framerateGraph.setTheme(theme); + this.framerateGraph.refresh({ force: options.redraw }); + } + if (this.markersOverview) { this.markersOverview.setTheme(theme); this.markersOverview.refresh({ force: options.redraw }); @@ -191,8 +194,7 @@ let OverviewView = { yield this.memoryOverview.ready(); return true; } - this.memoryOverview = new MemoryOverview($("#memory-overview")); - this.memoryOverview.fixedHeight = MEMORY_GRAPH_HEIGHT; + this.memoryOverview = new MemoryGraph($("#memory-overview")); yield this.memoryOverview.ready(); this.setTheme(); @@ -216,10 +218,9 @@ let OverviewView = { yield this.framerateGraph.ready(); return true; } - let metric = L10N.getStr("graphs.fps"); - this.framerateGraph = new LineGraphWidget($("#time-framerate"), { metric }); - this.framerateGraph.fixedHeight = FRAMERATE_GRAPH_HEIGHT; + this.framerateGraph = new FramerateGraph($("#time-framerate")); yield this.framerateGraph.ready(); + this.setTheme(); CanvasGraphUtils.linkAnimation(this.markersOverview, this.framerateGraph); CanvasGraphUtils.linkSelection(this.markersOverview, this.framerateGraph); diff --git a/browser/devtools/performance/views/toolbar.js b/browser/devtools/performance/views/toolbar.js index 63e6e922ed36..4df132297bbb 100644 --- a/browser/devtools/performance/views/toolbar.js +++ b/browser/devtools/performance/views/toolbar.js @@ -53,14 +53,10 @@ let ToolbarView = { menuitem.setAttribute("flex", "1"); menuitem.setAttribute("label", markerDetails.label); menuitem.setAttribute("marker-type", markerName); + menuitem.className = markerDetails.colorName; menuitem.addEventListener("command", this._onHiddenMarkersChanged); - // Style used by pseudo element ::before in performance.inc.css - let bulletStyle = `--bullet-bg: ${markerDetails.fill};` - bulletStyle += `--bullet-border: ${markerDetails.stroke}`; - menuitem.setAttribute("style", bulletStyle); - $("#performance-filter-menupopup").appendChild(menuitem); } }, diff --git a/browser/devtools/shared/moz.build b/browser/devtools/shared/moz.build index 2430e6cd29ec..552c6342565d 100644 --- a/browser/devtools/shared/moz.build +++ b/browser/devtools/shared/moz.build @@ -42,7 +42,6 @@ EXTRA_JS_MODULES.devtools.shared.timeline += [ 'timeline/global.js', 'timeline/marker-details.js', 'timeline/markers-overview.js', - 'timeline/memory-overview.js', 'timeline/waterfall.js', ] diff --git a/browser/devtools/shared/profiler/tree-model.js b/browser/devtools/shared/profiler/tree-model.js index 1b79dca89bb8..7f87874a5ee3 100644 --- a/browser/devtools/shared/profiler/tree-model.js +++ b/browser/devtools/shared/profiler/tree-model.js @@ -4,16 +4,21 @@ "use strict"; const {Cc, Ci, Cu, Cr} = require("chrome"); +const {extend} = require("sdk/util/object"); loader.lazyRequireGetter(this, "Services"); loader.lazyRequireGetter(this, "L10N", "devtools/shared/profiler/global", true); loader.lazyRequireGetter(this, "CATEGORY_MAPPINGS", "devtools/shared/profiler/global", true); +loader.lazyRequireGetter(this, "CATEGORIES", + "devtools/shared/profiler/global", true); loader.lazyRequireGetter(this, "CATEGORY_JIT", "devtools/shared/profiler/global", true); loader.lazyRequireGetter(this, "JITOptimizations", "devtools/shared/profiler/jit", true); +loader.lazyRequireGetter(this, "CATEGORY_OTHER", + "devtools/shared/profiler/global", true); const CHROME_SCHEMES = ["chrome://", "resource://", "jar:file://"]; const CONTENT_SCHEMES = ["http://", "https://", "file://", "app://"]; @@ -97,7 +102,7 @@ ThreadNode.prototype = { // should be taken into consideration. if (options.contentOnly) { // The (root) node is not considered a content function, it'll be removed. - sampleFrames = sampleFrames.filter(isContent); + sampleFrames = filterPlatformData(sampleFrames); } else { // Remove the (root) node manually. sampleFrames = sampleFrames.slice(1); @@ -161,8 +166,11 @@ ThreadNode.prototype = { * The category type of this function call ("js", "graphics" etc.). * @param number allocations * The number of memory allocations performed in this frame. + * @param boolean isMetaCategory + * Whether or not this is a platform node that should appear as a + * generalized meta category or not. */ -function FrameNode({ location, line, column, category, allocations }) { +function FrameNode({ location, line, column, category, allocations, isMetaCategory }) { this.location = location; this.line = line; this.column = column; @@ -173,6 +181,7 @@ function FrameNode({ location, line, column, category, allocations }) { this.duration = 0; this.calls = {}; this._optimizations = null; + this.isMetaCategory = isMetaCategory; } FrameNode.prototype = { @@ -202,8 +211,12 @@ FrameNode.prototype = { if (!frame) { return; } - let location = frame.location; - let child = _store[location] || (_store[location] = new FrameNode(frame)); + // If we are only displaying content, then platform data will have + // a `isMetaCategory` property. Group by category (GC, Graphics, etc.) + // to group together frames so they're displayed only once, since we don't + // need the location anyway. + let key = frame.isMetaCategory ? frame.category : frame.location; + let child = _store[key] || (_store[key] = new FrameNode(frame)); child.sampleTimes.push({ start: time, end: time + duration }); child.samples++; child.duration += duration; @@ -273,7 +286,8 @@ FrameNode.prototype = { line: line, column: column, categoryData: categoryData, - isContent: !!isContent(this) + isContent: !!isContent(this), + isMetaCategory: this.isMetaCategory }; }, @@ -332,3 +346,47 @@ function nsIURL(url) { // The cache used in the `nsIURL` function. let gNSURLStore = new Map(); + +/** + * This filters out platform data frames in a sample. With latest performance + * tool in Fx40, when displaying only content, we still filter out all platform data, + * except we generalize platform data that are leaves. We do this because of two + * observations: + * + * 1. The leaf is where time is _actually_ being spent, so we _need_ to show it + * to developers in some way to give them accurate profiling data. We decide to + * split the platform into various category buckets and just show time spent in + * each bucket. + * + * 2. The calls leading to the leaf _aren't_ where we are spending time, but + * _do_ give the developer context for how they got to the leaf where they _are_ + * spending time. For non-platform hackers, the non-leaf platform frames don't + * give any meaningful context, and so we can safely filter them out. + * + * Example transformations: + * Before: PlatformA -> PlatformB -> ContentA -> ContentB + * After: ContentA -> ContentB + * + * Before: PlatformA -> ContentA -> PlatformB -> PlatformC + * After: ContentA -> Category(PlatformC) + */ +function filterPlatformData (frames) { + let result = []; + let last = frames.length - 1; + let frame; + + for (let i = 0; i < frames.length; i++) { + frame = frames[i]; + if (isContent(frame)) { + result.push(frame); + } else if (last === i) { + // Extend here so we're not destructively editing + // the original profiler data. Set isMetaCategory `true`, + // and ensure we have a category set by default, because that's how + // the generalized frame nodes are organized. + result.push(extend({ isMetaCategory: true, category: CATEGORY_OTHER }, frame)); + } + } + + return result; +} diff --git a/browser/devtools/shared/profiler/tree-view.js b/browser/devtools/shared/profiler/tree-view.js index 16e45b1fb2c3..eb67806f25dd 100644 --- a/browser/devtools/shared/profiler/tree-view.js +++ b/browser/devtools/shared/profiler/tree-view.js @@ -187,7 +187,8 @@ CallView.prototype = Heritage.extend(AbstractTreeItem.prototype, { targetNode.className = "call-tree-item"; targetNode.setAttribute("origin", frameInfo.isContent ? "content" : "chrome"); targetNode.setAttribute("category", frameInfo.categoryData.abbrev || ""); - targetNode.setAttribute("tooltiptext", this.frame.location || ""); + targetNode.setAttribute("tooltiptext", frameInfo.isMetaCategory ? frameInfo.categoryData.label : + this.frame.location || ""); if (this.hidden) { targetNode.style.display = "none"; } @@ -309,48 +310,53 @@ CallView.prototype = Heritage.extend(AbstractTreeItem.prototype, { nameNode.className = "plain call-tree-name"; nameNode.setAttribute("flex", "1"); nameNode.setAttribute("crop", "end"); - nameNode.setAttribute("value", frameInfo.functionName || ""); + nameNode.setAttribute("value", frameInfo.isMetaCategory + ? frameInfo.categoryData.label + : frameInfo.functionName || ""); cell.appendChild(nameNode); - let urlNode = this.document.createElement("label"); - urlNode.className = "plain call-tree-url"; - urlNode.setAttribute("flex", "1"); - urlNode.setAttribute("crop", "end"); - urlNode.setAttribute("value", frameInfo.fileName || ""); - urlNode.setAttribute("tooltiptext", URL_LABEL_TOOLTIP + " → " + frameInfo.url); - urlNode.addEventListener("mousedown", this._onUrlClick); - cell.appendChild(urlNode); + // Don't render detailed labels for meta category frames + if (!frameInfo.isMetaCategory) { + let urlNode = this.document.createElement("label"); + urlNode.className = "plain call-tree-url"; + urlNode.setAttribute("flex", "1"); + urlNode.setAttribute("crop", "end"); + urlNode.setAttribute("value", frameInfo.fileName || ""); + urlNode.setAttribute("tooltiptext", URL_LABEL_TOOLTIP + " → " + frameInfo.url); + urlNode.addEventListener("mousedown", this._onUrlClick); + cell.appendChild(urlNode); - let lineNode = this.document.createElement("label"); - lineNode.className = "plain call-tree-line"; - lineNode.setAttribute("value", frameInfo.line ? ":" + frameInfo.line : ""); - cell.appendChild(lineNode); + let lineNode = this.document.createElement("label"); + lineNode.className = "plain call-tree-line"; + lineNode.setAttribute("value", frameInfo.line ? ":" + frameInfo.line : ""); + cell.appendChild(lineNode); - let columnNode = this.document.createElement("label"); - columnNode.className = "plain call-tree-column"; - columnNode.setAttribute("value", frameInfo.column ? ":" + frameInfo.column : ""); - cell.appendChild(columnNode); + let columnNode = this.document.createElement("label"); + columnNode.className = "plain call-tree-column"; + columnNode.setAttribute("value", frameInfo.column ? ":" + frameInfo.column : ""); + cell.appendChild(columnNode); - let hostNode = this.document.createElement("label"); - hostNode.className = "plain call-tree-host"; - hostNode.setAttribute("value", frameInfo.hostName || ""); - cell.appendChild(hostNode); + let hostNode = this.document.createElement("label"); + hostNode.className = "plain call-tree-host"; + hostNode.setAttribute("value", frameInfo.hostName || ""); + cell.appendChild(hostNode); - let zoomNode = this.document.createElement("button"); - zoomNode.className = "plain call-tree-zoom"; - zoomNode.setAttribute("tooltiptext", ZOOM_BUTTON_TOOLTIP); - zoomNode.addEventListener("mousedown", this._onZoomClick); - cell.appendChild(zoomNode); + let zoomNode = this.document.createElement("button"); + zoomNode.className = "plain call-tree-zoom"; + zoomNode.setAttribute("tooltiptext", ZOOM_BUTTON_TOOLTIP); + zoomNode.addEventListener("mousedown", this._onZoomClick); + cell.appendChild(zoomNode); - let spacerNode = this.document.createElement("spacer"); - spacerNode.setAttribute("flex", "10000"); - cell.appendChild(spacerNode); + let spacerNode = this.document.createElement("spacer"); + spacerNode.setAttribute("flex", "10000"); + cell.appendChild(spacerNode); - let categoryNode = this.document.createElement("label"); - categoryNode.className = "plain call-tree-category"; - categoryNode.style.color = frameInfo.categoryData.color; - categoryNode.setAttribute("value", frameInfo.categoryData.label || ""); - cell.appendChild(categoryNode); + let categoryNode = this.document.createElement("label"); + categoryNode.className = "plain call-tree-category"; + categoryNode.style.color = frameInfo.categoryData.color; + categoryNode.setAttribute("value", frameInfo.categoryData.label || ""); + cell.appendChild(categoryNode); + } let hasDescendants = Object.keys(this.frame.calls).length > 0; if (hasDescendants == false) { diff --git a/browser/devtools/shared/timeline/global.js b/browser/devtools/shared/timeline/global.js index 913a37afe711..24f94a302e16 100644 --- a/browser/devtools/shared/timeline/global.js +++ b/browser/devtools/shared/timeline/global.js @@ -18,9 +18,11 @@ const L10N = new ViewHelpers.L10N(STRINGS_URI); * to marker names, while the values are objects with the following format: * - group: the row index in the timeline overview graph; multiple markers * can be added on the same row. @see - * - fill: a fill color used when drawing the marker - * - stroke: a stroke color used when drawing the marker * - label: the label used in the waterfall to identify the marker + * - colorName: the name of the DevTools color used for this marker. If adding + * a new color, be sure to check that there's an entry for + * `.marker-details-bullet.{COLORNAME}` for the equivilent entry. + * https://developer.mozilla.org/en-US/docs/Tools/DevToolsColors * * Whenever this is changed, browser_timeline_waterfall-styles.js *must* be * updated as well. @@ -28,38 +30,32 @@ const L10N = new ViewHelpers.L10N(STRINGS_URI); const TIMELINE_BLUEPRINT = { "Styles": { group: 0, - fill: "hsl(285,50%,68%)", - stroke: "hsl(285,50%,48%)", + colorName: "highlight-pink", label: L10N.getStr("timeline.label.styles2") }, "Reflow": { group: 0, - fill: "hsl(285,50%,68%)", - stroke: "hsl(285,50%,48%)", + colorName: "highlight-pink", label: L10N.getStr("timeline.label.reflow2") }, "Paint": { group: 0, - fill: "hsl(104,57%,71%)", - stroke: "hsl(104,57%,51%)", + colorName: "highlight-green", label: L10N.getStr("timeline.label.paint") }, "DOMEvent": { group: 1, - fill: "hsl(39,82%,69%)", - stroke: "hsl(39,82%,49%)", + colorName: "highlight-lightorange", label: L10N.getStr("timeline.label.domevent") }, "Javascript": { group: 1, - fill: "hsl(39,82%,69%)", - stroke: "hsl(39,82%,49%)", + colorName: "highlight-lightorange", label: L10N.getStr("timeline.label.javascript2") }, "ConsoleTime": { group: 2, - fill: "hsl(0,0%,80%)", - stroke: "hsl(0,0%,60%)", + colorName: "highlight-bluegrey", label: L10N.getStr("timeline.label.consoleTime") }, }; diff --git a/browser/devtools/shared/timeline/marker-details.js b/browser/devtools/shared/timeline/marker-details.js index 5e3b64d3c400..7e9dff585a94 100644 --- a/browser/devtools/shared/timeline/marker-details.js +++ b/browser/devtools/shared/timeline/marker-details.js @@ -64,9 +64,7 @@ MarkerDetails.prototype = { hbox.setAttribute("align", "center"); let bullet = this._document.createElement("hbox"); - bullet.className = "marker-details-bullet"; - bullet.style.backgroundColor = blueprint.fill; - bullet.style.borderColor = blueprint.stroke; + bullet.className = `marker-details-bullet ${blueprint.colorName}`; let label = this._document.createElement("label"); label.className = "marker-details-type"; diff --git a/browser/devtools/shared/timeline/markers-overview.js b/browser/devtools/shared/timeline/markers-overview.js index a333f54b625e..0df40bac194a 100644 --- a/browser/devtools/shared/timeline/markers-overview.js +++ b/browser/devtools/shared/timeline/markers-overview.js @@ -169,12 +169,8 @@ MarkersOverview.prototype = Heritage.extend(AbstractCanvasGraph.prototype, { let top = headerHeight + style.group * groupHeight + groupPadding / 2; let height = groupHeight - groupPadding; - let gradient = ctx.createLinearGradient(0, top, 0, top + height); - gradient.addColorStop(OVERVIEW_MARKERS_COLOR_STOPS[0], style.stroke); - gradient.addColorStop(OVERVIEW_MARKERS_COLOR_STOPS[1], style.fill); - gradient.addColorStop(OVERVIEW_MARKERS_COLOR_STOPS[2], style.fill); - gradient.addColorStop(OVERVIEW_MARKERS_COLOR_STOPS[3], style.stroke); - ctx.fillStyle = gradient; + let color = getColor(style.colorName, this.theme); + ctx.fillStyle = color; ctx.beginPath(); for (let { start, end } of batch) { @@ -226,7 +222,7 @@ MarkersOverview.prototype = Heritage.extend(AbstractCanvasGraph.prototype, { * to see the effects. */ setTheme: function (theme) { - theme = theme || "light"; + this.theme = theme = theme || "light"; this.backgroundColor = getColor("body-background", theme); this.selectionBackgroundColor = setAlpha(getColor("selection-background", theme), 0.25); this.selectionStripesColor = setAlpha("#fff", 0.1); diff --git a/browser/devtools/shared/timeline/memory-overview.js b/browser/devtools/shared/timeline/memory-overview.js deleted file mode 100644 index 6b59ee55d46f..000000000000 --- a/browser/devtools/shared/timeline/memory-overview.js +++ /dev/null @@ -1,80 +0,0 @@ -/* 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/. */ -"use strict"; - -/** - * This file contains the "memory overview" graph, a simple representation of - * of all the memory measurements taken while streaming the timeline data. - */ - -const {Cc, Ci, Cu, Cr} = require("chrome"); - -Cu.import("resource:///modules/devtools/Graphs.jsm"); -Cu.import("resource:///modules/devtools/ViewHelpers.jsm"); - -const { colorUtils: { setAlpha }} = require("devtools/css-color"); -const { getColor } = require("devtools/shared/theme"); - -loader.lazyRequireGetter(this, "L10N", - "devtools/shared/timeline/global", true); - -const OVERVIEW_DAMPEN_VALUES = 0.95; - -const OVERVIEW_HEIGHT = 30; // px -const OVERVIEW_STROKE_WIDTH = 1; // px -const OVERVIEW_MAXIMUM_LINE_COLOR = "rgba(0,136,204,0.4)"; -const OVERVIEW_AVERAGE_LINE_COLOR = "rgba(0,136,204,0.7)"; -const OVERVIEW_MINIMUM_LINE_COLOR = "rgba(0,136,204,0.9)"; -const OVERVIEW_CLIPHEAD_LINE_COLOR = "#666"; -const OVERVIEW_SELECTION_LINE_COLOR = "#555"; - -/** - * An overview for the memory data. - * - * @param nsIDOMNode parent - * The parent node holding the overview. - */ -function MemoryOverview(parent) { - LineGraphWidget.call(this, parent, { metric: L10N.getStr("graphs.memory") }); - this.setTheme(); -} - -MemoryOverview.prototype = Heritage.extend(LineGraphWidget.prototype, { - dampenValuesFactor: OVERVIEW_DAMPEN_VALUES, - fixedHeight: OVERVIEW_HEIGHT, - strokeWidth: OVERVIEW_STROKE_WIDTH, - maximumLineColor: OVERVIEW_MAXIMUM_LINE_COLOR, - averageLineColor: OVERVIEW_AVERAGE_LINE_COLOR, - minimumLineColor: OVERVIEW_MINIMUM_LINE_COLOR, - clipheadLineColor: OVERVIEW_CLIPHEAD_LINE_COLOR, - selectionLineColor: OVERVIEW_SELECTION_LINE_COLOR, - withTooltipArrows: false, - withFixedTooltipPositions: true, - - /** - * Disables selection and empties this graph. - */ - clearView: function() { - this.selectionEnabled = false; - this.dropSelection(); - this.setData([]); - }, - - /** - * Sets the theme via `theme` to either "light" or "dark", - * and updates the internal styling to match. Requires a redraw - * to see the effects. - */ - setTheme: function (theme) { - theme = theme || "light"; - this.backgroundColor = getColor("body-background", theme); - this.backgroundGradientStart = setAlpha(getColor("highlight-blue", theme), 0.2); - this.backgroundGradientEnd = setAlpha(getColor("highlight-blue", theme), 0.05); - this.strokeColor = getColor("highlight-blue", theme); - this.selectionBackgroundColor = setAlpha(getColor("selection-background", theme), 0.25); - this.selectionStripesColor = "rgba(255, 255, 255, 0.1)"; - } -}); - -exports.MemoryOverview = MemoryOverview; diff --git a/browser/devtools/shared/timeline/waterfall.js b/browser/devtools/shared/timeline/waterfall.js index a74569a97932..2335d4117592 100644 --- a/browser/devtools/shared/timeline/waterfall.js +++ b/browser/devtools/shared/timeline/waterfall.js @@ -432,9 +432,7 @@ Waterfall.prototype = { sidebar.setAttribute("align", "center"); let bullet = this._document.createElement("hbox"); - bullet.className = "waterfall-marker-bullet"; - bullet.style.backgroundColor = blueprint.fill; - bullet.style.borderColor = blueprint.stroke; + bullet.className = `waterfall-marker-bullet ${blueprint.colorName}`; bullet.setAttribute("type", marker.name); sidebar.appendChild(bullet); @@ -483,12 +481,8 @@ Waterfall.prototype = { let offset = this._isRTL ? this._waterfallWidth : 0; let bar = this._document.createElement("hbox"); - bar.className = "waterfall-marker-bar"; - bar.style.backgroundColor = blueprint.fill; - bar.style.borderColor = blueprint.stroke; + bar.className = `waterfall-marker-bar ${blueprint.colorName}`; bar.style.transform = "translateX(" + (start - offset) + "px)"; - // Save border color. It will change when marker is selected. - bar.setAttribute("borderColor", blueprint.stroke); bar.setAttribute("type", marker.name); bar.setAttribute("width", Math.max(width, WATERFALL_MARKER_BAR_WIDTH_MIN)); waterfall.appendChild(bar); diff --git a/browser/devtools/shared/widgets/SideMenuWidget.jsm b/browser/devtools/shared/widgets/SideMenuWidget.jsm index 9f79e6c893d8..6e13b46073a5 100644 --- a/browser/devtools/shared/widgets/SideMenuWidget.jsm +++ b/browser/devtools/shared/widgets/SideMenuWidget.jsm @@ -22,6 +22,7 @@ this.EXPORTED_SYMBOLS = ["SideMenuWidget"]; * @param nsIDOMNode aNode * The element associated with the widget. * @param Object aOptions + * - contextMenu: optional element or element ID that serves as a context menu. * - showArrows: specifies if items should display horizontal arrows. * - showItemCheckboxes: specifies if items should display checkboxes. * - showGroupCheckboxes: specifies if groups should display checkboxes. @@ -31,7 +32,8 @@ this.SideMenuWidget = function SideMenuWidget(aNode, aOptions={}) { this.window = this.document.defaultView; this._parent = aNode; - let { showArrows, showItemCheckboxes, showGroupCheckboxes } = aOptions; + let { contextMenu, showArrows, showItemCheckboxes, showGroupCheckboxes } = aOptions; + this._contextMenu = contextMenu || null; this._showArrows = showArrows || false; this._showItemCheckboxes = showItemCheckboxes || false; this._showGroupCheckboxes = showGroupCheckboxes || false; @@ -45,6 +47,7 @@ this.SideMenuWidget = function SideMenuWidget(aNode, aOptions={}) { this._list.setAttribute("with-item-checkboxes", this._showItemCheckboxes); this._list.setAttribute("with-group-checkboxes", this._showGroupCheckboxes); this._list.setAttribute("tabindex", "0"); + this._list.addEventListener("contextmenu", e => this._showContextMenu(e), false); this._list.addEventListener("keypress", e => this.emit("keyPress", e), false); this._list.addEventListener("mousedown", e => this.emit("mousePress", e), false); this._parent.appendChild(this._list); @@ -389,6 +392,17 @@ SideMenuWidget.prototype = { } }, + /** + * Shows the contextMenu element. + */ + _showContextMenu: function(e) { + if (!this._contextMenu) { + return; + } + + this._contextMenu.openPopupAtScreen(e.screenX, e.screenY, true); + }, + window: null, document: null, _showArrows: false, diff --git a/browser/locales/en-US/chrome/browser/devtools/debugger.dtd b/browser/locales/en-US/chrome/browser/devtools/debugger.dtd index 79ea0a20f8ed..63879c7aba9e 100644 --- a/browser/locales/en-US/chrome/browser/devtools/debugger.dtd +++ b/browser/locales/en-US/chrome/browser/devtools/debugger.dtd @@ -198,3 +198,17 @@ + + + + + + + + + diff --git a/browser/locales/en-US/chrome/browser/devtools/gclicommands.properties b/browser/locales/en-US/chrome/browser/devtools/gclicommands.properties index 502c8e6668fc..9c98a25fafa2 100644 --- a/browser/locales/en-US/chrome/browser/devtools/gclicommands.properties +++ b/browser/locales/en-US/chrome/browser/devtools/gclicommands.properties @@ -1529,16 +1529,16 @@ folderInvalidPath=Please enter a valid path # The argument (%1$S) is the folder path. folderOpenDirResult=Opened %1$S -# LOCALIZATION NOTE (rulesDesc) A very short description of the -# 'rules' command. See highlightManual for a fuller description of what +# LOCALIZATION NOTE (rulersDesc) A very short description of the +# 'rulers' command. See rulersManual for a fuller description of what # it does. This string is designed to be shown in a menu alongside the # command name, which is why it should be as short as possible. rulersDesc=Toggle rulers for the page -# LOCALIZATION NOTE (rulesManual) A fuller description of the 'rules' +# LOCALIZATION NOTE (rulersManual) A fuller description of the 'rulers' # command, displayed when the user asks for help on what it does. rulersManual=Toggle the horizontal and vertical rulers for the current page # LOCALIZATION NOTE (rulersTooltip) A string displayed as the -# tooltip of button in devtools toolbox which toggles the rulers highligher. +# tooltip of button in devtools toolbox which toggles the rulers. rulersTooltip=Toggle rulers for the page diff --git a/browser/locales/en-US/chrome/browser/devtools/inspector.properties b/browser/locales/en-US/chrome/browser/devtools/inspector.properties index d6ab7662d3f4..8ec8671d98dd 100644 --- a/browser/locales/en-US/chrome/browser/devtools/inspector.properties +++ b/browser/locales/en-US/chrome/browser/devtools/inspector.properties @@ -54,3 +54,13 @@ previewTooltip.image.brokenImage=Could not load the image #LOCALIZATION NOTE: Used in the image preview tooltip when the image could not be loaded eventsTooltip.openInDebugger=Open in Debugger + +# LOCALIZATION NOTE (inspector.collapsePane): This is the tooltip for the button +# that collapses the right panel (rules, computed, box-model, etc...) in the +# inspector UI. +inspector.collapsePane=Collapse pane + +# LOCALIZATION NOTE (inspector.expandPane): This is the tooltip for the button +# that expands the right panel (rules, computed, box-model, etc...) in the +# inspector UI. +inspector.expandPane=Expand pane diff --git a/browser/locales/en-US/chrome/browser/devtools/profiler.properties b/browser/locales/en-US/chrome/browser/devtools/profiler.properties index e014c224a217..7622b99491d5 100644 --- a/browser/locales/en-US/chrome/browser/devtools/profiler.properties +++ b/browser/locales/en-US/chrome/browser/devtools/profiler.properties @@ -125,10 +125,13 @@ recordingsList.saveDialogAllFilter=All Files # This string is displayed in a tooltip when no JIT optimizations were detected. jit.optimizationFailure=Optimization failed -# LOCALIZATION NOTE (jit.samples): -# This string is displayed for the unit representing thenumber of times a +# LOCALIZATION NOTE (jit.samples2): +# See: http://developer.mozilla.org/en/docs/Localization_and_Plurals +# This string is displayed for the unit representing the number of times a # frame is sampled. -jit.samples=samples +# "#1" represents the number of samples +# example: 30 samples +jit.samples2=#1 sample;#1 samples # LOCALIZATION NOTE (jit.empty): # This string is displayed when there are no JIT optimizations to display. diff --git a/browser/modules/ReaderParent.jsm b/browser/modules/ReaderParent.jsm index e2285f866a1a..4fd40f1bc0f1 100644 --- a/browser/modules/ReaderParent.jsm +++ b/browser/modules/ReaderParent.jsm @@ -159,6 +159,13 @@ let ReaderParent = { } }, + buttonClick: function(event) { + if (event.button != 0) { + return; + } + this.toggleReaderMode(event); + }, + toggleReaderMode: function(event) { let win = event.target.ownerDocument.defaultView; let browser = win.gBrowser.selectedBrowser; diff --git a/browser/themes/shared/devtools/inspector.css b/browser/themes/shared/devtools/inspector.css index b72b7b343615..ad1e6e1cba21 100644 --- a/browser/themes/shared/devtools/inspector.css +++ b/browser/themes/shared/devtools/inspector.css @@ -39,6 +39,44 @@ max-width: 200px !important; } +/* Expand/collapse panel toolbar button */ + +#inspector-pane-toggle { + background: none; + box-shadow: none; + border: none; + list-style-image: url(debugger-collapse.png); + -moz-image-region: rect(0px,16px,16px,0px); +} + +#inspector-pane-toggle > .toolbarbutton-icon { + width: 16px; + height: 16px; +} + +#inspector-pane-toggle[pane-collapsed] { + list-style-image: url(debugger-expand.png); +} + +#inspector-pane-toggle:active { + -moz-image-region: rect(0px,32px,16px,16px); +} + +@media (min-resolution: 2dppx) { + #inspector-pane-toggle { + list-style-image: url(debugger-collapse@2x.png); + -moz-image-region: rect(0px,32px,32px,0px); + } + + #inspector-pane-toggle[pane-collapsed] { + list-style-image: url(debugger-expand@2x.png); + } + + #inspector-pane-toggle:active { + -moz-image-region: rect(0px,64px,32px,32px); + } +} + /* Tooltip: Events */ #devtools-tooltip-events-container { diff --git a/browser/themes/shared/devtools/performance.inc.css b/browser/themes/shared/devtools/performance.inc.css index 34313eea0bfa..d6ee24f44c41 100644 --- a/browser/themes/shared/devtools/performance.inc.css +++ b/browser/themes/shared/devtools/performance.inc.css @@ -57,10 +57,7 @@ width: 8px; height: 8px; margin: 0 8px; - border: 1px solid; border-radius: 1px; - background-color: var(--bullet-bg); - border-color: var(--bullet-border); } /* Recording Notice */ @@ -380,7 +377,6 @@ height: 8px; -moz-margin-start: 8px; -moz-margin-end: 6px; - border: 1px solid; border-radius: 1px; } @@ -391,9 +387,8 @@ .waterfall-marker-bar { height: 9px; - border: 1px solid; - border-radius: 1px; transform-origin: left center; + border-radius: 1px; } .waterfall-marker-container.selected > .waterfall-sidebar, @@ -402,11 +397,6 @@ color: var(--theme-selection-color); } -.waterfall-marker-container.selected .waterfall-marker-bullet, -.waterfall-marker-container.selected .waterfall-marker-bar { - border-color: initial !important; -} - .waterfall-marker-location { color: -moz-nativehyperlinktext; } @@ -426,10 +416,34 @@ .marker-details-bullet { width: 8px; height: 8px; - border: 1px solid; border-radius: 1px; } +#performance-filter-menupopup > menuitem.highlight-pink:before, +.marker-details-bullet.highlight-pink, +.waterfall-marker-bar.highlight-pink, +.waterfall-marker-bullet.highlight-pink { + background-color: var(--theme-highlight-pink); +} +#performance-filter-menupopup > menuitem.highlight-bluegrey:before, +.marker-details-bullet.highlight-bluegrey, +.waterfall-marker-bar.highlight-bluegrey, +.waterfall-marker-bullet.highlight-bluegrey { + background-color: var(--theme-highlight-bluegrey); +} +#performance-filter-menupopup > menuitem.highlight-green:before, +.marker-details-bullet.highlight-green, +.waterfall-marker-bar.highlight-green, +.waterfall-marker-bullet.highlight-green { + background-color: var(--theme-highlight-green); +} +#performance-filter-menupopup > menuitem.highlight-lightorange:before, +.marker-details-bullet.highlight-lightorange, +.waterfall-marker-bar.highlight-lightorange, +.waterfall-marker-bullet.highlight-lightorange { + background-color: var(--theme-highlight-lightorange); +} + #waterfall-details > * { padding-top: 3px; } diff --git a/configure.in b/configure.in index 0d679eba4629..9a2dcbd67b73 100644 --- a/configure.in +++ b/configure.in @@ -6425,11 +6425,7 @@ MOZ_ARG_ENABLE_BOOL(verify-mar, MOZ_VERIFY_MAR_SIGNATURE= ) if test -n "$MOZ_VERIFY_MAR_SIGNATURE"; then - if test "$OS_ARCH" = "WINNT"; then - AC_DEFINE(MOZ_VERIFY_MAR_SIGNATURE) - else - AC_MSG_ERROR([Can only build with --enable-verify-mar with a Windows target]) - fi + AC_DEFINE(MOZ_VERIFY_MAR_SIGNATURE) fi dnl ======================================================== diff --git a/dom/apps/AppsUtils.jsm b/dom/apps/AppsUtils.jsm index 8374b1396ec9..cbd879576728 100644 --- a/dom/apps/AppsUtils.jsm +++ b/dom/apps/AppsUtils.jsm @@ -503,7 +503,6 @@ this.AppsUtils = { * Checks if the app role is allowed: * Only certified apps can be themes. * Only privileged or certified apps can be addons. - * Langpacks need to be privileged. * @param aRole : the role assigned to this app. * @param aStatus : the APP_STATUS_* for this app. */ @@ -511,13 +510,6 @@ this.AppsUtils = { if (aRole == "theme" && aStatus !== Ci.nsIPrincipal.APP_STATUS_CERTIFIED) { return false; } - if (aRole == "langpack" && aStatus !== Ci.nsIPrincipal.APP_STATUS_PRIVILEGED) { - let allow = false; - try { - allow = Services.prefs.getBoolPref("dom.apps.allow_unsigned_langpacks"); - } catch(e) {} - return allow; - } if (!this.allowUnsignedAddons && (aRole == "addon" && aStatus !== Ci.nsIPrincipal.APP_STATUS_CERTIFIED && diff --git a/dom/apps/ImportExport.jsm b/dom/apps/ImportExport.jsm index 0c28d362c86b..a90c4f8bb220 100644 --- a/dom/apps/ImportExport.jsm +++ b/dom/apps/ImportExport.jsm @@ -26,6 +26,9 @@ XPCOMUtils.defineLazyModuleGetter(this, "PermissionsInstaller", XPCOMUtils.defineLazyModuleGetter(this, "Task", "resource://gre/modules/Task.jsm"); +XPCOMUtils.defineLazyModuleGetter(this, "OS", + "resource://gre/modules/osfile.jsm"); + this.EXPORTED_SYMBOLS = ["ImportExport"]; const kAppArchiveMimeType = "application/openwebapp+zip"; @@ -225,7 +228,12 @@ this.ImportExport = { // |file| now points to application.zip, open it. let appZipReader = Cc["@mozilla.org/libjar/zip-reader;1"] .createInstance(Ci.nsIZipReader); - appZipReader.open(file); + try { + appZipReader.open(file); + } catch(e) { + throw "InvalidZip"; + } + if (!appZipReader.hasEntry("manifest.webapp")) { throw "NoManifestFound"; } @@ -233,10 +241,35 @@ this.ImportExport = { return [readObjectFromZip(appZipReader, "manifest.webapp"), file]; }, + // Returns a promise that resolves to the temp file path. + _writeBlobToTempFile: function(aBlob) { + // Save the blob to a temp file. + debug("_writeBlobToTempFile"); + let path; + return new Promise((aResolve, aReject) => { + let reader = Cc['@mozilla.org/files/filereader;1'] + .createInstance(Ci.nsIDOMFileReader); + reader.onloadend = () => { + path = OS.Path.join(OS.Constants.Path.tmpDir, "app-blob.zip"); + debug("onloadend path=" + path); + OS.File.openUnique(path).then(obj => { + path = obj.path; + let file = obj.file; + debug("openUnique path=" + path); + return file.write(new Uint8Array(reader.result)) + .then(file.close.bind(file)) + }) + .then(() => aResolve(path)) + .catch(aReject); + } + reader.readAsArrayBuffer(aBlob); + }); + }, + // Imports a blob, returning a Promise that resolves to // [manifestURL, manifest] // Possible errors are: - // NoBlobFound, UnsupportedBlobArchive, MissingMetadataFile, IncorrectVersion, + // NoBlobFound, InvalidZip, MissingMetadataFile, IncorrectVersion, // AppAlreadyInstalled, DontImportCertifiedApps, InvalidManifest, // InvalidPrivilegeLevel, InvalidOrigin, DuplicateOrigin import: Task.async(function*(aBlob) { @@ -246,15 +279,15 @@ this.ImportExport = { throw "NoBlobFound"; } - let isFile = aBlob instanceof Ci.nsIDOMFile; - if (!isFile) { - // XXX: TODO Store the blob on disk. - throw "UnsupportedBlobArchive"; - } - + let isFileBlob = aBlob instanceof Ci.nsIDOMFile; // We can't QI the DOMFile to nsIFile, so we need to create one. let zipFile = Cc["@mozilla.org/file/local;1"].createInstance(Ci.nsIFile); - zipFile.initWithPath(aBlob.mozFullPath); + if (!isFileBlob) { + let path = yield this._writeBlobToTempFile(aBlob); + zipFile.initWithPath(path); + } else { + zipFile.initWithPath(aBlob.mozFullPath); + } debug("Importing from " + zipFile.path); @@ -263,8 +296,13 @@ this.ImportExport = { let manifest; let zipReader = Cc["@mozilla.org/libjar/zip-reader;1"] .createInstance(Ci.nsIZipReader); - zipReader.open(zipFile); try { + try { + zipReader.open(zipFile); + } catch(e) { + throw "InvalidZip"; + } + // Do some sanity checks on the metadata.json and manifest.webapp files. if (!zipReader.hasEntry("metadata.json")) { throw "MissingMetadataFile"; @@ -431,6 +469,9 @@ this.ImportExport = { throw e; } finally { zipReader.close(); + if (!isFileBlob) { + zipFile.remove(false); + } } return [meta.manifestURL, manifest]; @@ -439,31 +480,37 @@ this.ImportExport = { // Extracts the manifest from a blob, returning a Promise that resolves to // the manifest // Possible errors are: - // NoBlobFound, UnsupportedBlobArchive, MissingMetadataFile. + // NoBlobFound, InvalidZip, MissingMetadataFile. extractManifest: Task.async(function*(aBlob) { // First, do we even have a blob? if (!aBlob || !aBlob instanceof Ci.nsIDOMBlob) { throw "NoBlobFound"; } - let isFile = aBlob instanceof Ci.nsIDOMFile; - if (!isFile) { - // XXX: TODO Store the blob on disk. - throw "UnsupportedBlobArchive"; - } - + let isFileBlob = aBlob instanceof Ci.nsIDOMFile; // We can't QI the DOMFile to nsIFile, so we need to create one. let zipFile = Cc["@mozilla.org/file/local;1"].createInstance(Ci.nsIFile); - zipFile.initWithPath(aBlob.mozFullPath); + if (!isFileBlob) { + let path = yield this._writeBlobToTempFile(aBlob); + zipFile.initWithPath(path); + } else { + zipFile.initWithPath(aBlob.mozFullPath); + } + debug("extractManifest from " + zipFile.path); // Do some sanity checks on the metadata.json and manifest.webapp files. let zipReader = Cc["@mozilla.org/libjar/zip-reader;1"] .createInstance(Ci.nsIZipReader); - zipReader.open(zipFile); let manifest; try { + try { + zipReader.open(zipFile); + } catch(e) { + throw "InvalidZip"; + } + if (zipReader.hasEntry("manifest.webapp")) { manifest = readObjectFromZip(zipReader, "manifest.webapp"); if (!manifest) { @@ -484,6 +531,9 @@ this.ImportExport = { } } finally { zipReader.close(); + if (!isFileBlob) { + zipFile.remove(false); + } } return manifest; diff --git a/dom/apps/Webapps.jsm b/dom/apps/Webapps.jsm index 3be634e0a315..61f2e8c2bfca 100644 --- a/dom/apps/Webapps.jsm +++ b/dom/apps/Webapps.jsm @@ -3901,8 +3901,16 @@ this.DOMApplicationRegistry = { ? Ci.nsIPrincipal.APP_STATUS_PRIVILEGED : Ci.nsIPrincipal.APP_STATUS_INSTALLED; + let allowUnsignedLangpack = false; + try { + allowUnsignedLangpack = + Services.prefs.getBoolPref("dom.apps.allow_unsigned_langpacks"); + } catch(e) {} + let isLangPack = newManifest.role === "langpack" && + (aIsSigned || allowUnsignedLangpack); + let status = AppsUtils.getAppManifestStatus(newManifest); - if (status > maxStatus) { + if (status > maxStatus && !isLangPack) { throw "INVALID_SECURITY_LEVEL"; } diff --git a/dom/apps/tests/test_import_export.html b/dom/apps/tests/test_import_export.html index 524eda946202..cd1739eaa7ee 100644 --- a/dom/apps/tests/test_import_export.html +++ b/dom/apps/tests/test_import_export.html @@ -299,6 +299,21 @@ function runTest() { is(request.result, miniManifestURL, "Packaged App uninstalled."); navigator.mozApps.mgmt.onuninstall = null; + + // Check that we support memory backed blobs. + // The blob here is not a valid app, but that's fine for this test. + let blob = new Blob(["This is a test blob."]); + navigator.mozApps.mgmt.import(blob) + .then(() => { + ok(false, "This is not an app!"); + continueTest(); + }) + .catch(aError => { + is(aError.name, "InvalidZip", "Memory blob processed."); + continueTest(); + }); + yield undefined; + // Check that we restored the app registry. request = navigator.mozApps.mgmt.getAll(); request.onerror = cbError; diff --git a/layout/tools/reftest/runreftest.py b/layout/tools/reftest/runreftest.py index 1389845a4870..5e01dbc11332 100644 --- a/layout/tools/reftest/runreftest.py +++ b/layout/tools/reftest/runreftest.py @@ -223,6 +223,7 @@ class RefTest(object): #Don't use auto-enabled e10s prefs['browser.tabs.remote.autostart.1'] = False + prefs['browser.tabs.remote.autostart.2'] = False if options.e10s: prefs['browser.tabs.remote.autostart'] = True diff --git a/mobile/android/base/PrefsHelper.java b/mobile/android/base/PrefsHelper.java index 2318568de85e..f3495b4cf08e 100644 --- a/mobile/android/base/PrefsHelper.java +++ b/mobile/android/base/PrefsHelper.java @@ -115,6 +115,10 @@ public final class PrefsHelper { } public static void setPref(String pref, Object value) { + setPref(pref, value, false); + } + + public static void setPref(String pref, Object value, boolean flush) { if (pref == null || pref.length() == 0) { throw new IllegalArgumentException("Pref name must be non-empty"); } @@ -122,6 +126,8 @@ public final class PrefsHelper { try { JSONObject jsonPref = new JSONObject(); jsonPref.put("name", pref); + jsonPref.put("flush", flush); + if (value instanceof Boolean) { jsonPref.put("type", "bool"); jsonPref.put("value", ((Boolean)value).booleanValue()); diff --git a/mobile/android/base/crashreporter/res/drawable-mdpi/crash_reporter.png b/mobile/android/base/crashreporter/res/drawable-mdpi/crash_reporter.png index 5804e08a772e..c9f495d30b37 100644 Binary files a/mobile/android/base/crashreporter/res/drawable-mdpi/crash_reporter.png and b/mobile/android/base/crashreporter/res/drawable-mdpi/crash_reporter.png differ diff --git a/mobile/android/base/menu/GeckoMenuItem.java b/mobile/android/base/menu/GeckoMenuItem.java index 544747b8ea70..be31c14d08b7 100644 --- a/mobile/android/base/menu/GeckoMenuItem.java +++ b/mobile/android/base/menu/GeckoMenuItem.java @@ -141,9 +141,11 @@ public class GeckoMenuItem implements MenuItem { public View getActionView() { if (mActionProvider != null) { if (getActionEnum() == MenuItem.SHOW_AS_ACTION_IF_ROOM) { - return mActionProvider.onCreateActionView(SECONDARY_ACTION_BAR_HISTORY_SIZE, false); + return mActionProvider.onCreateActionView(SECONDARY_ACTION_BAR_HISTORY_SIZE, + GeckoActionProvider.ActionViewType.DEFAULT); } else { - return mActionProvider.onCreateActionView(QUICK_SHARE_ACTION_BAR_HISTORY_SIZE, true); + return mActionProvider.onCreateActionView(QUICK_SHARE_ACTION_BAR_HISTORY_SIZE, + GeckoActionProvider.ActionViewType.QUICK_SHARE_ICON); } } diff --git a/mobile/android/base/menu/MenuItemActionView.java b/mobile/android/base/menu/MenuItemActionView.java index 873ca4ac531c..be1260e89683 100644 --- a/mobile/android/base/menu/MenuItemActionView.java +++ b/mobile/android/base/menu/MenuItemActionView.java @@ -165,4 +165,18 @@ public class MenuItemActionView extends LinearLayout listener.onClick(view); } } + + /** + * Update the styles if this view is being used in the context menus. + * + * Ideally, we just use different layout files and styles to set this, but + * MenuItemActionView is too integrated into GeckoActionProvider to provide + * an easy separation so instead I provide this hack. I'm sorry. + */ + public void initContextMenuStyles() { + final int defaultContextMenuPadding = getContext().getResources().getDimensionPixelOffset( + R.dimen.context_menu_item_horizontal_padding); + mMenuItem.setPadding(defaultContextMenuPadding, getPaddingTop(), + defaultContextMenuPadding, getPaddingBottom()); + } } diff --git a/mobile/android/base/overlays/ui/OverlayDialogButton.java b/mobile/android/base/overlays/ui/OverlayDialogButton.java index 9d726b4fa202..8b7bc872b463 100644 --- a/mobile/android/base/overlays/ui/OverlayDialogButton.java +++ b/mobile/android/base/overlays/ui/OverlayDialogButton.java @@ -5,16 +5,17 @@ package org.mozilla.gecko.overlays.ui; -import android.util.AttributeSet; import org.mozilla.gecko.R; import android.content.Context; +import android.content.res.TypedArray; import android.graphics.drawable.Drawable; +import android.util.AttributeSet; import android.util.Log; -import android.view.LayoutInflater; -import android.view.View; import android.view.animation.Animation; import android.view.animation.AnimationUtils; +import android.view.LayoutInflater; +import android.view.View; import android.widget.ImageView; import android.widget.LinearLayout; import android.widget.TextView; @@ -29,25 +30,17 @@ import android.widget.TextView; public class OverlayDialogButton extends LinearLayout { private static final String LOGTAG = "GeckoOverlayDialogButton"; - // The views making up this button. - private final ImageView icon; - private final TextView label; - - // Label/icon used when enabled. - private String enabledLabel; - private Drawable enabledIcon; - - // Label/icon used when disabled. - private String disabledLabel; - private Drawable disabledIcon; - - // Click listeners used when enabled/disabled. Currently, disabledOnClickListener is set - // internally to something that causes the icon to pulse. - private OnClickListener enabledOnClickListener; - private OnClickListener disabledOnClickListener; - + // We can't use super.isEnabled(), since we want to stay clickable in disabled state. private boolean isEnabled = true; + private final ImageView iconView; + private final TextView labelView; + + private String enabledText = ""; + private String disabledText = ""; + + private OnClickListener enabledOnClickListener; + public OverlayDialogButton(Context context) { this(context, null); } @@ -59,71 +52,60 @@ public class OverlayDialogButton extends LinearLayout { LayoutInflater.from(context).inflate(R.layout.overlay_share_button, this); - icon = (ImageView) findViewById(R.id.overlaybtn_icon); - label = (TextView) findViewById(R.id.overlaybtn_label); - } + iconView = (ImageView) findViewById(R.id.overlaybtn_icon); + labelView = (TextView) findViewById(R.id.overlaybtn_label); - public void setEnabledLabelAndIcon(String s, Drawable d) { - enabledLabel = s; - enabledIcon = d; + super.setOnClickListener(new OnClickListener() { - if (isEnabled) { - updateViews(); - } - } + @Override + public void onClick(View v) { - public void setDisabledLabelAndIcon(String s, Drawable d) { - disabledLabel = s; - disabledIcon = d; - - if (!isEnabled) { - updateViews(); - } - } - - /** - * Assign the appropriate label and icon to the views, and update the onClickListener for this - * view to the correct one (based on current enabledness state). - */ - private void updateViews() { - label.setEnabled(isEnabled); - if (isEnabled) { - label.setText(enabledLabel); - icon.setImageDrawable(enabledIcon); - super.setOnClickListener(enabledOnClickListener); - } else { - label.setText(disabledLabel); - icon.setImageDrawable(disabledIcon); - super.setOnClickListener(getPopListener()); - } - } - - /** - * Helper method to lazily-initialise disabledOnClickListener to a listener that performs the - * "pop" animation on the icon. - * updateViews handles making this the actual onClickListener for this view. - */ - private OnClickListener getPopListener() { - if (disabledOnClickListener == null) { - disabledOnClickListener = new OnClickListener() { - @Override - public void onClick(View view) { + if (isEnabled) { + if (enabledOnClickListener != null) { + enabledOnClickListener.onClick(v); + } else { + Log.e(LOGTAG, "enabledOnClickListener is null."); + } + } else { Animation anim = AnimationUtils.loadAnimation(getContext(), R.anim.overlay_pop); - icon.startAnimation(anim); + iconView.startAnimation(anim); } - }; + } + }); + + final TypedArray typedArray = context.obtainStyledAttributes(attrs, R.styleable.OverlayDialogButton); + + Drawable drawable = typedArray.getDrawable(R.styleable.OverlayDialogButton_drawable); + if (drawable != null) { + setDrawable(drawable); } - return disabledOnClickListener; + String disabledText = typedArray.getString(R.styleable.OverlayDialogButton_disabledText); + if (disabledText != null) { + this.disabledText = disabledText; + } + + String enabledText = typedArray.getString(R.styleable.OverlayDialogButton_enabledText); + if (enabledText != null) { + this.enabledText = enabledText; + } + + typedArray.recycle(); + + setEnabled(true); + } + + public void setDrawable(Drawable drawable) { + iconView.setImageDrawable(drawable); + } + + public void setText(String text) { + labelView.setText(text); } @Override - public void setOnClickListener(OnClickListener l) { - enabledOnClickListener = l; - - if (isEnabled) { - updateViews(); - } + public void setOnClickListener(OnClickListener listener) { + enabledOnClickListener = listener; } /** @@ -132,11 +114,15 @@ public class OverlayDialogButton extends LinearLayout { */ @Override public void setEnabled(boolean enabled) { - if (enabled == isEnabled) { - return; - } - isEnabled = enabled; - updateViews(); + iconView.setEnabled(enabled); + labelView.setEnabled(enabled); + + if (enabled) { + setText(enabledText); + } else { + setText(disabledText); + } } + } diff --git a/mobile/android/base/overlays/ui/SendTabDeviceListArrayAdapter.java b/mobile/android/base/overlays/ui/SendTabDeviceListArrayAdapter.java index e09ffe497281..d2f8f553154d 100644 --- a/mobile/android/base/overlays/ui/SendTabDeviceListArrayAdapter.java +++ b/mobile/android/base/overlays/ui/SendTabDeviceListArrayAdapter.java @@ -105,7 +105,8 @@ public class SendTabDeviceListArrayAdapter extends ArrayAdapter { final GeckoActionProvider provider = GeckoActionProvider.getForType(item.getIntent().getType(), getContext()); provider.setIntent(item.getIntent()); - final MenuItemActionView view = (MenuItemActionView) provider.onCreateActionView(); + final MenuItemActionView view = (MenuItemActionView) provider.onCreateActionView( + GeckoActionProvider.ActionViewType.CONTEXT_MENU); // If a quickshare button is clicked, we need to close the dialog. view.addActionButtonClickListener(new View.OnClickListener() { @Override diff --git a/mobile/android/base/reading/ReadingListSyncAdapter.java b/mobile/android/base/reading/ReadingListSyncAdapter.java index ce4f7cd0b825..d29b36efbe4a 100644 --- a/mobile/android/base/reading/ReadingListSyncAdapter.java +++ b/mobile/android/base/reading/ReadingListSyncAdapter.java @@ -260,6 +260,11 @@ public class ReadingListSyncAdapter extends AbstractThreadedSyncAdapter { } } + if (result == null) { + // The poll timed out. Let's call this an error. + result = Result.Error; + } + switch (result) { case Success: requestPeriodicSync(account, ReadingListSyncAdapter.AFTER_SUCCESS_SYNC_DELAY_SECONDS); diff --git a/mobile/android/base/resources/drawable-hdpi-v11/alert_guest.png b/mobile/android/base/resources/drawable-hdpi-v11/alert_guest.png index 55d569730182..02db6ab2d014 100644 Binary files a/mobile/android/base/resources/drawable-hdpi-v11/alert_guest.png and b/mobile/android/base/resources/drawable-hdpi-v11/alert_guest.png differ diff --git a/mobile/android/base/resources/drawable-hdpi-v11/ic_menu_new_tab.png b/mobile/android/base/resources/drawable-hdpi-v11/ic_menu_new_tab.png index 8956fb033c21..502ae989c4cd 100644 Binary files a/mobile/android/base/resources/drawable-hdpi-v11/ic_menu_new_tab.png and b/mobile/android/base/resources/drawable-hdpi-v11/ic_menu_new_tab.png differ diff --git a/mobile/android/base/resources/drawable-hdpi-v11/ic_menu_settings.png b/mobile/android/base/resources/drawable-hdpi-v11/ic_menu_settings.png index c63245e0551c..ef13f026ca28 100644 Binary files a/mobile/android/base/resources/drawable-hdpi-v11/ic_menu_settings.png and b/mobile/android/base/resources/drawable-hdpi-v11/ic_menu_settings.png differ diff --git a/mobile/android/base/resources/drawable-hdpi-v11/ic_status_logo.png b/mobile/android/base/resources/drawable-hdpi-v11/ic_status_logo.png index 2b03337dd547..4fe0e14bc6db 100644 Binary files a/mobile/android/base/resources/drawable-hdpi-v11/ic_status_logo.png and b/mobile/android/base/resources/drawable-hdpi-v11/ic_status_logo.png differ diff --git a/mobile/android/base/resources/drawable-hdpi/ab_background.9.png b/mobile/android/base/resources/drawable-hdpi/ab_background.9.png index eb6f5f653e7c..8cb5bc879e65 100644 Binary files a/mobile/android/base/resources/drawable-hdpi/ab_background.9.png and b/mobile/android/base/resources/drawable-hdpi/ab_background.9.png differ diff --git a/mobile/android/base/resources/drawable-hdpi/ab_copy.png b/mobile/android/base/resources/drawable-hdpi/ab_copy.png index 7ebc6c2b45f2..ca2b0001d0ba 100644 Binary files a/mobile/android/base/resources/drawable-hdpi/ab_copy.png and b/mobile/android/base/resources/drawable-hdpi/ab_copy.png differ diff --git a/mobile/android/base/resources/drawable-hdpi/ab_mic.png b/mobile/android/base/resources/drawable-hdpi/ab_mic.png index 302125b84115..6129631b2fb5 100644 Binary files a/mobile/android/base/resources/drawable-hdpi/ab_mic.png and b/mobile/android/base/resources/drawable-hdpi/ab_mic.png differ diff --git a/mobile/android/base/resources/drawable-hdpi/ab_search.png b/mobile/android/base/resources/drawable-hdpi/ab_search.png index d55d89a34f56..16da0b59ecfe 100644 Binary files a/mobile/android/base/resources/drawable-hdpi/ab_search.png and b/mobile/android/base/resources/drawable-hdpi/ab_search.png differ diff --git a/mobile/android/base/resources/drawable-hdpi/ab_select_all.png b/mobile/android/base/resources/drawable-hdpi/ab_select_all.png index 2d373d4c7582..86b6d2cd8882 100644 Binary files a/mobile/android/base/resources/drawable-hdpi/ab_select_all.png and b/mobile/android/base/resources/drawable-hdpi/ab_select_all.png differ diff --git a/mobile/android/base/resources/drawable-hdpi/alert_app_animation_1.png b/mobile/android/base/resources/drawable-hdpi/alert_app_animation_1.png index 79fc701b457e..a4d50bc46c47 100644 Binary files a/mobile/android/base/resources/drawable-hdpi/alert_app_animation_1.png and b/mobile/android/base/resources/drawable-hdpi/alert_app_animation_1.png differ diff --git a/mobile/android/base/resources/drawable-hdpi/alert_app_animation_2.png b/mobile/android/base/resources/drawable-hdpi/alert_app_animation_2.png index 900ffa94b1af..865875257f09 100644 Binary files a/mobile/android/base/resources/drawable-hdpi/alert_app_animation_2.png and b/mobile/android/base/resources/drawable-hdpi/alert_app_animation_2.png differ diff --git a/mobile/android/base/resources/drawable-hdpi/alert_app_animation_3.png b/mobile/android/base/resources/drawable-hdpi/alert_app_animation_3.png index aea692e3fd09..202f6370f0f9 100644 Binary files a/mobile/android/base/resources/drawable-hdpi/alert_app_animation_3.png and b/mobile/android/base/resources/drawable-hdpi/alert_app_animation_3.png differ diff --git a/mobile/android/base/resources/drawable-hdpi/alert_app_animation_4.png b/mobile/android/base/resources/drawable-hdpi/alert_app_animation_4.png index de86474087f6..75c4d3091fa3 100644 Binary files a/mobile/android/base/resources/drawable-hdpi/alert_app_animation_4.png and b/mobile/android/base/resources/drawable-hdpi/alert_app_animation_4.png differ diff --git a/mobile/android/base/resources/drawable-hdpi/alert_app_animation_5.png b/mobile/android/base/resources/drawable-hdpi/alert_app_animation_5.png index db33ad6719d0..575aa9def24a 100644 Binary files a/mobile/android/base/resources/drawable-hdpi/alert_app_animation_5.png and b/mobile/android/base/resources/drawable-hdpi/alert_app_animation_5.png differ diff --git a/mobile/android/base/resources/drawable-hdpi/alert_app_animation_6.png b/mobile/android/base/resources/drawable-hdpi/alert_app_animation_6.png index e42c956ea9c2..c2021eb2960f 100644 Binary files a/mobile/android/base/resources/drawable-hdpi/alert_app_animation_6.png and b/mobile/android/base/resources/drawable-hdpi/alert_app_animation_6.png differ diff --git a/mobile/android/base/resources/drawable-hdpi/alert_app_animation_7.png b/mobile/android/base/resources/drawable-hdpi/alert_app_animation_7.png index bb12cd6fc61a..42551c6a37de 100644 Binary files a/mobile/android/base/resources/drawable-hdpi/alert_app_animation_7.png and b/mobile/android/base/resources/drawable-hdpi/alert_app_animation_7.png differ diff --git a/mobile/android/base/resources/drawable-hdpi/alert_download_animation_1.png b/mobile/android/base/resources/drawable-hdpi/alert_download_animation_1.png index 2f637ce39813..2e9767de8b62 100644 Binary files a/mobile/android/base/resources/drawable-hdpi/alert_download_animation_1.png and b/mobile/android/base/resources/drawable-hdpi/alert_download_animation_1.png differ diff --git a/mobile/android/base/resources/drawable-hdpi/alert_download_animation_2.png b/mobile/android/base/resources/drawable-hdpi/alert_download_animation_2.png index c9ea5577fe65..8c8743e3a8f9 100644 Binary files a/mobile/android/base/resources/drawable-hdpi/alert_download_animation_2.png and b/mobile/android/base/resources/drawable-hdpi/alert_download_animation_2.png differ diff --git a/mobile/android/base/resources/drawable-hdpi/alert_download_animation_3.png b/mobile/android/base/resources/drawable-hdpi/alert_download_animation_3.png index cfae2b2b6102..4f9aadab2993 100644 Binary files a/mobile/android/base/resources/drawable-hdpi/alert_download_animation_3.png and b/mobile/android/base/resources/drawable-hdpi/alert_download_animation_3.png differ diff --git a/mobile/android/base/resources/drawable-hdpi/alert_download_animation_4.png b/mobile/android/base/resources/drawable-hdpi/alert_download_animation_4.png index 2d19e5bfbb45..7449b954616f 100644 Binary files a/mobile/android/base/resources/drawable-hdpi/alert_download_animation_4.png and b/mobile/android/base/resources/drawable-hdpi/alert_download_animation_4.png differ diff --git a/mobile/android/base/resources/drawable-hdpi/alert_download_animation_5.png b/mobile/android/base/resources/drawable-hdpi/alert_download_animation_5.png index 8992011e9a94..e2a5e30beacc 100644 Binary files a/mobile/android/base/resources/drawable-hdpi/alert_download_animation_5.png and b/mobile/android/base/resources/drawable-hdpi/alert_download_animation_5.png differ diff --git a/mobile/android/base/resources/drawable-hdpi/alert_download_animation_6.png b/mobile/android/base/resources/drawable-hdpi/alert_download_animation_6.png index e7b0284a3729..628e4f59a4f6 100644 Binary files a/mobile/android/base/resources/drawable-hdpi/alert_download_animation_6.png and b/mobile/android/base/resources/drawable-hdpi/alert_download_animation_6.png differ diff --git a/mobile/android/base/resources/drawable-hdpi/alert_guest.png b/mobile/android/base/resources/drawable-hdpi/alert_guest.png index b812a703f538..ce7f04c648c2 100644 Binary files a/mobile/android/base/resources/drawable-hdpi/alert_guest.png and b/mobile/android/base/resources/drawable-hdpi/alert_guest.png differ diff --git a/mobile/android/base/resources/drawable-hdpi/alert_mic.png b/mobile/android/base/resources/drawable-hdpi/alert_mic.png index 849bd1032f72..b22a3fac9799 100644 Binary files a/mobile/android/base/resources/drawable-hdpi/alert_mic.png and b/mobile/android/base/resources/drawable-hdpi/alert_mic.png differ diff --git a/mobile/android/base/resources/drawable-hdpi/blank.png b/mobile/android/base/resources/drawable-hdpi/blank.png index c9e68bdde890..a9b6b2240e77 100644 Binary files a/mobile/android/base/resources/drawable-hdpi/blank.png and b/mobile/android/base/resources/drawable-hdpi/blank.png differ diff --git a/mobile/android/base/resources/drawable-hdpi/device_mobile.png b/mobile/android/base/resources/drawable-hdpi/device_mobile.png index 5b765970b48b..7d60b1e20735 100644 Binary files a/mobile/android/base/resources/drawable-hdpi/device_mobile.png and b/mobile/android/base/resources/drawable-hdpi/device_mobile.png differ diff --git a/mobile/android/base/resources/drawable-hdpi/device_pc.png b/mobile/android/base/resources/drawable-hdpi/device_pc.png index 213c6776a604..fa40ee688647 100644 Binary files a/mobile/android/base/resources/drawable-hdpi/device_pc.png and b/mobile/android/base/resources/drawable-hdpi/device_pc.png differ diff --git a/mobile/android/base/resources/drawable-hdpi/favicon_search.png b/mobile/android/base/resources/drawable-hdpi/favicon_search.png old mode 100755 new mode 100644 index 21f993e0179e..8ce678fd3d52 Binary files a/mobile/android/base/resources/drawable-hdpi/favicon_search.png and b/mobile/android/base/resources/drawable-hdpi/favicon_search.png differ diff --git a/mobile/android/base/resources/drawable-hdpi/fxaccount_checkbox.png b/mobile/android/base/resources/drawable-hdpi/fxaccount_checkbox.png old mode 100755 new mode 100644 index 11e89d34aba2..d822956376f9 Binary files a/mobile/android/base/resources/drawable-hdpi/fxaccount_checkbox.png and b/mobile/android/base/resources/drawable-hdpi/fxaccount_checkbox.png differ diff --git a/mobile/android/base/resources/drawable-hdpi/fxaccount_ddarrow_inactive.png b/mobile/android/base/resources/drawable-hdpi/fxaccount_ddarrow_inactive.png index 204562d39f09..195aa3dff885 100644 Binary files a/mobile/android/base/resources/drawable-hdpi/fxaccount_ddarrow_inactive.png and b/mobile/android/base/resources/drawable-hdpi/fxaccount_ddarrow_inactive.png differ diff --git a/mobile/android/base/resources/drawable-hdpi/fxaccount_intro.png b/mobile/android/base/resources/drawable-hdpi/fxaccount_intro.png index 2f3868bb9dc4..69f289b89e24 100644 Binary files a/mobile/android/base/resources/drawable-hdpi/fxaccount_intro.png and b/mobile/android/base/resources/drawable-hdpi/fxaccount_intro.png differ diff --git a/mobile/android/base/resources/drawable-hdpi/fxaccount_mail.png b/mobile/android/base/resources/drawable-hdpi/fxaccount_mail.png old mode 100755 new mode 100644 index 3a2e33adfcc3..3fe9c4af023b Binary files a/mobile/android/base/resources/drawable-hdpi/fxaccount_mail.png and b/mobile/android/base/resources/drawable-hdpi/fxaccount_mail.png differ diff --git a/mobile/android/base/resources/drawable-hdpi/grid_icon_bg_activated.9.png b/mobile/android/base/resources/drawable-hdpi/grid_icon_bg_activated.9.png index 7d4e4b4816d2..4ff910fdab29 100644 Binary files a/mobile/android/base/resources/drawable-hdpi/grid_icon_bg_activated.9.png and b/mobile/android/base/resources/drawable-hdpi/grid_icon_bg_activated.9.png differ diff --git a/mobile/android/base/resources/drawable-hdpi/home_group_collapsed.png b/mobile/android/base/resources/drawable-hdpi/home_group_collapsed.png index 0306cbe8da6a..2fc59ca9653b 100644 Binary files a/mobile/android/base/resources/drawable-hdpi/home_group_collapsed.png and b/mobile/android/base/resources/drawable-hdpi/home_group_collapsed.png differ diff --git a/mobile/android/base/resources/drawable-hdpi/home_group_expanded.png b/mobile/android/base/resources/drawable-hdpi/home_group_expanded.png index 2caf71ffc2d6..0ad2de2fde2b 100644 Binary files a/mobile/android/base/resources/drawable-hdpi/home_group_expanded.png and b/mobile/android/base/resources/drawable-hdpi/home_group_expanded.png differ diff --git a/mobile/android/base/resources/drawable-hdpi/home_tab_menu_strip.9.png b/mobile/android/base/resources/drawable-hdpi/home_tab_menu_strip.9.png index b9ab3d0db63d..7f2986af2a5f 100644 Binary files a/mobile/android/base/resources/drawable-hdpi/home_tab_menu_strip.9.png and b/mobile/android/base/resources/drawable-hdpi/home_tab_menu_strip.9.png differ diff --git a/mobile/android/base/resources/drawable-hdpi/homepage_banner_firstrun.png b/mobile/android/base/resources/drawable-hdpi/homepage_banner_firstrun.png index 243bba0d93d0..e6d1fba27cf3 100644 Binary files a/mobile/android/base/resources/drawable-hdpi/homepage_banner_firstrun.png and b/mobile/android/base/resources/drawable-hdpi/homepage_banner_firstrun.png differ diff --git a/mobile/android/base/resources/drawable-hdpi/ic_action_settings.png b/mobile/android/base/resources/drawable-hdpi/ic_action_settings.png index c088bdd23f7a..38129ea360eb 100644 Binary files a/mobile/android/base/resources/drawable-hdpi/ic_action_settings.png and b/mobile/android/base/resources/drawable-hdpi/ic_action_settings.png differ diff --git a/mobile/android/base/resources/drawable-hdpi/ic_url_bar_tab.png b/mobile/android/base/resources/drawable-hdpi/ic_url_bar_tab.png index 168894b34a84..104be017d475 100644 Binary files a/mobile/android/base/resources/drawable-hdpi/ic_url_bar_tab.png and b/mobile/android/base/resources/drawable-hdpi/ic_url_bar_tab.png differ diff --git a/mobile/android/base/resources/drawable-hdpi/ic_widget_new_tab.png b/mobile/android/base/resources/drawable-hdpi/ic_widget_new_tab.png index 6e9ed330c8f7..1067fa19b7e7 100644 Binary files a/mobile/android/base/resources/drawable-hdpi/ic_widget_new_tab.png and b/mobile/android/base/resources/drawable-hdpi/ic_widget_new_tab.png differ diff --git a/mobile/android/base/resources/drawable-hdpi/ic_widget_search.png b/mobile/android/base/resources/drawable-hdpi/ic_widget_search.png index 4724a95eae9f..7eecf6879ecd 100644 Binary files a/mobile/android/base/resources/drawable-hdpi/ic_widget_search.png and b/mobile/android/base/resources/drawable-hdpi/ic_widget_search.png differ diff --git a/mobile/android/base/resources/drawable-hdpi/icon_key.png b/mobile/android/base/resources/drawable-hdpi/icon_key.png index e6a7ab9f11dd..ad60f8e400d2 100644 Binary files a/mobile/android/base/resources/drawable-hdpi/icon_key.png and b/mobile/android/base/resources/drawable-hdpi/icon_key.png differ diff --git a/mobile/android/base/resources/drawable-hdpi/icon_search_empty_firefox.png b/mobile/android/base/resources/drawable-hdpi/icon_search_empty_firefox.png index 23343813e553..34349032416c 100644 Binary files a/mobile/android/base/resources/drawable-hdpi/icon_search_empty_firefox.png and b/mobile/android/base/resources/drawable-hdpi/icon_search_empty_firefox.png differ diff --git a/mobile/android/base/resources/drawable-hdpi/icon_shareplane.png b/mobile/android/base/resources/drawable-hdpi/icon_shareplane.png new file mode 100644 index 000000000000..5bd8e8b7074a Binary files /dev/null and b/mobile/android/base/resources/drawable-hdpi/icon_shareplane.png differ diff --git a/mobile/android/base/resources/drawable-hdpi/lock_identified.png b/mobile/android/base/resources/drawable-hdpi/lock_identified.png index 781682895789..a37dc1657b06 100644 Binary files a/mobile/android/base/resources/drawable-hdpi/lock_identified.png and b/mobile/android/base/resources/drawable-hdpi/lock_identified.png differ diff --git a/mobile/android/base/resources/drawable-hdpi/lock_verified.png b/mobile/android/base/resources/drawable-hdpi/lock_verified.png index d1e8ed7dc322..3bdf7f8174e8 100644 Binary files a/mobile/android/base/resources/drawable-hdpi/lock_verified.png and b/mobile/android/base/resources/drawable-hdpi/lock_verified.png differ diff --git a/mobile/android/base/resources/drawable-hdpi/media_bar_pause.png b/mobile/android/base/resources/drawable-hdpi/media_bar_pause.png index 9628faf310a6..8ac36f0a5780 100644 Binary files a/mobile/android/base/resources/drawable-hdpi/media_bar_pause.png and b/mobile/android/base/resources/drawable-hdpi/media_bar_pause.png differ diff --git a/mobile/android/base/resources/drawable-hdpi/menu.png b/mobile/android/base/resources/drawable-hdpi/menu.png index 703713427cc8..286b971b5372 100644 Binary files a/mobile/android/base/resources/drawable-hdpi/menu.png and b/mobile/android/base/resources/drawable-hdpi/menu.png differ diff --git a/mobile/android/base/resources/drawable-hdpi/menu_item_uncheck.png b/mobile/android/base/resources/drawable-hdpi/menu_item_uncheck.png index 005dc96a4da2..64e867d45514 100644 Binary files a/mobile/android/base/resources/drawable-hdpi/menu_item_uncheck.png and b/mobile/android/base/resources/drawable-hdpi/menu_item_uncheck.png differ diff --git a/mobile/android/base/resources/drawable-hdpi/menu_light.png b/mobile/android/base/resources/drawable-hdpi/menu_light.png index fe90cd9b9c94..0590b4eabdcb 100644 Binary files a/mobile/android/base/resources/drawable-hdpi/menu_light.png and b/mobile/android/base/resources/drawable-hdpi/menu_light.png differ diff --git a/mobile/android/base/resources/drawable-hdpi/menu_tabs.png b/mobile/android/base/resources/drawable-hdpi/menu_tabs.png index 703713427cc8..286b971b5372 100644 Binary files a/mobile/android/base/resources/drawable-hdpi/menu_tabs.png and b/mobile/android/base/resources/drawable-hdpi/menu_tabs.png differ diff --git a/mobile/android/base/resources/drawable-hdpi/network_error.png b/mobile/android/base/resources/drawable-hdpi/network_error.png index 4407781b5267..bd56d00f7feb 100644 Binary files a/mobile/android/base/resources/drawable-hdpi/network_error.png and b/mobile/android/base/resources/drawable-hdpi/network_error.png differ diff --git a/mobile/android/base/resources/drawable-hdpi/new_tablet_tab_close.png b/mobile/android/base/resources/drawable-hdpi/new_tablet_tab_close.png index f6135d6d53f4..735f8ac1cd98 100644 Binary files a/mobile/android/base/resources/drawable-hdpi/new_tablet_tab_close.png and b/mobile/android/base/resources/drawable-hdpi/new_tablet_tab_close.png differ diff --git a/mobile/android/base/resources/drawable-hdpi/onboard_start_addon.png b/mobile/android/base/resources/drawable-hdpi/onboard_start_addon.png index 612fb3cd9ac1..36358967f3de 100644 Binary files a/mobile/android/base/resources/drawable-hdpi/onboard_start_addon.png and b/mobile/android/base/resources/drawable-hdpi/onboard_start_addon.png differ diff --git a/mobile/android/base/resources/drawable-hdpi/onboard_start_private.png b/mobile/android/base/resources/drawable-hdpi/onboard_start_private.png index 4c0b2f6f3bf0..87778c11db31 100644 Binary files a/mobile/android/base/resources/drawable-hdpi/onboard_start_private.png and b/mobile/android/base/resources/drawable-hdpi/onboard_start_private.png differ diff --git a/mobile/android/base/resources/drawable-hdpi/onboard_start_shield.png b/mobile/android/base/resources/drawable-hdpi/onboard_start_shield.png index 216a3adcfea6..8175c0090a8a 100644 Binary files a/mobile/android/base/resources/drawable-hdpi/onboard_start_shield.png and b/mobile/android/base/resources/drawable-hdpi/onboard_start_shield.png differ diff --git a/mobile/android/base/resources/drawable-hdpi/onboard_start_sync.png b/mobile/android/base/resources/drawable-hdpi/onboard_start_sync.png index abdc49ef1475..8aa710f04e23 100644 Binary files a/mobile/android/base/resources/drawable-hdpi/onboard_start_sync.png and b/mobile/android/base/resources/drawable-hdpi/onboard_start_sync.png differ diff --git a/mobile/android/base/resources/drawable-hdpi/overlay_check.png b/mobile/android/base/resources/drawable-hdpi/overlay_check.png index 19a1374fee79..067c35236899 100644 Binary files a/mobile/android/base/resources/drawable-hdpi/overlay_check.png and b/mobile/android/base/resources/drawable-hdpi/overlay_check.png differ diff --git a/mobile/android/base/resources/drawable-hdpi/search_clear.png b/mobile/android/base/resources/drawable-hdpi/search_clear.png index 122c0d85ac78..703c25d3a5c5 100644 Binary files a/mobile/android/base/resources/drawable-hdpi/search_clear.png and b/mobile/android/base/resources/drawable-hdpi/search_clear.png differ diff --git a/mobile/android/base/resources/drawable-hdpi/search_history.png b/mobile/android/base/resources/drawable-hdpi/search_history.png index 531b23f24cea..c609100e9c30 100644 Binary files a/mobile/android/base/resources/drawable-hdpi/search_history.png and b/mobile/android/base/resources/drawable-hdpi/search_history.png differ diff --git a/mobile/android/base/resources/drawable-hdpi/search_icon_active.png b/mobile/android/base/resources/drawable-hdpi/search_icon_active.png index 0c58a16c6ae6..a957030806ad 100644 Binary files a/mobile/android/base/resources/drawable-hdpi/search_icon_active.png and b/mobile/android/base/resources/drawable-hdpi/search_icon_active.png differ diff --git a/mobile/android/base/resources/drawable-hdpi/search_icon_inactive.png b/mobile/android/base/resources/drawable-hdpi/search_icon_inactive.png index 21f993e0179e..8ce678fd3d52 100644 Binary files a/mobile/android/base/resources/drawable-hdpi/search_icon_inactive.png and b/mobile/android/base/resources/drawable-hdpi/search_icon_inactive.png differ diff --git a/mobile/android/base/resources/drawable-hdpi/search_launcher.png b/mobile/android/base/resources/drawable-hdpi/search_launcher.png index d5895a54fd72..70c0d7630a03 100644 Binary files a/mobile/android/base/resources/drawable-hdpi/search_launcher.png and b/mobile/android/base/resources/drawable-hdpi/search_launcher.png differ diff --git a/mobile/android/base/resources/drawable-hdpi/search_plus.png b/mobile/android/base/resources/drawable-hdpi/search_plus.png index 6f61c93d8438..3f56ee1e60e3 100644 Binary files a/mobile/android/base/resources/drawable-hdpi/search_plus.png and b/mobile/android/base/resources/drawable-hdpi/search_plus.png differ diff --git a/mobile/android/base/resources/drawable-hdpi/share_plane.png b/mobile/android/base/resources/drawable-hdpi/share_plane.png deleted file mode 100644 index f312ed4a941c..000000000000 Binary files a/mobile/android/base/resources/drawable-hdpi/share_plane.png and /dev/null differ diff --git a/mobile/android/base/resources/drawable-hdpi/shield_disabled.png b/mobile/android/base/resources/drawable-hdpi/shield_disabled.png index 428cfdda6af2..01166d0e1e00 100644 Binary files a/mobile/android/base/resources/drawable-hdpi/shield_disabled.png and b/mobile/android/base/resources/drawable-hdpi/shield_disabled.png differ diff --git a/mobile/android/base/resources/drawable-hdpi/shield_disabled_doorhanger.png b/mobile/android/base/resources/drawable-hdpi/shield_disabled_doorhanger.png index fcfd77dd5b5f..809da0848177 100644 Binary files a/mobile/android/base/resources/drawable-hdpi/shield_disabled_doorhanger.png and b/mobile/android/base/resources/drawable-hdpi/shield_disabled_doorhanger.png differ diff --git a/mobile/android/base/resources/drawable-hdpi/shield_enabled_doorhanger.png b/mobile/android/base/resources/drawable-hdpi/shield_enabled_doorhanger.png index 80592faa8bd3..5a85036ff7dd 100644 Binary files a/mobile/android/base/resources/drawable-hdpi/shield_enabled_doorhanger.png and b/mobile/android/base/resources/drawable-hdpi/shield_enabled_doorhanger.png differ diff --git a/mobile/android/base/resources/drawable-hdpi/suggestion_item_search.png b/mobile/android/base/resources/drawable-hdpi/suggestion_item_search.png old mode 100755 new mode 100644 index 21f993e0179e..8ce678fd3d52 Binary files a/mobile/android/base/resources/drawable-hdpi/suggestion_item_search.png and b/mobile/android/base/resources/drawable-hdpi/suggestion_item_search.png differ diff --git a/mobile/android/base/resources/drawable-hdpi/sync_desktop.png b/mobile/android/base/resources/drawable-hdpi/sync_desktop.png index f8ea56b3357a..81477dd62d51 100644 Binary files a/mobile/android/base/resources/drawable-hdpi/sync_desktop.png and b/mobile/android/base/resources/drawable-hdpi/sync_desktop.png differ diff --git a/mobile/android/base/resources/drawable-hdpi/sync_desktop_inactive.png b/mobile/android/base/resources/drawable-hdpi/sync_desktop_inactive.png index 4a9886f62017..c7a0502fea64 100644 Binary files a/mobile/android/base/resources/drawable-hdpi/sync_desktop_inactive.png and b/mobile/android/base/resources/drawable-hdpi/sync_desktop_inactive.png differ diff --git a/mobile/android/base/resources/drawable-hdpi/sync_mobile.png b/mobile/android/base/resources/drawable-hdpi/sync_mobile.png index 7c9d0ad8b48d..26639fab7da4 100644 Binary files a/mobile/android/base/resources/drawable-hdpi/sync_mobile.png and b/mobile/android/base/resources/drawable-hdpi/sync_mobile.png differ diff --git a/mobile/android/base/resources/drawable-hdpi/sync_mobile_inactive.png b/mobile/android/base/resources/drawable-hdpi/sync_mobile_inactive.png index 76f8039042e5..1c1a5fc3dd9c 100644 Binary files a/mobile/android/base/resources/drawable-hdpi/sync_mobile_inactive.png and b/mobile/android/base/resources/drawable-hdpi/sync_mobile_inactive.png differ diff --git a/mobile/android/base/resources/drawable-hdpi/sync_promo.png b/mobile/android/base/resources/drawable-hdpi/sync_promo.png index 9d47956d3325..13fa55ec71e8 100644 Binary files a/mobile/android/base/resources/drawable-hdpi/sync_promo.png and b/mobile/android/base/resources/drawable-hdpi/sync_promo.png differ diff --git a/mobile/android/base/resources/drawable-hdpi/tab_indicator_background.9.png b/mobile/android/base/resources/drawable-hdpi/tab_indicator_background.9.png index b093b1078d3f..0702df4bce46 100644 Binary files a/mobile/android/base/resources/drawable-hdpi/tab_indicator_background.9.png and b/mobile/android/base/resources/drawable-hdpi/tab_indicator_background.9.png differ diff --git a/mobile/android/base/resources/drawable-hdpi/tab_indicator_divider.9.png b/mobile/android/base/resources/drawable-hdpi/tab_indicator_divider.9.png index 8792e9e9db13..0d4ce430ba7f 100644 Binary files a/mobile/android/base/resources/drawable-hdpi/tab_indicator_divider.9.png and b/mobile/android/base/resources/drawable-hdpi/tab_indicator_divider.9.png differ diff --git a/mobile/android/base/resources/drawable-hdpi/tab_indicator_selected.9.png b/mobile/android/base/resources/drawable-hdpi/tab_indicator_selected.9.png index faa598acd28a..388c9efb8a27 100644 Binary files a/mobile/android/base/resources/drawable-hdpi/tab_indicator_selected.9.png and b/mobile/android/base/resources/drawable-hdpi/tab_indicator_selected.9.png differ diff --git a/mobile/android/base/resources/drawable-hdpi/tab_indicator_selected_focused.9.png b/mobile/android/base/resources/drawable-hdpi/tab_indicator_selected_focused.9.png index 535212c01167..888afb195e19 100644 Binary files a/mobile/android/base/resources/drawable-hdpi/tab_indicator_selected_focused.9.png and b/mobile/android/base/resources/drawable-hdpi/tab_indicator_selected_focused.9.png differ diff --git a/mobile/android/base/resources/drawable-hdpi/tab_new.png b/mobile/android/base/resources/drawable-hdpi/tab_new.png index 655146f5290d..bd7d55de2910 100644 Binary files a/mobile/android/base/resources/drawable-hdpi/tab_new.png and b/mobile/android/base/resources/drawable-hdpi/tab_new.png differ diff --git a/mobile/android/base/resources/drawable-hdpi/tab_panel_tab_globe.png b/mobile/android/base/resources/drawable-hdpi/tab_panel_tab_globe.png index 44d4547b127a..c93121433ddb 100644 Binary files a/mobile/android/base/resources/drawable-hdpi/tab_panel_tab_globe.png and b/mobile/android/base/resources/drawable-hdpi/tab_panel_tab_globe.png differ diff --git a/mobile/android/base/resources/drawable-hdpi/tabs_count.png b/mobile/android/base/resources/drawable-hdpi/tabs_count.png index af141a63acc2..c336982473dd 100644 Binary files a/mobile/android/base/resources/drawable-hdpi/tabs_count.png and b/mobile/android/base/resources/drawable-hdpi/tabs_count.png differ diff --git a/mobile/android/base/resources/drawable-hdpi/tabs_count_foreground.png b/mobile/android/base/resources/drawable-hdpi/tabs_count_foreground.png index 1f5cbaf225b8..6a26f8e3dae0 100644 Binary files a/mobile/android/base/resources/drawable-hdpi/tabs_count_foreground.png and b/mobile/android/base/resources/drawable-hdpi/tabs_count_foreground.png differ diff --git a/mobile/android/base/resources/drawable-hdpi/tabs_private.png b/mobile/android/base/resources/drawable-hdpi/tabs_private.png index 172a71201932..6d5591e1e556 100644 Binary files a/mobile/android/base/resources/drawable-hdpi/tabs_private.png and b/mobile/android/base/resources/drawable-hdpi/tabs_private.png differ diff --git a/mobile/android/base/resources/drawable-hdpi/top_site_add.png b/mobile/android/base/resources/drawable-hdpi/top_site_add.png index da1e5d4d8e52..a94bce623c5a 100644 Binary files a/mobile/android/base/resources/drawable-hdpi/top_site_add.png and b/mobile/android/base/resources/drawable-hdpi/top_site_add.png differ diff --git a/mobile/android/base/resources/drawable-hdpi/undo_button_icon.png b/mobile/android/base/resources/drawable-hdpi/undo_button_icon.png index 4b1a8be6c90b..030d5247efb5 100644 Binary files a/mobile/android/base/resources/drawable-hdpi/undo_button_icon.png and b/mobile/android/base/resources/drawable-hdpi/undo_button_icon.png differ diff --git a/mobile/android/base/resources/drawable-hdpi/url_bar_entry_default.9.png b/mobile/android/base/resources/drawable-hdpi/url_bar_entry_default.9.png index ce90e3688de4..4a733d0edd76 100644 Binary files a/mobile/android/base/resources/drawable-hdpi/url_bar_entry_default.9.png and b/mobile/android/base/resources/drawable-hdpi/url_bar_entry_default.9.png differ diff --git a/mobile/android/base/resources/drawable-hdpi/url_bar_entry_default_pb.9.png b/mobile/android/base/resources/drawable-hdpi/url_bar_entry_default_pb.9.png index d1360c992cb7..001f03779a17 100644 Binary files a/mobile/android/base/resources/drawable-hdpi/url_bar_entry_default_pb.9.png and b/mobile/android/base/resources/drawable-hdpi/url_bar_entry_default_pb.9.png differ diff --git a/mobile/android/base/resources/drawable-hdpi/url_bar_entry_pressed.9.png b/mobile/android/base/resources/drawable-hdpi/url_bar_entry_pressed.9.png index 2d7b460c706b..33adefc60ab0 100644 Binary files a/mobile/android/base/resources/drawable-hdpi/url_bar_entry_pressed.9.png and b/mobile/android/base/resources/drawable-hdpi/url_bar_entry_pressed.9.png differ diff --git a/mobile/android/base/resources/drawable-hdpi/url_bar_entry_pressed_pb.9.png b/mobile/android/base/resources/drawable-hdpi/url_bar_entry_pressed_pb.9.png index aa59b1edcda5..ffd2249dc0d0 100644 Binary files a/mobile/android/base/resources/drawable-hdpi/url_bar_entry_pressed_pb.9.png and b/mobile/android/base/resources/drawable-hdpi/url_bar_entry_pressed_pb.9.png differ diff --git a/mobile/android/base/resources/drawable-hdpi/widget_bg.9.png b/mobile/android/base/resources/drawable-hdpi/widget_bg.9.png index a016543610e0..478d0dd50c16 100644 Binary files a/mobile/android/base/resources/drawable-hdpi/widget_bg.9.png and b/mobile/android/base/resources/drawable-hdpi/widget_bg.9.png differ diff --git a/mobile/android/base/resources/drawable-large-hdpi-v11/arrow_popup_bg.9.png b/mobile/android/base/resources/drawable-large-hdpi-v11/arrow_popup_bg.9.png index b3c983313714..db106e687fa7 100644 Binary files a/mobile/android/base/resources/drawable-large-hdpi-v11/arrow_popup_bg.9.png and b/mobile/android/base/resources/drawable-large-hdpi-v11/arrow_popup_bg.9.png differ diff --git a/mobile/android/base/resources/drawable-large-hdpi-v11/menu_tabs.png b/mobile/android/base/resources/drawable-large-hdpi-v11/menu_tabs.png index 703713427cc8..286b971b5372 100644 Binary files a/mobile/android/base/resources/drawable-large-hdpi-v11/menu_tabs.png and b/mobile/android/base/resources/drawable-large-hdpi-v11/menu_tabs.png differ diff --git a/mobile/android/base/resources/drawable-large-hdpi-v11/new_tablet_nav_back.png b/mobile/android/base/resources/drawable-large-hdpi-v11/new_tablet_nav_back.png index 1754c44edc86..afacf74d65f0 100644 Binary files a/mobile/android/base/resources/drawable-large-hdpi-v11/new_tablet_nav_back.png and b/mobile/android/base/resources/drawable-large-hdpi-v11/new_tablet_nav_back.png differ diff --git a/mobile/android/base/resources/drawable-large-hdpi-v11/new_tablet_tab_new_dark.png b/mobile/android/base/resources/drawable-large-hdpi-v11/new_tablet_tab_new_dark.png index b29e972af98f..533db4713db5 100644 Binary files a/mobile/android/base/resources/drawable-large-hdpi-v11/new_tablet_tab_new_dark.png and b/mobile/android/base/resources/drawable-large-hdpi-v11/new_tablet_tab_new_dark.png differ diff --git a/mobile/android/base/resources/drawable-large-mdpi-v11/arrow_popup_bg.9.png b/mobile/android/base/resources/drawable-large-mdpi-v11/arrow_popup_bg.9.png index f9bc33edcf2b..88dc6ee6e9ee 100644 Binary files a/mobile/android/base/resources/drawable-large-mdpi-v11/arrow_popup_bg.9.png and b/mobile/android/base/resources/drawable-large-mdpi-v11/arrow_popup_bg.9.png differ diff --git a/mobile/android/base/resources/drawable-large-mdpi-v11/menu_tabs.png b/mobile/android/base/resources/drawable-large-mdpi-v11/menu_tabs.png index 97ea84dc41d7..95359bed7f10 100644 Binary files a/mobile/android/base/resources/drawable-large-mdpi-v11/menu_tabs.png and b/mobile/android/base/resources/drawable-large-mdpi-v11/menu_tabs.png differ diff --git a/mobile/android/base/resources/drawable-large-mdpi-v11/new_tablet_nav_back.png b/mobile/android/base/resources/drawable-large-mdpi-v11/new_tablet_nav_back.png index 311c8ac7f8b8..6a0f18b4008a 100644 Binary files a/mobile/android/base/resources/drawable-large-mdpi-v11/new_tablet_nav_back.png and b/mobile/android/base/resources/drawable-large-mdpi-v11/new_tablet_nav_back.png differ diff --git a/mobile/android/base/resources/drawable-large-mdpi-v11/new_tablet_tab_new_dark.png b/mobile/android/base/resources/drawable-large-mdpi-v11/new_tablet_tab_new_dark.png index e674cd8553b3..c2901acc5c3f 100644 Binary files a/mobile/android/base/resources/drawable-large-mdpi-v11/new_tablet_tab_new_dark.png and b/mobile/android/base/resources/drawable-large-mdpi-v11/new_tablet_tab_new_dark.png differ diff --git a/mobile/android/base/resources/drawable-large-xhdpi-v11/arrow_popup_bg.9.png b/mobile/android/base/resources/drawable-large-xhdpi-v11/arrow_popup_bg.9.png index e63f57d93504..1757423c3a0c 100644 Binary files a/mobile/android/base/resources/drawable-large-xhdpi-v11/arrow_popup_bg.9.png and b/mobile/android/base/resources/drawable-large-xhdpi-v11/arrow_popup_bg.9.png differ diff --git a/mobile/android/base/resources/drawable-large-xhdpi-v11/menu_tabs.png b/mobile/android/base/resources/drawable-large-xhdpi-v11/menu_tabs.png index 5ef07f717982..e6b549401c13 100644 Binary files a/mobile/android/base/resources/drawable-large-xhdpi-v11/menu_tabs.png and b/mobile/android/base/resources/drawable-large-xhdpi-v11/menu_tabs.png differ diff --git a/mobile/android/base/resources/drawable-large-xhdpi-v11/new_tablet_nav_back.png b/mobile/android/base/resources/drawable-large-xhdpi-v11/new_tablet_nav_back.png index cc8497057d83..9f622b48fe25 100644 Binary files a/mobile/android/base/resources/drawable-large-xhdpi-v11/new_tablet_nav_back.png and b/mobile/android/base/resources/drawable-large-xhdpi-v11/new_tablet_nav_back.png differ diff --git a/mobile/android/base/resources/drawable-large-xhdpi-v11/new_tablet_tab_new_dark.png b/mobile/android/base/resources/drawable-large-xhdpi-v11/new_tablet_tab_new_dark.png index a7aa51e48758..887f458c8991 100644 Binary files a/mobile/android/base/resources/drawable-large-xhdpi-v11/new_tablet_tab_new_dark.png and b/mobile/android/base/resources/drawable-large-xhdpi-v11/new_tablet_tab_new_dark.png differ diff --git a/mobile/android/base/resources/drawable-large-xxhdpi-v11/new_tablet_nav_back.png b/mobile/android/base/resources/drawable-large-xxhdpi-v11/new_tablet_nav_back.png index de7b10121183..e78427d65ca1 100644 Binary files a/mobile/android/base/resources/drawable-large-xxhdpi-v11/new_tablet_nav_back.png and b/mobile/android/base/resources/drawable-large-xxhdpi-v11/new_tablet_nav_back.png differ diff --git a/mobile/android/base/resources/drawable-ldpi/fxaccount_intro.png b/mobile/android/base/resources/drawable-ldpi/fxaccount_intro.png index 5599f931a917..dd5e0b83593d 100644 Binary files a/mobile/android/base/resources/drawable-ldpi/fxaccount_intro.png and b/mobile/android/base/resources/drawable-ldpi/fxaccount_intro.png differ diff --git a/mobile/android/base/resources/drawable-mdpi-v11/alert_camera.png b/mobile/android/base/resources/drawable-mdpi-v11/alert_camera.png index fb2bac96dfe6..85a2ff27937e 100644 Binary files a/mobile/android/base/resources/drawable-mdpi-v11/alert_camera.png and b/mobile/android/base/resources/drawable-mdpi-v11/alert_camera.png differ diff --git a/mobile/android/base/resources/drawable-mdpi-v11/alert_guest.png b/mobile/android/base/resources/drawable-mdpi-v11/alert_guest.png index 051b13f8b8e2..af5734e6557a 100644 Binary files a/mobile/android/base/resources/drawable-mdpi-v11/alert_guest.png and b/mobile/android/base/resources/drawable-mdpi-v11/alert_guest.png differ diff --git a/mobile/android/base/resources/drawable-mdpi-v11/ic_menu_find_in_page.png b/mobile/android/base/resources/drawable-mdpi-v11/ic_menu_find_in_page.png index 049a17ca202a..5a824976307a 100644 Binary files a/mobile/android/base/resources/drawable-mdpi-v11/ic_menu_find_in_page.png and b/mobile/android/base/resources/drawable-mdpi-v11/ic_menu_find_in_page.png differ diff --git a/mobile/android/base/resources/drawable-mdpi-v11/ic_menu_new_tab.png b/mobile/android/base/resources/drawable-mdpi-v11/ic_menu_new_tab.png index 810f0c144575..48cd33995552 100644 Binary files a/mobile/android/base/resources/drawable-mdpi-v11/ic_menu_new_tab.png and b/mobile/android/base/resources/drawable-mdpi-v11/ic_menu_new_tab.png differ diff --git a/mobile/android/base/resources/drawable-mdpi-v11/ic_menu_reload.png b/mobile/android/base/resources/drawable-mdpi-v11/ic_menu_reload.png index c4e6e8da6ff7..2f34541b2a52 100644 Binary files a/mobile/android/base/resources/drawable-mdpi-v11/ic_menu_reload.png and b/mobile/android/base/resources/drawable-mdpi-v11/ic_menu_reload.png differ diff --git a/mobile/android/base/resources/drawable-mdpi-v11/ic_status_logo.png b/mobile/android/base/resources/drawable-mdpi-v11/ic_status_logo.png index 4b70e777e357..6d00eae80058 100644 Binary files a/mobile/android/base/resources/drawable-mdpi-v11/ic_status_logo.png and b/mobile/android/base/resources/drawable-mdpi-v11/ic_status_logo.png differ diff --git a/mobile/android/base/resources/drawable-mdpi/ab_add_search_engine.png b/mobile/android/base/resources/drawable-mdpi/ab_add_search_engine.png index 99fd3827e06a..b6496570134a 100644 Binary files a/mobile/android/base/resources/drawable-mdpi/ab_add_search_engine.png and b/mobile/android/base/resources/drawable-mdpi/ab_add_search_engine.png differ diff --git a/mobile/android/base/resources/drawable-mdpi/ab_background.9.png b/mobile/android/base/resources/drawable-mdpi/ab_background.9.png index bad01d12080a..c09c8b6e7812 100644 Binary files a/mobile/android/base/resources/drawable-mdpi/ab_background.9.png and b/mobile/android/base/resources/drawable-mdpi/ab_background.9.png differ diff --git a/mobile/android/base/resources/drawable-mdpi/ab_copy.png b/mobile/android/base/resources/drawable-mdpi/ab_copy.png index e83624eb1e3d..baf56c3f2a59 100644 Binary files a/mobile/android/base/resources/drawable-mdpi/ab_copy.png and b/mobile/android/base/resources/drawable-mdpi/ab_copy.png differ diff --git a/mobile/android/base/resources/drawable-mdpi/ab_mic.png b/mobile/android/base/resources/drawable-mdpi/ab_mic.png index 67e3465d8d45..2834094c7d45 100644 Binary files a/mobile/android/base/resources/drawable-mdpi/ab_mic.png and b/mobile/android/base/resources/drawable-mdpi/ab_mic.png differ diff --git a/mobile/android/base/resources/drawable-mdpi/ab_paste.png b/mobile/android/base/resources/drawable-mdpi/ab_paste.png index df6844d206c0..8981060c1de2 100644 Binary files a/mobile/android/base/resources/drawable-mdpi/ab_paste.png and b/mobile/android/base/resources/drawable-mdpi/ab_paste.png differ diff --git a/mobile/android/base/resources/drawable-mdpi/ab_search.png b/mobile/android/base/resources/drawable-mdpi/ab_search.png index 34c6cdb4b859..2c8e24656d2d 100644 Binary files a/mobile/android/base/resources/drawable-mdpi/ab_search.png and b/mobile/android/base/resources/drawable-mdpi/ab_search.png differ diff --git a/mobile/android/base/resources/drawable-mdpi/ab_select_all.png b/mobile/android/base/resources/drawable-mdpi/ab_select_all.png index 1534e188d138..1f000ac7a893 100644 Binary files a/mobile/android/base/resources/drawable-mdpi/ab_select_all.png and b/mobile/android/base/resources/drawable-mdpi/ab_select_all.png differ diff --git a/mobile/android/base/resources/drawable-mdpi/alert_download.png b/mobile/android/base/resources/drawable-mdpi/alert_download.png index b6755b6c94b0..fff1d3dff1ba 100644 Binary files a/mobile/android/base/resources/drawable-mdpi/alert_download.png and b/mobile/android/base/resources/drawable-mdpi/alert_download.png differ diff --git a/mobile/android/base/resources/drawable-mdpi/alert_guest.png b/mobile/android/base/resources/drawable-mdpi/alert_guest.png index 40e5ccac9ef9..ec97ed90de50 100644 Binary files a/mobile/android/base/resources/drawable-mdpi/alert_guest.png and b/mobile/android/base/resources/drawable-mdpi/alert_guest.png differ diff --git a/mobile/android/base/resources/drawable-mdpi/alert_mic.png b/mobile/android/base/resources/drawable-mdpi/alert_mic.png index 0b5ccb2ee9a9..a50ea57455c8 100644 Binary files a/mobile/android/base/resources/drawable-mdpi/alert_mic.png and b/mobile/android/base/resources/drawable-mdpi/alert_mic.png differ diff --git a/mobile/android/base/resources/drawable-mdpi/autocomplete_list_bg.9.png b/mobile/android/base/resources/drawable-mdpi/autocomplete_list_bg.9.png index c7bb4ee903f5..69945471734e 100644 Binary files a/mobile/android/base/resources/drawable-mdpi/autocomplete_list_bg.9.png and b/mobile/android/base/resources/drawable-mdpi/autocomplete_list_bg.9.png differ diff --git a/mobile/android/base/resources/drawable-mdpi/device_mobile.png b/mobile/android/base/resources/drawable-mdpi/device_mobile.png index 99989be618aa..87008953ff68 100644 Binary files a/mobile/android/base/resources/drawable-mdpi/device_mobile.png and b/mobile/android/base/resources/drawable-mdpi/device_mobile.png differ diff --git a/mobile/android/base/resources/drawable-mdpi/favicon_globe.png b/mobile/android/base/resources/drawable-mdpi/favicon_globe.png index c20ab864297a..dbfd1fc90878 100644 Binary files a/mobile/android/base/resources/drawable-mdpi/favicon_globe.png and b/mobile/android/base/resources/drawable-mdpi/favicon_globe.png differ diff --git a/mobile/android/base/resources/drawable-mdpi/favicon_search.png b/mobile/android/base/resources/drawable-mdpi/favicon_search.png old mode 100755 new mode 100644 index 9342fd3ae1cf..c8f027fafae4 Binary files a/mobile/android/base/resources/drawable-mdpi/favicon_search.png and b/mobile/android/base/resources/drawable-mdpi/favicon_search.png differ diff --git a/mobile/android/base/resources/drawable-mdpi/find_prev.png b/mobile/android/base/resources/drawable-mdpi/find_prev.png index 90b7714687db..3c7b23859aca 100644 Binary files a/mobile/android/base/resources/drawable-mdpi/find_prev.png and b/mobile/android/base/resources/drawable-mdpi/find_prev.png differ diff --git a/mobile/android/base/resources/drawable-mdpi/firefox_settings_alert.png b/mobile/android/base/resources/drawable-mdpi/firefox_settings_alert.png index 11fff3e9ebd2..3d21034cba1e 100644 Binary files a/mobile/android/base/resources/drawable-mdpi/firefox_settings_alert.png and b/mobile/android/base/resources/drawable-mdpi/firefox_settings_alert.png differ diff --git a/mobile/android/base/resources/drawable-mdpi/fxaccount_checkbox.png b/mobile/android/base/resources/drawable-mdpi/fxaccount_checkbox.png index 1a50daf6de8d..d1f37711322f 100644 Binary files a/mobile/android/base/resources/drawable-mdpi/fxaccount_checkbox.png and b/mobile/android/base/resources/drawable-mdpi/fxaccount_checkbox.png differ diff --git a/mobile/android/base/resources/drawable-mdpi/fxaccount_ddarrow_inactive.png b/mobile/android/base/resources/drawable-mdpi/fxaccount_ddarrow_inactive.png index 7d82a89cb183..2f39ab6fa62e 100644 Binary files a/mobile/android/base/resources/drawable-mdpi/fxaccount_ddarrow_inactive.png and b/mobile/android/base/resources/drawable-mdpi/fxaccount_ddarrow_inactive.png differ diff --git a/mobile/android/base/resources/drawable-mdpi/fxaccount_intro.png b/mobile/android/base/resources/drawable-mdpi/fxaccount_intro.png index 89caec5c1311..35957fc894d3 100644 Binary files a/mobile/android/base/resources/drawable-mdpi/fxaccount_intro.png and b/mobile/android/base/resources/drawable-mdpi/fxaccount_intro.png differ diff --git a/mobile/android/base/resources/drawable-mdpi/fxaccount_mail.png b/mobile/android/base/resources/drawable-mdpi/fxaccount_mail.png index bcb5f1596358..95dd5900677c 100644 Binary files a/mobile/android/base/resources/drawable-mdpi/fxaccount_mail.png and b/mobile/android/base/resources/drawable-mdpi/fxaccount_mail.png differ diff --git a/mobile/android/base/resources/drawable-mdpi/fxaccount_sync_error.png b/mobile/android/base/resources/drawable-mdpi/fxaccount_sync_error.png index 71f60fb224ee..7f8eaaf6edda 100644 Binary files a/mobile/android/base/resources/drawable-mdpi/fxaccount_sync_error.png and b/mobile/android/base/resources/drawable-mdpi/fxaccount_sync_error.png differ diff --git a/mobile/android/base/resources/drawable-mdpi/grid_icon_bg_activated.9.png b/mobile/android/base/resources/drawable-mdpi/grid_icon_bg_activated.9.png index 3bb409bdd7a4..1e7f32156f9f 100644 Binary files a/mobile/android/base/resources/drawable-mdpi/grid_icon_bg_activated.9.png and b/mobile/android/base/resources/drawable-mdpi/grid_icon_bg_activated.9.png differ diff --git a/mobile/android/base/resources/drawable-mdpi/home_group_collapsed.png b/mobile/android/base/resources/drawable-mdpi/home_group_collapsed.png index 667c6d59a203..43ffc1cc3c59 100644 Binary files a/mobile/android/base/resources/drawable-mdpi/home_group_collapsed.png and b/mobile/android/base/resources/drawable-mdpi/home_group_collapsed.png differ diff --git a/mobile/android/base/resources/drawable-mdpi/home_group_expanded.png b/mobile/android/base/resources/drawable-mdpi/home_group_expanded.png index 3e497fcd6891..71973e64460b 100644 Binary files a/mobile/android/base/resources/drawable-mdpi/home_group_expanded.png and b/mobile/android/base/resources/drawable-mdpi/home_group_expanded.png differ diff --git a/mobile/android/base/resources/drawable-mdpi/home_tab_menu_strip.9.png b/mobile/android/base/resources/drawable-mdpi/home_tab_menu_strip.9.png index b9ab3d0db63d..7f2986af2a5f 100644 Binary files a/mobile/android/base/resources/drawable-mdpi/home_tab_menu_strip.9.png and b/mobile/android/base/resources/drawable-mdpi/home_tab_menu_strip.9.png differ diff --git a/mobile/android/base/resources/drawable-mdpi/homepage_banner_firstrun.png b/mobile/android/base/resources/drawable-mdpi/homepage_banner_firstrun.png index 83866d775d51..d86fc3b415dc 100644 Binary files a/mobile/android/base/resources/drawable-mdpi/homepage_banner_firstrun.png and b/mobile/android/base/resources/drawable-mdpi/homepage_banner_firstrun.png differ diff --git a/mobile/android/base/resources/drawable-mdpi/ic_action_settings.png b/mobile/android/base/resources/drawable-mdpi/ic_action_settings.png index 371f06e1c185..05de5ae43c2f 100644 Binary files a/mobile/android/base/resources/drawable-mdpi/ic_action_settings.png and b/mobile/android/base/resources/drawable-mdpi/ic_action_settings.png differ diff --git a/mobile/android/base/resources/drawable-mdpi/ic_menu_addons_filler.png b/mobile/android/base/resources/drawable-mdpi/ic_menu_addons_filler.png index 824379c18a41..37a783e0b85b 100644 Binary files a/mobile/android/base/resources/drawable-mdpi/ic_menu_addons_filler.png and b/mobile/android/base/resources/drawable-mdpi/ic_menu_addons_filler.png differ diff --git a/mobile/android/base/resources/drawable-mdpi/ic_menu_guest.png b/mobile/android/base/resources/drawable-mdpi/ic_menu_guest.png index 73c4d1082029..17150b4494ad 100644 Binary files a/mobile/android/base/resources/drawable-mdpi/ic_menu_guest.png and b/mobile/android/base/resources/drawable-mdpi/ic_menu_guest.png differ diff --git a/mobile/android/base/resources/drawable-mdpi/ic_url_bar_star.png b/mobile/android/base/resources/drawable-mdpi/ic_url_bar_star.png index a47e114f5550..3ae58b45df78 100644 Binary files a/mobile/android/base/resources/drawable-mdpi/ic_url_bar_star.png and b/mobile/android/base/resources/drawable-mdpi/ic_url_bar_star.png differ diff --git a/mobile/android/base/resources/drawable-mdpi/ic_widget_new_tab.png b/mobile/android/base/resources/drawable-mdpi/ic_widget_new_tab.png index 229140770a5e..9f888f3efd97 100644 Binary files a/mobile/android/base/resources/drawable-mdpi/ic_widget_new_tab.png and b/mobile/android/base/resources/drawable-mdpi/ic_widget_new_tab.png differ diff --git a/mobile/android/base/resources/drawable-mdpi/ic_widget_search.png b/mobile/android/base/resources/drawable-mdpi/ic_widget_search.png index db2562642006..e34fc8dac854 100644 Binary files a/mobile/android/base/resources/drawable-mdpi/ic_widget_search.png and b/mobile/android/base/resources/drawable-mdpi/ic_widget_search.png differ diff --git a/mobile/android/base/resources/drawable-mdpi/icon_key.png b/mobile/android/base/resources/drawable-mdpi/icon_key.png index 14d3c53d5435..5b251debb76c 100644 Binary files a/mobile/android/base/resources/drawable-mdpi/icon_key.png and b/mobile/android/base/resources/drawable-mdpi/icon_key.png differ diff --git a/mobile/android/base/resources/drawable-mdpi/icon_pageaction.png b/mobile/android/base/resources/drawable-mdpi/icon_pageaction.png index 22d0c618e0d4..a61c2990e258 100644 Binary files a/mobile/android/base/resources/drawable-mdpi/icon_pageaction.png and b/mobile/android/base/resources/drawable-mdpi/icon_pageaction.png differ diff --git a/mobile/android/base/resources/drawable-mdpi/icon_search_empty_firefox.png b/mobile/android/base/resources/drawable-mdpi/icon_search_empty_firefox.png index dd3172c64006..9b15548d0fee 100644 Binary files a/mobile/android/base/resources/drawable-mdpi/icon_search_empty_firefox.png and b/mobile/android/base/resources/drawable-mdpi/icon_search_empty_firefox.png differ diff --git a/mobile/android/base/resources/drawable-mdpi/icon_shareplane.png b/mobile/android/base/resources/drawable-mdpi/icon_shareplane.png new file mode 100644 index 000000000000..793e610c171a Binary files /dev/null and b/mobile/android/base/resources/drawable-mdpi/icon_shareplane.png differ diff --git a/mobile/android/base/resources/drawable-mdpi/lock_identified.png b/mobile/android/base/resources/drawable-mdpi/lock_identified.png index a464ac1605a8..05d67b9bee22 100644 Binary files a/mobile/android/base/resources/drawable-mdpi/lock_identified.png and b/mobile/android/base/resources/drawable-mdpi/lock_identified.png differ diff --git a/mobile/android/base/resources/drawable-mdpi/lock_verified.png b/mobile/android/base/resources/drawable-mdpi/lock_verified.png index e729acf01f9e..15f207e7b99e 100644 Binary files a/mobile/android/base/resources/drawable-mdpi/lock_verified.png and b/mobile/android/base/resources/drawable-mdpi/lock_verified.png differ diff --git a/mobile/android/base/resources/drawable-mdpi/media_bar_pause.png b/mobile/android/base/resources/drawable-mdpi/media_bar_pause.png index 10ca44850ec0..bfb4458cbf38 100644 Binary files a/mobile/android/base/resources/drawable-mdpi/media_bar_pause.png and b/mobile/android/base/resources/drawable-mdpi/media_bar_pause.png differ diff --git a/mobile/android/base/resources/drawable-mdpi/menu.png b/mobile/android/base/resources/drawable-mdpi/menu.png index 97ea84dc41d7..95359bed7f10 100644 Binary files a/mobile/android/base/resources/drawable-mdpi/menu.png and b/mobile/android/base/resources/drawable-mdpi/menu.png differ diff --git a/mobile/android/base/resources/drawable-mdpi/menu_item_uncheck.png b/mobile/android/base/resources/drawable-mdpi/menu_item_uncheck.png index f7dc437f6ec4..4e8daf3712b6 100644 Binary files a/mobile/android/base/resources/drawable-mdpi/menu_item_uncheck.png and b/mobile/android/base/resources/drawable-mdpi/menu_item_uncheck.png differ diff --git a/mobile/android/base/resources/drawable-mdpi/menu_light.png b/mobile/android/base/resources/drawable-mdpi/menu_light.png index e94ae6bf6ff1..9b3e8f18d0b4 100644 Binary files a/mobile/android/base/resources/drawable-mdpi/menu_light.png and b/mobile/android/base/resources/drawable-mdpi/menu_light.png differ diff --git a/mobile/android/base/resources/drawable-mdpi/menu_tabs.png b/mobile/android/base/resources/drawable-mdpi/menu_tabs.png index 97ea84dc41d7..95359bed7f10 100644 Binary files a/mobile/android/base/resources/drawable-mdpi/menu_tabs.png and b/mobile/android/base/resources/drawable-mdpi/menu_tabs.png differ diff --git a/mobile/android/base/resources/drawable-mdpi/network_error.png b/mobile/android/base/resources/drawable-mdpi/network_error.png index 1ae8a0cb90e7..c5c4b923015a 100644 Binary files a/mobile/android/base/resources/drawable-mdpi/network_error.png and b/mobile/android/base/resources/drawable-mdpi/network_error.png differ diff --git a/mobile/android/base/resources/drawable-mdpi/onboard_start_addon.png b/mobile/android/base/resources/drawable-mdpi/onboard_start_addon.png index 80ec90c478bb..947f687e5461 100644 Binary files a/mobile/android/base/resources/drawable-mdpi/onboard_start_addon.png and b/mobile/android/base/resources/drawable-mdpi/onboard_start_addon.png differ diff --git a/mobile/android/base/resources/drawable-mdpi/onboard_start_private.png b/mobile/android/base/resources/drawable-mdpi/onboard_start_private.png index da8260205f12..1bc23993f670 100644 Binary files a/mobile/android/base/resources/drawable-mdpi/onboard_start_private.png and b/mobile/android/base/resources/drawable-mdpi/onboard_start_private.png differ diff --git a/mobile/android/base/resources/drawable-mdpi/onboard_start_shield.png b/mobile/android/base/resources/drawable-mdpi/onboard_start_shield.png index dde66ce8f3d5..5e5a341eb0d7 100644 Binary files a/mobile/android/base/resources/drawable-mdpi/onboard_start_shield.png and b/mobile/android/base/resources/drawable-mdpi/onboard_start_shield.png differ diff --git a/mobile/android/base/resources/drawable-mdpi/onboard_start_sync.png b/mobile/android/base/resources/drawable-mdpi/onboard_start_sync.png index 396076848f99..8b7693b43748 100644 Binary files a/mobile/android/base/resources/drawable-mdpi/onboard_start_sync.png and b/mobile/android/base/resources/drawable-mdpi/onboard_start_sync.png differ diff --git a/mobile/android/base/resources/drawable-mdpi/overlay_check.png b/mobile/android/base/resources/drawable-mdpi/overlay_check.png index a130d78f2158..b22a85fe8be9 100644 Binary files a/mobile/android/base/resources/drawable-mdpi/overlay_check.png and b/mobile/android/base/resources/drawable-mdpi/overlay_check.png differ diff --git a/mobile/android/base/resources/drawable-mdpi/overlay_readinglist_already_icon.png b/mobile/android/base/resources/drawable-mdpi/overlay_readinglist_already_icon.png index 118c3718695f..748b786f2cb3 100644 Binary files a/mobile/android/base/resources/drawable-mdpi/overlay_readinglist_already_icon.png and b/mobile/android/base/resources/drawable-mdpi/overlay_readinglist_already_icon.png differ diff --git a/mobile/android/base/resources/drawable-mdpi/search_clear.png b/mobile/android/base/resources/drawable-mdpi/search_clear.png index 09602b026138..4ae67bd0a07b 100644 Binary files a/mobile/android/base/resources/drawable-mdpi/search_clear.png and b/mobile/android/base/resources/drawable-mdpi/search_clear.png differ diff --git a/mobile/android/base/resources/drawable-mdpi/search_history.png b/mobile/android/base/resources/drawable-mdpi/search_history.png index 012613cade19..c4003a9b0b26 100644 Binary files a/mobile/android/base/resources/drawable-mdpi/search_history.png and b/mobile/android/base/resources/drawable-mdpi/search_history.png differ diff --git a/mobile/android/base/resources/drawable-mdpi/search_icon_active.png b/mobile/android/base/resources/drawable-mdpi/search_icon_active.png index eaab77eea0a0..7cf64bd7dd5c 100644 Binary files a/mobile/android/base/resources/drawable-mdpi/search_icon_active.png and b/mobile/android/base/resources/drawable-mdpi/search_icon_active.png differ diff --git a/mobile/android/base/resources/drawable-mdpi/search_icon_inactive.png b/mobile/android/base/resources/drawable-mdpi/search_icon_inactive.png index 9342fd3ae1cf..c8f027fafae4 100644 Binary files a/mobile/android/base/resources/drawable-mdpi/search_icon_inactive.png and b/mobile/android/base/resources/drawable-mdpi/search_icon_inactive.png differ diff --git a/mobile/android/base/resources/drawable-mdpi/search_launcher.png b/mobile/android/base/resources/drawable-mdpi/search_launcher.png index a8c874b14236..a97ee2f79c0a 100644 Binary files a/mobile/android/base/resources/drawable-mdpi/search_launcher.png and b/mobile/android/base/resources/drawable-mdpi/search_launcher.png differ diff --git a/mobile/android/base/resources/drawable-mdpi/search_plus.png b/mobile/android/base/resources/drawable-mdpi/search_plus.png index 7efff962d1ef..9be6e4c73086 100644 Binary files a/mobile/android/base/resources/drawable-mdpi/search_plus.png and b/mobile/android/base/resources/drawable-mdpi/search_plus.png differ diff --git a/mobile/android/base/resources/drawable-mdpi/share_plane.png b/mobile/android/base/resources/drawable-mdpi/share_plane.png deleted file mode 100644 index 1790980c9bcf..000000000000 Binary files a/mobile/android/base/resources/drawable-mdpi/share_plane.png and /dev/null differ diff --git a/mobile/android/base/resources/drawable-mdpi/shield_disabled_doorhanger.png b/mobile/android/base/resources/drawable-mdpi/shield_disabled_doorhanger.png index b6757b351e57..0c3c3b51b739 100644 Binary files a/mobile/android/base/resources/drawable-mdpi/shield_disabled_doorhanger.png and b/mobile/android/base/resources/drawable-mdpi/shield_disabled_doorhanger.png differ diff --git a/mobile/android/base/resources/drawable-mdpi/suggestion_item_search.png b/mobile/android/base/resources/drawable-mdpi/suggestion_item_search.png old mode 100755 new mode 100644 index a642786a8ea8..72ee98d1e97a Binary files a/mobile/android/base/resources/drawable-mdpi/suggestion_item_search.png and b/mobile/android/base/resources/drawable-mdpi/suggestion_item_search.png differ diff --git a/mobile/android/base/resources/drawable-mdpi/switch_button_icon.png b/mobile/android/base/resources/drawable-mdpi/switch_button_icon.png index 0647a545e0fd..23d612106039 100644 Binary files a/mobile/android/base/resources/drawable-mdpi/switch_button_icon.png and b/mobile/android/base/resources/drawable-mdpi/switch_button_icon.png differ diff --git a/mobile/android/base/resources/drawable-mdpi/sync_desktop_inactive.png b/mobile/android/base/resources/drawable-mdpi/sync_desktop_inactive.png index 462a88c34d70..7147e33179ca 100644 Binary files a/mobile/android/base/resources/drawable-mdpi/sync_desktop_inactive.png and b/mobile/android/base/resources/drawable-mdpi/sync_desktop_inactive.png differ diff --git a/mobile/android/base/resources/drawable-mdpi/sync_mobile.png b/mobile/android/base/resources/drawable-mdpi/sync_mobile.png index c931dc3170ae..0a4b4cc7d3f1 100644 Binary files a/mobile/android/base/resources/drawable-mdpi/sync_mobile.png and b/mobile/android/base/resources/drawable-mdpi/sync_mobile.png differ diff --git a/mobile/android/base/resources/drawable-mdpi/sync_mobile_inactive.png b/mobile/android/base/resources/drawable-mdpi/sync_mobile_inactive.png index ea02c5d554dd..964b262f8b3e 100644 Binary files a/mobile/android/base/resources/drawable-mdpi/sync_mobile_inactive.png and b/mobile/android/base/resources/drawable-mdpi/sync_mobile_inactive.png differ diff --git a/mobile/android/base/resources/drawable-mdpi/sync_promo.png b/mobile/android/base/resources/drawable-mdpi/sync_promo.png index 658886b17df1..20e14a232151 100644 Binary files a/mobile/android/base/resources/drawable-mdpi/sync_promo.png and b/mobile/android/base/resources/drawable-mdpi/sync_promo.png differ diff --git a/mobile/android/base/resources/drawable-mdpi/tab_indicator_background.9.png b/mobile/android/base/resources/drawable-mdpi/tab_indicator_background.9.png index 161008100a6d..e0282be4978f 100644 Binary files a/mobile/android/base/resources/drawable-mdpi/tab_indicator_background.9.png and b/mobile/android/base/resources/drawable-mdpi/tab_indicator_background.9.png differ diff --git a/mobile/android/base/resources/drawable-mdpi/tab_indicator_divider.9.png b/mobile/android/base/resources/drawable-mdpi/tab_indicator_divider.9.png index 8792e9e9db13..0d4ce430ba7f 100644 Binary files a/mobile/android/base/resources/drawable-mdpi/tab_indicator_divider.9.png and b/mobile/android/base/resources/drawable-mdpi/tab_indicator_divider.9.png differ diff --git a/mobile/android/base/resources/drawable-mdpi/tab_indicator_selected.9.png b/mobile/android/base/resources/drawable-mdpi/tab_indicator_selected.9.png index a19ae0468a4c..e0d6d98594b0 100644 Binary files a/mobile/android/base/resources/drawable-mdpi/tab_indicator_selected.9.png and b/mobile/android/base/resources/drawable-mdpi/tab_indicator_selected.9.png differ diff --git a/mobile/android/base/resources/drawable-mdpi/tab_indicator_selected_focused.9.png b/mobile/android/base/resources/drawable-mdpi/tab_indicator_selected_focused.9.png index a373f5e5f35f..14ee43dd63cc 100644 Binary files a/mobile/android/base/resources/drawable-mdpi/tab_indicator_selected_focused.9.png and b/mobile/android/base/resources/drawable-mdpi/tab_indicator_selected_focused.9.png differ diff --git a/mobile/android/base/resources/drawable-mdpi/tab_new.png b/mobile/android/base/resources/drawable-mdpi/tab_new.png index 62d34445617b..3124474d4c31 100644 Binary files a/mobile/android/base/resources/drawable-mdpi/tab_new.png and b/mobile/android/base/resources/drawable-mdpi/tab_new.png differ diff --git a/mobile/android/base/resources/drawable-mdpi/tab_new_pb.png b/mobile/android/base/resources/drawable-mdpi/tab_new_pb.png index 42205007d37c..c58f7f5308bb 100644 Binary files a/mobile/android/base/resources/drawable-mdpi/tab_new_pb.png and b/mobile/android/base/resources/drawable-mdpi/tab_new_pb.png differ diff --git a/mobile/android/base/resources/drawable-mdpi/tab_panel_tab_globe.png b/mobile/android/base/resources/drawable-mdpi/tab_panel_tab_globe.png index 840ff6371bd3..ab923b5f3d94 100644 Binary files a/mobile/android/base/resources/drawable-mdpi/tab_panel_tab_globe.png and b/mobile/android/base/resources/drawable-mdpi/tab_panel_tab_globe.png differ diff --git a/mobile/android/base/resources/drawable-mdpi/tabs_count_foreground.png b/mobile/android/base/resources/drawable-mdpi/tabs_count_foreground.png index 0d25721d406a..4f6be519982f 100644 Binary files a/mobile/android/base/resources/drawable-mdpi/tabs_count_foreground.png and b/mobile/android/base/resources/drawable-mdpi/tabs_count_foreground.png differ diff --git a/mobile/android/base/resources/drawable-mdpi/tabs_normal.png b/mobile/android/base/resources/drawable-mdpi/tabs_normal.png index 44b40e710e6d..5a8668b2e84e 100644 Binary files a/mobile/android/base/resources/drawable-mdpi/tabs_normal.png and b/mobile/android/base/resources/drawable-mdpi/tabs_normal.png differ diff --git a/mobile/android/base/resources/drawable-mdpi/tabs_private.png b/mobile/android/base/resources/drawable-mdpi/tabs_private.png index 70594812040b..e532cd00bca6 100644 Binary files a/mobile/android/base/resources/drawable-mdpi/tabs_private.png and b/mobile/android/base/resources/drawable-mdpi/tabs_private.png differ diff --git a/mobile/android/base/resources/drawable-mdpi/undo_button_icon.png b/mobile/android/base/resources/drawable-mdpi/undo_button_icon.png index 542bba657669..e150945be539 100644 Binary files a/mobile/android/base/resources/drawable-mdpi/undo_button_icon.png and b/mobile/android/base/resources/drawable-mdpi/undo_button_icon.png differ diff --git a/mobile/android/base/resources/drawable-mdpi/url_bar_entry_default.9.png b/mobile/android/base/resources/drawable-mdpi/url_bar_entry_default.9.png index ebbc374e84d1..a9e6ba25acfe 100644 Binary files a/mobile/android/base/resources/drawable-mdpi/url_bar_entry_default.9.png and b/mobile/android/base/resources/drawable-mdpi/url_bar_entry_default.9.png differ diff --git a/mobile/android/base/resources/drawable-mdpi/url_bar_entry_default_pb.9.png b/mobile/android/base/resources/drawable-mdpi/url_bar_entry_default_pb.9.png index 3f50e414fdcd..9b1f20112661 100644 Binary files a/mobile/android/base/resources/drawable-mdpi/url_bar_entry_default_pb.9.png and b/mobile/android/base/resources/drawable-mdpi/url_bar_entry_default_pb.9.png differ diff --git a/mobile/android/base/resources/drawable-mdpi/url_bar_entry_pressed.9.png b/mobile/android/base/resources/drawable-mdpi/url_bar_entry_pressed.9.png index e65ab65940df..65e2d3e4855e 100644 Binary files a/mobile/android/base/resources/drawable-mdpi/url_bar_entry_pressed.9.png and b/mobile/android/base/resources/drawable-mdpi/url_bar_entry_pressed.9.png differ diff --git a/mobile/android/base/resources/drawable-mdpi/url_bar_entry_pressed_pb.9.png b/mobile/android/base/resources/drawable-mdpi/url_bar_entry_pressed_pb.9.png index 075e6663dd96..342d6afc7d61 100644 Binary files a/mobile/android/base/resources/drawable-mdpi/url_bar_entry_pressed_pb.9.png and b/mobile/android/base/resources/drawable-mdpi/url_bar_entry_pressed_pb.9.png differ diff --git a/mobile/android/base/resources/drawable-mdpi/widget_bg.9.png b/mobile/android/base/resources/drawable-mdpi/widget_bg.9.png index 515a6c91f6b1..de42857959b6 100644 Binary files a/mobile/android/base/resources/drawable-mdpi/widget_bg.9.png and b/mobile/android/base/resources/drawable-mdpi/widget_bg.9.png differ diff --git a/mobile/android/base/resources/drawable-xhdpi-v11/alert_camera.png b/mobile/android/base/resources/drawable-xhdpi-v11/alert_camera.png index dd1174add7f4..d3f14f45af2e 100644 Binary files a/mobile/android/base/resources/drawable-xhdpi-v11/alert_camera.png and b/mobile/android/base/resources/drawable-xhdpi-v11/alert_camera.png differ diff --git a/mobile/android/base/resources/drawable-xhdpi-v11/alert_guest.png b/mobile/android/base/resources/drawable-xhdpi-v11/alert_guest.png index 5bb71d4c77f2..aa6f4718b3ed 100644 Binary files a/mobile/android/base/resources/drawable-xhdpi-v11/alert_guest.png and b/mobile/android/base/resources/drawable-xhdpi-v11/alert_guest.png differ diff --git a/mobile/android/base/resources/drawable-xhdpi-v11/ic_menu_new_tab.png b/mobile/android/base/resources/drawable-xhdpi-v11/ic_menu_new_tab.png index 776d33e1beb7..d790aa5e73ba 100644 Binary files a/mobile/android/base/resources/drawable-xhdpi-v11/ic_menu_new_tab.png and b/mobile/android/base/resources/drawable-xhdpi-v11/ic_menu_new_tab.png differ diff --git a/mobile/android/base/resources/drawable-xhdpi/ab_background.9.png b/mobile/android/base/resources/drawable-xhdpi/ab_background.9.png index 4ab8b40a1912..f83aa6852462 100644 Binary files a/mobile/android/base/resources/drawable-xhdpi/ab_background.9.png and b/mobile/android/base/resources/drawable-xhdpi/ab_background.9.png differ diff --git a/mobile/android/base/resources/drawable-xhdpi/ab_copy.png b/mobile/android/base/resources/drawable-xhdpi/ab_copy.png index eba847516580..6c468ddbf8ac 100644 Binary files a/mobile/android/base/resources/drawable-xhdpi/ab_copy.png and b/mobile/android/base/resources/drawable-xhdpi/ab_copy.png differ diff --git a/mobile/android/base/resources/drawable-xhdpi/ab_search.png b/mobile/android/base/resources/drawable-xhdpi/ab_search.png index 45e83d547db3..9e3f562ca950 100644 Binary files a/mobile/android/base/resources/drawable-xhdpi/ab_search.png and b/mobile/android/base/resources/drawable-xhdpi/ab_search.png differ diff --git a/mobile/android/base/resources/drawable-xhdpi/ab_select_all.png b/mobile/android/base/resources/drawable-xhdpi/ab_select_all.png index bfcccdd503bf..01cbfa97678f 100644 Binary files a/mobile/android/base/resources/drawable-xhdpi/ab_select_all.png and b/mobile/android/base/resources/drawable-xhdpi/ab_select_all.png differ diff --git a/mobile/android/base/resources/drawable-xhdpi/alert_app_animation_1.png b/mobile/android/base/resources/drawable-xhdpi/alert_app_animation_1.png index 79fc701b457e..a4d50bc46c47 100644 Binary files a/mobile/android/base/resources/drawable-xhdpi/alert_app_animation_1.png and b/mobile/android/base/resources/drawable-xhdpi/alert_app_animation_1.png differ diff --git a/mobile/android/base/resources/drawable-xhdpi/alert_app_animation_2.png b/mobile/android/base/resources/drawable-xhdpi/alert_app_animation_2.png index 900ffa94b1af..865875257f09 100644 Binary files a/mobile/android/base/resources/drawable-xhdpi/alert_app_animation_2.png and b/mobile/android/base/resources/drawable-xhdpi/alert_app_animation_2.png differ diff --git a/mobile/android/base/resources/drawable-xhdpi/alert_app_animation_3.png b/mobile/android/base/resources/drawable-xhdpi/alert_app_animation_3.png index aea692e3fd09..202f6370f0f9 100644 Binary files a/mobile/android/base/resources/drawable-xhdpi/alert_app_animation_3.png and b/mobile/android/base/resources/drawable-xhdpi/alert_app_animation_3.png differ diff --git a/mobile/android/base/resources/drawable-xhdpi/alert_app_animation_4.png b/mobile/android/base/resources/drawable-xhdpi/alert_app_animation_4.png index de86474087f6..75c4d3091fa3 100644 Binary files a/mobile/android/base/resources/drawable-xhdpi/alert_app_animation_4.png and b/mobile/android/base/resources/drawable-xhdpi/alert_app_animation_4.png differ diff --git a/mobile/android/base/resources/drawable-xhdpi/alert_app_animation_5.png b/mobile/android/base/resources/drawable-xhdpi/alert_app_animation_5.png index db33ad6719d0..575aa9def24a 100644 Binary files a/mobile/android/base/resources/drawable-xhdpi/alert_app_animation_5.png and b/mobile/android/base/resources/drawable-xhdpi/alert_app_animation_5.png differ diff --git a/mobile/android/base/resources/drawable-xhdpi/alert_app_animation_6.png b/mobile/android/base/resources/drawable-xhdpi/alert_app_animation_6.png index e42c956ea9c2..c2021eb2960f 100644 Binary files a/mobile/android/base/resources/drawable-xhdpi/alert_app_animation_6.png and b/mobile/android/base/resources/drawable-xhdpi/alert_app_animation_6.png differ diff --git a/mobile/android/base/resources/drawable-xhdpi/alert_app_animation_7.png b/mobile/android/base/resources/drawable-xhdpi/alert_app_animation_7.png index bb12cd6fc61a..42551c6a37de 100644 Binary files a/mobile/android/base/resources/drawable-xhdpi/alert_app_animation_7.png and b/mobile/android/base/resources/drawable-xhdpi/alert_app_animation_7.png differ diff --git a/mobile/android/base/resources/drawable-xhdpi/alert_download_animation_1.png b/mobile/android/base/resources/drawable-xhdpi/alert_download_animation_1.png index 2f637ce39813..2e9767de8b62 100644 Binary files a/mobile/android/base/resources/drawable-xhdpi/alert_download_animation_1.png and b/mobile/android/base/resources/drawable-xhdpi/alert_download_animation_1.png differ diff --git a/mobile/android/base/resources/drawable-xhdpi/alert_download_animation_2.png b/mobile/android/base/resources/drawable-xhdpi/alert_download_animation_2.png index c9ea5577fe65..8c8743e3a8f9 100644 Binary files a/mobile/android/base/resources/drawable-xhdpi/alert_download_animation_2.png and b/mobile/android/base/resources/drawable-xhdpi/alert_download_animation_2.png differ diff --git a/mobile/android/base/resources/drawable-xhdpi/alert_download_animation_3.png b/mobile/android/base/resources/drawable-xhdpi/alert_download_animation_3.png index cfae2b2b6102..4f9aadab2993 100644 Binary files a/mobile/android/base/resources/drawable-xhdpi/alert_download_animation_3.png and b/mobile/android/base/resources/drawable-xhdpi/alert_download_animation_3.png differ diff --git a/mobile/android/base/resources/drawable-xhdpi/alert_download_animation_4.png b/mobile/android/base/resources/drawable-xhdpi/alert_download_animation_4.png index 2d19e5bfbb45..7449b954616f 100644 Binary files a/mobile/android/base/resources/drawable-xhdpi/alert_download_animation_4.png and b/mobile/android/base/resources/drawable-xhdpi/alert_download_animation_4.png differ diff --git a/mobile/android/base/resources/drawable-xhdpi/alert_download_animation_5.png b/mobile/android/base/resources/drawable-xhdpi/alert_download_animation_5.png index 8992011e9a94..e2a5e30beacc 100644 Binary files a/mobile/android/base/resources/drawable-xhdpi/alert_download_animation_5.png and b/mobile/android/base/resources/drawable-xhdpi/alert_download_animation_5.png differ diff --git a/mobile/android/base/resources/drawable-xhdpi/alert_download_animation_6.png b/mobile/android/base/resources/drawable-xhdpi/alert_download_animation_6.png index e7b0284a3729..628e4f59a4f6 100644 Binary files a/mobile/android/base/resources/drawable-xhdpi/alert_download_animation_6.png and b/mobile/android/base/resources/drawable-xhdpi/alert_download_animation_6.png differ diff --git a/mobile/android/base/resources/drawable-xhdpi/alert_guest.png b/mobile/android/base/resources/drawable-xhdpi/alert_guest.png index 4ca6d8451023..361843a5cafe 100644 Binary files a/mobile/android/base/resources/drawable-xhdpi/alert_guest.png and b/mobile/android/base/resources/drawable-xhdpi/alert_guest.png differ diff --git a/mobile/android/base/resources/drawable-xhdpi/blank.png b/mobile/android/base/resources/drawable-xhdpi/blank.png index 3e3ef0c47f5a..269f4c7a4315 100644 Binary files a/mobile/android/base/resources/drawable-xhdpi/blank.png and b/mobile/android/base/resources/drawable-xhdpi/blank.png differ diff --git a/mobile/android/base/resources/drawable-xhdpi/device_pc.png b/mobile/android/base/resources/drawable-xhdpi/device_pc.png index c2495899e4df..fde7abc31cff 100644 Binary files a/mobile/android/base/resources/drawable-xhdpi/device_pc.png and b/mobile/android/base/resources/drawable-xhdpi/device_pc.png differ diff --git a/mobile/android/base/resources/drawable-xhdpi/dropshadow.9.png b/mobile/android/base/resources/drawable-xhdpi/dropshadow.9.png index 685358e69ad4..baa3d89c0e70 100644 Binary files a/mobile/android/base/resources/drawable-xhdpi/dropshadow.9.png and b/mobile/android/base/resources/drawable-xhdpi/dropshadow.9.png differ diff --git a/mobile/android/base/resources/drawable-xhdpi/favicon_search.png b/mobile/android/base/resources/drawable-xhdpi/favicon_search.png old mode 100755 new mode 100644 index b184526a0f5b..d720c78b3bf0 Binary files a/mobile/android/base/resources/drawable-xhdpi/favicon_search.png and b/mobile/android/base/resources/drawable-xhdpi/favicon_search.png differ diff --git a/mobile/android/base/resources/drawable-xhdpi/firefox_settings_alert.png b/mobile/android/base/resources/drawable-xhdpi/firefox_settings_alert.png index e062ce8ffb54..c3addce0d445 100644 Binary files a/mobile/android/base/resources/drawable-xhdpi/firefox_settings_alert.png and b/mobile/android/base/resources/drawable-xhdpi/firefox_settings_alert.png differ diff --git a/mobile/android/base/resources/drawable-xhdpi/fxaccount_intro.png b/mobile/android/base/resources/drawable-xhdpi/fxaccount_intro.png index d734d8be45d0..6563d716b96f 100644 Binary files a/mobile/android/base/resources/drawable-xhdpi/fxaccount_intro.png and b/mobile/android/base/resources/drawable-xhdpi/fxaccount_intro.png differ diff --git a/mobile/android/base/resources/drawable-xhdpi/home_group_collapsed.png b/mobile/android/base/resources/drawable-xhdpi/home_group_collapsed.png index 3c85ff7354e5..acd90bc8227b 100644 Binary files a/mobile/android/base/resources/drawable-xhdpi/home_group_collapsed.png and b/mobile/android/base/resources/drawable-xhdpi/home_group_collapsed.png differ diff --git a/mobile/android/base/resources/drawable-xhdpi/home_group_expanded.png b/mobile/android/base/resources/drawable-xhdpi/home_group_expanded.png index 300ad9edcdc6..5152c11a56a0 100644 Binary files a/mobile/android/base/resources/drawable-xhdpi/home_group_expanded.png and b/mobile/android/base/resources/drawable-xhdpi/home_group_expanded.png differ diff --git a/mobile/android/base/resources/drawable-xhdpi/home_tab_menu_strip.9.png b/mobile/android/base/resources/drawable-xhdpi/home_tab_menu_strip.9.png index c439a0b371d0..e639d05dfb76 100644 Binary files a/mobile/android/base/resources/drawable-xhdpi/home_tab_menu_strip.9.png and b/mobile/android/base/resources/drawable-xhdpi/home_tab_menu_strip.9.png differ diff --git a/mobile/android/base/resources/drawable-xhdpi/homepage_banner_firstrun.png b/mobile/android/base/resources/drawable-xhdpi/homepage_banner_firstrun.png index 5b2ee8d001da..01b381559747 100644 Binary files a/mobile/android/base/resources/drawable-xhdpi/homepage_banner_firstrun.png and b/mobile/android/base/resources/drawable-xhdpi/homepage_banner_firstrun.png differ diff --git a/mobile/android/base/resources/drawable-xhdpi/ic_action_settings.png b/mobile/android/base/resources/drawable-xhdpi/ic_action_settings.png index 73464f6f0f09..910fd4f14137 100644 Binary files a/mobile/android/base/resources/drawable-xhdpi/ic_action_settings.png and b/mobile/android/base/resources/drawable-xhdpi/ic_action_settings.png differ diff --git a/mobile/android/base/resources/drawable-xhdpi/ic_url_bar_star.png b/mobile/android/base/resources/drawable-xhdpi/ic_url_bar_star.png index 0a2343f98f1f..43b89f04aeda 100644 Binary files a/mobile/android/base/resources/drawable-xhdpi/ic_url_bar_star.png and b/mobile/android/base/resources/drawable-xhdpi/ic_url_bar_star.png differ diff --git a/mobile/android/base/resources/drawable-xhdpi/ic_url_bar_tab.png b/mobile/android/base/resources/drawable-xhdpi/ic_url_bar_tab.png index 98e4af354741..eb45a5c5f967 100644 Binary files a/mobile/android/base/resources/drawable-xhdpi/ic_url_bar_tab.png and b/mobile/android/base/resources/drawable-xhdpi/ic_url_bar_tab.png differ diff --git a/mobile/android/base/resources/drawable-xhdpi/ic_widget_new_tab.png b/mobile/android/base/resources/drawable-xhdpi/ic_widget_new_tab.png index 0c0e6cf432b5..ab8bcb4c5638 100644 Binary files a/mobile/android/base/resources/drawable-xhdpi/ic_widget_new_tab.png and b/mobile/android/base/resources/drawable-xhdpi/ic_widget_new_tab.png differ diff --git a/mobile/android/base/resources/drawable-xhdpi/ic_widget_search.png b/mobile/android/base/resources/drawable-xhdpi/ic_widget_search.png index cd1d52d4d2c4..277441090968 100644 Binary files a/mobile/android/base/resources/drawable-xhdpi/ic_widget_search.png and b/mobile/android/base/resources/drawable-xhdpi/ic_widget_search.png differ diff --git a/mobile/android/base/resources/drawable-xhdpi/icon_key.png b/mobile/android/base/resources/drawable-xhdpi/icon_key.png index 0c7a6856a731..d10c18149df4 100644 Binary files a/mobile/android/base/resources/drawable-xhdpi/icon_key.png and b/mobile/android/base/resources/drawable-xhdpi/icon_key.png differ diff --git a/mobile/android/base/resources/drawable-xhdpi/icon_pageaction.png b/mobile/android/base/resources/drawable-xhdpi/icon_pageaction.png index 775370a24a15..177a64136b5f 100644 Binary files a/mobile/android/base/resources/drawable-xhdpi/icon_pageaction.png and b/mobile/android/base/resources/drawable-xhdpi/icon_pageaction.png differ diff --git a/mobile/android/base/resources/drawable-xhdpi/icon_remote_tabs_empty.png b/mobile/android/base/resources/drawable-xhdpi/icon_remote_tabs_empty.png index 2bdc3daea5d2..d7e833606b61 100644 Binary files a/mobile/android/base/resources/drawable-xhdpi/icon_remote_tabs_empty.png and b/mobile/android/base/resources/drawable-xhdpi/icon_remote_tabs_empty.png differ diff --git a/mobile/android/base/resources/drawable-xhdpi/icon_search_empty_firefox.png b/mobile/android/base/resources/drawable-xhdpi/icon_search_empty_firefox.png index f001a80137a9..f81f293d5fab 100644 Binary files a/mobile/android/base/resources/drawable-xhdpi/icon_search_empty_firefox.png and b/mobile/android/base/resources/drawable-xhdpi/icon_search_empty_firefox.png differ diff --git a/mobile/android/base/resources/drawable-xhdpi/icon_shareplane.png b/mobile/android/base/resources/drawable-xhdpi/icon_shareplane.png new file mode 100644 index 000000000000..dd621ce5a7ae Binary files /dev/null and b/mobile/android/base/resources/drawable-xhdpi/icon_shareplane.png differ diff --git a/mobile/android/base/resources/drawable-xhdpi/lock_identified.png b/mobile/android/base/resources/drawable-xhdpi/lock_identified.png index 6b0fec93855e..aa2071553628 100644 Binary files a/mobile/android/base/resources/drawable-xhdpi/lock_identified.png and b/mobile/android/base/resources/drawable-xhdpi/lock_identified.png differ diff --git a/mobile/android/base/resources/drawable-xhdpi/lock_verified.png b/mobile/android/base/resources/drawable-xhdpi/lock_verified.png index 9fc5798e33d5..6b66211421b0 100644 Binary files a/mobile/android/base/resources/drawable-xhdpi/lock_verified.png and b/mobile/android/base/resources/drawable-xhdpi/lock_verified.png differ diff --git a/mobile/android/base/resources/drawable-xhdpi/media_bar_pause.png b/mobile/android/base/resources/drawable-xhdpi/media_bar_pause.png index fc850531796e..d199673e42a0 100644 Binary files a/mobile/android/base/resources/drawable-xhdpi/media_bar_pause.png and b/mobile/android/base/resources/drawable-xhdpi/media_bar_pause.png differ diff --git a/mobile/android/base/resources/drawable-xhdpi/menu.png b/mobile/android/base/resources/drawable-xhdpi/menu.png index 5ef07f717982..e6b549401c13 100644 Binary files a/mobile/android/base/resources/drawable-xhdpi/menu.png and b/mobile/android/base/resources/drawable-xhdpi/menu.png differ diff --git a/mobile/android/base/resources/drawable-xhdpi/menu_item_uncheck.png b/mobile/android/base/resources/drawable-xhdpi/menu_item_uncheck.png index 0f6cf3fb4ec0..1d298c4e3ebf 100644 Binary files a/mobile/android/base/resources/drawable-xhdpi/menu_item_uncheck.png and b/mobile/android/base/resources/drawable-xhdpi/menu_item_uncheck.png differ diff --git a/mobile/android/base/resources/drawable-xhdpi/menu_light.png b/mobile/android/base/resources/drawable-xhdpi/menu_light.png index c23e7b641c73..44af9a9fc048 100644 Binary files a/mobile/android/base/resources/drawable-xhdpi/menu_light.png and b/mobile/android/base/resources/drawable-xhdpi/menu_light.png differ diff --git a/mobile/android/base/resources/drawable-xhdpi/menu_tabs.png b/mobile/android/base/resources/drawable-xhdpi/menu_tabs.png index 5ef07f717982..e6b549401c13 100644 Binary files a/mobile/android/base/resources/drawable-xhdpi/menu_tabs.png and b/mobile/android/base/resources/drawable-xhdpi/menu_tabs.png differ diff --git a/mobile/android/base/resources/drawable-xhdpi/network_error.png b/mobile/android/base/resources/drawable-xhdpi/network_error.png index 4b0e99710ecf..653c6c8d4073 100644 Binary files a/mobile/android/base/resources/drawable-xhdpi/network_error.png and b/mobile/android/base/resources/drawable-xhdpi/network_error.png differ diff --git a/mobile/android/base/resources/drawable-xhdpi/onboard_start_addon.png b/mobile/android/base/resources/drawable-xhdpi/onboard_start_addon.png index b32fdcff7577..9a6a3a3526e6 100644 Binary files a/mobile/android/base/resources/drawable-xhdpi/onboard_start_addon.png and b/mobile/android/base/resources/drawable-xhdpi/onboard_start_addon.png differ diff --git a/mobile/android/base/resources/drawable-xhdpi/onboard_start_private.png b/mobile/android/base/resources/drawable-xhdpi/onboard_start_private.png index 570e4515d0cc..af9e8d283163 100644 Binary files a/mobile/android/base/resources/drawable-xhdpi/onboard_start_private.png and b/mobile/android/base/resources/drawable-xhdpi/onboard_start_private.png differ diff --git a/mobile/android/base/resources/drawable-xhdpi/onboard_start_shield.png b/mobile/android/base/resources/drawable-xhdpi/onboard_start_shield.png index 6d5e9a160589..96dc0d93ee09 100644 Binary files a/mobile/android/base/resources/drawable-xhdpi/onboard_start_shield.png and b/mobile/android/base/resources/drawable-xhdpi/onboard_start_shield.png differ diff --git a/mobile/android/base/resources/drawable-xhdpi/onboard_start_sync.png b/mobile/android/base/resources/drawable-xhdpi/onboard_start_sync.png index 5f4de6c1f90f..1ea53a17891a 100644 Binary files a/mobile/android/base/resources/drawable-xhdpi/onboard_start_sync.png and b/mobile/android/base/resources/drawable-xhdpi/onboard_start_sync.png differ diff --git a/mobile/android/base/resources/drawable-xhdpi/overlay_check.png b/mobile/android/base/resources/drawable-xhdpi/overlay_check.png index 7c0443944470..0251dd6e3e7d 100644 Binary files a/mobile/android/base/resources/drawable-xhdpi/overlay_check.png and b/mobile/android/base/resources/drawable-xhdpi/overlay_check.png differ diff --git a/mobile/android/base/resources/drawable-xhdpi/pause.png b/mobile/android/base/resources/drawable-xhdpi/pause.png index d215ae69ee8e..0bbb7a3a3369 100644 Binary files a/mobile/android/base/resources/drawable-xhdpi/pause.png and b/mobile/android/base/resources/drawable-xhdpi/pause.png differ diff --git a/mobile/android/base/resources/drawable-xhdpi/search_clear.png b/mobile/android/base/resources/drawable-xhdpi/search_clear.png index 251eeb53f49f..01eeacf70e23 100644 Binary files a/mobile/android/base/resources/drawable-xhdpi/search_clear.png and b/mobile/android/base/resources/drawable-xhdpi/search_clear.png differ diff --git a/mobile/android/base/resources/drawable-xhdpi/search_history.png b/mobile/android/base/resources/drawable-xhdpi/search_history.png index e900112b4012..d80c3681282f 100644 Binary files a/mobile/android/base/resources/drawable-xhdpi/search_history.png and b/mobile/android/base/resources/drawable-xhdpi/search_history.png differ diff --git a/mobile/android/base/resources/drawable-xhdpi/search_icon_active.png b/mobile/android/base/resources/drawable-xhdpi/search_icon_active.png index 2f3d3d149f91..46651503830a 100644 Binary files a/mobile/android/base/resources/drawable-xhdpi/search_icon_active.png and b/mobile/android/base/resources/drawable-xhdpi/search_icon_active.png differ diff --git a/mobile/android/base/resources/drawable-xhdpi/search_icon_inactive.png b/mobile/android/base/resources/drawable-xhdpi/search_icon_inactive.png index b184526a0f5b..d720c78b3bf0 100644 Binary files a/mobile/android/base/resources/drawable-xhdpi/search_icon_inactive.png and b/mobile/android/base/resources/drawable-xhdpi/search_icon_inactive.png differ diff --git a/mobile/android/base/resources/drawable-xhdpi/search_launcher.png b/mobile/android/base/resources/drawable-xhdpi/search_launcher.png index 67bc6a907f1c..be0fd65fb445 100644 Binary files a/mobile/android/base/resources/drawable-xhdpi/search_launcher.png and b/mobile/android/base/resources/drawable-xhdpi/search_launcher.png differ diff --git a/mobile/android/base/resources/drawable-xhdpi/search_plus.png b/mobile/android/base/resources/drawable-xhdpi/search_plus.png index 1a9bf03c130c..780231118868 100644 Binary files a/mobile/android/base/resources/drawable-xhdpi/search_plus.png and b/mobile/android/base/resources/drawable-xhdpi/search_plus.png differ diff --git a/mobile/android/base/resources/drawable-xhdpi/share_plane.png b/mobile/android/base/resources/drawable-xhdpi/share_plane.png deleted file mode 100644 index 176cb27f109d..000000000000 Binary files a/mobile/android/base/resources/drawable-xhdpi/share_plane.png and /dev/null differ diff --git a/mobile/android/base/resources/drawable-xhdpi/shield_disabled_doorhanger.png b/mobile/android/base/resources/drawable-xhdpi/shield_disabled_doorhanger.png index 61745ca44de1..d5793abc71f2 100644 Binary files a/mobile/android/base/resources/drawable-xhdpi/shield_disabled_doorhanger.png and b/mobile/android/base/resources/drawable-xhdpi/shield_disabled_doorhanger.png differ diff --git a/mobile/android/base/resources/drawable-xhdpi/shield_enabled_doorhanger.png b/mobile/android/base/resources/drawable-xhdpi/shield_enabled_doorhanger.png index 01b1eaf028d8..b9795e540302 100644 Binary files a/mobile/android/base/resources/drawable-xhdpi/shield_enabled_doorhanger.png and b/mobile/android/base/resources/drawable-xhdpi/shield_enabled_doorhanger.png differ diff --git a/mobile/android/base/resources/drawable-xhdpi/suggestion_item_search.png b/mobile/android/base/resources/drawable-xhdpi/suggestion_item_search.png old mode 100755 new mode 100644 index 3e5da9414f02..21d7f6545db9 Binary files a/mobile/android/base/resources/drawable-xhdpi/suggestion_item_search.png and b/mobile/android/base/resources/drawable-xhdpi/suggestion_item_search.png differ diff --git a/mobile/android/base/resources/drawable-xhdpi/sync_desktop.png b/mobile/android/base/resources/drawable-xhdpi/sync_desktop.png index efff1314f591..1e82f15c57a3 100644 Binary files a/mobile/android/base/resources/drawable-xhdpi/sync_desktop.png and b/mobile/android/base/resources/drawable-xhdpi/sync_desktop.png differ diff --git a/mobile/android/base/resources/drawable-xhdpi/sync_desktop_inactive.png b/mobile/android/base/resources/drawable-xhdpi/sync_desktop_inactive.png index 2bb9fa7d363a..8d881e195569 100644 Binary files a/mobile/android/base/resources/drawable-xhdpi/sync_desktop_inactive.png and b/mobile/android/base/resources/drawable-xhdpi/sync_desktop_inactive.png differ diff --git a/mobile/android/base/resources/drawable-xhdpi/sync_mobile.png b/mobile/android/base/resources/drawable-xhdpi/sync_mobile.png index ab34d7b6b58c..62ca6745c257 100644 Binary files a/mobile/android/base/resources/drawable-xhdpi/sync_mobile.png and b/mobile/android/base/resources/drawable-xhdpi/sync_mobile.png differ diff --git a/mobile/android/base/resources/drawable-xhdpi/sync_mobile_inactive.png b/mobile/android/base/resources/drawable-xhdpi/sync_mobile_inactive.png index 74eee72c951f..35a03eac3c40 100644 Binary files a/mobile/android/base/resources/drawable-xhdpi/sync_mobile_inactive.png and b/mobile/android/base/resources/drawable-xhdpi/sync_mobile_inactive.png differ diff --git a/mobile/android/base/resources/drawable-xhdpi/tab_indicator_background.9.png b/mobile/android/base/resources/drawable-xhdpi/tab_indicator_background.9.png index d5216c96bac8..54bb0c3ad5fa 100644 Binary files a/mobile/android/base/resources/drawable-xhdpi/tab_indicator_background.9.png and b/mobile/android/base/resources/drawable-xhdpi/tab_indicator_background.9.png differ diff --git a/mobile/android/base/resources/drawable-xhdpi/tab_indicator_divider.9.png b/mobile/android/base/resources/drawable-xhdpi/tab_indicator_divider.9.png index 8792e9e9db13..0d4ce430ba7f 100644 Binary files a/mobile/android/base/resources/drawable-xhdpi/tab_indicator_divider.9.png and b/mobile/android/base/resources/drawable-xhdpi/tab_indicator_divider.9.png differ diff --git a/mobile/android/base/resources/drawable-xhdpi/tab_indicator_selected.9.png b/mobile/android/base/resources/drawable-xhdpi/tab_indicator_selected.9.png index 9ec9246c0621..4055b50b5819 100644 Binary files a/mobile/android/base/resources/drawable-xhdpi/tab_indicator_selected.9.png and b/mobile/android/base/resources/drawable-xhdpi/tab_indicator_selected.9.png differ diff --git a/mobile/android/base/resources/drawable-xhdpi/tab_indicator_selected_focused.9.png b/mobile/android/base/resources/drawable-xhdpi/tab_indicator_selected_focused.9.png index 55ff12bd7891..30faf8eb3693 100644 Binary files a/mobile/android/base/resources/drawable-xhdpi/tab_indicator_selected_focused.9.png and b/mobile/android/base/resources/drawable-xhdpi/tab_indicator_selected_focused.9.png differ diff --git a/mobile/android/base/resources/drawable-xhdpi/tab_new.png b/mobile/android/base/resources/drawable-xhdpi/tab_new.png index 26dd40996276..99365ba02078 100644 Binary files a/mobile/android/base/resources/drawable-xhdpi/tab_new.png and b/mobile/android/base/resources/drawable-xhdpi/tab_new.png differ diff --git a/mobile/android/base/resources/drawable-xhdpi/tab_panel_tab_globe.png b/mobile/android/base/resources/drawable-xhdpi/tab_panel_tab_globe.png index af7159118bde..74ab54205f2c 100644 Binary files a/mobile/android/base/resources/drawable-xhdpi/tab_panel_tab_globe.png and b/mobile/android/base/resources/drawable-xhdpi/tab_panel_tab_globe.png differ diff --git a/mobile/android/base/resources/drawable-xhdpi/tabs_count_foreground.png b/mobile/android/base/resources/drawable-xhdpi/tabs_count_foreground.png index e8dafcef896f..86d3acadf8a5 100644 Binary files a/mobile/android/base/resources/drawable-xhdpi/tabs_count_foreground.png and b/mobile/android/base/resources/drawable-xhdpi/tabs_count_foreground.png differ diff --git a/mobile/android/base/resources/drawable-xhdpi/tabs_private.png b/mobile/android/base/resources/drawable-xhdpi/tabs_private.png index c3b2c924c669..5550000663ad 100644 Binary files a/mobile/android/base/resources/drawable-xhdpi/tabs_private.png and b/mobile/android/base/resources/drawable-xhdpi/tabs_private.png differ diff --git a/mobile/android/base/resources/drawable-xhdpi/top_site_add.png b/mobile/android/base/resources/drawable-xhdpi/top_site_add.png index 12b5daed54bd..f167dc5c15cd 100644 Binary files a/mobile/android/base/resources/drawable-xhdpi/top_site_add.png and b/mobile/android/base/resources/drawable-xhdpi/top_site_add.png differ diff --git a/mobile/android/base/resources/drawable-xhdpi/undo_button_icon.png b/mobile/android/base/resources/drawable-xhdpi/undo_button_icon.png index d50a9cac5b82..58d0a03f96d8 100644 Binary files a/mobile/android/base/resources/drawable-xhdpi/undo_button_icon.png and b/mobile/android/base/resources/drawable-xhdpi/undo_button_icon.png differ diff --git a/mobile/android/base/resources/drawable-xhdpi/url_bar_entry_default.9.png b/mobile/android/base/resources/drawable-xhdpi/url_bar_entry_default.9.png index 89cea79db63a..fbb0f2d96933 100644 Binary files a/mobile/android/base/resources/drawable-xhdpi/url_bar_entry_default.9.png and b/mobile/android/base/resources/drawable-xhdpi/url_bar_entry_default.9.png differ diff --git a/mobile/android/base/resources/drawable-xhdpi/url_bar_entry_default_pb.9.png b/mobile/android/base/resources/drawable-xhdpi/url_bar_entry_default_pb.9.png index 2113d6375148..96cf1b331e39 100644 Binary files a/mobile/android/base/resources/drawable-xhdpi/url_bar_entry_default_pb.9.png and b/mobile/android/base/resources/drawable-xhdpi/url_bar_entry_default_pb.9.png differ diff --git a/mobile/android/base/resources/drawable-xhdpi/url_bar_entry_pressed.9.png b/mobile/android/base/resources/drawable-xhdpi/url_bar_entry_pressed.9.png index 132331a091fb..11b3e2f242c6 100644 Binary files a/mobile/android/base/resources/drawable-xhdpi/url_bar_entry_pressed.9.png and b/mobile/android/base/resources/drawable-xhdpi/url_bar_entry_pressed.9.png differ diff --git a/mobile/android/base/resources/drawable-xhdpi/url_bar_entry_pressed_pb.9.png b/mobile/android/base/resources/drawable-xhdpi/url_bar_entry_pressed_pb.9.png index 44599260ba84..344d08e123da 100644 Binary files a/mobile/android/base/resources/drawable-xhdpi/url_bar_entry_pressed_pb.9.png and b/mobile/android/base/resources/drawable-xhdpi/url_bar_entry_pressed_pb.9.png differ diff --git a/mobile/android/base/resources/drawable-xhdpi/widget_bg.9.png b/mobile/android/base/resources/drawable-xhdpi/widget_bg.9.png index c268cbde56cd..caab957ed5e8 100644 Binary files a/mobile/android/base/resources/drawable-xhdpi/widget_bg.9.png and b/mobile/android/base/resources/drawable-xhdpi/widget_bg.9.png differ diff --git a/mobile/android/base/resources/drawable-xxhdpi/dropshadow.9.png b/mobile/android/base/resources/drawable-xxhdpi/dropshadow.9.png index f50b3c570aeb..113e1010accf 100644 Binary files a/mobile/android/base/resources/drawable-xxhdpi/dropshadow.9.png and b/mobile/android/base/resources/drawable-xxhdpi/dropshadow.9.png differ diff --git a/mobile/android/base/resources/drawable-xxhdpi/favicon_search.png b/mobile/android/base/resources/drawable-xxhdpi/favicon_search.png old mode 100755 new mode 100644 index e8c2bb3edf94..837a3cb18b28 Binary files a/mobile/android/base/resources/drawable-xxhdpi/favicon_search.png and b/mobile/android/base/resources/drawable-xxhdpi/favicon_search.png differ diff --git a/mobile/android/base/resources/drawable-xxhdpi/home_group_collapsed.png b/mobile/android/base/resources/drawable-xxhdpi/home_group_collapsed.png index 68dff82b41d2..f2ac168b32ee 100644 Binary files a/mobile/android/base/resources/drawable-xxhdpi/home_group_collapsed.png and b/mobile/android/base/resources/drawable-xxhdpi/home_group_collapsed.png differ diff --git a/mobile/android/base/resources/drawable-xxhdpi/home_group_expanded.png b/mobile/android/base/resources/drawable-xxhdpi/home_group_expanded.png index bbba4d66656b..7e5b968fecd6 100644 Binary files a/mobile/android/base/resources/drawable-xxhdpi/home_group_expanded.png and b/mobile/android/base/resources/drawable-xxhdpi/home_group_expanded.png differ diff --git a/mobile/android/base/resources/drawable-xxhdpi/homepage_banner_firstrun.png b/mobile/android/base/resources/drawable-xxhdpi/homepage_banner_firstrun.png index 46ce5b421740..e38c916b452d 100644 Binary files a/mobile/android/base/resources/drawable-xxhdpi/homepage_banner_firstrun.png and b/mobile/android/base/resources/drawable-xxhdpi/homepage_banner_firstrun.png differ diff --git a/mobile/android/base/resources/drawable-xxhdpi/ic_action_settings.png b/mobile/android/base/resources/drawable-xxhdpi/ic_action_settings.png index ca6265846211..0b01eddee5f8 100644 Binary files a/mobile/android/base/resources/drawable-xxhdpi/ic_action_settings.png and b/mobile/android/base/resources/drawable-xxhdpi/ic_action_settings.png differ diff --git a/mobile/android/base/resources/drawable-xxhdpi/ic_widget_new_tab.png b/mobile/android/base/resources/drawable-xxhdpi/ic_widget_new_tab.png index 4966525315e3..d7f2b0c5ff3d 100644 Binary files a/mobile/android/base/resources/drawable-xxhdpi/ic_widget_new_tab.png and b/mobile/android/base/resources/drawable-xxhdpi/ic_widget_new_tab.png differ diff --git a/mobile/android/base/resources/drawable-xxhdpi/ic_widget_search.png b/mobile/android/base/resources/drawable-xxhdpi/ic_widget_search.png index af078be82327..c191cb112297 100644 Binary files a/mobile/android/base/resources/drawable-xxhdpi/ic_widget_search.png and b/mobile/android/base/resources/drawable-xxhdpi/ic_widget_search.png differ diff --git a/mobile/android/base/resources/drawable-xxhdpi/icon_key.png b/mobile/android/base/resources/drawable-xxhdpi/icon_key.png index c4a189f29747..f7b344b29d25 100644 Binary files a/mobile/android/base/resources/drawable-xxhdpi/icon_key.png and b/mobile/android/base/resources/drawable-xxhdpi/icon_key.png differ diff --git a/mobile/android/base/resources/drawable-xxhdpi/icon_search_empty_firefox.png b/mobile/android/base/resources/drawable-xxhdpi/icon_search_empty_firefox.png index 8a57e62786b7..2bdca16fb338 100644 Binary files a/mobile/android/base/resources/drawable-xxhdpi/icon_search_empty_firefox.png and b/mobile/android/base/resources/drawable-xxhdpi/icon_search_empty_firefox.png differ diff --git a/mobile/android/base/resources/drawable-xxhdpi/icon_shareplane.png b/mobile/android/base/resources/drawable-xxhdpi/icon_shareplane.png new file mode 100644 index 000000000000..482fc454f594 Binary files /dev/null and b/mobile/android/base/resources/drawable-xxhdpi/icon_shareplane.png differ diff --git a/mobile/android/base/resources/drawable-xxhdpi/network_error.png b/mobile/android/base/resources/drawable-xxhdpi/network_error.png index 0f1e2480e3ae..8272110d67c6 100644 Binary files a/mobile/android/base/resources/drawable-xxhdpi/network_error.png and b/mobile/android/base/resources/drawable-xxhdpi/network_error.png differ diff --git a/mobile/android/base/resources/drawable-xxhdpi/onboard_start_addon.png b/mobile/android/base/resources/drawable-xxhdpi/onboard_start_addon.png index a739002f0aae..b78589a7c5d9 100644 Binary files a/mobile/android/base/resources/drawable-xxhdpi/onboard_start_addon.png and b/mobile/android/base/resources/drawable-xxhdpi/onboard_start_addon.png differ diff --git a/mobile/android/base/resources/drawable-xxhdpi/onboard_start_private.png b/mobile/android/base/resources/drawable-xxhdpi/onboard_start_private.png index c9adc99ebc7b..3b3765027cf2 100644 Binary files a/mobile/android/base/resources/drawable-xxhdpi/onboard_start_private.png and b/mobile/android/base/resources/drawable-xxhdpi/onboard_start_private.png differ diff --git a/mobile/android/base/resources/drawable-xxhdpi/onboard_start_shield.png b/mobile/android/base/resources/drawable-xxhdpi/onboard_start_shield.png index f86aa4ad077f..7162bbf41528 100644 Binary files a/mobile/android/base/resources/drawable-xxhdpi/onboard_start_shield.png and b/mobile/android/base/resources/drawable-xxhdpi/onboard_start_shield.png differ diff --git a/mobile/android/base/resources/drawable-xxhdpi/onboard_start_sync.png b/mobile/android/base/resources/drawable-xxhdpi/onboard_start_sync.png index df8d3f3c1795..c405f4afb0d8 100644 Binary files a/mobile/android/base/resources/drawable-xxhdpi/onboard_start_sync.png and b/mobile/android/base/resources/drawable-xxhdpi/onboard_start_sync.png differ diff --git a/mobile/android/base/resources/drawable-xxhdpi/search_clear.png b/mobile/android/base/resources/drawable-xxhdpi/search_clear.png index 5a46e4a2844a..bf2f802b9505 100644 Binary files a/mobile/android/base/resources/drawable-xxhdpi/search_clear.png and b/mobile/android/base/resources/drawable-xxhdpi/search_clear.png differ diff --git a/mobile/android/base/resources/drawable-xxhdpi/search_history.png b/mobile/android/base/resources/drawable-xxhdpi/search_history.png index f6962efb0876..fe5af1a92bdf 100644 Binary files a/mobile/android/base/resources/drawable-xxhdpi/search_history.png and b/mobile/android/base/resources/drawable-xxhdpi/search_history.png differ diff --git a/mobile/android/base/resources/drawable-xxhdpi/search_icon_active.png b/mobile/android/base/resources/drawable-xxhdpi/search_icon_active.png index b2dcce36b518..f42627eae61e 100644 Binary files a/mobile/android/base/resources/drawable-xxhdpi/search_icon_active.png and b/mobile/android/base/resources/drawable-xxhdpi/search_icon_active.png differ diff --git a/mobile/android/base/resources/drawable-xxhdpi/search_icon_inactive.png b/mobile/android/base/resources/drawable-xxhdpi/search_icon_inactive.png index e8c2bb3edf94..837a3cb18b28 100644 Binary files a/mobile/android/base/resources/drawable-xxhdpi/search_icon_inactive.png and b/mobile/android/base/resources/drawable-xxhdpi/search_icon_inactive.png differ diff --git a/mobile/android/base/resources/drawable-xxhdpi/search_launcher.png b/mobile/android/base/resources/drawable-xxhdpi/search_launcher.png index 0beaec28de25..6c8fc767833e 100644 Binary files a/mobile/android/base/resources/drawable-xxhdpi/search_launcher.png and b/mobile/android/base/resources/drawable-xxhdpi/search_launcher.png differ diff --git a/mobile/android/base/resources/drawable-xxhdpi/search_plus.png b/mobile/android/base/resources/drawable-xxhdpi/search_plus.png index 41be79959fdc..f377ffa02797 100644 Binary files a/mobile/android/base/resources/drawable-xxhdpi/search_plus.png and b/mobile/android/base/resources/drawable-xxhdpi/search_plus.png differ diff --git a/mobile/android/base/resources/drawable-xxhdpi/share_plane.png b/mobile/android/base/resources/drawable-xxhdpi/share_plane.png deleted file mode 100644 index ecc310ac1daa..000000000000 Binary files a/mobile/android/base/resources/drawable-xxhdpi/share_plane.png and /dev/null differ diff --git a/mobile/android/base/resources/drawable-xxhdpi/shield_disabled_doorhanger.png b/mobile/android/base/resources/drawable-xxhdpi/shield_disabled_doorhanger.png index 56a47478af1e..cb9498ea6930 100644 Binary files a/mobile/android/base/resources/drawable-xxhdpi/shield_disabled_doorhanger.png and b/mobile/android/base/resources/drawable-xxhdpi/shield_disabled_doorhanger.png differ diff --git a/mobile/android/base/resources/drawable-xxhdpi/shield_enabled_doorhanger.png b/mobile/android/base/resources/drawable-xxhdpi/shield_enabled_doorhanger.png index fded6732cc0c..940b96cd6d3e 100644 Binary files a/mobile/android/base/resources/drawable-xxhdpi/shield_enabled_doorhanger.png and b/mobile/android/base/resources/drawable-xxhdpi/shield_enabled_doorhanger.png differ diff --git a/mobile/android/base/resources/drawable-xxhdpi/suggestion_item_search.png b/mobile/android/base/resources/drawable-xxhdpi/suggestion_item_search.png old mode 100755 new mode 100644 index aab4b47f6e76..e4a384991a02 Binary files a/mobile/android/base/resources/drawable-xxhdpi/suggestion_item_search.png and b/mobile/android/base/resources/drawable-xxhdpi/suggestion_item_search.png differ diff --git a/mobile/android/base/resources/drawable-xxhdpi/sync_desktop.png b/mobile/android/base/resources/drawable-xxhdpi/sync_desktop.png index 2f79d5d698b9..23f473056e45 100644 Binary files a/mobile/android/base/resources/drawable-xxhdpi/sync_desktop.png and b/mobile/android/base/resources/drawable-xxhdpi/sync_desktop.png differ diff --git a/mobile/android/base/resources/drawable-xxhdpi/sync_desktop_inactive.png b/mobile/android/base/resources/drawable-xxhdpi/sync_desktop_inactive.png index 2a53582542f1..da5f4c42ac4b 100644 Binary files a/mobile/android/base/resources/drawable-xxhdpi/sync_desktop_inactive.png and b/mobile/android/base/resources/drawable-xxhdpi/sync_desktop_inactive.png differ diff --git a/mobile/android/base/resources/drawable-xxhdpi/sync_mobile.png b/mobile/android/base/resources/drawable-xxhdpi/sync_mobile.png index 337b049e5e63..33b5bf658fad 100644 Binary files a/mobile/android/base/resources/drawable-xxhdpi/sync_mobile.png and b/mobile/android/base/resources/drawable-xxhdpi/sync_mobile.png differ diff --git a/mobile/android/base/resources/drawable-xxhdpi/sync_mobile_inactive.png b/mobile/android/base/resources/drawable-xxhdpi/sync_mobile_inactive.png index 382c71db3077..6a50bed5897f 100644 Binary files a/mobile/android/base/resources/drawable-xxhdpi/sync_mobile_inactive.png and b/mobile/android/base/resources/drawable-xxhdpi/sync_mobile_inactive.png differ diff --git a/mobile/android/base/resources/drawable-xxhdpi/tab_panel_tab_globe.png b/mobile/android/base/resources/drawable-xxhdpi/tab_panel_tab_globe.png index 83dd804f8ef1..0a05cf146229 100644 Binary files a/mobile/android/base/resources/drawable-xxhdpi/tab_panel_tab_globe.png and b/mobile/android/base/resources/drawable-xxhdpi/tab_panel_tab_globe.png differ diff --git a/mobile/android/base/resources/drawable-xxhdpi/url_bar_entry_default.9.png b/mobile/android/base/resources/drawable-xxhdpi/url_bar_entry_default.9.png index 57cb26613041..6fa462933359 100644 Binary files a/mobile/android/base/resources/drawable-xxhdpi/url_bar_entry_default.9.png and b/mobile/android/base/resources/drawable-xxhdpi/url_bar_entry_default.9.png differ diff --git a/mobile/android/base/resources/drawable-xxhdpi/url_bar_entry_default_pb.9.png b/mobile/android/base/resources/drawable-xxhdpi/url_bar_entry_default_pb.9.png index bc36bc396dab..19270ef429f8 100644 Binary files a/mobile/android/base/resources/drawable-xxhdpi/url_bar_entry_default_pb.9.png and b/mobile/android/base/resources/drawable-xxhdpi/url_bar_entry_default_pb.9.png differ diff --git a/mobile/android/base/resources/drawable-xxhdpi/url_bar_entry_pressed.9.png b/mobile/android/base/resources/drawable-xxhdpi/url_bar_entry_pressed.9.png index fdf7251dd01b..02a55e12a51a 100644 Binary files a/mobile/android/base/resources/drawable-xxhdpi/url_bar_entry_pressed.9.png and b/mobile/android/base/resources/drawable-xxhdpi/url_bar_entry_pressed.9.png differ diff --git a/mobile/android/base/resources/drawable-xxhdpi/url_bar_entry_pressed_pb.9.png b/mobile/android/base/resources/drawable-xxhdpi/url_bar_entry_pressed_pb.9.png index 2a457673b68d..ab5d4e6671b6 100644 Binary files a/mobile/android/base/resources/drawable-xxhdpi/url_bar_entry_pressed_pb.9.png and b/mobile/android/base/resources/drawable-xxhdpi/url_bar_entry_pressed_pb.9.png differ diff --git a/mobile/android/base/resources/drawable-xxhdpi/urlbar_stop.png b/mobile/android/base/resources/drawable-xxhdpi/urlbar_stop.png index 69aa6a5b103a..1301cae71adb 100644 Binary files a/mobile/android/base/resources/drawable-xxhdpi/urlbar_stop.png and b/mobile/android/base/resources/drawable-xxhdpi/urlbar_stop.png differ diff --git a/mobile/android/base/resources/drawable-xxxhdpi/search_launcher.png b/mobile/android/base/resources/drawable-xxxhdpi/search_launcher.png index 007296cda752..3d4e65d88ae4 100644 Binary files a/mobile/android/base/resources/drawable-xxxhdpi/search_launcher.png and b/mobile/android/base/resources/drawable-xxxhdpi/search_launcher.png differ diff --git a/mobile/android/base/resources/drawable/overlay_share_bookmark_button.xml b/mobile/android/base/resources/drawable/overlay_share_bookmark_button.xml new file mode 100644 index 000000000000..bc1d51c5de14 --- /dev/null +++ b/mobile/android/base/resources/drawable/overlay_share_bookmark_button.xml @@ -0,0 +1,12 @@ + + + + + + + diff --git a/mobile/android/base/resources/drawable/overlay_share_reading_list_button.xml b/mobile/android/base/resources/drawable/overlay_share_reading_list_button.xml new file mode 100644 index 000000000000..aa409e3bbc0f --- /dev/null +++ b/mobile/android/base/resources/drawable/overlay_share_reading_list_button.xml @@ -0,0 +1,12 @@ + + + + + + + diff --git a/mobile/android/base/resources/layout/overlay_share_dialog.xml b/mobile/android/base/resources/layout/overlay_share_dialog.xml index 4d6cdd36a5d3..5fe7ecc7f0a5 100644 --- a/mobile/android/base/resources/layout/overlay_share_dialog.xml +++ b/mobile/android/base/resources/layout/overlay_share_dialog.xml @@ -5,7 +5,9 @@ - file, You can obtain one at http://mozilla.org/MPL/2.0/. --> - + android:enabled="false" + gecko:drawable="@drawable/overlay_share_reading_list_button" + gecko:enabledText="@string/overlay_share_reading_list_btn_label" + gecko:disabledText="@string/overlay_share_reading_list_btn_label_already"/> + android:enabled="false" + gecko:drawable="@drawable/overlay_share_bookmark_button" + gecko:enabledText="@string/overlay_share_bookmark_btn_label" + gecko:disabledText="@string/overlay_share_bookmark_btn_label_already"/> diff --git a/mobile/android/base/resources/values-v21/dimens.xml b/mobile/android/base/resources/values-v21/dimens.xml new file mode 100644 index 000000000000..dbf33ea28e1e --- /dev/null +++ b/mobile/android/base/resources/values-v21/dimens.xml @@ -0,0 +1,8 @@ + + + + + 17dp + diff --git a/mobile/android/base/resources/values/attrs.xml b/mobile/android/base/resources/values/attrs.xml index d3151aec7e4a..43eb4e5bce65 100644 --- a/mobile/android/base/resources/values/attrs.xml +++ b/mobile/android/base/resources/values/attrs.xml @@ -189,5 +189,11 @@ + + + + + + diff --git a/mobile/android/base/resources/values/dimens.xml b/mobile/android/base/resources/values/dimens.xml index dd81e54f6775..e7b8382ba179 100644 --- a/mobile/android/base/resources/values/dimens.xml +++ b/mobile/android/base/resources/values/dimens.xml @@ -105,6 +105,8 @@ 30dp 60dp + 10dp + 6dp 21dp 16sp diff --git a/mobile/android/base/widget/ActivityChooserModel.java b/mobile/android/base/widget/ActivityChooserModel.java index fd776ffb14a6..48f5fda12f7c 100644 --- a/mobile/android/base/widget/ActivityChooserModel.java +++ b/mobile/android/base/widget/ActivityChooserModel.java @@ -783,7 +783,7 @@ public class ActivityChooserModel extends DataSetObservable { } resolveInfo.labelRes = R.string.overlay_share_send_other; - resolveInfo.icon = R.drawable.share_plane; + resolveInfo.icon = R.drawable.icon_shareplane; } mActivities.add(new ActivityResolveInfo(resolveInfo)); diff --git a/mobile/android/base/widget/GeckoActionProvider.java b/mobile/android/base/widget/GeckoActionProvider.java index dbe3da0f34f1..dfb12fa4c9b6 100644 --- a/mobile/android/base/widget/GeckoActionProvider.java +++ b/mobile/android/base/widget/GeckoActionProvider.java @@ -90,18 +90,31 @@ public class GeckoActionProvider { /** * Creates the action view using the default history size. */ - public View onCreateActionView() { - return onCreateActionView(MAX_HISTORY_SIZE_DEFAULT, false); + public View onCreateActionView(final ActionViewType viewType) { + return onCreateActionView(MAX_HISTORY_SIZE_DEFAULT, viewType); } - public View onCreateActionView(final int maxHistorySize, final boolean isForQuickShareBar) { + public View onCreateActionView(final int maxHistorySize, final ActionViewType viewType) { // Create the view and set its data model. ActivityChooserModel dataModel = ActivityChooserModel.get(mContext, mHistoryFileName); final MenuItemActionView view; - if (isForQuickShareBar) { - view = new QuickShareBarActionView(mContext, null); - } else { - view = new MenuItemActionView(mContext, null); + switch (viewType) { + case DEFAULT: + view = new MenuItemActionView(mContext, null); + break; + + case QUICK_SHARE_ICON: + view = new QuickShareBarActionView(mContext, null); + break; + + case CONTEXT_MENU: + view = new MenuItemActionView(mContext, null); + view.initContextMenuStyles(); + break; + + default: + throw new IllegalArgumentException( + "Unknown " + ActionViewType.class.getSimpleName() + ": " + viewType); } view.addActionButtonClickListener(mCallbacks); @@ -251,4 +264,10 @@ public class GeckoActionProvider { Telemetry.sendUIEvent(TelemetryContract.Event.SHARE, TelemetryContract.Method.BUTTON); } } + + public enum ActionViewType { + DEFAULT, + QUICK_SHARE_ICON, + CONTEXT_MENU, + } } diff --git a/mobile/android/branding/aurora/content/about.png b/mobile/android/branding/aurora/content/about.png index 3ea8114c0a40..e0a8040ef249 100644 Binary files a/mobile/android/branding/aurora/content/about.png and b/mobile/android/branding/aurora/content/about.png differ diff --git a/mobile/android/branding/aurora/res/drawable-hdpi/large_icon.png b/mobile/android/branding/aurora/res/drawable-hdpi/large_icon.png deleted file mode 120000 index fd11ee776429..000000000000 --- a/mobile/android/branding/aurora/res/drawable-hdpi/large_icon.png +++ /dev/null @@ -1 +0,0 @@ -../drawable-xxhdpi/icon.png \ No newline at end of file diff --git a/mobile/android/branding/aurora/res/drawable-hdpi/large_icon.png b/mobile/android/branding/aurora/res/drawable-hdpi/large_icon.png new file mode 100644 index 000000000000..e94121b3cd97 Binary files /dev/null and b/mobile/android/branding/aurora/res/drawable-hdpi/large_icon.png differ diff --git a/mobile/android/branding/aurora/res/drawable-mdpi/large_icon.png b/mobile/android/branding/aurora/res/drawable-mdpi/large_icon.png deleted file mode 120000 index 79362e743cd1..000000000000 --- a/mobile/android/branding/aurora/res/drawable-mdpi/large_icon.png +++ /dev/null @@ -1 +0,0 @@ -../drawable-xhdpi/icon.png \ No newline at end of file diff --git a/mobile/android/branding/aurora/res/drawable-mdpi/large_icon.png b/mobile/android/branding/aurora/res/drawable-mdpi/large_icon.png new file mode 100644 index 000000000000..b6eee4c0c64d Binary files /dev/null and b/mobile/android/branding/aurora/res/drawable-mdpi/large_icon.png differ diff --git a/mobile/android/branding/aurora/res/drawable-mdpi/launcher_widget.png b/mobile/android/branding/aurora/res/drawable-mdpi/launcher_widget.png index 23d966478fdf..5c0a660a2481 100644 Binary files a/mobile/android/branding/aurora/res/drawable-mdpi/launcher_widget.png and b/mobile/android/branding/aurora/res/drawable-mdpi/launcher_widget.png differ diff --git a/mobile/android/branding/aurora/res/drawable-mdpi/widget_icon.png b/mobile/android/branding/aurora/res/drawable-mdpi/widget_icon.png index 39f3d0cd678d..6782e94e2d13 100644 Binary files a/mobile/android/branding/aurora/res/drawable-mdpi/widget_icon.png and b/mobile/android/branding/aurora/res/drawable-mdpi/widget_icon.png differ diff --git a/mobile/android/branding/aurora/res/drawable-xhdpi/icon.png b/mobile/android/branding/aurora/res/drawable-xhdpi/icon.png index debea20eaf50..b6eee4c0c64d 100644 Binary files a/mobile/android/branding/aurora/res/drawable-xhdpi/icon.png and b/mobile/android/branding/aurora/res/drawable-xhdpi/icon.png differ diff --git a/mobile/android/branding/aurora/res/drawable-xhdpi/large_icon.png b/mobile/android/branding/aurora/res/drawable-xhdpi/large_icon.png deleted file mode 120000 index 17528430e69f..000000000000 --- a/mobile/android/branding/aurora/res/drawable-xhdpi/large_icon.png +++ /dev/null @@ -1 +0,0 @@ -../drawable-xxxhdpi/icon.png \ No newline at end of file diff --git a/mobile/android/branding/aurora/res/drawable-xhdpi/large_icon.png b/mobile/android/branding/aurora/res/drawable-xhdpi/large_icon.png new file mode 100644 index 000000000000..3e3823f8aada Binary files /dev/null and b/mobile/android/branding/aurora/res/drawable-xhdpi/large_icon.png differ diff --git a/mobile/android/branding/aurora/res/drawable-xhdpi/widget_icon.png b/mobile/android/branding/aurora/res/drawable-xhdpi/widget_icon.png index 99810e65f4d8..d4b25483cd5c 100644 Binary files a/mobile/android/branding/aurora/res/drawable-xhdpi/widget_icon.png and b/mobile/android/branding/aurora/res/drawable-xhdpi/widget_icon.png differ diff --git a/mobile/android/branding/aurora/res/drawable-xxhdpi/large_icon.png b/mobile/android/branding/aurora/res/drawable-xxhdpi/large_icon.png index f68eb57c9a1e..5b439392e44a 100644 Binary files a/mobile/android/branding/aurora/res/drawable-xxhdpi/large_icon.png and b/mobile/android/branding/aurora/res/drawable-xxhdpi/large_icon.png differ diff --git a/mobile/android/branding/aurora/res/drawable-xxhdpi/launcher_widget.png b/mobile/android/branding/aurora/res/drawable-xxhdpi/launcher_widget.png index 279af3fff38b..07c1bac09c37 100644 Binary files a/mobile/android/branding/aurora/res/drawable-xxhdpi/launcher_widget.png and b/mobile/android/branding/aurora/res/drawable-xxhdpi/launcher_widget.png differ diff --git a/mobile/android/branding/beta/content/about.png b/mobile/android/branding/beta/content/about.png index 3cc1444f645b..c2cc83a8f810 100644 Binary files a/mobile/android/branding/beta/content/about.png and b/mobile/android/branding/beta/content/about.png differ diff --git a/mobile/android/branding/beta/res/drawable-hdpi/large_icon.png b/mobile/android/branding/beta/res/drawable-hdpi/large_icon.png deleted file mode 120000 index fd11ee776429..000000000000 --- a/mobile/android/branding/beta/res/drawable-hdpi/large_icon.png +++ /dev/null @@ -1 +0,0 @@ -../drawable-xxhdpi/icon.png \ No newline at end of file diff --git a/mobile/android/branding/beta/res/drawable-hdpi/large_icon.png b/mobile/android/branding/beta/res/drawable-hdpi/large_icon.png new file mode 100644 index 000000000000..64f1f8f97764 Binary files /dev/null and b/mobile/android/branding/beta/res/drawable-hdpi/large_icon.png differ diff --git a/mobile/android/branding/beta/res/drawable-hdpi/widget_icon.png b/mobile/android/branding/beta/res/drawable-hdpi/widget_icon.png index 61cc75cc0968..df30a314894b 100644 Binary files a/mobile/android/branding/beta/res/drawable-hdpi/widget_icon.png and b/mobile/android/branding/beta/res/drawable-hdpi/widget_icon.png differ diff --git a/mobile/android/branding/beta/res/drawable-mdpi/large_icon.png b/mobile/android/branding/beta/res/drawable-mdpi/large_icon.png deleted file mode 120000 index 79362e743cd1..000000000000 --- a/mobile/android/branding/beta/res/drawable-mdpi/large_icon.png +++ /dev/null @@ -1 +0,0 @@ -../drawable-xhdpi/icon.png \ No newline at end of file diff --git a/mobile/android/branding/beta/res/drawable-mdpi/large_icon.png b/mobile/android/branding/beta/res/drawable-mdpi/large_icon.png new file mode 100644 index 000000000000..34b90e3007f3 Binary files /dev/null and b/mobile/android/branding/beta/res/drawable-mdpi/large_icon.png differ diff --git a/mobile/android/branding/beta/res/drawable-mdpi/widget_icon.png b/mobile/android/branding/beta/res/drawable-mdpi/widget_icon.png index 09dff9c49109..7b0faed34ab3 100644 Binary files a/mobile/android/branding/beta/res/drawable-mdpi/widget_icon.png and b/mobile/android/branding/beta/res/drawable-mdpi/widget_icon.png differ diff --git a/mobile/android/branding/beta/res/drawable-xhdpi/large_icon.png b/mobile/android/branding/beta/res/drawable-xhdpi/large_icon.png deleted file mode 120000 index 17528430e69f..000000000000 --- a/mobile/android/branding/beta/res/drawable-xhdpi/large_icon.png +++ /dev/null @@ -1 +0,0 @@ -../drawable-xxxhdpi/icon.png \ No newline at end of file diff --git a/mobile/android/branding/beta/res/drawable-xhdpi/large_icon.png b/mobile/android/branding/beta/res/drawable-xhdpi/large_icon.png new file mode 100644 index 000000000000..0626cb83ca45 Binary files /dev/null and b/mobile/android/branding/beta/res/drawable-xhdpi/large_icon.png differ diff --git a/mobile/android/branding/beta/res/drawable-xhdpi/widget_icon.png b/mobile/android/branding/beta/res/drawable-xhdpi/widget_icon.png index b03bc6e61a11..9c661b613d5a 100644 Binary files a/mobile/android/branding/beta/res/drawable-xhdpi/widget_icon.png and b/mobile/android/branding/beta/res/drawable-xhdpi/widget_icon.png differ diff --git a/mobile/android/branding/beta/res/drawable-xxhdpi/large_icon.png b/mobile/android/branding/beta/res/drawable-xxhdpi/large_icon.png index 9655e8ca3c49..6a25ee0f0b01 100644 Binary files a/mobile/android/branding/beta/res/drawable-xxhdpi/large_icon.png and b/mobile/android/branding/beta/res/drawable-xxhdpi/large_icon.png differ diff --git a/mobile/android/branding/nightly/content/about.png b/mobile/android/branding/nightly/content/about.png index edc33d2a22a3..c44d2250562c 100644 Binary files a/mobile/android/branding/nightly/content/about.png and b/mobile/android/branding/nightly/content/about.png differ diff --git a/mobile/android/branding/nightly/res/drawable-hdpi/large_icon.png b/mobile/android/branding/nightly/res/drawable-hdpi/large_icon.png deleted file mode 120000 index fd11ee776429..000000000000 --- a/mobile/android/branding/nightly/res/drawable-hdpi/large_icon.png +++ /dev/null @@ -1 +0,0 @@ -../drawable-xxhdpi/icon.png \ No newline at end of file diff --git a/mobile/android/branding/nightly/res/drawable-hdpi/large_icon.png b/mobile/android/branding/nightly/res/drawable-hdpi/large_icon.png new file mode 100644 index 000000000000..7f5173db6c71 Binary files /dev/null and b/mobile/android/branding/nightly/res/drawable-hdpi/large_icon.png differ diff --git a/mobile/android/branding/nightly/res/drawable-hdpi/widget_icon.png b/mobile/android/branding/nightly/res/drawable-hdpi/widget_icon.png index d759d069f1d5..08ca060c44c6 100644 Binary files a/mobile/android/branding/nightly/res/drawable-hdpi/widget_icon.png and b/mobile/android/branding/nightly/res/drawable-hdpi/widget_icon.png differ diff --git a/mobile/android/branding/nightly/res/drawable-mdpi/large_icon.png b/mobile/android/branding/nightly/res/drawable-mdpi/large_icon.png deleted file mode 120000 index 79362e743cd1..000000000000 --- a/mobile/android/branding/nightly/res/drawable-mdpi/large_icon.png +++ /dev/null @@ -1 +0,0 @@ -../drawable-xhdpi/icon.png \ No newline at end of file diff --git a/mobile/android/branding/nightly/res/drawable-mdpi/large_icon.png b/mobile/android/branding/nightly/res/drawable-mdpi/large_icon.png new file mode 100644 index 000000000000..a94fc85550d1 Binary files /dev/null and b/mobile/android/branding/nightly/res/drawable-mdpi/large_icon.png differ diff --git a/mobile/android/branding/nightly/res/drawable-mdpi/launcher_widget.png b/mobile/android/branding/nightly/res/drawable-mdpi/launcher_widget.png index 23d966478fdf..5c0a660a2481 100644 Binary files a/mobile/android/branding/nightly/res/drawable-mdpi/launcher_widget.png and b/mobile/android/branding/nightly/res/drawable-mdpi/launcher_widget.png differ diff --git a/mobile/android/branding/nightly/res/drawable-mdpi/widget_icon.png b/mobile/android/branding/nightly/res/drawable-mdpi/widget_icon.png index f13d3fa5d395..f98cae843741 100644 Binary files a/mobile/android/branding/nightly/res/drawable-mdpi/widget_icon.png and b/mobile/android/branding/nightly/res/drawable-mdpi/widget_icon.png differ diff --git a/mobile/android/branding/nightly/res/drawable-xhdpi/large_icon.png b/mobile/android/branding/nightly/res/drawable-xhdpi/large_icon.png deleted file mode 120000 index 17528430e69f..000000000000 --- a/mobile/android/branding/nightly/res/drawable-xhdpi/large_icon.png +++ /dev/null @@ -1 +0,0 @@ -../drawable-xxxhdpi/icon.png \ No newline at end of file diff --git a/mobile/android/branding/nightly/res/drawable-xhdpi/large_icon.png b/mobile/android/branding/nightly/res/drawable-xhdpi/large_icon.png new file mode 100644 index 000000000000..de6b7971b68c Binary files /dev/null and b/mobile/android/branding/nightly/res/drawable-xhdpi/large_icon.png differ diff --git a/mobile/android/branding/nightly/res/drawable-xhdpi/widget_icon.png b/mobile/android/branding/nightly/res/drawable-xhdpi/widget_icon.png index ef76eb342035..554b5342255b 100644 Binary files a/mobile/android/branding/nightly/res/drawable-xhdpi/widget_icon.png and b/mobile/android/branding/nightly/res/drawable-xhdpi/widget_icon.png differ diff --git a/mobile/android/branding/nightly/res/drawable-xxhdpi/large_icon.png b/mobile/android/branding/nightly/res/drawable-xxhdpi/large_icon.png index e39fc34fad67..cae9ea289114 100644 Binary files a/mobile/android/branding/nightly/res/drawable-xxhdpi/large_icon.png and b/mobile/android/branding/nightly/res/drawable-xxhdpi/large_icon.png differ diff --git a/mobile/android/branding/nightly/res/drawable-xxhdpi/launcher_widget.png b/mobile/android/branding/nightly/res/drawable-xxhdpi/launcher_widget.png index 279af3fff38b..07c1bac09c37 100644 Binary files a/mobile/android/branding/nightly/res/drawable-xxhdpi/launcher_widget.png and b/mobile/android/branding/nightly/res/drawable-xxhdpi/launcher_widget.png differ diff --git a/mobile/android/branding/nightly/res/drawable-xxhdpi/widget_icon.png b/mobile/android/branding/nightly/res/drawable-xxhdpi/widget_icon.png index c93181cbf777..33b0c8637daa 100644 Binary files a/mobile/android/branding/nightly/res/drawable-xxhdpi/widget_icon.png and b/mobile/android/branding/nightly/res/drawable-xxhdpi/widget_icon.png differ diff --git a/mobile/android/branding/official/content/about.png b/mobile/android/branding/official/content/about.png index 3cc1444f645b..c2cc83a8f810 100644 Binary files a/mobile/android/branding/official/content/about.png and b/mobile/android/branding/official/content/about.png differ diff --git a/mobile/android/branding/official/res/drawable-hdpi/large_icon.png b/mobile/android/branding/official/res/drawable-hdpi/large_icon.png deleted file mode 120000 index fd11ee776429..000000000000 --- a/mobile/android/branding/official/res/drawable-hdpi/large_icon.png +++ /dev/null @@ -1 +0,0 @@ -../drawable-xxhdpi/icon.png \ No newline at end of file diff --git a/mobile/android/branding/official/res/drawable-hdpi/large_icon.png b/mobile/android/branding/official/res/drawable-hdpi/large_icon.png new file mode 100644 index 000000000000..2f77696abb35 Binary files /dev/null and b/mobile/android/branding/official/res/drawable-hdpi/large_icon.png differ diff --git a/mobile/android/branding/official/res/drawable-hdpi/launcher_widget.png b/mobile/android/branding/official/res/drawable-hdpi/launcher_widget.png index 9de7f3ba1070..76e722db6769 100644 Binary files a/mobile/android/branding/official/res/drawable-hdpi/launcher_widget.png and b/mobile/android/branding/official/res/drawable-hdpi/launcher_widget.png differ diff --git a/mobile/android/branding/official/res/drawable-mdpi/large_icon.png b/mobile/android/branding/official/res/drawable-mdpi/large_icon.png deleted file mode 120000 index 79362e743cd1..000000000000 --- a/mobile/android/branding/official/res/drawable-mdpi/large_icon.png +++ /dev/null @@ -1 +0,0 @@ -../drawable-xhdpi/icon.png \ No newline at end of file diff --git a/mobile/android/branding/official/res/drawable-mdpi/large_icon.png b/mobile/android/branding/official/res/drawable-mdpi/large_icon.png new file mode 100644 index 000000000000..4263ad5a95cc Binary files /dev/null and b/mobile/android/branding/official/res/drawable-mdpi/large_icon.png differ diff --git a/mobile/android/branding/official/res/drawable-mdpi/launcher_widget.png b/mobile/android/branding/official/res/drawable-mdpi/launcher_widget.png index ca727dd443be..bc8f7932f22d 100644 Binary files a/mobile/android/branding/official/res/drawable-mdpi/launcher_widget.png and b/mobile/android/branding/official/res/drawable-mdpi/launcher_widget.png differ diff --git a/mobile/android/branding/official/res/drawable-xhdpi/large_icon.png b/mobile/android/branding/official/res/drawable-xhdpi/large_icon.png deleted file mode 120000 index 17528430e69f..000000000000 --- a/mobile/android/branding/official/res/drawable-xhdpi/large_icon.png +++ /dev/null @@ -1 +0,0 @@ -../drawable-xxxhdpi/icon.png \ No newline at end of file diff --git a/mobile/android/branding/official/res/drawable-xhdpi/large_icon.png b/mobile/android/branding/official/res/drawable-xhdpi/large_icon.png new file mode 100644 index 000000000000..c5767bb298b5 Binary files /dev/null and b/mobile/android/branding/official/res/drawable-xhdpi/large_icon.png differ diff --git a/mobile/android/branding/official/res/drawable-xxhdpi/large_icon.png b/mobile/android/branding/official/res/drawable-xxhdpi/large_icon.png index f44e6d0e0adf..a37b9a83dfb4 100644 Binary files a/mobile/android/branding/official/res/drawable-xxhdpi/large_icon.png and b/mobile/android/branding/official/res/drawable-xxhdpi/large_icon.png differ diff --git a/mobile/android/branding/official/res/drawable-xxhdpi/launcher_widget.png b/mobile/android/branding/official/res/drawable-xxhdpi/launcher_widget.png index 6e41f409eb72..89a40e2d26db 100644 Binary files a/mobile/android/branding/official/res/drawable-xxhdpi/launcher_widget.png and b/mobile/android/branding/official/res/drawable-xxhdpi/launcher_widget.png differ diff --git a/mobile/android/branding/official/res/drawable-xxxhdpi/icon.png b/mobile/android/branding/official/res/drawable-xxxhdpi/icon.png index 465193a163d8..c5767bb298b5 100644 Binary files a/mobile/android/branding/official/res/drawable-xxxhdpi/icon.png and b/mobile/android/branding/official/res/drawable-xxxhdpi/icon.png differ diff --git a/mobile/android/branding/unofficial/content/about.png b/mobile/android/branding/unofficial/content/about.png index 3819f6337a17..2e09fb26530c 100644 Binary files a/mobile/android/branding/unofficial/content/about.png and b/mobile/android/branding/unofficial/content/about.png differ diff --git a/mobile/android/branding/unofficial/content/favicon32.png b/mobile/android/branding/unofficial/content/favicon32.png index 3f04acd50d30..50623f5a4278 100644 Binary files a/mobile/android/branding/unofficial/content/favicon32.png and b/mobile/android/branding/unofficial/content/favicon32.png differ diff --git a/mobile/android/branding/unofficial/content/favicon64.png b/mobile/android/branding/unofficial/content/favicon64.png index d6263c9d2403..de9ca927e645 100644 Binary files a/mobile/android/branding/unofficial/content/favicon64.png and b/mobile/android/branding/unofficial/content/favicon64.png differ diff --git a/mobile/android/branding/unofficial/res/drawable-hdpi/icon.png b/mobile/android/branding/unofficial/res/drawable-hdpi/icon.png index 1cdb4df2fcb7..58b2da23f7a4 100644 Binary files a/mobile/android/branding/unofficial/res/drawable-hdpi/icon.png and b/mobile/android/branding/unofficial/res/drawable-hdpi/icon.png differ diff --git a/mobile/android/branding/unofficial/res/drawable-hdpi/large_icon.png b/mobile/android/branding/unofficial/res/drawable-hdpi/large_icon.png deleted file mode 120000 index fd11ee776429..000000000000 --- a/mobile/android/branding/unofficial/res/drawable-hdpi/large_icon.png +++ /dev/null @@ -1 +0,0 @@ -../drawable-xxhdpi/icon.png \ No newline at end of file diff --git a/mobile/android/branding/unofficial/res/drawable-hdpi/large_icon.png b/mobile/android/branding/unofficial/res/drawable-hdpi/large_icon.png new file mode 100644 index 000000000000..62a0ffbb4bb9 Binary files /dev/null and b/mobile/android/branding/unofficial/res/drawable-hdpi/large_icon.png differ diff --git a/mobile/android/branding/unofficial/res/drawable-mdpi/icon.png b/mobile/android/branding/unofficial/res/drawable-mdpi/icon.png index 6e01e7aec57e..99c2db2484e1 100644 Binary files a/mobile/android/branding/unofficial/res/drawable-mdpi/icon.png and b/mobile/android/branding/unofficial/res/drawable-mdpi/icon.png differ diff --git a/mobile/android/branding/unofficial/res/drawable-mdpi/large_icon.png b/mobile/android/branding/unofficial/res/drawable-mdpi/large_icon.png deleted file mode 120000 index 79362e743cd1..000000000000 --- a/mobile/android/branding/unofficial/res/drawable-mdpi/large_icon.png +++ /dev/null @@ -1 +0,0 @@ -../drawable-xhdpi/icon.png \ No newline at end of file diff --git a/mobile/android/branding/unofficial/res/drawable-mdpi/large_icon.png b/mobile/android/branding/unofficial/res/drawable-mdpi/large_icon.png new file mode 100644 index 000000000000..227c3c9d155a Binary files /dev/null and b/mobile/android/branding/unofficial/res/drawable-mdpi/large_icon.png differ diff --git a/mobile/android/branding/unofficial/res/drawable-mdpi/launcher_widget.png b/mobile/android/branding/unofficial/res/drawable-mdpi/launcher_widget.png index 23d966478fdf..5c0a660a2481 100644 Binary files a/mobile/android/branding/unofficial/res/drawable-mdpi/launcher_widget.png and b/mobile/android/branding/unofficial/res/drawable-mdpi/launcher_widget.png differ diff --git a/mobile/android/branding/unofficial/res/drawable-xhdpi/icon.png b/mobile/android/branding/unofficial/res/drawable-xhdpi/icon.png index 27e348b0d4af..227c3c9d155a 100644 Binary files a/mobile/android/branding/unofficial/res/drawable-xhdpi/icon.png and b/mobile/android/branding/unofficial/res/drawable-xhdpi/icon.png differ diff --git a/mobile/android/branding/unofficial/res/drawable-xhdpi/large_icon.png b/mobile/android/branding/unofficial/res/drawable-xhdpi/large_icon.png deleted file mode 120000 index fd11ee776429..000000000000 --- a/mobile/android/branding/unofficial/res/drawable-xhdpi/large_icon.png +++ /dev/null @@ -1 +0,0 @@ -../drawable-xxhdpi/icon.png \ No newline at end of file diff --git a/mobile/android/branding/unofficial/res/drawable-xhdpi/large_icon.png b/mobile/android/branding/unofficial/res/drawable-xhdpi/large_icon.png new file mode 100644 index 000000000000..62a0ffbb4bb9 Binary files /dev/null and b/mobile/android/branding/unofficial/res/drawable-xhdpi/large_icon.png differ diff --git a/mobile/android/branding/unofficial/res/drawable-xhdpi/widget_icon.png b/mobile/android/branding/unofficial/res/drawable-xhdpi/widget_icon.png index ef76eb342035..554b5342255b 100644 Binary files a/mobile/android/branding/unofficial/res/drawable-xhdpi/widget_icon.png and b/mobile/android/branding/unofficial/res/drawable-xhdpi/widget_icon.png differ diff --git a/mobile/android/branding/unofficial/res/drawable-xxhdpi/icon.png b/mobile/android/branding/unofficial/res/drawable-xxhdpi/icon.png index 91974a1966fe..62a0ffbb4bb9 100644 Binary files a/mobile/android/branding/unofficial/res/drawable-xxhdpi/icon.png and b/mobile/android/branding/unofficial/res/drawable-xxhdpi/icon.png differ diff --git a/mobile/android/branding/unofficial/res/drawable-xxhdpi/large_icon.png b/mobile/android/branding/unofficial/res/drawable-xxhdpi/large_icon.png deleted file mode 120000 index 12585c964985..000000000000 --- a/mobile/android/branding/unofficial/res/drawable-xxhdpi/large_icon.png +++ /dev/null @@ -1 +0,0 @@ -icon.png \ No newline at end of file diff --git a/mobile/android/branding/unofficial/res/drawable-xxhdpi/large_icon.png b/mobile/android/branding/unofficial/res/drawable-xxhdpi/large_icon.png new file mode 100644 index 000000000000..62a0ffbb4bb9 Binary files /dev/null and b/mobile/android/branding/unofficial/res/drawable-xxhdpi/large_icon.png differ diff --git a/mobile/android/branding/unofficial/res/drawable-xxhdpi/launcher_widget.png b/mobile/android/branding/unofficial/res/drawable-xxhdpi/launcher_widget.png index 279af3fff38b..07c1bac09c37 100644 Binary files a/mobile/android/branding/unofficial/res/drawable-xxhdpi/launcher_widget.png and b/mobile/android/branding/unofficial/res/drawable-xxhdpi/launcher_widget.png differ diff --git a/mobile/android/chrome/content/browser.js b/mobile/android/chrome/content/browser.js index 0571f0bf590f..b7e938bd7dcd 100644 --- a/mobile/android/chrome/content/browser.js +++ b/mobile/android/chrome/content/browser.js @@ -1413,7 +1413,7 @@ var BrowserApp = { }); }, - setPreferences: function setPreferences(aPref) { + setPreferences: function (aPref) { let json = JSON.parse(aPref); switch (json.name) { @@ -1470,6 +1470,13 @@ var BrowserApp = { break; } } + + // Finally, if we were asked to flush, flush prefs to disk right now. + // This allows us to be confident that prefs set in Settings are persisted, + // even if we crash very soon after. + if (json.flush) { + Services.prefs.savePrefFile(null); + } }, sanitize: function (aItems, callback) { diff --git a/mobile/android/tests/background/junit3/res/drawable-hdpi/icon.png b/mobile/android/tests/background/junit3/res/drawable-hdpi/icon.png index 5c6a89f801c1..e83438eee46e 100644 Binary files a/mobile/android/tests/background/junit3/res/drawable-hdpi/icon.png and b/mobile/android/tests/background/junit3/res/drawable-hdpi/icon.png differ diff --git a/mobile/android/tests/background/junit3/res/drawable-ldpi/icon.png b/mobile/android/tests/background/junit3/res/drawable-ldpi/icon.png index 7e383f14932f..0483c95e99b1 100644 Binary files a/mobile/android/tests/background/junit3/res/drawable-ldpi/icon.png and b/mobile/android/tests/background/junit3/res/drawable-ldpi/icon.png differ diff --git a/mobile/android/tests/background/junit3/res/drawable-mdpi/icon.png b/mobile/android/tests/background/junit3/res/drawable-mdpi/icon.png index f2d917b905cb..86b4dee54628 100644 Binary files a/mobile/android/tests/background/junit3/res/drawable-mdpi/icon.png and b/mobile/android/tests/background/junit3/res/drawable-mdpi/icon.png differ diff --git a/mobile/android/tests/browser/junit3/res/drawable-hdpi/icon.png b/mobile/android/tests/browser/junit3/res/drawable-hdpi/icon.png index 5c6a89f801c1..e83438eee46e 100644 Binary files a/mobile/android/tests/browser/junit3/res/drawable-hdpi/icon.png and b/mobile/android/tests/browser/junit3/res/drawable-hdpi/icon.png differ diff --git a/mobile/android/tests/browser/junit3/res/drawable-ldpi/icon.png b/mobile/android/tests/browser/junit3/res/drawable-ldpi/icon.png index 7e383f14932f..0483c95e99b1 100644 Binary files a/mobile/android/tests/browser/junit3/res/drawable-ldpi/icon.png and b/mobile/android/tests/browser/junit3/res/drawable-ldpi/icon.png differ diff --git a/mobile/android/tests/browser/junit3/res/drawable-mdpi/icon.png b/mobile/android/tests/browser/junit3/res/drawable-mdpi/icon.png index f2d917b905cb..86b4dee54628 100644 Binary files a/mobile/android/tests/browser/junit3/res/drawable-mdpi/icon.png and b/mobile/android/tests/browser/junit3/res/drawable-mdpi/icon.png differ diff --git a/mobile/android/themes/core/images/5stars.png b/mobile/android/themes/core/images/5stars.png index 7fc20b45011a..c5fb5de9c40f 100644 Binary files a/mobile/android/themes/core/images/5stars.png and b/mobile/android/themes/core/images/5stars.png differ diff --git a/mobile/android/themes/core/images/addons-32.png b/mobile/android/themes/core/images/addons-32.png index 9679afd823c3..a50103206d27 100644 Binary files a/mobile/android/themes/core/images/addons-32.png and b/mobile/android/themes/core/images/addons-32.png differ diff --git a/mobile/android/themes/core/images/arrowdown-16.png b/mobile/android/themes/core/images/arrowdown-16.png index c982426f2ade..6ceffc863f0e 100644 Binary files a/mobile/android/themes/core/images/arrowdown-16.png and b/mobile/android/themes/core/images/arrowdown-16.png differ diff --git a/mobile/android/themes/core/images/arrowleft-16.png b/mobile/android/themes/core/images/arrowleft-16.png index 464a4a866cd9..248537ebcd7c 100644 Binary files a/mobile/android/themes/core/images/arrowleft-16.png and b/mobile/android/themes/core/images/arrowleft-16.png differ diff --git a/mobile/android/themes/core/images/arrowright-16.png b/mobile/android/themes/core/images/arrowright-16.png index 859e98ba64b6..c91c53fd4ffc 100644 Binary files a/mobile/android/themes/core/images/arrowright-16.png and b/mobile/android/themes/core/images/arrowright-16.png differ diff --git a/mobile/android/themes/core/images/arrowup-16.png b/mobile/android/themes/core/images/arrowup-16.png index 16bb47b66f4e..58771e9d261c 100644 Binary files a/mobile/android/themes/core/images/arrowup-16.png and b/mobile/android/themes/core/images/arrowup-16.png differ diff --git a/mobile/android/themes/core/images/cast-active-hdpi.png b/mobile/android/themes/core/images/cast-active-hdpi.png index 1be34d5bb94f..655ecc8eb3b4 100644 Binary files a/mobile/android/themes/core/images/cast-active-hdpi.png and b/mobile/android/themes/core/images/cast-active-hdpi.png differ diff --git a/mobile/android/themes/core/images/checkbox_checked.png b/mobile/android/themes/core/images/checkbox_checked.png index e87e6146b04b..26e0b49b287f 100644 Binary files a/mobile/android/themes/core/images/checkbox_checked.png and b/mobile/android/themes/core/images/checkbox_checked.png differ diff --git a/mobile/android/themes/core/images/checkbox_checked_disabled.png b/mobile/android/themes/core/images/checkbox_checked_disabled.png index 62843d9c81e7..0ee34bb28843 100644 Binary files a/mobile/android/themes/core/images/checkbox_checked_disabled.png and b/mobile/android/themes/core/images/checkbox_checked_disabled.png differ diff --git a/mobile/android/themes/core/images/checkbox_checked_pressed.png b/mobile/android/themes/core/images/checkbox_checked_pressed.png index 688a8282ef31..67f0f6be0e09 100644 Binary files a/mobile/android/themes/core/images/checkbox_checked_pressed.png and b/mobile/android/themes/core/images/checkbox_checked_pressed.png differ diff --git a/mobile/android/themes/core/images/checkbox_unchecked.png b/mobile/android/themes/core/images/checkbox_unchecked.png index c34c4dff247d..0ba564a6f83d 100644 Binary files a/mobile/android/themes/core/images/checkbox_unchecked.png and b/mobile/android/themes/core/images/checkbox_unchecked.png differ diff --git a/mobile/android/themes/core/images/checkbox_unchecked_disabled.png b/mobile/android/themes/core/images/checkbox_unchecked_disabled.png index 7c3990603057..c676e227a7b1 100644 Binary files a/mobile/android/themes/core/images/checkbox_unchecked_disabled.png and b/mobile/android/themes/core/images/checkbox_unchecked_disabled.png differ diff --git a/mobile/android/themes/core/images/checkbox_unchecked_pressed.png b/mobile/android/themes/core/images/checkbox_unchecked_pressed.png index bcbac43be0e7..5e957ff0fd48 100644 Binary files a/mobile/android/themes/core/images/checkbox_unchecked_pressed.png and b/mobile/android/themes/core/images/checkbox_unchecked_pressed.png differ diff --git a/mobile/android/themes/core/images/errorpage-larry-black.png b/mobile/android/themes/core/images/errorpage-larry-black.png index 9f2e4a6e7366..333084343dd4 100644 Binary files a/mobile/android/themes/core/images/errorpage-larry-black.png and b/mobile/android/themes/core/images/errorpage-larry-black.png differ diff --git a/mobile/android/themes/core/images/errorpage-larry-white.png b/mobile/android/themes/core/images/errorpage-larry-white.png index fc153c7314e8..6f93c22c5233 100644 Binary files a/mobile/android/themes/core/images/errorpage-larry-white.png and b/mobile/android/themes/core/images/errorpage-larry-white.png differ diff --git a/mobile/android/themes/core/images/exitfullscreen-hdpi.png b/mobile/android/themes/core/images/exitfullscreen-hdpi.png index 826e53408432..402be0c6be20 100644 Binary files a/mobile/android/themes/core/images/exitfullscreen-hdpi.png and b/mobile/android/themes/core/images/exitfullscreen-hdpi.png differ diff --git a/mobile/android/themes/core/images/fullscreen-hdpi.png b/mobile/android/themes/core/images/fullscreen-hdpi.png index 980e787310a9..a98bff33de97 100644 Binary files a/mobile/android/themes/core/images/fullscreen-hdpi.png and b/mobile/android/themes/core/images/fullscreen-hdpi.png differ diff --git a/mobile/android/themes/core/images/icon_floaty_hdpi.png b/mobile/android/themes/core/images/icon_floaty_hdpi.png index cc0c4e0a807e..f9204ecc506f 100644 Binary files a/mobile/android/themes/core/images/icon_floaty_hdpi.png and b/mobile/android/themes/core/images/icon_floaty_hdpi.png differ diff --git a/mobile/android/themes/core/images/icon_floaty_mdpi.png b/mobile/android/themes/core/images/icon_floaty_mdpi.png index 4dee35ac94eb..e3bbf79ca4fb 100644 Binary files a/mobile/android/themes/core/images/icon_floaty_mdpi.png and b/mobile/android/themes/core/images/icon_floaty_mdpi.png differ diff --git a/mobile/android/themes/core/images/icon_floaty_xhdpi.png b/mobile/android/themes/core/images/icon_floaty_xhdpi.png index 3459007224c1..22b7323f08d6 100644 Binary files a/mobile/android/themes/core/images/icon_floaty_xhdpi.png and b/mobile/android/themes/core/images/icon_floaty_xhdpi.png differ diff --git a/mobile/android/themes/core/images/icon_floaty_xxhdpi.png b/mobile/android/themes/core/images/icon_floaty_xxhdpi.png index 66a0d38a42a6..3c6dd6937468 100644 Binary files a/mobile/android/themes/core/images/icon_floaty_xxhdpi.png and b/mobile/android/themes/core/images/icon_floaty_xxhdpi.png differ diff --git a/mobile/android/themes/core/images/icon_heart_hdpi.png b/mobile/android/themes/core/images/icon_heart_hdpi.png index a557297ce9b0..0aec6b885fca 100644 Binary files a/mobile/android/themes/core/images/icon_heart_hdpi.png and b/mobile/android/themes/core/images/icon_heart_hdpi.png differ diff --git a/mobile/android/themes/core/images/icon_heart_mdpi.png b/mobile/android/themes/core/images/icon_heart_mdpi.png index adf4ff011d8f..1f18448cd128 100644 Binary files a/mobile/android/themes/core/images/icon_heart_mdpi.png and b/mobile/android/themes/core/images/icon_heart_mdpi.png differ diff --git a/mobile/android/themes/core/images/icon_heart_xhdpi.png b/mobile/android/themes/core/images/icon_heart_xhdpi.png index 0b57a41355ee..99d2c8b1cccf 100644 Binary files a/mobile/android/themes/core/images/icon_heart_xhdpi.png and b/mobile/android/themes/core/images/icon_heart_xhdpi.png differ diff --git a/mobile/android/themes/core/images/icon_heart_xxhdpi.png b/mobile/android/themes/core/images/icon_heart_xxhdpi.png index ab8dfaa4aaab..dae8e25109dd 100644 Binary files a/mobile/android/themes/core/images/icon_heart_xxhdpi.png and b/mobile/android/themes/core/images/icon_heart_xxhdpi.png differ diff --git a/mobile/android/themes/core/images/lock.png b/mobile/android/themes/core/images/lock.png index 5ff3654d3172..27cf636cc756 100644 Binary files a/mobile/android/themes/core/images/lock.png and b/mobile/android/themes/core/images/lock.png differ diff --git a/mobile/android/themes/core/images/marketplace-logo.png b/mobile/android/themes/core/images/marketplace-logo.png index 3500ee5841ed..f300983b98dd 100644 Binary files a/mobile/android/themes/core/images/marketplace-logo.png and b/mobile/android/themes/core/images/marketplace-logo.png differ diff --git a/mobile/android/themes/core/images/mute-hdpi.png b/mobile/android/themes/core/images/mute-hdpi.png index 0bd1e60e6a3e..efd14f576087 100644 Binary files a/mobile/android/themes/core/images/mute-hdpi.png and b/mobile/android/themes/core/images/mute-hdpi.png differ diff --git a/mobile/android/themes/core/images/pause-hdpi.png b/mobile/android/themes/core/images/pause-hdpi.png index e377d321ce03..99966db50f7d 100644 Binary files a/mobile/android/themes/core/images/pause-hdpi.png and b/mobile/android/themes/core/images/pause-hdpi.png differ diff --git a/mobile/android/themes/core/images/play-hdpi.png b/mobile/android/themes/core/images/play-hdpi.png index a8482eb4dd7e..90d30e14c12b 100644 Binary files a/mobile/android/themes/core/images/play-hdpi.png and b/mobile/android/themes/core/images/play-hdpi.png differ diff --git a/mobile/android/themes/core/images/privatebrowsing-mask.png b/mobile/android/themes/core/images/privatebrowsing-mask.png index f98082058ff5..73286a6aece1 100644 Binary files a/mobile/android/themes/core/images/privatebrowsing-mask.png and b/mobile/android/themes/core/images/privatebrowsing-mask.png differ diff --git a/mobile/android/themes/core/images/reader-minus-hdpi.png b/mobile/android/themes/core/images/reader-minus-hdpi.png index 2b2e483c7ae2..31932ada1e9b 100644 Binary files a/mobile/android/themes/core/images/reader-minus-hdpi.png and b/mobile/android/themes/core/images/reader-minus-hdpi.png differ diff --git a/mobile/android/themes/core/images/reader-minus-mdpi.png b/mobile/android/themes/core/images/reader-minus-mdpi.png index 53b6e71bd0dc..db2a5e80911a 100644 Binary files a/mobile/android/themes/core/images/reader-minus-mdpi.png and b/mobile/android/themes/core/images/reader-minus-mdpi.png differ diff --git a/mobile/android/themes/core/images/reader-minus-xhdpi.png b/mobile/android/themes/core/images/reader-minus-xhdpi.png index 78e97b4a4e48..e4878aa58e93 100644 Binary files a/mobile/android/themes/core/images/reader-minus-xhdpi.png and b/mobile/android/themes/core/images/reader-minus-xhdpi.png differ diff --git a/mobile/android/themes/core/images/reader-minus-xxhdpi.png b/mobile/android/themes/core/images/reader-minus-xxhdpi.png index e9f0fbb61d86..c7db678b1915 100644 Binary files a/mobile/android/themes/core/images/reader-minus-xxhdpi.png and b/mobile/android/themes/core/images/reader-minus-xxhdpi.png differ diff --git a/mobile/android/themes/core/images/reader-plus-hdpi.png b/mobile/android/themes/core/images/reader-plus-hdpi.png index 80f96968ce84..95dc1e41ae6d 100644 Binary files a/mobile/android/themes/core/images/reader-plus-hdpi.png and b/mobile/android/themes/core/images/reader-plus-hdpi.png differ diff --git a/mobile/android/themes/core/images/reader-plus-mdpi.png b/mobile/android/themes/core/images/reader-plus-mdpi.png index 4603a204f467..1ec5732f58da 100644 Binary files a/mobile/android/themes/core/images/reader-plus-mdpi.png and b/mobile/android/themes/core/images/reader-plus-mdpi.png differ diff --git a/mobile/android/themes/core/images/reader-plus-xhdpi.png b/mobile/android/themes/core/images/reader-plus-xhdpi.png index d2f26364951f..3cd446a62e7e 100644 Binary files a/mobile/android/themes/core/images/reader-plus-xhdpi.png and b/mobile/android/themes/core/images/reader-plus-xhdpi.png differ diff --git a/mobile/android/themes/core/images/reader-plus-xxhdpi.png b/mobile/android/themes/core/images/reader-plus-xxhdpi.png index 9494b94436b9..6b73e9f0a2d1 100644 Binary files a/mobile/android/themes/core/images/reader-plus-xxhdpi.png and b/mobile/android/themes/core/images/reader-plus-xxhdpi.png differ diff --git a/mobile/android/themes/core/images/reader-share-icon-xxhdpi.png b/mobile/android/themes/core/images/reader-share-icon-xxhdpi.png index 718428f811ec..fee49e5f2ae8 100644 Binary files a/mobile/android/themes/core/images/reader-share-icon-xxhdpi.png and b/mobile/android/themes/core/images/reader-share-icon-xxhdpi.png differ diff --git a/mobile/android/themes/core/images/reader-style-icon-active-xhdpi.png b/mobile/android/themes/core/images/reader-style-icon-active-xhdpi.png index eb73af6d736a..dd13cf4dc6c1 100644 Binary files a/mobile/android/themes/core/images/reader-style-icon-active-xhdpi.png and b/mobile/android/themes/core/images/reader-style-icon-active-xhdpi.png differ diff --git a/mobile/android/themes/core/images/reader-style-icon-active-xxhdpi.png b/mobile/android/themes/core/images/reader-style-icon-active-xxhdpi.png index fb02250f19e4..195b56e873b0 100644 Binary files a/mobile/android/themes/core/images/reader-style-icon-active-xxhdpi.png and b/mobile/android/themes/core/images/reader-style-icon-active-xxhdpi.png differ diff --git a/mobile/android/themes/core/images/reader-toggle-off-icon-xhdpi.png b/mobile/android/themes/core/images/reader-toggle-off-icon-xhdpi.png index 9c471aec7e1f..5bc42e697724 100644 Binary files a/mobile/android/themes/core/images/reader-toggle-off-icon-xhdpi.png and b/mobile/android/themes/core/images/reader-toggle-off-icon-xhdpi.png differ diff --git a/mobile/android/themes/core/images/reader-toggle-off-icon-xxhdpi.png b/mobile/android/themes/core/images/reader-toggle-off-icon-xxhdpi.png index ed4cdaefcf2f..ac92d2c64eea 100644 Binary files a/mobile/android/themes/core/images/reader-toggle-off-icon-xxhdpi.png and b/mobile/android/themes/core/images/reader-toggle-off-icon-xxhdpi.png differ diff --git a/mobile/android/themes/core/images/reader-toggle-on-icon-hdpi.png b/mobile/android/themes/core/images/reader-toggle-on-icon-hdpi.png index a602f91e9982..ac140e15f256 100644 Binary files a/mobile/android/themes/core/images/reader-toggle-on-icon-hdpi.png and b/mobile/android/themes/core/images/reader-toggle-on-icon-hdpi.png differ diff --git a/mobile/android/themes/core/images/reader-toggle-on-icon-mdpi.png b/mobile/android/themes/core/images/reader-toggle-on-icon-mdpi.png index 0788d51002b1..25b05b039c54 100644 Binary files a/mobile/android/themes/core/images/reader-toggle-on-icon-mdpi.png and b/mobile/android/themes/core/images/reader-toggle-on-icon-mdpi.png differ diff --git a/mobile/android/themes/core/images/reader-toggle-on-icon-xhdpi.png b/mobile/android/themes/core/images/reader-toggle-on-icon-xhdpi.png index d1e6512c1488..d02a87ddc70a 100644 Binary files a/mobile/android/themes/core/images/reader-toggle-on-icon-xhdpi.png and b/mobile/android/themes/core/images/reader-toggle-on-icon-xhdpi.png differ diff --git a/mobile/android/themes/core/images/reader-toggle-on-icon-xxhdpi.png b/mobile/android/themes/core/images/reader-toggle-on-icon-xxhdpi.png index 642d50938597..5467fe26aaa3 100644 Binary files a/mobile/android/themes/core/images/reader-toggle-on-icon-xxhdpi.png and b/mobile/android/themes/core/images/reader-toggle-on-icon-xxhdpi.png differ diff --git a/mobile/android/themes/core/images/scrubber-hdpi.png b/mobile/android/themes/core/images/scrubber-hdpi.png index 49c60505f465..a1ba09dc9bd0 100644 Binary files a/mobile/android/themes/core/images/scrubber-hdpi.png and b/mobile/android/themes/core/images/scrubber-hdpi.png differ diff --git a/mobile/android/themes/core/images/search-clear-30.png b/mobile/android/themes/core/images/search-clear-30.png index 8bab39a08d35..3acdbafa2a70 100644 Binary files a/mobile/android/themes/core/images/search-clear-30.png and b/mobile/android/themes/core/images/search-clear-30.png differ diff --git a/mobile/android/themes/core/images/search.png b/mobile/android/themes/core/images/search.png index 2369d03f336b..e127d7d84e37 100644 Binary files a/mobile/android/themes/core/images/search.png and b/mobile/android/themes/core/images/search.png differ diff --git a/mobile/android/themes/core/images/textfield.png b/mobile/android/themes/core/images/textfield.png index 436853fa1ea7..24f82552d264 100644 Binary files a/mobile/android/themes/core/images/textfield.png and b/mobile/android/themes/core/images/textfield.png differ diff --git a/mobile/android/themes/core/images/throbber.png b/mobile/android/themes/core/images/throbber.png index c601ec80ba7c..0a4307dbd0a1 100644 Binary files a/mobile/android/themes/core/images/throbber.png and b/mobile/android/themes/core/images/throbber.png differ diff --git a/mobile/android/themes/core/images/update.png b/mobile/android/themes/core/images/update.png index b66287294cac..2e58c7127061 100644 Binary files a/mobile/android/themes/core/images/update.png and b/mobile/android/themes/core/images/update.png differ diff --git a/mobile/android/themes/core/images/wordmark-hdpi.png b/mobile/android/themes/core/images/wordmark-hdpi.png index 9cf5e12d62df..718cbfc9616f 100644 Binary files a/mobile/android/themes/core/images/wordmark-hdpi.png and b/mobile/android/themes/core/images/wordmark-hdpi.png differ diff --git a/modules/libmar/moz.build b/modules/libmar/moz.build index 44191c3ab1e8..d9a8b34bb677 100644 --- a/modules/libmar/moz.build +++ b/modules/libmar/moz.build @@ -9,11 +9,7 @@ DIRS += ['src'] if CONFIG['MOZ_ENABLE_SIGNMAR']: DIRS += ['sign', 'verify'] TEST_DIRS += ['tests'] -elif CONFIG['OS_ARCH'] == 'WINNT': - # On Windows we don't verify with NSS and updater needs to link to it - DIRS += ['verify'] -elif CONFIG['OS_ARCH'] == 'Darwin': - # On OSX we don't verify with NSS and updater needs to link to it. +elif CONFIG['MOZ_VERIFY_MAR_SIGNATURE']: DIRS += ['verify'] # If we are building ./sign and ./verify then ./tool must come after it diff --git a/modules/libmar/src/mar.h b/modules/libmar/src/mar.h index 4e53d2cb5bd3..98b454d94a18 100644 --- a/modules/libmar/src/mar.h +++ b/modules/libmar/src/mar.h @@ -134,6 +134,26 @@ int mar_create(const char *dest, */ int mar_extract(const char *path); +#define MAR_MAX_CERT_SIZE (16*1024) // Way larger than necessary + +/* Read the entire file (not a MAR file) into a newly-allocated buffer. + * This function does not write to stderr. Instead, the caller should + * write whatever error messages it sees fit. The caller must free the returned + * buffer using free(). + * + * @param filePath The path to the file that should be read. + * @param maxSize The maximum valid file size. + * @param data On success, *data will point to a newly-allocated buffer + * with the file's contents in it. + * @param size On success, *size will be the size of the created buffer. + * + * @return 0 on success, -1 on error + */ +int mar_read_entire_file(const char * filePath, + uint32_t maxSize, + /*out*/ const uint8_t * *data, + /*out*/ uint32_t *size); + /** * Verifies a MAR file by verifying each signature with the corresponding * certificate. That is, the first signature will be verified using the first @@ -154,12 +174,10 @@ int mar_extract(const char *path); * a negative number if there was an error * a positive number if the signature does not verify */ -#ifdef XP_WIN -int mar_verify_signaturesW(MarFile *mar, - const uint8_t * const *certData, - const uint32_t *certDataSizes, - uint32_t certCount); -#endif +int mar_verify_signatures(MarFile *mar, + const uint8_t * const *certData, + const uint32_t *certDataSizes, + uint32_t certCount); /** * Reads the product info block from the MAR file's additional block section. diff --git a/modules/libmar/src/mar_cmdline.h b/modules/libmar/src/mar_cmdline.h index e8645ec2b664..e2c9ed5feeeb 100644 --- a/modules/libmar/src/mar_cmdline.h +++ b/modules/libmar/src/mar_cmdline.h @@ -38,38 +38,6 @@ int get_mar_file_info(const char *path, uint32_t *offsetAdditionalBlocks, uint32_t *numAdditionalBlocks); -/** - * Verifies a MAR file by verifying each signature with the corresponding - * certificate. That is, the first signature will be verified using the first - * certificate given, the second signature will be verified using the second - * certificate given, etc. The signature count must exactly match the number of - * certificates given, and all signature verifications must succeed. - * This is only used by the signmar program when used with arguments to verify - * a MAR. This should not be used to verify a MAR that will be extracted in the - * same operation by updater code. This function prints the error message if - * verification fails. - * - * @param pathToMAR The path of the MAR file whose signature should be - * checked - * @param certData Pointer to the first element in an array of certificate - * file data. - * @param certDataSizes Pointer to the first element in an array for size of - * the cert data. - * @param certNames Pointer to the first element in an array of certificate - * names. - * Used only if compiled with NSS support - * @param certCount The number of elements in certData, certDataSizes, - * and certNames - * @return 0 on success - * a negative number if there was an error - * a positive number if the signature does not verify - */ -int mar_verify_signatures(const char *pathToMAR, - const uint8_t * const *certData, - const uint32_t *certDataSizes, - const char * const *certNames, - uint32_t certCount); - /** * Reads the product info block from the MAR file's additional block section. * The caller is responsible for freeing the fields in infoBlock diff --git a/modules/libmar/tool/mar.c b/modules/libmar/tool/mar.c index 8abbac7342d1..88110098416a 100644 --- a/modules/libmar/tool/mar.c +++ b/modules/libmar/tool/mar.c @@ -19,6 +19,8 @@ #endif #if !defined(NO_SIGN_VERIFY) && (!defined(XP_WIN) || defined(MAR_NSS)) +#include "cert.h" +#include "pk11pub.h" int NSSInitCryptoContext(const char *NSSConfigDir); #endif @@ -115,25 +117,23 @@ int main(int argc, char **argv) { const char *certNames[MAX_SIGNATURES]; char *MARChannelID = MAR_CHANNEL_ID; char *productVersion = MOZ_APP_VERSION; - uint32_t i, k; + uint32_t k; int rv = -1; uint32_t certCount = 0; int32_t sigIndex = -1; -#if defined(XP_WIN) && !defined(MAR_NSS) && !defined(NO_SIGN_VERIFY) - HANDLE certFile; - uint8_t *certBuffers[MAX_SIGNATURES]; -#endif -#if !defined(NO_SIGN_VERIFY) && ((!defined(MAR_NSS) && defined(XP_WIN)) || \ - defined(XP_MACOSX)) - char* DERFilePaths[MAX_SIGNATURES]; +#if !defined(NO_SIGN_VERIFY) uint32_t fileSizes[MAX_SIGNATURES]; - uint32_t read; + const uint8_t* certBuffers[MAX_SIGNATURES]; + char* DERFilePaths[MAX_SIGNATURES]; +#if (!defined(XP_WIN) && !defined(XP_MACOSX)) || defined(MAR_NSS) + CERTCertificate* certs[MAX_SIGNATURES]; +#endif #endif - memset(certNames, 0, sizeof(certNames)); + memset((void*)certNames, 0, sizeof(certNames)); #if defined(XP_WIN) && !defined(MAR_NSS) && !defined(NO_SIGN_VERIFY) - memset(certBuffers, 0, sizeof(certBuffers)); + memset((void*)certBuffers, 0, sizeof(certBuffers)); #endif #if !defined(NO_SIGN_VERIFY) && ((!defined(MAR_NSS) && defined(XP_WIN)) || \ defined(XP_MACOSX)) @@ -319,43 +319,68 @@ int main(int argc, char **argv) { return import_signature(argv[2], sigIndex, argv[3], argv[4]); case 'v': - -#if defined(XP_WIN) && !defined(MAR_NSS) if (certCount == 0) { print_usage(); return -1; } - for (k = 0; k < certCount; ++k) { - /* If the mar program was built using CryptoAPI, then read in the buffer - containing the cert from disk. */ - certFile = CreateFileA(DERFilePaths[k], GENERIC_READ, - FILE_SHARE_READ | - FILE_SHARE_WRITE | - FILE_SHARE_DELETE, - NULL, - OPEN_EXISTING, - 0, NULL); - if (INVALID_HANDLE_VALUE == certFile) { - return -1; - } - fileSizes[k] = GetFileSize(certFile, NULL); - certBuffers[k] = malloc(fileSizes[k]); - if (!ReadFile(certFile, certBuffers[k], fileSizes[k], &read, NULL) || - fileSizes[k] != read) { - CloseHandle(certFile); - for (i = 0; i <= k; i++) { - free(certBuffers[i]); - } - return -1; - } - CloseHandle(certFile); +#if (!defined(XP_WIN) && !defined(XP_MACOSX)) || defined(MAR_NSS) + if (!NSSConfigDir || certCount == 0) { + print_usage(); + return -1; } - rv = mar_verify_signatures(argv[2], certBuffers, fileSizes, - NULL, certCount); + if (NSSInitCryptoContext(NSSConfigDir)) { + fprintf(stderr, "ERROR: Could not initialize crypto library.\n"); + return -1; + } +#endif + + rv = 0; for (k = 0; k < certCount; ++k) { - free(certBuffers[k]); +#if (defined(XP_WIN) || defined(XP_MACOSX)) && !defined(MAR_NSS) + rv = mar_read_entire_file(DERFilePaths[k], MAR_MAX_CERT_SIZE, + &certBuffers[k], &fileSizes[k]); +#else + /* It is somewhat circuitous to look up a CERTCertificate and then pass + * in its DER encoding just so we can later re-create that + * CERTCertificate to extract the public key out of it. However, by doing + * things this way, we maximize the reuse of the mar_verify_signatures + * function and also we keep the control flow as similar as possible + * between programs and operating systems, at least for the functions + * that are critically important to security. + */ + certs[k] = PK11_FindCertFromNickname(certNames[k], NULL); + if (certs[k]) { + certBuffers[k] = certs[k]->derCert.data; + fileSizes[k] = certs[k]->derCert.len; + } else { + rv = -1; + } +#endif + if (rv) { + fprintf(stderr, "ERROR: could not read file %s", DERFilePaths[k]); + break; + } + } + + if (!rv) { + MarFile *mar = mar_open(argv[2]); + if (mar) { + rv = mar_verify_signatures(mar, certBuffers, fileSizes, certCount); + mar_close(mar); + } else { + fprintf(stderr, "ERROR: Could not open MAR file.\n"); + rv = -1; + } + } + for (k = 0; k < certCount; ++k) { +#if (defined(XP_WIN) || defined(XP_MACOSX)) && !defined(MAR_NSS) + free((void*)certBuffers[k]); +#else + /* certBuffers[k] is owned by certs[k] so don't free it */ + CERT_DestroyCertificate(certs[k]); +#endif } if (rv) { /* Determine if the source MAR file has the new fields for signing */ @@ -369,26 +394,8 @@ int main(int argc, char **argv) { } return -1; } - return 0; -#elif defined(XP_MACOSX) - return mar_verify_signatures(argv[2], (const uint8_t* const*)DERFilePaths, - 0, NULL, certCount); -#else - if (!NSSConfigDir || certCount == 0) { - print_usage(); - return -1; - } - - if (NSSInitCryptoContext(NSSConfigDir)) { - fprintf(stderr, "ERROR: Could not initialize crypto library.\n"); - return -1; - } - - return mar_verify_signatures(argv[2], NULL, 0, certNames, certCount); - -#endif /* defined(XP_WIN) && !defined(MAR_NSS) */ case 's': if (!NSSConfigDir || certCount == 0 || argc < 4) { print_usage(); diff --git a/modules/libmar/verify/MacVerifyCrypto.cpp b/modules/libmar/verify/MacVerifyCrypto.cpp index ce2846d501bd..8d6833e1f95d 100644 --- a/modules/libmar/verify/MacVerifyCrypto.cpp +++ b/modules/libmar/verify/MacVerifyCrypto.cpp @@ -212,9 +212,10 @@ CryptoMac_VerifyUpdate(CryptoX_SignatureHandle* aInputData, void* aBuf, CryptoX_Result CryptoMac_LoadPublicKey(const unsigned char* aCertData, + unsigned int aDataSize, CryptoX_PublicKey* aPublicKey) { - if (!aCertData || !aPublicKey) { + if (!aCertData || aDataSize == 0 || !aPublicKey) { return CryptoX_Error; } *aPublicKey = NULL; @@ -261,121 +262,30 @@ CryptoMac_LoadPublicKey(const unsigned char* aCertData, } sCspHandle = cspHandle; } - - FILE* certFile = NULL; - long certFileSize = 0; - uint8* certBuffer = NULL; - - certFile = fopen((char*)aCertData, "rb"); - if (!certFile) { - return CryptoX_Error; - } - if (fseek(certFile, 0, SEEK_END)) { - fclose(certFile); - return CryptoX_Error; - } - certFileSize = ftell(certFile); - if (certFileSize < 0) { - fclose(certFile); - return CryptoX_Error; - } - certBuffer = (uint8*)malloc(certFileSize); - if (fseek(certFile, 0, SEEK_SET)) { - free(certBuffer); - fclose(certFile); - return CryptoX_Error; - } - uint readResult = fread(certBuffer, sizeof(uint8), certFileSize, certFile); - if (readResult != certFileSize) { - free(certBuffer); - fclose(certFile); - return CryptoX_Error; - } - fclose(certFile); - - CFDataRef certData = CFDataCreate(kCFAllocatorDefault, - certBuffer, - certFileSize); - free(certBuffer); - if (!certData) { - return CryptoX_Error; - } - - SecCertificateRef cert = SecCertificateCreateWithData(kCFAllocatorDefault, - certData); - CFRelease(certData); - if (!cert) { - return CryptoX_Error; - } - - SecKeyRef publicKey; - OSStatus status = SecCertificateCopyPublicKey(cert, (SecKeyRef*)&publicKey); - CFRelease(cert); - if (status) { - return CryptoX_Error; - } - - *aPublicKey = (void*)publicKey; - return CryptoX_Success; } - CFURLRef url = - CFURLCreateFromFileSystemRepresentation(kCFAllocatorDefault, - aCertData, - strlen((char*)aCertData), - false); - if (!url) { - return CryptoX_Error; - } - - CFReadStreamRef stream = CFReadStreamCreateWithFile(kCFAllocatorDefault, url); - if (!stream) { - CFRelease(url); - return CryptoX_Error; - } - - SecTransformRef readTransform = - SecTransformCreateReadTransformWithReadStreamPtr(stream); - if (!readTransform) { - CFRelease(url); - CFRelease(stream); - return CryptoX_Error; - } - - CFErrorRef error; - CFDataRef tempCertData = (CFDataRef)SecTransformExecutePtr(readTransform, - &error); - if (!tempCertData || error) { - CFRelease(url); - CFRelease(stream); - CFRelease(readTransform); + CFDataRef certData = CFDataCreate(kCFAllocatorDefault, + aCertData, + aDataSize); + if (!certData) { return CryptoX_Error; } SecCertificateRef cert = SecCertificateCreateWithData(kCFAllocatorDefault, - tempCertData); + certData); + CFRelease(certData); if (!cert) { - CFRelease(url); - CFRelease(stream); - CFRelease(readTransform); - CFRelease(tempCertData); return CryptoX_Error; } - CryptoX_Result result = CryptoX_Error; OSStatus status = SecCertificateCopyPublicKey(cert, (SecKeyRef*)aPublicKey); - if (status == 0) { - result = CryptoX_Success; + CFRelease(cert); + if (status != 0) { + return CryptoX_Error; } - CFRelease(url); - CFRelease(stream); - CFRelease(readTransform); - CFRelease(tempCertData); - CFRelease(cert); - - return result; + return CryptoX_Success; } CryptoX_Result diff --git a/modules/libmar/verify/cryptox.c b/modules/libmar/verify/cryptox.c index 48fbecdfab2a..af34210383df 100644 --- a/modules/libmar/verify/cryptox.c +++ b/modules/libmar/verify/cryptox.c @@ -16,29 +16,32 @@ /** * Loads the public key for the specified cert name from the NSS store. * - * @param certName The cert name to find. + * @param certData The DER-encoded X509 certificate to extract the key from. + * @param certDataSize The size of certData. * @param publicKey Out parameter for the public key to use. - * @param cert Out parameter for the certificate to use. * @return CryptoX_Success on success, CryptoX_Error on error. */ CryptoX_Result -NSS_LoadPublicKey(const char *certNickname, - SECKEYPublicKey **publicKey, - CERTCertificate **cert) +NSS_LoadPublicKey(const unsigned char *certData, unsigned int certDataSize, + SECKEYPublicKey **publicKey) { - secuPWData pwdata = { PW_NONE, 0 }; - if (!cert || !publicKey || !cert) { + CERTCertificate * cert; + SECItem certDataItem = { siBuffer, (unsigned char*) certData, certDataSize }; + + if (!certData || !publicKey) { return CryptoX_Error; } + cert = CERT_NewTempCertificate(CERT_GetDefaultCertDB(), &certDataItem, NULL, + PR_FALSE, PR_TRUE); /* Get the cert and embedded public key out of the database */ - *cert = PK11_FindCertFromNickname(certNickname, &pwdata); - if (!*cert) { + if (!cert) { return CryptoX_Error; } - *publicKey = CERT_ExtractPublicKey(*cert); + *publicKey = CERT_ExtractPublicKey(cert); + CERT_DestroyCertificate(cert); + if (!*publicKey) { - CERT_DestroyCertificate(*cert); return CryptoX_Error; } return CryptoX_Success; @@ -150,12 +153,11 @@ CryptoX_Result CryptoAPI_LoadPublicKey(HCRYPTPROV provider, BYTE *certData, DWORD sizeOfCertData, - HCRYPTKEY *publicKey, - HCERTSTORE *certStore) + HCRYPTKEY *publicKey) { CRYPT_DATA_BLOB blob; CERT_CONTEXT *context; - if (!provider || !certData || !publicKey || !certStore) { + if (!provider || !certData || !publicKey) { return CryptoX_Error; } @@ -165,7 +167,7 @@ CryptoAPI_LoadPublicKey(HCRYPTPROV provider, CERT_QUERY_CONTENT_FLAG_CERT, CERT_QUERY_FORMAT_FLAG_BINARY, 0, NULL, NULL, NULL, - certStore, NULL, (const void **)&context)) { + NULL, NULL, (const void **)&context)) { return CryptoX_Error; } diff --git a/modules/libmar/verify/cryptox.h b/modules/libmar/verify/cryptox.h index 2dd93efd6e45..2296b815f42e 100644 --- a/modules/libmar/verify/cryptox.h +++ b/modules/libmar/verify/cryptox.h @@ -15,7 +15,9 @@ #if defined(MAR_NSS) -#include "nss_secutil.h" +#include "cert.h" +#include "keyhi.h" +#include "cryptohi.h" #define CryptoX_InvalidHandleValue NULL #define CryptoX_ProviderHandle void* @@ -26,9 +28,9 @@ #ifdef __cplusplus extern "C" { #endif -CryptoX_Result NSS_LoadPublicKey(const char *certNickname, - SECKEYPublicKey **publicKey, - CERTCertificate **cert); +CryptoX_Result NSS_LoadPublicKey(const unsigned char* certData, + unsigned int certDataSize, + SECKEYPublicKey** publicKey); CryptoX_Result NSS_VerifyBegin(VFYContext **ctx, SECKEYPublicKey * const *publicKey); CryptoX_Result NSS_VerifySignature(VFYContext * const *ctx , @@ -46,9 +48,8 @@ CryptoX_Result NSS_VerifySignature(VFYContext * const *ctx , VFY_DestroyContext(*SignatureHandle, PR_TRUE) #define CryptoX_VerifyUpdate(SignatureHandle, buf, len) \ VFY_Update(*SignatureHandle, (const unsigned char*)(buf), len) -#define CryptoX_LoadPublicKey(CryptoHandle, certData, dataSize, \ - publicKey, certName, cert) \ - NSS_LoadPublicKey(certName, publicKey, cert) +#define CryptoX_LoadPublicKey(CryptoHandle, certData, dataSize, publicKey) \ + NSS_LoadPublicKey(certData, dataSize, publicKey) #define CryptoX_VerifySignature(hash, publicKey, signedData, len) \ NSS_VerifySignature(hash, (const unsigned char *)(signedData), len) #define CryptoX_FreePublicKey(key) \ @@ -73,6 +74,7 @@ CryptoX_Result CryptoMac_VerifyBegin(CryptoX_SignatureHandle* aInputData); CryptoX_Result CryptoMac_VerifyUpdate(CryptoX_SignatureHandle* aInputData, void* aBuf, unsigned int aLen); CryptoX_Result CryptoMac_LoadPublicKey(const unsigned char* aCertData, + unsigned int aDataSize, CryptoX_PublicKey* aPublicKey); CryptoX_Result CryptoMac_VerifySignature(CryptoX_SignatureHandle* aInputData, CryptoX_PublicKey* aPublicKey, @@ -91,8 +93,8 @@ void CryptoMac_FreePublicKey(CryptoX_PublicKey* aPublicKey); #define CryptoX_VerifyUpdate(aInputData, aBuf, aLen) \ CryptoMac_VerifyUpdate(aInputData, aBuf, aLen) #define CryptoX_LoadPublicKey(aProviderHandle, aCertData, aDataSize, \ - aPublicKey, aCertName, aCert) \ - CryptoMac_LoadPublicKey(aCertData, aPublicKey) + aPublicKey) \ + CryptoMac_LoadPublicKey(aCertData, aDataSize, aPublicKey) #define CryptoX_VerifySignature(aInputData, aPublicKey, aSignature, \ aSignatureLen) \ CryptoMac_VerifySignature(aInputData, aPublicKey, aSignature, aSignatureLen) @@ -111,8 +113,7 @@ CryptoX_Result CryptoAPI_InitCryptoContext(HCRYPTPROV *provider); CryptoX_Result CryptoAPI_LoadPublicKey(HCRYPTPROV hProv, BYTE *certData, DWORD sizeOfCertData, - HCRYPTKEY *publicKey, - HCERTSTORE *cert); + HCRYPTKEY *publicKey); CryptoX_Result CryptoAPI_VerifyBegin(HCRYPTPROV provider, HCRYPTHASH* hash); CryptoX_Result CryptoAPI_VerifyUpdate(HCRYPTHASH* hash, BYTE *buf, DWORD len); @@ -133,10 +134,8 @@ CryptoX_Result CyprtoAPI_VerifySignature(HCRYPTHASH *hash, #define CryptoX_FreeSignatureHandle(SignatureHandle) #define CryptoX_VerifyUpdate(SignatureHandle, buf, len) \ CryptoAPI_VerifyUpdate(SignatureHandle, (BYTE *)(buf), len) -#define CryptoX_LoadPublicKey(CryptoHandle, certData, dataSize, \ - publicKey, certName, cert) \ - CryptoAPI_LoadPublicKey(CryptoHandle, (BYTE*)(certData), \ - dataSize, publicKey, cert) +#define CryptoX_LoadPublicKey(CryptoHandle, certData, dataSize, publicKey) \ + CryptoAPI_LoadPublicKey(CryptoHandle, (BYTE*)(certData), dataSize, publicKey) #define CryptoX_VerifySignature(hash, publicKey, signedData, len) \ CyprtoAPI_VerifySignature(hash, publicKey, signedData, len) #define CryptoX_FreePublicKey(key) \ @@ -163,8 +162,7 @@ CryptoX_Result CyprtoAPI_VerifySignature(HCRYPTHASH *hash, CryptoX_Error #define CryptoX_FreeSignatureHandle(SignatureHandle) #define CryptoX_VerifyUpdate(SignatureHandle, buf, len) CryptoX_Error -#define CryptoX_LoadPublicKey(CryptoHandle, certData, dataSize, \ - publicKey, certName, cert) \ +#define CryptoX_LoadPublicKey(CryptoHandle, certData, dataSize, publicKey) \ CryptoX_Error #define CryptoX_VerifySignature(hash, publicKey, signedData, len) CryptoX_Error #define CryptoX_FreePublicKey(key) CryptoX_Error diff --git a/modules/libmar/verify/mar_verify.c b/modules/libmar/verify/mar_verify.c index 7578b62e31ac..165a802189f0 100644 --- a/modules/libmar/verify/mar_verify.c +++ b/modules/libmar/verify/mar_verify.c @@ -17,6 +17,46 @@ #include "mar.h" #include "cryptox.h" +int +mar_read_entire_file(const char * filePath, uint32_t maxSize, + /*out*/ const uint8_t * *data, + /*out*/ uint32_t *size) +{ + int result; + FILE * f; + + if (!filePath || !data || !size) { + return -1; + } + + f = fopen(filePath, "rb"); + if (!f) { + return -1; + } + + result = -1; + if (!fseeko(f, 0, SEEK_END)) { + int64_t fileSize = ftello(f); + if (fileSize > 0 && fileSize <= maxSize && !fseeko(f, 0, SEEK_SET)) { + unsigned char * fileData; + + *size = (unsigned int) fileSize; + fileData = malloc(*size); + if (fileData) { + if (fread(fileData, *size, 1, f) == 1) { + *data = fileData; + result = 0; + } else { + free(fileData); + } + } + } + fclose(f); + } + + return result; +} + int mar_extract_and_verify_signatures_fp(FILE *fp, CryptoX_ProviderHandle provider, CryptoX_PublicKey *keys, @@ -81,92 +121,8 @@ ReadAndUpdateVerifyContext(FILE *fp, * certificate given, the second signature will be verified using the second * certificate given, etc. The signature count must exactly match the number of * certificates given, and all signature verifications must succeed. - * This is only used by the signmar program when used with arguments to verify - * a MAR. This should not be used to verify a MAR that will be extracted in the - * same operation by updater code. This function prints the error message if - * verification fails. * - * @param pathToMARFile The path of the MAR file to verify. - * @param certData Pointer to the first element in an array of certificate - * file data. - * @param certDataSizes Pointer to the first element in an array for size of the - * cert data. - * @param certNames Pointer to the first element in an array of certificate names. - * Used only if compiled as NSS, specifies the certificate names - * @param certCount The number of elements in certData, certDataSizes, and certNames - * @return 0 on success - * a negative number if there was an error - * a positive number if the signature does not verify - */ -int -mar_verify_signatures(const char *pathToMARFile, - const uint8_t * const *certData, - const uint32_t *certDataSizes, - const char * const *certNames, - uint32_t certCount) { - int rv; - CryptoX_ProviderHandle provider = CryptoX_InvalidHandleValue; - CryptoX_Certificate certs[MAX_SIGNATURES]; - CryptoX_PublicKey keys[MAX_SIGNATURES]; - FILE *fp; - uint32_t k; - - memset(certs, 0, sizeof(certs)); - memset(keys, 0, sizeof(keys)); - - if (!pathToMARFile || certCount == 0) { - fprintf(stderr, "ERROR: Invalid parameter specified.\n"); - return CryptoX_Error; - } - - fp = fopen(pathToMARFile, "rb"); - if (!fp) { - fprintf(stderr, "ERROR: Could not open MAR file.\n"); - return CryptoX_Error; - } - - if (CryptoX_Failed(CryptoX_InitCryptoProvider(&provider))) { - fclose(fp); - fprintf(stderr, "ERROR: Could not init crytpo library.\n"); - return CryptoX_Error; - } - - /* Load the certs and keys */ - for (k = 0; k < certCount; k++) { - if (CryptoX_Failed(CryptoX_LoadPublicKey(provider, certData[k], certDataSizes[k], - &keys[k], certNames[k], &certs[k]))) { - fclose(fp); - fprintf(stderr, "ERROR: Could not load public key.\n"); - return CryptoX_Error; - } - } - - rv = mar_extract_and_verify_signatures_fp(fp, provider, keys, certCount); - fclose(fp); - - /* Cleanup the allocated keys and certs */ - for (k = 0; k < certCount; k++) { - if (keys[k]) { - CryptoX_FreePublicKey(&keys[k]); - } - - if (certs[k]) { - CryptoX_FreeCertificate(&certs[k]); - } - } - return rv; -} - -#ifdef XP_WIN -/** - * Verifies a MAR file by verifying each signature with the corresponding - * certificate. That is, the first signature will be verified using the first - * certificate given, the second signature will be verified using the second - * certificate given, etc. The signature count must exactly match the number of - * certificates given, and all signature verifications must succeed. - * - * @param pathToMARFile The path of the MAR file who's signature - * should be calculated + * @param mar The file who's signature should be calculated * @param certData Pointer to the first element in an array of * certificate data * @param certDataSizes Pointer to the first element in an array for size of @@ -175,17 +131,15 @@ mar_verify_signatures(const char *pathToMARFile, * @return 0 on success */ int -mar_verify_signaturesW(MarFile *mar, - const uint8_t * const *certData, - const uint32_t *certDataSizes, - uint32_t certCount) { +mar_verify_signatures(MarFile *mar, + const uint8_t * const *certData, + const uint32_t *certDataSizes, + uint32_t certCount) { int rv = -1; CryptoX_ProviderHandle provider = CryptoX_InvalidHandleValue; - CryptoX_Certificate certs[MAX_SIGNATURES]; CryptoX_PublicKey keys[MAX_SIGNATURES]; uint32_t k; - memset(certs, 0, sizeof(certs)); memset(keys, 0, sizeof(keys)); if (!mar || !certData || !certDataSizes || certCount == 0) { @@ -205,7 +159,7 @@ mar_verify_signaturesW(MarFile *mar, for (k = 0; k < certCount; ++k) { if (CryptoX_Failed(CryptoX_LoadPublicKey(provider, certData[k], certDataSizes[k], - &keys[k], "", &certs[k]))) { + &keys[k]))) { fprintf(stderr, "ERROR: Could not load public key.\n"); goto failure; } @@ -219,15 +173,10 @@ failure: if (keys[k]) { CryptoX_FreePublicKey(&keys[k]); } - - if (certs[k]) { - CryptoX_FreeCertificate(&certs[k]); - } } return rv; } -#endif /** * Extracts each signature from the specified MAR file, diff --git a/testing/profiles/prefs_general.js b/testing/profiles/prefs_general.js index 82006a2a760a..a9f79fbb7e92 100644 --- a/testing/profiles/prefs_general.js +++ b/testing/profiles/prefs_general.js @@ -304,6 +304,7 @@ user_pref("media.decoder.heuristic.dormant.timeout", 0); user_pref("browser.displayedE10SPrompt.1", 5); // Don't use auto-enabled e10s user_pref("browser.tabs.remote.autostart.1", false); +user_pref("browser.tabs.remote.autostart.2", false); // Don't forceably kill content processes after a timeout user_pref("dom.ipc.tabs.shutdownTimeoutSecs", 0); diff --git a/testing/xpcshell/head.js b/testing/xpcshell/head.js index 06ddab628c70..a4b26b22717b 100644 --- a/testing/xpcshell/head.js +++ b/testing/xpcshell/head.js @@ -501,7 +501,14 @@ function _execute_test() { try { do_test_pending("MAIN run_test"); - run_test(); + // Check if run_test() is defined. If defined, run it. + // Else, call run_next_test() directly to invoke tests + // added by add_test() and add_task(). + if (typeof run_test === "function") { + run_test(); + } else { + run_next_test(); + } do_test_finished("MAIN run_test"); _do_main(); } catch (e) { diff --git a/testing/xpcshell/selftest.py b/testing/xpcshell/selftest.py index 2d44d7e21508..04750f4f84fc 100644 --- a/testing/xpcshell/selftest.py +++ b/testing/xpcshell/selftest.py @@ -287,6 +287,64 @@ function run_test() { } ''' +# A test to check that add_test() tests run without run_test() +NO_RUN_TEST_ADD_TEST = ''' +add_test(function no_run_test_add_test() { + do_check_true(true); + run_next_test(); +}); +''' + +# A test to check that add_task() tests run without run_test() +NO_RUN_TEST_ADD_TASK = ''' +add_task(function no_run_test_add_task() { + do_check_true(true); +}); +''' + +# A test to check that both add_task() and add_test() work without run_test() +NO_RUN_TEST_ADD_TEST_ADD_TASK = ''' +add_test(function no_run_test_add_test() { + do_check_true(true); + run_next_test(); +}); + +add_task(function no_run_test_add_task() { + do_check_true(true); +}); +''' + +# A test to check that an empty test file without run_test(), +# add_test() or add_task() works. +NO_RUN_TEST_EMPTY_TEST = ''' +// This is an empty test file. +''' + +NO_RUN_TEST_ADD_TEST_FAIL = ''' +add_test(function no_run_test_add_test_fail() { + do_check_true(false); + run_next_test(); +}); +''' + +NO_RUN_TEST_ADD_TASK_FAIL = ''' +add_task(function no_run_test_add_task_fail() { + do_check_true(false); +}); +''' + +NO_RUN_TEST_ADD_TASK_MULTIPLE = ''' +Components.utils.import("resource://gre/modules/Promise.jsm"); + +add_task(function test_task() { + yield Promise.resolve(true); +}); + +add_task(function test_2() { + yield Promise.resolve(true); +}); +''' + class XPCShellTestsTests(unittest.TestCase): """ @@ -892,5 +950,105 @@ tail = self.assertInLog("At this stage, the test has succeeded") self.assertInLog("Throwing an error to force displaying the log") + def testNoRunTestAddTest(self): + """ + Check that add_test() works fine without run_test() in the test file. + """ + self.writeFile("test_noRunTestAddTest.js", NO_RUN_TEST_ADD_TEST) + self.writeManifest(["test_noRunTestAddTest.js"]) + + self.assertTestResult(True) + self.assertEquals(1, self.x.testCount) + self.assertEquals(1, self.x.passCount) + self.assertEquals(0, self.x.failCount) + self.assertInLog(TEST_PASS_STRING) + self.assertNotInLog(TEST_FAIL_STRING) + + def testNoRunTestAddTask(self): + """ + Check that add_task() works fine without run_test() in the test file. + """ + self.writeFile("test_noRunTestAddTask.js", NO_RUN_TEST_ADD_TASK) + self.writeManifest(["test_noRunTestAddTask.js"]) + + self.assertTestResult(True) + self.assertEquals(1, self.x.testCount) + self.assertEquals(1, self.x.passCount) + self.assertEquals(0, self.x.failCount) + self.assertInLog(TEST_PASS_STRING) + self.assertNotInLog(TEST_FAIL_STRING) + + def testNoRunTestAddTestAddTask(self): + """ + Check that both add_test() and add_task() work without run_test() + in the test file. + """ + self.writeFile("test_noRunTestAddTestAddTask.js", NO_RUN_TEST_ADD_TEST_ADD_TASK) + self.writeManifest(["test_noRunTestAddTestAddTask.js"]) + + self.assertTestResult(True) + self.assertEquals(1, self.x.testCount) + self.assertEquals(1, self.x.passCount) + self.assertEquals(0, self.x.failCount) + self.assertInLog(TEST_PASS_STRING) + self.assertNotInLog(TEST_FAIL_STRING) + + def testNoRunTestEmptyTest(self): + """ + Check that the test passes on an empty file that contains neither + run_test() nor add_test(), add_task(). + """ + self.writeFile("test_noRunTestEmptyTest.js", NO_RUN_TEST_EMPTY_TEST) + self.writeManifest(["test_noRunTestEmptyTest.js"]) + + self.assertTestResult(True) + self.assertEquals(1, self.x.testCount) + self.assertEquals(1, self.x.passCount) + self.assertEquals(0, self.x.failCount) + self.assertInLog(TEST_PASS_STRING) + self.assertNotInLog(TEST_FAIL_STRING) + + def testNoRunTestAddTestFail(self): + """ + Check that test fails on using add_test() without run_test(). + """ + self.writeFile("test_noRunTestAddTestFail.js", NO_RUN_TEST_ADD_TEST_FAIL) + self.writeManifest(["test_noRunTestAddTestFail.js"]) + + self.assertTestResult(False) + self.assertEquals(1, self.x.testCount) + self.assertEquals(0, self.x.passCount) + self.assertEquals(1, self.x.failCount) + self.assertInLog(TEST_FAIL_STRING) + self.assertNotInLog(TEST_PASS_STRING) + + def testNoRunTestAddTaskFail(self): + """ + Check that test fails on using add_task() without run_test(). + """ + self.writeFile("test_noRunTestAddTaskFail.js", NO_RUN_TEST_ADD_TASK_FAIL) + self.writeManifest(["test_noRunTestAddTaskFail.js"]) + + self.assertTestResult(False) + self.assertEquals(1, self.x.testCount) + self.assertEquals(0, self.x.passCount) + self.assertEquals(1, self.x.failCount) + self.assertInLog(TEST_FAIL_STRING) + self.assertNotInLog(TEST_PASS_STRING) + + def testNoRunTestAddTaskMultiple(self): + """ + Check that multple add_task() tests work without run_test(). + """ + self.writeFile("test_noRunTestAddTaskMultiple.js", NO_RUN_TEST_ADD_TASK_MULTIPLE) + self.writeManifest(["test_noRunTestAddTaskMultiple.js"]) + + self.assertTestResult(True) + self.assertEquals(1, self.x.testCount) + self.assertEquals(1, self.x.passCount) + self.assertEquals(0, self.x.failCount) + self.assertInLog(TEST_PASS_STRING) + self.assertNotInLog(TEST_FAIL_STRING) + if __name__ == "__main__": unittest.main(verbosity=3) diff --git a/toolkit/components/maintenanceservice/maintenanceservice.cpp b/toolkit/components/maintenanceservice/maintenanceservice.cpp index 2e453af6998d..8ba27ebc143e 100644 --- a/toolkit/components/maintenanceservice/maintenanceservice.cpp +++ b/toolkit/components/maintenanceservice/maintenanceservice.cpp @@ -14,6 +14,7 @@ #include "workmonitor.h" #include "uachelper.h" #include "updatehelper.h" +#include "registrycertificates.h" // Link w/ subsystem window so we don't get a console when executing // this binary through the installer. @@ -102,6 +103,10 @@ wmain(int argc, WCHAR **argv) return 0; } + if (!lstrcmpi(argv[1], L"check-cert") && argc > 2) { + return DoesBinaryMatchAllowedCertificates(argv[2], argv[3], FALSE) ? 0 : 1; + } + SERVICE_TABLE_ENTRYW DispatchTable[] = { { SVC_NAME, (LPSERVICE_MAIN_FUNCTIONW) SvcMain }, { nullptr, nullptr } diff --git a/toolkit/components/maintenanceservice/registrycertificates.cpp b/toolkit/components/maintenanceservice/registrycertificates.cpp index 5c6b40a98738..22dcfad42c93 100644 --- a/toolkit/components/maintenanceservice/registrycertificates.cpp +++ b/toolkit/components/maintenanceservice/registrycertificates.cpp @@ -17,10 +17,17 @@ * Verifies if the file path matches any certificate stored in the registry. * * @param filePath The file path of the application to check if allowed. + * @param allowFallbackKeySkip when this is TRUE the fallback registry key will + * be used to skip the certificate check. This is the default since the + * fallback registry key is located under HKEY_LOCAL_MACHINE which can't be + * written to by a low integrity process. + * Note: the maintenance service binary can be used to perform this check for + * testing or troubleshooting. * @return TRUE if the binary matches any of the allowed certificates. */ BOOL -DoesBinaryMatchAllowedCertificates(LPCWSTR basePathForUpdate, LPCWSTR filePath) +DoesBinaryMatchAllowedCertificates(LPCWSTR basePathForUpdate, LPCWSTR filePath, + BOOL allowFallbackKeySkip) { WCHAR maintenanceServiceKey[MAX_PATH + 1]; if (!CalculateRegistryPathFromFilePath(basePathForUpdate, @@ -49,6 +56,11 @@ DoesBinaryMatchAllowedCertificates(LPCWSTR basePathForUpdate, LPCWSTR filePath) if (retCode != ERROR_SUCCESS) { LOG_WARN(("Could not open fallback key. (%d)", retCode)); return FALSE; + } else if (allowFallbackKeySkip) { + LOG_WARN(("Fallback key present, skipping VerifyCertificateTrustForFile " + "check and the certificate attribute registry matching " + "check.")); + return TRUE; } } nsAutoRegKey baseKey(baseKeyRaw); diff --git a/toolkit/components/maintenanceservice/registrycertificates.h b/toolkit/components/maintenanceservice/registrycertificates.h index 29213e843a03..9f68d1a8d921 100644 --- a/toolkit/components/maintenanceservice/registrycertificates.h +++ b/toolkit/components/maintenanceservice/registrycertificates.h @@ -8,6 +8,7 @@ #include "certificatecheck.h" BOOL DoesBinaryMatchAllowedCertificates(LPCWSTR basePathForUpdate, - LPCWSTR filePath); + LPCWSTR filePath, + BOOL allowFallbackKeySkip = TRUE); #endif diff --git a/toolkit/components/places/PlacesUtils.jsm b/toolkit/components/places/PlacesUtils.jsm index 7614d40dbf07..f83e8c6e7eeb 100644 --- a/toolkit/components/places/PlacesUtils.jsm +++ b/toolkit/components/places/PlacesUtils.jsm @@ -945,7 +945,7 @@ this.PlacesUtils = { FROM moz_keywords k JOIN moz_places h ON h.id = k.place_id WHERE k.keyword = :keyword`); - stmt.params.keyword = aKeyword; + stmt.params.keyword = aKeyword.toLowerCase(); try { if (!stmt.executeStep()) return [ null, null ]; diff --git a/toolkit/modules/AddonWatcher.jsm b/toolkit/modules/AddonWatcher.jsm index 4d08a717895c..d73e2428fe0a 100644 --- a/toolkit/modules/AddonWatcher.jsm +++ b/toolkit/modules/AddonWatcher.jsm @@ -158,7 +158,7 @@ let AddonWatcher = { } if (diff.totalCPOWTime > 0) { Telemetry.getKeyedHistogramById("MISBEHAVING_ADDONS_CPOW_TIME_MS"). - add(addonId, diff.totalCPOWTime); + add(addonId, diff.totalCPOWTime / 1000); } // Report mibehaviors to the user. diff --git a/toolkit/modules/tests/browser/browser_AddonWatcher.js b/toolkit/modules/tests/browser/browser_AddonWatcher.js index cc7a005a21fb..ba4bbdd91fc3 100644 --- a/toolkit/modules/tests/browser/browser_AddonWatcher.js +++ b/toolkit/modules/tests/browser/browser_AddonWatcher.js @@ -82,7 +82,7 @@ let burn_rubber = Task.async(function*({histogramName, topic, expectedReason, pr Assert.equal(reason, expectedReason, "Reason is valid"); let snap2 = histogram.snapshot(ADDON_ID); - Assert.ok(snap2.sum > expectedMinSum, `Histogram ${histogramName} recorded a gravity of ${snap2.sum}, expecting at least ${expectedMinSum}.`); + Assert.ok(snap2.sum >= expectedMinSum, `Histogram ${histogramName} recorded a gravity of ${snap2.sum}, expecting at least ${expectedMinSum}.`); } finally { AddonWatcher.uninit(); for (let key of Object.keys(prefs)) { @@ -121,6 +121,6 @@ add_task(function* test_burn_CPOW() { histogramName: "MISBEHAVING_ADDONS_CPOW_TIME_MS", topic: "test-addonwatcher-burn-some-cpow", expectedReason: "totalCPOWTime", - expectedMinSum: 1000, + expectedMinSum: 400, }); }); diff --git a/toolkit/mozapps/update/tests/chrome/utils.js b/toolkit/mozapps/update/tests/chrome/utils.js index 088841594de4..291fbd386226 100644 --- a/toolkit/mozapps/update/tests/chrome/utils.js +++ b/toolkit/mozapps/update/tests/chrome/utils.js @@ -129,6 +129,7 @@ Cu.import("resource://gre/modules/AddonManager.jsm", this); Cu.import("resource://gre/modules/Services.jsm", this); const IS_MACOSX = ("nsILocalFileMac" in Ci); +const IS_WIN = ("@mozilla.org/windows-registry-key;1" in Cc); // The tests have to use the pageid instead of the pageIndex due to the // app update wizard's access method being random. @@ -183,6 +184,10 @@ const TEST_ADDONS = [ "appdisabled_1", "appdisabled_2", const LOG_FUNCTION = info; +const BIN_SUFFIX = (IS_WIN ? ".exe" : ""); +const FILE_UPDATER_BIN = "updater" + (IS_MACOSX ? ".app" : BIN_SUFFIX); +const FILE_UPDATER_BIN_BAK = FILE_UPDATER_BIN + ".bak"; + var gURLData = URL_HOST + "/" + REL_PATH_DATA + "/"; var gTestTimeout = 240000; // 4 minutes @@ -871,6 +876,26 @@ function verifyTestsRan() { } } +/** + * Restore the updater that was backed up. This is called both in setupFiles + * and resetFiles. It is called in setupFiles before the backup is done in + * case the previous test failed. It is called in resetFiles to put things + * back to its original state. + */ +function resetUpdaterBackup() { + let baseAppDir = getAppBaseDir(); + let updater = baseAppDir.clone(); + let updaterBackup = baseAppDir.clone(); + updater.append(FILE_UPDATER_BIN); + updaterBackup.append(FILE_UPDATER_BIN_BAK); + if (updaterBackup.exists()) { + if (updater.exists()) { + updater.remove(true); + } + updaterBackup.moveTo(baseAppDir, FILE_UPDATER_BIN); + } +} + /** * Creates a backup of files the tests need to modify so they can be restored to * the original file when the test has finished and then modifies the files. @@ -886,6 +911,31 @@ function setupFiles() { updateSettingsIni = baseAppDir.clone(); updateSettingsIni.append(FILE_UPDATE_SETTINGS_INI); writeFile(updateSettingsIni, UPDATE_SETTINGS_CONTENTS); + + // Just in case the last test failed, try to reset. + resetUpdaterBackup(); + + // Move away the real updater + let updater = baseAppDir.clone(); + updater.append(FILE_UPDATER_BIN); + updater.moveTo(baseAppDir, FILE_UPDATER_BIN_BAK); + + // Move in the test only updater + let testUpdaterDir = Cc["@mozilla.org/file/directory_service;1"]. + getService(Ci.nsIProperties). + get("CurWorkD", Ci.nsILocalFile); + + let relPath = REL_PATH_DATA; + let pathParts = relPath.split("/"); + for (let i = 0; i < pathParts.length; ++i) { + testUpdaterDir.append(pathParts[i]); + } + + let testUpdater = testUpdaterDir.clone(); + testUpdater.append(FILE_UPDATER_BIN); + if (testUpdater.exists()) { + testUpdater.copyToFollowingLinks(baseAppDir, FILE_UPDATER_BIN); + } } /** @@ -978,6 +1028,7 @@ function resetFiles() { ", Exception: " + e); } } + resetUpdaterBackup(); } /** diff --git a/toolkit/mozapps/update/tests/data/xpcshellUtilsAUS.js b/toolkit/mozapps/update/tests/data/xpcshellUtilsAUS.js index 3e75c8575f0e..4df9b95df611 100644 --- a/toolkit/mozapps/update/tests/data/xpcshellUtilsAUS.js +++ b/toolkit/mozapps/update/tests/data/xpcshellUtilsAUS.js @@ -1162,12 +1162,15 @@ function getTestDirPath() { * The relative path to the file or directory to get from the root of * the test's data directory. If not specified the test's data * directory will be returned. + * @param aAllowNonExists (optional) + * Whether or not to throw an error if the path exists. + * If not specified, then false is used. * @return The nsIFile for the file in the test data directory. * @throws If the file or directory does not exist. */ -function getTestDirFile(aRelPath) { +function getTestDirFile(aRelPath, aAllowNonExists) { let relpath = getTestDirPath() + (aRelPath ? aRelPath : ""); - return do_get_file(relpath, false); + return do_get_file(relpath, !!aAllowNonExists); } function getSpecialFolderDir(aCSIDL) { @@ -1426,11 +1429,12 @@ function unlockDirectory(aDir) { function runUpdate(aExpectedExitValue, aExpectedStatus, aCallback) { // Copy the updater binary to the updates directory. let binDir = gGREBinDirOrig.clone(); - let updater = binDir.clone(); - updater.append("updater.app"); + let updater = getTestDirFile("updater.app", true); if (!updater.exists()) { - updater = binDir.clone(); - updater.append(FILE_UPDATER_BIN); + updater = getTestDirFile(FILE_UPDATER_BIN); + if (!updater.exists()) { + do_throw("Unable to find updater binary!"); + } } Assert.ok(updater.exists(), "updater or updater.app should exist"); @@ -1688,8 +1692,6 @@ function setupAppFiles() { // dependentlibs.list file. let appFiles = [ { relPath : FILE_APP_BIN, inGreDir : false }, - { relPath : FILE_UPDATER_BIN, - inGreDir : false }, { relPath : FILE_APPLICATION_INI, inGreDir : true }, { relPath : "dependentlibs.list", @@ -1724,6 +1726,17 @@ function setupAppFiles() { copyFileToTestAppDir(aAppFile.relPath, aAppFile.inGreDir); }); + // Copy the xpcshell updater binary + let updater = getTestDirFile("updater.app", true); + if (!updater.exists()) { + updater = getTestDirFile(FILE_UPDATER_BIN); + if (!updater.exists()) { + do_throw("Unable to find updater binary!"); + } + } + let testBinDir = getGREBinDir() + updater.copyToFollowingLinks(testBinDir, updater.leafName); + debugDump("finish - copying or creating symlinks to application files " + "for the test"); } @@ -2015,10 +2028,13 @@ function runUpdateUsingService(aInitialStatus, aExpectedStatus, aCheckSvcLog) { setEnvironment(); - // There is a security check done by the service to make sure the updater - // we are executing is the same as the one in the apply-to dir. - // To make sure they match from tests we copy updater.exe to the apply-to dir. - copyFileToTestAppDir(FILE_UPDATER_BIN, false); + let updater = getTestDirFile(FILE_UPDATER_BIN); + if (!updater.exists()) { + do_throw("Unable to find updater binary!"); + } + let testBinDir = getGREBinDir() + updater.copyToFollowingLinks(testBinDir, updater.leafName); + updater.copyToFollowingLinks(updatesDir, updater.leafName); // The service will execute maintenanceservice_installer.exe and // will copy maintenanceservice.exe out of the same directory from diff --git a/toolkit/mozapps/update/tests/unit_base_updater/xpcshell.ini b/toolkit/mozapps/update/tests/unit_base_updater/xpcshell.ini index 5195409a0cb1..8b853da784ed 100644 --- a/toolkit/mozapps/update/tests/unit_base_updater/xpcshell.ini +++ b/toolkit/mozapps/update/tests/unit_base_updater/xpcshell.ini @@ -19,9 +19,9 @@ skip-if = toolkit == 'gonk' reason = bug 820380 [marStageSuccessPartial.js] [marVersionDowngrade.js] -skip-if = os != 'win' +skip-if = os != 'win' && os != 'mac' [marWrongChannel.js] -skip-if = os != 'win' +skip-if = os != 'win' && os != 'mac' [marStageFailurePartial.js] [marCallbackAppSuccessComplete_win.js] skip-if = os != 'win' diff --git a/toolkit/mozapps/update/tests/unit_service_updater/checkUpdaterSigSvc.js b/toolkit/mozapps/update/tests/unit_service_updater/checkUpdaterSigSvc.js new file mode 100644 index 000000000000..828534766ffe --- /dev/null +++ b/toolkit/mozapps/update/tests/unit_service_updater/checkUpdaterSigSvc.js @@ -0,0 +1,40 @@ +/* Any copyright is dedicated to the Public Domain. + * http://creativecommons.org/publicdomain/zero/1.0/ + */ + +/** + * We skip authenticode cert checks from the service udpates + * so that we can use updater-xpcshell with the wrong certs for testing. + * This tests that code path. */ + +function run_test() { + if (!IS_AUTHENTICODE_CHECK_ENABLED) { + return; + } + + let binDir = getGREBinDir(); + let maintenanceServiceBin = binDir.clone(); + maintenanceServiceBin.append(FILE_MAINTENANCE_SERVICE_BIN); + + let updaterBin = binDir.clone(); + updaterBin.append(FILE_UPDATER_BIN); + + logTestInfo("Launching maintenance service bin: " + + maintenanceServiceBin.path + " to check updater: " + + updaterBin.path + " signature."); + + // Bypass the manifest and run as invoker + let env = Cc["@mozilla.org/process/environment;1"]. + getService(Ci.nsIEnvironment); + env.set("__COMPAT_LAYER", "RunAsInvoker"); + + let dummyInstallPath = "---"; + let maintenanceServiceBinArgs = ["check-cert", dummyInstallPath, + updaterBin.path]; + let maintenanceServiceBinProcess = Cc["@mozilla.org/process/util;1"]. + createInstance(Ci.nsIProcess); + maintenanceServiceBinProcess.init(maintenanceServiceBin); + maintenanceServiceBinProcess.run(true, maintenanceServiceBinArgs, + maintenanceServiceBinArgs.length); + do_check_eq(maintenanceServiceBinProcess.exitValue, 0); +} diff --git a/toolkit/mozapps/update/tests/unit_service_updater/xpcshell.ini b/toolkit/mozapps/update/tests/unit_service_updater/xpcshell.ini index 7d6bc8b41431..76b2d68dc77f 100644 --- a/toolkit/mozapps/update/tests/unit_service_updater/xpcshell.ini +++ b/toolkit/mozapps/update/tests/unit_service_updater/xpcshell.ini @@ -80,3 +80,4 @@ run-sequentially = Uses the Mozilla Maintenance Service. run-sequentially = Uses the Mozilla Maintenance Service. [marAppApplyUpdateStageSuccessSvc.js] run-sequentially = Uses the Mozilla Maintenance Service. +[checkUpdaterSigSvc.js] diff --git a/toolkit/mozapps/update/updater/Makefile.in b/toolkit/mozapps/update/updater/Makefile.in index 81b8a0be4914..38bf05fc9797 100644 --- a/toolkit/mozapps/update/updater/Makefile.in +++ b/toolkit/mozapps/update/updater/Makefile.in @@ -3,6 +3,8 @@ # 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/. +# For changes here, also consider ./updater-xpcshell/Makefile.in + ifndef MOZ_WINCONSOLE ifdef MOZ_DEBUG MOZ_WINCONSOLE = 1 @@ -30,6 +32,10 @@ export:: $(CERT_HEADERS) primaryCert.h: $(PRIMARY_CERT) secondaryCert.h: $(SECONDARY_CERT) + +# This is how the xpcshellCertificate.der file is generated, in case we ever +# have to regenerate it. +# ./certutil -L -d modules/libmar/tests/unit/data -n mycert -r > xpcshellCertificate.der xpcshellCert.h: xpcshellCertificate.der $(CERT_HEADERS): gen_cert_header.py diff --git a/toolkit/mozapps/update/updater/archivereader.cpp b/toolkit/mozapps/update/updater/archivereader.cpp index 5192f71f0a23..fe10327d4eb5 100644 --- a/toolkit/mozapps/update/updater/archivereader.cpp +++ b/toolkit/mozapps/update/updater/archivereader.cpp @@ -15,12 +15,15 @@ #include "updatehelper.h" #endif -#ifdef XP_WIN // These are generated at compile time based on the DER file for the channel // being used +#ifdef MOZ_VERIFY_MAR_SIGNATURE +#ifdef UPDATER_XPCSHELL_CERT +#include "../xpcshellCert.h" +#else #include "primaryCert.h" #include "secondaryCert.h" -#include "xpcshellCert.h" +#endif #endif #define UPDATER_NO_STRING_GLUE_STL @@ -38,9 +41,6 @@ static int outbuf_size = 262144; static char *inbuf = nullptr; static char *outbuf = nullptr; -#ifdef XP_WIN -#include "resource.h" - /** * Performs a verification on the opened MAR file with the passed in * certificate name ID and type ID. @@ -53,16 +53,19 @@ template int VerifyLoadedCert(MarFile *archive, const uint8_t (&certData)[SIZE]) { + (void)archive; + (void)certData; + +#ifdef MOZ_VERIFY_MAR_SIGNATURE const uint32_t size = SIZE; - const uint8_t * const data = &certData[0]; - if (mar_verify_signaturesW(archive, &data, &size, 1)) { + const uint8_t* const data = &certData[0]; + if (mar_verify_signatures(archive, &data, &size, 1)) { return CERT_VERIFY_ERROR; } +#endif return OK; } -#endif - /** * Performs a verification on the opened MAR file. Both the primary and backup @@ -79,21 +82,18 @@ ArchiveReader::VerifySignature() return ARCHIVE_NOT_OPEN; } -#ifdef XP_WIN - // If the fallback key exists we're running an XPCShell test and we should - // use the XPCShell specific cert for the signed MAR. - int rv; - if (DoesFallbackKeyExist()) { - rv = VerifyLoadedCert(mArchive, xpcshellCertData); - } else { - rv = VerifyLoadedCert(mArchive, primaryCertData); - if (rv != OK) { - rv = VerifyLoadedCert(mArchive, secondaryCertData); - } - } - return rv; -#else +#ifndef MOZ_VERIFY_MAR_SIGNATURE return OK; +#else +#ifdef UPDATER_XPCSHELL_CERT + int rv = VerifyLoadedCert(mArchive, xpcshellCertData); +#else + int rv = VerifyLoadedCert(mArchive, primaryCertData); + if (rv != OK) { + rv = VerifyLoadedCert(mArchive, secondaryCertData); + } +#endif + return rv; #endif } diff --git a/toolkit/mozapps/update/updater/moz.build b/toolkit/mozapps/update/updater/moz.build index 7e867a4af533..d5b1d5046062 100644 --- a/toolkit/mozapps/update/updater/moz.build +++ b/toolkit/mozapps/update/updater/moz.build @@ -6,112 +6,8 @@ Program('updater') -SOURCES += [ - 'archivereader.cpp', - 'bspatch.cpp', - 'updater.cpp', -] - -have_progressui = 0 -if CONFIG['OS_ARCH'] == 'WINNT': - have_progressui = 1 - SOURCES += [ - 'loaddlls.cpp', - 'progressui_win.cpp', - 'win_dirent.cpp', - ] - RCINCLUDE = 'updater.rc' - DEFINES['UNICODE'] = True - DEFINES['_UNICODE'] = True - DEFINES['NOMINMAX'] = True - USE_STATIC_LIBS = True - - # Pick up nsWindowsRestart.cpp - LOCAL_INCLUDES += [ - '/toolkit/xre', - ] - USE_LIBS += [ - 'updatecommon-standalone', - 'verifymar', - ] - OS_LIBS += [ - 'comctl32', - 'ws2_32', - 'shell32', - 'shlwapi', - 'crypt32', - 'advapi32', - ] -else: - USE_LIBS += [ - 'updatecommon', - ] - -USE_LIBS += [ - 'mar', -] - -if CONFIG['MOZ_NATIVE_BZ2']: - OS_LIBS += CONFIG['MOZ_BZ2_LIBS'] -else: - USE_LIBS += [ - 'bz2', - ] - -if CONFIG['MOZ_ENABLE_GTK']: - have_progressui = 1 - SOURCES += [ - 'progressui_gtk.cpp', - ] - -if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'cocoa': - have_progressui = 1 - SOURCES += [ - 'launchchild_osx.mm', - 'progressui_osx.mm', - ] - OS_LIBS += ['-framework Cocoa'] -elif CONFIG['MOZ_WIDGET_TOOLKIT'] == 'gonk': - have_progressui = 1 - SOURCES += [ - 'automounter_gonk.cpp', - 'progressui_gonk.cpp', - ] - DISABLE_STL_WRAPPING = True - OS_LIBS += [ - 'cutils', - 'sysutils', - ] - -if have_progressui == 0: - SOURCES += [ - 'progressui_null.cpp', - ] - -DEFINES['NS_NO_XPCOM'] = True -DISABLE_STL_WRAPPING = True -for var in ('MAR_CHANNEL_ID', 'MOZ_APP_VERSION'): - DEFINES[var] = '"%s"' % CONFIG[var] - -LOCAL_INCLUDES += [ - '../common', - '/xpcom/glue', -] - -DELAYLOAD_DLLS += [ - 'crypt32.dll', - 'comctl32.dll', - 'userenv.dll', - 'wsock32.dll', -] - -if CONFIG['_MSC_VER']: - WIN32_EXE_LDFLAGS += ['-ENTRY:wmainCRTStartup'] -elif CONFIG['OS_ARCH'] == 'WINNT': - WIN32_EXE_LDFLAGS += ['-municode'] - -if CONFIG['MOZ_WIDGET_GTK']: - CXXFLAGS += CONFIG['TK_CFLAGS'] - OS_LIBS += CONFIG['TK_LIBS'] - +updater_rel_path = '' +include('updater-common.build') +if CONFIG['ENABLE_TESTS']: + DIRS += ['updater-xpcshell'] FAIL_ON_WARNINGS = True diff --git a/toolkit/mozapps/update/updater/updater-common.build b/toolkit/mozapps/update/updater/updater-common.build new file mode 100644 index 000000000000..c7df7269abdb --- /dev/null +++ b/toolkit/mozapps/update/updater/updater-common.build @@ -0,0 +1,130 @@ +# -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*- +# vim: set filetype=python: +# 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/. + +srcs = [ + 'archivereader.cpp', + 'bspatch.cpp', + 'updater.cpp', +] + +have_progressui = 0 + +if CONFIG['MOZ_VERIFY_MAR_SIGNATURE']: + USE_LIBS += [ + 'verifymar', + ] + +if CONFIG['OS_ARCH'] == 'WINNT': + have_progressui = 1 + srcs += [ + 'loaddlls.cpp', + 'progressui_win.cpp', + 'win_dirent.cpp', + ] + RCINCLUDE = '%supdater.rc' % updater_rel_path + DEFINES['UNICODE'] = True + DEFINES['_UNICODE'] = True + DEFINES['NOMINMAX'] = True + USE_STATIC_LIBS = True + + # Pick up nsWindowsRestart.cpp + LOCAL_INCLUDES += [ + '/toolkit/xre', + ] + USE_LIBS += [ + 'updatecommon-standalone', + ] + OS_LIBS += [ + 'comctl32', + 'ws2_32', + 'shell32', + 'shlwapi', + 'crypt32', + 'advapi32', + ] +elif CONFIG['OS_ARCH'] == 'Linux' and CONFIG['MOZ_VERIFY_MAR_SIGNATURE']: + USE_LIBS += [ + 'nss', + 'signmar', + 'updatecommon', + ] + OS_LIBS += CONFIG['nspr'] +else: + USE_LIBS += [ + 'updatecommon', + ] + +USE_LIBS += [ + 'mar', +] + +if CONFIG['MOZ_NATIVE_BZ2']: + OS_LIBS += CONFIG['MOZ_BZ2_LIBS'] +else: + USE_LIBS += [ + 'bz2', + ] + +if CONFIG['MOZ_ENABLE_GTK']: + have_progressui = 1 + srcs += [ + 'progressui_gtk.cpp', + ] + +if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'cocoa': + have_progressui = 1 + srcs += [ + 'launchchild_osx.mm', + 'progressui_osx.mm', + ] + OS_LIBS += [ + '-framework Cocoa', + '-framework Security', + ] +elif CONFIG['MOZ_WIDGET_TOOLKIT'] == 'gonk': + have_progressui = 1 + srcs += [ + 'automounter_gonk.cpp', + 'progressui_gonk.cpp', + ] + DISABLE_STL_WRAPPING = True + OS_LIBS += [ + 'cutils', + 'sysutils', + ] + +if have_progressui == 0: + srcs += [ + 'progressui_null.cpp', + ] + +SOURCES += ['%s%s' % (updater_rel_path, f) for f in sorted(srcs)] + +DEFINES['NS_NO_XPCOM'] = True +DISABLE_STL_WRAPPING = True +for var in ('MAR_CHANNEL_ID', 'MOZ_APP_VERSION'): + DEFINES[var] = '"%s"' % CONFIG[var] + +LOCAL_INCLUDES += [ + '/toolkit/mozapps/update/common', + '/xpcom/glue', +] + +DELAYLOAD_DLLS += [ + 'crypt32.dll', + 'comctl32.dll', + 'userenv.dll', + 'wsock32.dll', +] + +if CONFIG['_MSC_VER']: + WIN32_EXE_LDFLAGS += ['-ENTRY:wmainCRTStartup'] +elif CONFIG['OS_ARCH'] == 'WINNT': + WIN32_EXE_LDFLAGS += ['-municode'] + +if CONFIG['MOZ_WIDGET_GTK']: + CXXFLAGS += CONFIG['TK_CFLAGS'] + OS_LIBS += CONFIG['TK_LIBS'] diff --git a/toolkit/mozapps/update/updater/updater-xpcshell/Makefile.in b/toolkit/mozapps/update/updater/updater-xpcshell/Makefile.in new file mode 100644 index 000000000000..8d843ad57e85 --- /dev/null +++ b/toolkit/mozapps/update/updater/updater-xpcshell/Makefile.in @@ -0,0 +1,42 @@ +# vim:set ts=8 sw=8 sts=8 noet: +# 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/. + +# For changes here, also consider ../Makefile.in + +XPCSHELLTESTROOT = $(abspath $(DEPTH))/_tests/xpcshell/toolkit/mozapps/update/tests +MOCHITESTROOT = $(abspath $(DEPTH))/_tests/testing/mochitest/chrome/toolkit/mozapps/update/tests + +include $(topsrcdir)/config/rules.mk + +ifndef MOZ_WINCONSOLE +ifdef MOZ_DEBUG +MOZ_WINCONSOLE = 1 +else +MOZ_WINCONSOLE = 0 +endif +endif + +libs:: +ifeq (cocoa,$(MOZ_WIDGET_TOOLKIT)) + # Copy for xpcshell tests + $(NSINSTALL) -D $(XPCSHELLTESTROOT)/data/updater-xpcshell.app + rsync -a -C --exclude '*.in' $(srcdir)/../macbuild/Contents $(XPCSHELLTESTROOT)/data/updater-xpcshell.app + sed -e 's/%APP_NAME%/$(MOZ_APP_DISPLAYNAME)/' $(srcdir)/../macbuild/Contents/Resources/English.lproj/InfoPlist.strings.in | \ + iconv -f UTF-8 -t UTF-16 > $(XPCSHELLTESTROOT)/data/updater-xpcshell.app/Contents/Resources/English.lproj/InfoPlist.strings + $(NSINSTALL) -D $(XPCSHELLTESTROOT)/data/updater-xpcshell.app/Contents/MacOS/updater-xpcshell + $(NSINSTALL) $(PROGRAM) $(XPCSHELLTESTROOT)/data/updater-xpcshell.app/Contents/MacOS + rm -f $(PROGRAM) + rm -Rf $(XPCSHELLTESTROOT)/data/updater.app + mv $(XPCSHELLTESTROOT)/data/updater-xpcshell.app $(XPCSHELLTESTROOT)/data/updater.app + mv $(XPCSHELLTESTROOT)/data/updater.app/Contents/MacOS/updater-xpcshell $(XPCSHELLTESTROOT)/data/updater.app/Contents/MacOS/updater + + # Copy for mochitest chrome tests + rsync -a -C $(XPCSHELLTESTROOT)/data/updater.app $(MOCHITESTROOT)/data/updater.app +else + mv $(PROGRAM) $(XPCSHELLTESTROOT)/data/updater$(BIN_SUFFIX) + cp $(XPCSHELLTESTROOT)/data/updater$(BIN_SUFFIX) $(MOCHITESTROOT)/data/updater$(BIN_SUFFIX) +endif + +CXXFLAGS += $(MOZ_BZ2_CFLAGS) diff --git a/toolkit/mozapps/update/updater/updater-xpcshell/moz.build b/toolkit/mozapps/update/updater/updater-xpcshell/moz.build new file mode 100644 index 000000000000..7f16ee89e2cd --- /dev/null +++ b/toolkit/mozapps/update/updater/updater-xpcshell/moz.build @@ -0,0 +1,12 @@ +# -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*- +# vim: set filetype=python: +# 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/. + +Program('updater-xpcshell') + +updater_rel_path = '../' +NO_DIST_INSTALL = True +DEFINES['UPDATER_XPCSHELL_CERT'] = True +include('../updater-common.build') diff --git a/toolkit/mozapps/update/updater/updater.cpp b/toolkit/mozapps/update/updater/updater.cpp index 0a3da5b1eb9c..4eee6b5edcab 100644 --- a/toolkit/mozapps/update/updater/updater.cpp +++ b/toolkit/mozapps/update/updater/updater.cpp @@ -116,6 +116,11 @@ static bool sUseHardLinks = true; # define MAYBE_USE_HARD_LINKS 0 #endif +#if defined(MOZ_VERIFY_MAR_SIGNATURE) && !defined(XP_WIN) && !defined(XP_MACOSX) +#include "nss.h" +#include "prerror.h" +#endif + #ifdef XP_WIN #include "updatehelper.h" @@ -2189,7 +2194,12 @@ UpdateThreadFunc(void *param) NS_tchar updateSettingsPath[MAX_TEXT_LEN]; NS_tsnprintf(updateSettingsPath, sizeof(updateSettingsPath) / sizeof(updateSettingsPath[0]), - NS_T("%s/update-settings.ini"), gWorkingDirPath); +#ifdef XP_MACOSX + NS_T("%s/Contents/Resources/update-settings.ini"), +#else + NS_T("%s/update-settings.ini"), +#endif + gWorkingDirPath); MARChannelStringTable MARStrings; if (ReadMARChannelIDs(updateSettingsPath, &MARStrings) != OK) { // If we can't read from update-settings.ini then we shouldn't impose @@ -2279,6 +2289,20 @@ int NS_main(int argc, NS_tchar **argv) _exit(1); } #endif + +#if defined(MOZ_VERIFY_MAR_SIGNATURE) && !defined(XP_WIN) && !defined(XP_MACOSX) + // On Windows and Mac we rely on native APIs to do verifications so we don't + // need to initialize NSS at all there. + // Otherwise, minimize the amount of NSS we depend on by avoiding all the NSS + // databases. + if (NSS_NoDB_Init(NULL) != SECSuccess) { + PRErrorCode error = PR_GetError(); + fprintf(stderr, "Could not initialize NSS: %s (%d)", + PR_ErrorToName(error), (int) error); + _exit(1); + } +#endif + InitProgressUI(&argc, &argv); // To process an update the updater command line must at a minimum have the diff --git a/toolkit/mozapps/update/updater/updater.rc b/toolkit/mozapps/update/updater/updater.rc index ceddf51e555b..707efeafda79 100644 --- a/toolkit/mozapps/update/updater/updater.rc +++ b/toolkit/mozapps/update/updater/updater.rc @@ -4,7 +4,17 @@ // Microsoft Visual C++ generated resource script. // +#ifdef UPDATER_XPCSHELL_CERT +#include "../resource.h" +#define MANIFEST_PATH "../updater.exe.manifest" +#define COMCTL32_MANIFEST_PATH "../updater.exe.comctl32.manifest" +#define ICON_PATH "../updater.ico" +#else #include "resource.h" +#define MANIFEST_PATH "updater.exe.manifest" +#define COMCTL32_MANIFEST_PATH "updater.exe.comctl32.manifest" +#define ICON_PATH "updater.ico" +#endif #define APSTUDIO_READONLY_SYMBOLS ///////////////////////////////////////////////////////////////////////////// @@ -30,15 +40,15 @@ LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US // RT_MANIFEST // -1 RT_MANIFEST "updater.exe.manifest" -IDR_COMCTL32_MANIFEST RT_MANIFEST "updater.exe.comctl32.manifest" +1 RT_MANIFEST MANIFEST_PATH +IDR_COMCTL32_MANIFEST RT_MANIFEST COMCTL32_MANIFEST_PATH ///////////////////////////////////////////////////////////////////////////// // // Icon // -IDI_DIALOG ICON "updater.ico" +IDI_DIALOG ICON ICON_PATH ///////////////////////////////////////////////////////////////////////////// diff --git a/toolkit/xre/nsAppRunner.cpp b/toolkit/xre/nsAppRunner.cpp index fceba671ba1f..7127d990eb0b 100644 --- a/toolkit/xre/nsAppRunner.cpp +++ b/toolkit/xre/nsAppRunner.cpp @@ -4614,7 +4614,7 @@ mozilla::BrowserTabsRemoteAutostart() } gBrowserTabsRemoteAutostartInitialized = true; bool optInPref = Preferences::GetBool("browser.tabs.remote.autostart", false); - bool trialPref = Preferences::GetBool("browser.tabs.remote.autostart.1", false); + bool trialPref = Preferences::GetBool("browser.tabs.remote.autostart.2", false); bool prefEnabled = optInPref || trialPref; #if !defined(NIGHTLY_BUILD) // When running tests with 'layers.offmainthreadcomposition.testing.enabled' and diff --git a/widget/GfxDriverInfo.cpp b/widget/GfxDriverInfo.cpp index 8282ff1393e0..f0e1f0f5daff 100644 --- a/widget/GfxDriverInfo.cpp +++ b/widget/GfxDriverInfo.cpp @@ -228,6 +228,8 @@ const GfxDeviceFamily* GfxDriverInfo::GetDeviceFamily(DeviceFamily id) APPEND_DEVICE(0x0a72); APPEND_DEVICE(0x0a7a); APPEND_DEVICE(0x0caf); + APPEND_DEVICE(0x0dd2); + APPEND_DEVICE(0x0dd3); // GF180M ids APPEND_DEVICE(0x0de3); APPEND_DEVICE(0x0de8); @@ -246,6 +248,11 @@ const GfxDeviceFamily* GfxDriverInfo::GetDeviceFamily(DeviceFamily id) APPEND_DEVICE(0x0df5); APPEND_DEVICE(0x0df6); APPEND_DEVICE(0x0df7); + APPEND_DEVICE(0x1050); + APPEND_DEVICE(0x1051); + APPEND_DEVICE(0x1052); + APPEND_DEVICE(0x1054); + APPEND_DEVICE(0x1055); break; case Bug1116812: APPEND_DEVICE(0x2e32); diff --git a/xpcom/base/nsConsoleService.cpp b/xpcom/base/nsConsoleService.cpp index cc9c385d780f..c36ed97a350c 100644 --- a/xpcom/base/nsConsoleService.cpp +++ b/xpcom/base/nsConsoleService.cpp @@ -206,7 +206,7 @@ nsConsoleService::LogMessageWithMode(nsIConsoleMessage* aMessage, { MutexAutoLock lock(mLock); -#if defined(ANDROID) +#if defined(ANDROID) && !defined(RELEASE_BUILD) if (aOutputMode == OutputToLog) { nsCString msg; aMessage->ToString(msg);