From f069c3d51ee8f2dee3637330bc495181e84e4905 Mon Sep 17 00:00:00 2001 From: "J. Ryan Stinnett" Date: Mon, 11 Aug 2014 11:52:00 -0400 Subject: [PATCH 01/19] Bug 916804 - Telemetry for WebIDE. r=mratcliffe, r=paul --- .../test/test_connection_store.html | 7 +- .../app-manager/test/test_device_store.html | 7 +- .../test/test_remain_connected.html | 7 +- browser/devtools/shared/telemetry.js | 41 ++- .../devtools/webide/content/runtimedetails.js | 2 +- browser/devtools/webide/content/webide.js | 76 +++++- .../devtools/webide/modules/app-manager.js | 22 ++ browser/devtools/webide/modules/runtimes.js | 14 + browser/devtools/webide/test/chrome.ini | 1 + browser/devtools/webide/test/head.js | 13 +- .../devtools/webide/test/test_deviceinfo.html | 7 +- .../devtools/webide/test/test_runtime.html | 7 +- .../devtools/webide/test/test_telemetry.html | 250 ++++++++++++++++++ toolkit/components/telemetry/Histograms.json | 64 +++++ .../tests/mochitest/test_connectToChild.html | 8 +- .../mochitest/test_connection-manager.html | 6 +- .../server/tests/mochitest/test_device.html | 6 +- .../tests/mochitest/test_framerate_01.html | 6 +- .../tests/mochitest/test_framerate_02.html | 6 +- .../tests/mochitest/test_framerate_03.html | 6 +- 20 files changed, 513 insertions(+), 43 deletions(-) create mode 100644 browser/devtools/webide/test/test_telemetry.html diff --git a/browser/devtools/app-manager/test/test_connection_store.html b/browser/devtools/app-manager/test/test_connection_store.html index 7fd9b236123b..d3e696689879 100644 --- a/browser/devtools/app-manager/test/test_connection_store.html +++ b/browser/devtools/app-manager/test/test_connection_store.html @@ -26,8 +26,11 @@ Bug 901519 - [app manager] data store for connections + + + + + + + + + + diff --git a/toolkit/components/telemetry/Histograms.json b/toolkit/components/telemetry/Histograms.json index a995758c5ebe..ef1024c92504 100644 --- a/toolkit/components/telemetry/Histograms.json +++ b/toolkit/components/telemetry/Histograms.json @@ -5895,6 +5895,11 @@ "kind": "boolean", "description": "How many times has the devtool's Developer Toolbar been opened via the toolbox button?" }, + "DEVTOOLS_WEBIDE_OPENED_BOOLEAN": { + "expires_in_version": "never", + "kind": "boolean", + "description": "How many times has the DevTools WebIDE been opened?" + }, "DEVTOOLS_CUSTOM_OPENED_BOOLEAN": { "expires_in_version": "never", "kind": "boolean", @@ -6010,6 +6015,11 @@ "kind": "flag", "description": "How many users have opened the devtool's Developer Toolbar been opened via the toolbox button?" }, + "DEVTOOLS_WEBIDE_OPENED_PER_USER_FLAG": { + "expires_in_version": "never", + "kind": "flag", + "description": "How many users have opened the DevTools WebIDE?" + }, "DEVTOOLS_CUSTOM_OPENED_PER_USER_FLAG": { "expires_in_version": "never", "kind": "flag", @@ -6169,6 +6179,13 @@ "n_buckets": 100, "description": "How long has the developer toolbar been active (seconds)" }, + "DEVTOOLS_WEBIDE_TIME_ACTIVE_SECONDS": { + "expires_in_version": "never", + "kind": "exponential", + "high": "10000000", + "n_buckets": 100, + "description": "How long has WebIDE been active (seconds)" + }, "DEVTOOLS_CUSTOM_TIME_ACTIVE_SECONDS": { "expires_in_version": "never", "kind": "exponential", @@ -6176,6 +6193,53 @@ "n_buckets": 100, "description": "How long has a custom developer tool been active (seconds)" }, + "DEVTOOLS_WEBIDE_CONNECTION_RESULT": { + "expires_in_version": "never", + "kind": "boolean", + "description": "Did WebIDE runtime connection succeed?" + }, + "DEVTOOLS_WEBIDE_USB_CONNECTION_RESULT": { + "expires_in_version": "never", + "kind": "boolean", + "description": "Did WebIDE USB runtime connection succeed?" + }, + "DEVTOOLS_WEBIDE_WIFI_CONNECTION_RESULT": { + "expires_in_version": "never", + "kind": "boolean", + "description": "Did WebIDE WiFi runtime connection succeed?" + }, + "DEVTOOLS_WEBIDE_SIMULATOR_CONNECTION_RESULT": { + "expires_in_version": "never", + "kind": "boolean", + "description": "Did WebIDE simulator runtime connection succeed?" + }, + "DEVTOOLS_WEBIDE_REMOTE_CONNECTION_RESULT": { + "expires_in_version": "never", + "kind": "boolean", + "description": "Did WebIDE remote runtime connection succeed?" + }, + "DEVTOOLS_WEBIDE_LOCAL_CONNECTION_RESULT": { + "expires_in_version": "never", + "kind": "boolean", + "description": "Did WebIDE local runtime connection succeed?" + }, + "DEVTOOLS_WEBIDE_CONNECTION_TIME_SECONDS": { + "expires_in_version": "never", + "kind": "exponential", + "high": "10000000", + "n_buckets": 100, + "description": "How long was WebIDE connected to a runtime (seconds)?" + }, + "DEVTOOLS_WEBIDE_CONNECTION_PLAY_USED": { + "expires_in_version": "never", + "kind": "boolean", + "description": "Was WebIDE's play button used during this runtime connection?" + }, + "DEVTOOLS_WEBIDE_CONNECTION_DEBUG_USED": { + "expires_in_version": "never", + "kind": "boolean", + "description": "Was WebIDE's debug button used during this runtime connection?" + }, "BROWSER_IS_USER_DEFAULT": { "expires_in_version": "never", "kind": "boolean", diff --git a/toolkit/devtools/server/tests/mochitest/test_connectToChild.html b/toolkit/devtools/server/tests/mochitest/test_connectToChild.html index aa80740aec76..0d23b6c42fef 100644 --- a/toolkit/devtools/server/tests/mochitest/test_connectToChild.html +++ b/toolkit/devtools/server/tests/mochitest/test_connectToChild.html @@ -67,8 +67,12 @@ function runTests() { }, false); // Instantiate a minimal server - DebuggerServer.init(function () { return true; }); - DebuggerServer.addBrowserActors(); + if (!DebuggerServer.initialized) { + DebuggerServer.init(function () { return true; }); + } + if (!DebuggerServer.createRootActor) { + DebuggerServer.addBrowserActors(); + } function firstClient() { // Fake a first connection to an iframe diff --git a/toolkit/devtools/server/tests/mochitest/test_connection-manager.html b/toolkit/devtools/server/tests/mochitest/test_connection-manager.html index c747f0c9af36..9e6c5f2e0208 100644 --- a/toolkit/devtools/server/tests/mochitest/test_connection-manager.html +++ b/toolkit/devtools/server/tests/mochitest/test_connection-manager.html @@ -22,8 +22,10 @@ window.onload = function() { Cu.import("resource://gre/modules/devtools/Loader.jsm"); Cu.import("resource://gre/modules/Services.jsm"); - DebuggerServer.init(function () { return true; }); - DebuggerServer.addBrowserActors(); + if (!DebuggerServer.initialized) { + DebuggerServer.init(function () { return true; }); + DebuggerServer.addBrowserActors(); + } var {ConnectionManager, Connection} = devtools.require("devtools/client/connection-manager"); diff --git a/toolkit/devtools/server/tests/mochitest/test_device.html b/toolkit/devtools/server/tests/mochitest/test_device.html index c3bb9aa4ac5b..152b2c110dd4 100644 --- a/toolkit/devtools/server/tests/mochitest/test_device.html +++ b/toolkit/devtools/server/tests/mochitest/test_device.html @@ -28,8 +28,10 @@ window.onload = function() { var {getDeviceFront} = devtools.require("devtools/server/actors/device"); - DebuggerServer.init(function () { return true; }); - DebuggerServer.addBrowserActors(); + if (!DebuggerServer.initialized) { + DebuggerServer.init(function () { return true; }); + DebuggerServer.addBrowserActors(); + } var client = new DebuggerClient(DebuggerServer.connectPipe()); client.connect(function onConnect() { diff --git a/toolkit/devtools/server/tests/mochitest/test_framerate_01.html b/toolkit/devtools/server/tests/mochitest/test_framerate_01.html index e33c8cb1a111..3b89b49230aa 100644 --- a/toolkit/devtools/server/tests/mochitest/test_framerate_01.html +++ b/toolkit/devtools/server/tests/mochitest/test_framerate_01.html @@ -34,8 +34,10 @@ window.onload = function() { var {FramerateFront} = devtools.require("devtools/server/actors/framerate"); - DebuggerServer.init(function () { return true; }); - DebuggerServer.addBrowserActors(); + if (!DebuggerServer.initialized) { + DebuggerServer.init(function () { return true; }); + DebuggerServer.addBrowserActors(); + } var client = new DebuggerClient(DebuggerServer.connectPipe()); client.connect(function onConnect() { diff --git a/toolkit/devtools/server/tests/mochitest/test_framerate_02.html b/toolkit/devtools/server/tests/mochitest/test_framerate_02.html index 023717776ee5..175b8a134672 100644 --- a/toolkit/devtools/server/tests/mochitest/test_framerate_02.html +++ b/toolkit/devtools/server/tests/mochitest/test_framerate_02.html @@ -34,8 +34,10 @@ window.onload = function() { var {FramerateFront} = devtools.require("devtools/server/actors/framerate"); - DebuggerServer.init(function () { return true; }); - DebuggerServer.addBrowserActors(); + if (!DebuggerServer.initialized) { + DebuggerServer.init(function () { return true; }); + DebuggerServer.addBrowserActors(); + } var client = new DebuggerClient(DebuggerServer.connectPipe()); client.connect(function onConnect() { diff --git a/toolkit/devtools/server/tests/mochitest/test_framerate_03.html b/toolkit/devtools/server/tests/mochitest/test_framerate_03.html index affef174ec43..5eb789929a2b 100644 --- a/toolkit/devtools/server/tests/mochitest/test_framerate_03.html +++ b/toolkit/devtools/server/tests/mochitest/test_framerate_03.html @@ -37,8 +37,10 @@ window.onload = function() { var STOP_TICK = 3000; var TOTAL_TIME = 5000; - DebuggerServer.init(function () { return true; }); - DebuggerServer.addBrowserActors(); + if (!DebuggerServer.initialized) { + DebuggerServer.init(function () { return true; }); + DebuggerServer.addBrowserActors(); + } var client = new DebuggerClient(DebuggerServer.connectPipe()); client.connect(function onConnect() { From 82782aa5c7578463c7c8ea350660faebdd990b3a Mon Sep 17 00:00:00 2001 From: Patrick Brosset Date: Mon, 11 Aug 2014 04:43:00 -0400 Subject: [PATCH 02/19] Bug 1000716 - Intermittent race condition in markupview/test/browser_markupview_mutation_02.js. r=miker --- browser/devtools/markupview/markup-view.js | 8 ++++++-- .../markupview/test/browser_markupview_mutation_02.js | 9 +++++++++ 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/browser/devtools/markupview/markup-view.js b/browser/devtools/markupview/markup-view.js index 22bef8fc7a04..3f059677be08 100644 --- a/browser/devtools/markupview/markup-view.js +++ b/browser/devtools/markupview/markup-view.js @@ -13,7 +13,6 @@ const DEFAULT_MAX_CHILDREN = 100; const COLLAPSE_ATTRIBUTE_LENGTH = 120; const COLLAPSE_DATA_URL_REGEX = /^data.+base64/; const COLLAPSE_DATA_URL_LENGTH = 60; -const CONTAINER_FLASHING_DURATION = 500; const NEW_SELECTION_HIGHLIGHTER_TIMER = 1000; const {UndoStack} = require("devtools/shared/undo"); @@ -112,6 +111,11 @@ function MarkupView(aInspector, aFrame, aControllerWindow) { exports.MarkupView = MarkupView; MarkupView.prototype = { + /** + * How long does a node flash when it mutates (in ms). + */ + CONTAINER_FLASHING_DURATION: 500, + _selectedContainer: null, _initTooltips: function() { @@ -1578,7 +1582,7 @@ MarkupContainer.prototype = { } this._flashMutationTimer = contentWin.setTimeout(() => { this.flashed = false; - }, CONTAINER_FLASHING_DURATION); + }, this.markup.CONTAINER_FLASHING_DURATION); } }, diff --git a/browser/devtools/markupview/test/browser_markupview_mutation_02.js b/browser/devtools/markupview/test/browser_markupview_mutation_02.js index 7aae473747d8..c7a12d3bd203 100644 --- a/browser/devtools/markupview/test/browser_markupview_mutation_02.js +++ b/browser/devtools/markupview/test/browser_markupview_mutation_02.js @@ -55,6 +55,10 @@ const TEST_DATA = [{ let test = asyncTest(function*() { let {inspector} = yield addTab(TEST_URL).then(openInspector); + // Make sure mutated nodes flash for a very long time so we can more easily + // assert they do + inspector.markup.CONTAINER_FLASHING_DURATION = 1000 * 60 * 60; + info("Getting the root node to test mutations on"); let rootNode = getNode(".list"); let rootNodeFront = yield getNodeFront(".list", inspector); @@ -88,4 +92,9 @@ function* assertNodeFlashing(nodeFront, inspector) { ok(container, "Markup container for node found"); ok(container.tagState.classList.contains("theme-bg-contrast"), "Markup container for node is flashing"); + + // Clear the mutation flashing timeout now that we checked the node was flashing + let markup = inspector.markup; + markup._frame.contentWindow.clearTimeout(container._flashMutationTimer); + container._flashMutationTimer = null; } From a9eee4279062c1068ea088024396c3e0c79b9ad9 Mon Sep 17 00:00:00 2001 From: "Bernardo P. Rittmeyer" Date: Mon, 11 Aug 2014 14:03:00 -0400 Subject: [PATCH 03/19] Bug 1041845 - Apply image-rendering: -moz-crisp-edges style to favicons throughout the UI when resolution is 2dppx. r=MattN --- .lock | 0 browser/base/content/browser.css | 47 ++++++++++++++++++++ browser/base/content/tabbrowser.css | 7 +++ browser/components/places/content/places.css | 9 ++++ browser/components/preferences/handlers.css | 8 ++++ browser/components/tabview/tabview.css | 7 +++ browser/themes/osx/browser.css | 9 ---- browser/themes/osx/searchbar.css | 5 --- 8 files changed, 78 insertions(+), 14 deletions(-) create mode 100644 .lock diff --git a/.lock b/.lock new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/browser/base/content/browser.css b/browser/base/content/browser.css index 8e18e90c2f24..56cf111d783e 100644 --- a/browser/base/content/browser.css +++ b/browser/base/content/browser.css @@ -320,6 +320,14 @@ toolbar:not(#TabsToolbar) > #personal-bookmarks { min-width: 25ch; } +/* Apply crisp rendering for favicons at exactly 2dppx resolution */ +@media (resolution: 2dppx) { + .searchbar-engine-image, + .searchbar-engine-menuitem > .menu-iconic-left > .menu-iconic-icon { + image-rendering: -moz-crisp-edges; + } +} + #urlbar, .searchbar-textbox { /* Setting a width and min-width to let the location & search bars maintain @@ -472,6 +480,20 @@ toolbarbutton.bookmark-item { max-width: 13em; } +/* Apply crisp rendering for favicons at exactly 2dppx resolution */ +@media (resolution: 2dppx) { + .alltabs-popup > .menuitem-iconic > .menu-iconic-left > .menu-iconic-icon, + .menuitem-with-favicon > .menu-iconic-left > .menu-iconic-icon { + image-rendering: -moz-crisp-edges; + } + + .bookmark-item > .toolbarbutton-icon, + .bookmark-item > .menu-iconic-left > .menu-iconic-icon, + #personal-bookmarks[cui-areatype="toolbar"] > #bookmarks-toolbar-placeholder > .toolbarbutton-icon { + image-rendering: -moz-crisp-edges; + } +} + #editBMPanel_tagsSelector { /* override default listbox width from xul.css */ width: auto; @@ -629,6 +651,13 @@ window[chromehidden~="toolbar"] toolbar:not(.toolbar-primary):not(.chromeclass-m height: 16px; } +/* Apply crisp rendering for favicons at exactly 2dppx resolution */ +@media (resolution: 2dppx) { + .ctrlTab-favicon { + image-rendering: -moz-crisp-edges; + } +} + .ctrlTab-preview { -moz-binding: url("chrome://browser/content/browser-tabPreviews.xml#ctrlTab-preview"); } @@ -832,6 +861,15 @@ chatbar { max-height: 0; } +/* Apply crisp rendering for favicons at exactly 2dppx resolution */ +@media (resolution: 2dppx) { + #social-sidebar-favico, + .social-status-button, + .chat-status-icon { + image-rendering: -moz-crisp-edges; + } +} + /** See bug 872317 for why the following rule is necessary. */ #downloads-button { @@ -1000,6 +1038,15 @@ chatbox:-moz-full-screen-ancestor > .chat-titlebar { list-style-image: none; } +/* Apply crisp rendering for favicons at exactly 2dppx resolution */ +@media (resolution: 2dppx) { + #PanelUI-recentlyClosedWindows > toolbarbutton > .toolbarbutton-icon, + #PanelUI-recentlyClosedTabs > toolbarbutton > .toolbarbutton-icon, + #PanelUI-historyItems > toolbarbutton > .toolbarbutton-icon { + image-rendering: -moz-crisp-edges; + } +} + #customization-panelHolder { overflow-y: hidden; } diff --git a/browser/base/content/tabbrowser.css b/browser/base/content/tabbrowser.css index d5d9ee608ccf..bc5860e7114a 100644 --- a/browser/base/content/tabbrowser.css +++ b/browser/base/content/tabbrowser.css @@ -44,6 +44,13 @@ tabpanels { z-index: 2; } +/* Apply crisp rendering for favicons at exactly 2dppx resolution */ +@media (resolution: 2dppx) { + .tab-icon-image { + image-rendering: -moz-crisp-edges; + } +} + .tab-icon-image:not([src]):not([pinned]), .tab-throbber:not([busy]), .tab-throbber[busy] + .tab-icon-image { diff --git a/browser/components/places/content/places.css b/browser/components/places/content/places.css index 5151cca8254b..de3cc91d84ff 100644 --- a/browser/components/places/content/places.css +++ b/browser/components/places/content/places.css @@ -14,3 +14,12 @@ tree[type="places"] { menupopup[placespopup="true"] { -moz-binding: url("chrome://browser/content/places/menu.xml#places-popup-base"); } + +/* Apply crisp rendering for favicons at exactly 2dppx resolution */ +@media (resolution: 2dppx) { + #bookmarksChildren, + .sidebar-placesTreechildren, + .placesTree > treechildren { + image-rendering: -moz-crisp-edges; + } +} diff --git a/browser/components/preferences/handlers.css b/browser/components/preferences/handlers.css index abac7d575e9f..d5f100831e68 100644 --- a/browser/components/preferences/handlers.css +++ b/browser/components/preferences/handlers.css @@ -23,3 +23,11 @@ listitem.offlineapp { -moz-binding: url("chrome://browser/content/preferences/handlers.xml#offlineapp"); } + +/* Apply crisp rendering for favicons at exactly 2dppx resolution */ +@media (resolution: 2dppx) { + #handlersView > richlistitem, + .actionsMenu > menupopup > menuitem > .menu-iconic-left { + image-rendering: -moz-crisp-edges; + } +} diff --git a/browser/components/tabview/tabview.css b/browser/components/tabview/tabview.css index 8ab4b6c2466c..8f3ff20279f8 100644 --- a/browser/components/tabview/tabview.css +++ b/browser/components/tabview/tabview.css @@ -65,6 +65,13 @@ body { position: absolute; } +/* Apply crisp rendering for favicons at exactly 2dppx resolution */ +@media (resolution: 2dppx) { + .favicon > img { + image-rendering: -moz-crisp-edges; + } +} + .close { position: absolute; cursor: pointer; diff --git a/browser/themes/osx/browser.css b/browser/themes/osx/browser.css index 112adcd82654..f3d6501857b1 100644 --- a/browser/themes/osx/browser.css +++ b/browser/themes/osx/browser.css @@ -387,14 +387,6 @@ toolbarbutton.bookmark-item > menupopup { opacity: 0.7; } -@media (min-resolution: 2dppx) { - .bookmark-item > .toolbarbutton-icon, - .bookmark-item > .menu-iconic-left > .menu-iconic-icon, - #personal-bookmarks[cui-areatype="toolbar"] > #bookmarks-toolbar-placeholder > .toolbarbutton-icon { - image-rendering: -moz-crisp-edges; - } -} - #bookmarks-toolbar-placeholder { list-style-image: url("chrome://browser/skin/places/bookmarksToolbar.png") !important; } @@ -2798,7 +2790,6 @@ toolbarbutton.chevron > .toolbarbutton-menu-dropmarker { .tab-icon-image { list-style-image: url("chrome://mozapps/skin/places/defaultFavicon@2x.png"); - image-rendering: -moz-crisp-edges; } .tab-throbber[busy] { diff --git a/browser/themes/osx/searchbar.css b/browser/themes/osx/searchbar.css index 93023fee176a..0a45f7510b04 100644 --- a/browser/themes/osx/searchbar.css +++ b/browser/themes/osx/searchbar.css @@ -47,11 +47,6 @@ } @media (min-resolution: 2dppx) { - .searchbar-engine-image, - .searchbar-engine-menuitem > .menu-iconic-left > .menu-iconic-icon { - image-rendering: -moz-crisp-edges; - } - .searchbar-engine-image { list-style-image: url("chrome://mozapps/skin/places/defaultFavicon@2x.png"); } From 988f89ddf7f10ee77350d2deae50e2c94ae4c75d Mon Sep 17 00:00:00 2001 From: Manish Goregaokar Date: Mon, 11 Aug 2014 09:27:00 -0400 Subject: [PATCH 04/19] Bug 1046693 - Make cog on newtab page less blurry. r=Unfocused --- browser/themes/shared/newtab/controls.svg | 18 ++---------------- 1 file changed, 2 insertions(+), 16 deletions(-) diff --git a/browser/themes/shared/newtab/controls.svg b/browser/themes/shared/newtab/controls.svg index a37a3a7a42a3..3985f331c3b8 100644 --- a/browser/themes/shared/newtab/controls.svg +++ b/browser/themes/shared/newtab/controls.svg @@ -19,16 +19,11 @@ } .glyphShape-style-hover-gear { - fill: url(#gradient-linear-hover-gear); - } - .glyphShape-style-hover-gear-dropshadow { - fill: #000; - fill-opacity: .5; - filter: url(#filter-shadow-drop); + fill: #4a90e2; } .glyphShape-style-hover-pin { - fill: #0092e5; + fill: #4a90e2; } .glyphShape-style-hover-delete { @@ -57,14 +52,6 @@ - - - - - @@ -79,7 +66,6 @@ - From 722a7edfc5274334704fb0f84e557ab3a4d571ad Mon Sep 17 00:00:00 2001 From: "Bernardo P. Rittmeyer" Date: Mon, 11 Aug 2014 14:35:00 -0400 Subject: [PATCH 05/19] Bug 1050449 - Move autocomplete image-rendering css from OS X specific theme to content file. r=MattN --- toolkit/content/autocomplete.css | 13 +++++++++++++ toolkit/content/jar.mn | 1 + toolkit/content/widgets/autocomplete.xml | 3 +++ toolkit/themes/osx/global/autocomplete.css | 6 ------ 4 files changed, 17 insertions(+), 6 deletions(-) create mode 100644 toolkit/content/autocomplete.css diff --git a/toolkit/content/autocomplete.css b/toolkit/content/autocomplete.css new file mode 100644 index 000000000000..249c7ebf9c10 --- /dev/null +++ b/toolkit/content/autocomplete.css @@ -0,0 +1,13 @@ +/* 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/. */ + +@namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"); +@namespace html url("http://www.w3.org/1999/xhtml"); + +/* Apply crisp rendering for favicons at exactly 2dppx resolution */ +@media (resolution: 2dppx) { + .ac-site-icon { + image-rendering: -moz-crisp-edges; + } +} diff --git a/toolkit/content/jar.mn b/toolkit/content/jar.mn index 60000211d24d..54ad0d66e551 100644 --- a/toolkit/content/jar.mn +++ b/toolkit/content/jar.mn @@ -11,6 +11,7 @@ toolkit.jar: * content/global/xul.css (xul.css) content/global/textbox.css (textbox.css) content/global/menulist.css (menulist.css) + content/global/autocomplete.css (autocomplete.css) content/global/about.js (about.js) content/global/about.xhtml (about.xhtml) content/global/aboutAbout.js (aboutAbout.js) diff --git a/toolkit/content/widgets/autocomplete.xml b/toolkit/content/widgets/autocomplete.xml index 58dc9af6f4dc..cb83860817cb 100644 --- a/toolkit/content/widgets/autocomplete.xml +++ b/toolkit/content/widgets/autocomplete.xml @@ -19,6 +19,7 @@ + @@ -598,6 +599,7 @@ + @@ -929,6 +931,7 @@ extends="chrome://global/content/bindings/popup.xml#popup"> + diff --git a/toolkit/themes/osx/global/autocomplete.css b/toolkit/themes/osx/global/autocomplete.css index 92d6e2a17761..318af07b6a10 100644 --- a/toolkit/themes/osx/global/autocomplete.css +++ b/toolkit/themes/osx/global/autocomplete.css @@ -114,12 +114,6 @@ treechildren.autocomplete-treebody::-moz-tree-cell-text(selected) { -moz-margin-end: 5px; } -@media (min-resolution: 2dppx) { - image.ac-site-icon { - image-rendering: -moz-crisp-edges; - } -} - .ac-type-icon { width: 16px; height: 16px; From ae6486b5f68b4370c7921daadeba20080f263fb4 Mon Sep 17 00:00:00 2001 From: Jordan Santell Date: Mon, 11 Aug 2014 23:59:00 -0400 Subject: [PATCH 06/19] Bug 1052118 - Allow protocol.js Option to allow falsy values through. r=dcamp --- toolkit/devtools/server/protocol.js | 8 +++--- .../server/tests/unit/test_protocol_simple.js | 26 +++++++++++++++++-- 2 files changed, 27 insertions(+), 7 deletions(-) diff --git a/toolkit/devtools/server/protocol.js b/toolkit/devtools/server/protocol.js index e3290728eca2..9176ee2a447d 100644 --- a/toolkit/devtools/server/protocol.js +++ b/toolkit/devtools/server/protocol.js @@ -448,13 +448,11 @@ let Option = Class({ }, write: function(arg, ctx, name) { - if (!arg) { - return undefined; - } - let v = arg[name] || undefined; - if (v === undefined) { + // Ignore if arg is undefined or null; allow other falsy values + if (arg == undefined || arg[name] == undefined) { return undefined; } + let v = arg[name]; return this.type.write(v, ctx); }, read: function(v, ctx, outArgs, name) { diff --git a/toolkit/devtools/server/tests/unit/test_protocol_simple.js b/toolkit/devtools/server/tests/unit/test_protocol_simple.js index 8bb6d285fa6a..264baf811483 100644 --- a/toolkit/devtools/server/tests/unit/test_protocol_simple.js +++ b/toolkit/devtools/server/tests/unit/test_protocol_simple.js @@ -132,8 +132,18 @@ let RootActor = protocol.ActorClass({ oneway: true }), + emitFalsyOptions: method(function() { + events.emit(this, "falsyOptions", { zero: 0, farce: false }); + }, { + oneway: true + }), + events: { - "oneway": { a: Arg(0) } + "oneway": { a: Arg(0) }, + "falsyOptions": { + zero: Option(0), + farce: Option(0) + } } }); @@ -223,7 +233,7 @@ function run_test() trace.expectReceive({"from":""}); do_check_true(typeof(ret.option1) === "undefined"); do_check_true(typeof(ret.option2) === "undefined"); - }).then(ret => { + }).then(() => { // Explicitly call an optional argument... return rootClient.optionalArgs(5, 10); }).then(ret => { @@ -268,6 +278,18 @@ function run_test() }); do_check_true(typeof(rootClient.testOneWay("hello")) === "undefined"); return deferred.promise; + }).then(() => { + let deferred = promise.defer(); + rootClient.on("falsyOptions", res => { + trace.expectSend({"type":"emitFalsyOptions", "to":""}); + trace.expectReceive({"type":"falsyOptions", "farce":false, "zero": 0, "from":""}); + + do_check_true(res.zero === 0); + do_check_true(res.farce === false); + deferred.resolve(); + }); + rootClient.emitFalsyOptions(); + return deferred.promise; }).then(() => { client.close(() => { do_test_finished(); From 9addfc18a892dd54f591d61290326eabace1773f Mon Sep 17 00:00:00 2001 From: Richard Marti Date: Tue, 12 Aug 2014 12:43:48 +0200 Subject: [PATCH 07/19] Bug 1052315 - Correct the path to the sorter images. r=Unfocused --- browser/themes/shared/incontentprefs/preferences.css | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/browser/themes/shared/incontentprefs/preferences.css b/browser/themes/shared/incontentprefs/preferences.css index 83434349b26f..93576c6d9422 100644 --- a/browser/themes/shared/incontentprefs/preferences.css +++ b/browser/themes/shared/incontentprefs/preferences.css @@ -167,7 +167,7 @@ prefpane { #typeColumn > .treecol-sortdirection[sortDirection=descending], #actionColumn > .treecol-sortdirection[sortDirection=descending] { -moz-appearance: none; - list-style-image: url("chrome://browser/skin/preferences/in-content/sorter.png"); + list-style-image: url("chrome://browser/skin/in-content/sorter.png"); } #typeColumn > .treecol-sortdirection[sortDirection=descending], @@ -182,7 +182,7 @@ prefpane { #actionColumn > .treecol-sortdirection[sortDirection=descending] { width: 12px; height: 8px; - list-style-image: url("chrome://browser/skin/preferences/in-content/sorter@2x.png"); + list-style-image: url("chrome://browser/skin/in-content/sorter@2x.png"); } } From 357c2078bf1d462e95322f4c195c8993a03fa754 Mon Sep 17 00:00:00 2001 From: Richard Marti Date: Tue, 12 Aug 2014 10:56:59 +0200 Subject: [PATCH 08/19] Bug 1052316 - Add a min-width to the netError button. r=Unfocused --- browser/base/content/aboutneterror/netError.css | 1 + 1 file changed, 1 insertion(+) diff --git a/browser/base/content/aboutneterror/netError.css b/browser/base/content/aboutneterror/netError.css index 51fc83cdfb44..e4c6d6c7041a 100644 --- a/browser/base/content/aboutneterror/netError.css +++ b/browser/base/content/aboutneterror/netError.css @@ -45,6 +45,7 @@ ul { #errorTryAgain { margin-top: 1.2em; + min-width: 150px } #errorContainer { From 0d0c2ca0dc3b5f1bed8377571ae2b3f4d6ac12c0 Mon Sep 17 00:00:00 2001 From: Jared Wein Date: Tue, 12 Aug 2014 11:30:16 -0400 Subject: [PATCH 09/19] Bug 1048198 - Searchbar Search Suggestions is no longer able to disable. r=mattn --- .../search/SearchSuggestionController.jsm | 12 +++++- .../components/search/nsSearchSuggestions.js | 37 ---------------- .../tests/xpcshell/test_searchSuggest.js | 43 +++++++++++++++++++ 3 files changed, 54 insertions(+), 38 deletions(-) diff --git a/toolkit/components/search/SearchSuggestionController.jsm b/toolkit/components/search/SearchSuggestionController.jsm index 74f4413916f8..64aeb5a41e52 100644 --- a/toolkit/components/search/SearchSuggestionController.jsm +++ b/toolkit/components/search/SearchSuggestionController.jsm @@ -17,6 +17,16 @@ const SEARCH_RESPONSE_SUGGESTION_JSON = "application/x-suggestions+json"; const DEFAULT_FORM_HISTORY_PARAM = "searchbar-history"; const HTTP_OK = 200; const REMOTE_TIMEOUT = 500; // maximum time (ms) to wait before giving up on a remote suggestions +const BROWSER_SUGGEST_PREF = "browser.search.suggest.enabled"; + +/** + * Remote search suggestions will be shown if gRemoteSuggestionsEnabled + * is true. Global because only one pref observer is needed for all instances. + */ +let gRemoteSuggestionsEnabled = Services.prefs.getBoolPref(BROWSER_SUGGEST_PREF); +Services.prefs.addObserver(BROWSER_SUGGEST_PREF, function(aSubject, aTopic, aData) { + gRemoteSuggestionsEnabled = Services.prefs.getBoolPref(BROWSER_SUGGEST_PREF); +}, false); /** * SearchSuggestionController.jsm exists as a helper module to allow multiple consumers to request and display @@ -124,7 +134,7 @@ this.SearchSuggestionController.prototype = { this._searchString = searchTerm; // Remote results - if (searchTerm && this.maxRemoteResults && + if (searchTerm && gRemoteSuggestionsEnabled && this.maxRemoteResults && engine.supportsResponseType(SEARCH_RESPONSE_SUGGESTION_JSON)) { this._deferredRemoteResult = this._fetchRemote(searchTerm, engine, privateMode); promises.push(this._deferredRemoteResult.promise); diff --git a/toolkit/components/search/nsSearchSuggestions.js b/toolkit/components/search/nsSearchSuggestions.js index cbe7e5e64110..8e232bf651fc 100644 --- a/toolkit/components/search/nsSearchSuggestions.js +++ b/toolkit/components/search/nsSearchSuggestions.js @@ -2,10 +2,6 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ -const BROWSER_SUGGEST_PREF = "browser.search.suggest.enabled"; -const XPCOM_SHUTDOWN_TOPIC = "xpcom-shutdown"; -const NS_PREFBRANCH_PREFCHANGE_TOPIC_ID = "nsPref:changed"; - const { classes: Cc, interfaces: Ci, utils: Cu, results: Cr } = Components; Cu.import("resource://gre/modules/XPCOMUtils.jsm"); @@ -28,8 +24,6 @@ function SuggestAutoComplete() { SuggestAutoComplete.prototype = { _init: function() { - this._addObservers(); - this._suggestEnabled = Services.prefs.getBoolPref(BROWSER_SUGGEST_PREF); this._suggestionController = new SearchSuggestionController(obj => this.onResultsReturned(obj)); }, @@ -39,11 +33,6 @@ SuggestAutoComplete.prototype = { return this._suggestionLabel = bundle.GetStringFromName("suggestion_label"); }, - /** - * Search suggestions will be shown if this._suggestEnabled is true. - */ - _suggestEnabled: null, - /** * The object implementing nsIAutoCompleteObserver that we notify when * we have found results @@ -178,32 +167,6 @@ SuggestAutoComplete.prototype = { this._suggestionController.stop(); }, - /** - * nsIObserver - */ - observe: function SAC_observe(aSubject, aTopic, aData) { - switch (aTopic) { - case NS_PREFBRANCH_PREFCHANGE_TOPIC_ID: - this._suggestEnabled = Services.prefs.getBoolPref(BROWSER_SUGGEST_PREF); - break; - case XPCOM_SHUTDOWN_TOPIC: - this._removeObservers(); - break; - } - }, - - _addObservers: function SAC_addObservers() { - Services.prefs.addObserver(BROWSER_SUGGEST_PREF, this, false); - - Services.obs.addObserver(this, XPCOM_SHUTDOWN_TOPIC, false); - }, - - _removeObservers: function SAC_removeObservers() { - Services.prefs.removeObserver(BROWSER_SUGGEST_PREF, this); - - Services.obs.removeObserver(this, XPCOM_SHUTDOWN_TOPIC); - }, - // nsISupports QueryInterface: XPCOMUtils.generateQI([Ci.nsIAutoCompleteSearch, Ci.nsIAutoCompleteObserver]) diff --git a/toolkit/components/search/tests/xpcshell/test_searchSuggest.js b/toolkit/components/search/tests/xpcshell/test_searchSuggest.js index 36ea60dc9302..b80bebf8621c 100644 --- a/toolkit/components/search/tests/xpcshell/test_searchSuggest.js +++ b/toolkit/components/search/tests/xpcshell/test_searchSuggest.js @@ -278,6 +278,49 @@ add_task(function* one_of_each() { do_check_eq(result.remote[0], "letter B"); }); +add_task(function* local_result_returned_remote_result_disabled() { + Services.prefs.setBoolPref("browser.search.suggest.enabled", false); + let controller = new SearchSuggestionController(); + controller.maxLocalResults = 1; + controller.maxRemoteResults = 1; + let result = yield controller.fetch("letter ", false, getEngine); + do_check_eq(result.term, "letter "); + do_check_eq(result.local.length, 1); + do_check_eq(result.local[0], "letter A"); + do_check_eq(result.remote.length, 0); + Services.prefs.clearUserPref("browser.search.suggest.enabled"); +}); + +add_task(function* local_result_returned_remote_result_disabled_after_creation_of_controller() { + let controller = new SearchSuggestionController(); + controller.maxLocalResults = 1; + controller.maxRemoteResults = 1; + Services.prefs.setBoolPref("browser.search.suggest.enabled", false); + let result = yield controller.fetch("letter ", false, getEngine); + do_check_eq(result.term, "letter "); + do_check_eq(result.local.length, 1); + do_check_eq(result.local[0], "letter A"); + do_check_eq(result.remote.length, 0); +}); + +add_task(function* one_of_each_disabled_before_creation_enabled_after_creation_of_controller() { + Services.prefs.setBoolPref("browser.search.suggest.enabled", false); + let controller = new SearchSuggestionController(); + controller.maxLocalResults = 1; + controller.maxRemoteResults = 1; + Services.prefs.setBoolPref("browser.search.suggest.enabled", true); + let result = yield controller.fetch("letter ", false, getEngine); + do_check_eq(result.term, "letter "); + do_check_eq(result.local.length, 1); + do_check_eq(result.local[0], "letter A"); + do_check_eq(result.remote.length, 1); + do_check_eq(result.remote[0], "letter B"); +}); + +add_task(function* clear_suggestions_pref() { + Services.prefs.clearUserPref("browser.search.suggest.enabled"); +}); + add_task(function* one_local_zero_remote() { let controller = new SearchSuggestionController(); controller.maxLocalResults = 1; From e43397cf64166c503ef44cc14d7ea78e9242cd30 Mon Sep 17 00:00:00 2001 From: Lucas Rocha Date: Tue, 12 Aug 2014 16:34:29 +0100 Subject: [PATCH 10/19] Bug 1052345 - Fix inflation issue in TabCounter (r=wesj) --- mobile/android/base/toolbar/TabCounter.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mobile/android/base/toolbar/TabCounter.java b/mobile/android/base/toolbar/TabCounter.java index b991ac46dc9a..770edc373ff5 100644 --- a/mobile/android/base/toolbar/TabCounter.java +++ b/mobile/android/base/toolbar/TabCounter.java @@ -133,7 +133,7 @@ public class TabCounter extends ThemedTextSwitcher @Override public View makeView() { - return mInflater.inflate(mLayoutId, this, false); + return mInflater.inflate(mLayoutId, null); } } From db8ba6ec31b3bed9d20a53fc7ab0d02cfda9afa6 Mon Sep 17 00:00:00 2001 From: Tim Taubert Date: Tue, 12 Aug 2014 13:25:23 +0200 Subject: [PATCH 11/19] Bug 1052371 - Fix m-bc shutdown leak detector r=akachkach --- build/automationutils.py | 7 +++++-- testing/mochitest/runtests.py | 9 ++++++--- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/build/automationutils.py b/build/automationutils.py index 98c0f3e9293a..a6b6a55ee8d8 100644 --- a/build/automationutils.py +++ b/build/automationutils.py @@ -606,6 +606,8 @@ class ShutdownLeaks(object): self._logWindow(line) elif line[2:10] == "DOCSHELL": self._logDocShell(line) + elif line.startswith("TEST-START | Shutdown"): + self.seenShutdown = True elif message['action'] == 'test_start': fileName = message['test'].replace("chrome://mochitests/content/browser/", "") self.currentTest = {"fileName": fileName, "windows": set(), "docShells": set()} @@ -614,10 +616,11 @@ class ShutdownLeaks(object): if self.currentTest and (self.currentTest["windows"] or self.currentTest["docShells"]): self.tests.append(self.currentTest) self.currentTest = None - elif message['action'] == 'suite_end': - self.seenShutdown = True def process(self): + if not self.seenShutdown: + self.logger("TEST-UNEXPECTED-FAIL | ShutdownLeaks | process() called before end of test suite") + for test in self._parseLeakingTests(): for url, count in self._zipLeakedWindows(test["leakedWindows"]): self.logger("TEST-UNEXPECTED-FAIL | %s | leaked %d window(s) until shutdown [url = %s]" % (test["fileName"], count, url)) diff --git a/testing/mochitest/runtests.py b/testing/mochitest/runtests.py index 9374a5284ec0..908370bf1e83 100644 --- a/testing/mochitest/runtests.py +++ b/testing/mochitest/runtests.py @@ -1332,7 +1332,7 @@ class Mochitest(MochitestUtilsMixin): symbolsPath=None, timeout=-1, onLaunch=None, - webapprtChrome=False, + detectShutdownLeaks=False, screenshotOnFail=False, testPath=None, bisectChunk=None, @@ -1383,7 +1383,7 @@ class Mochitest(MochitestUtilsMixin): testUrl = testUrl.replace("&", "\\&") args.append(testUrl) - if mozinfo.info["debug"] and not webapprtChrome: + if detectShutdownLeaks: shutdownLeaks = ShutdownLeaks(log.info) else: shutdownLeaks = None @@ -1743,6 +1743,9 @@ class Mochitest(MochitestUtilsMixin): if options.vmwareRecording: self.startVMwareRecording(options); + # detect shutdown leaks for m-bc runs + detectShutdownLeaks = mozinfo.info["debug"] and options.browserChrome and not options.webapprtChrome + log.info("runtests.py | Running tests: start.\n") try: status = self.runApp(testURL, @@ -1755,7 +1758,7 @@ class Mochitest(MochitestUtilsMixin): symbolsPath=options.symbolsPath, timeout=timeout, onLaunch=onLaunch, - webapprtChrome=options.webapprtChrome, + detectShutdownLeaks=detectShutdownLeaks, screenshotOnFail=options.screenshotOnFail, testPath=options.testPath, bisectChunk=options.bisectChunk, From e47af3ba077f35c70e1f896119871cadbc984804 Mon Sep 17 00:00:00 2001 From: Tim Taubert Date: Tue, 12 Aug 2014 17:06:41 +0200 Subject: [PATCH 12/19] Bug 1052409 - Fix browser_openH264 shutdown leak r=gfritzsche --- toolkit/mozapps/extensions/test/browser/browser_openH264.js | 1 + 1 file changed, 1 insertion(+) diff --git a/toolkit/mozapps/extensions/test/browser/browser_openH264.js b/toolkit/mozapps/extensions/test/browser/browser_openH264.js index 8754d7e5a77f..7e33c0f6b7ac 100644 --- a/toolkit/mozapps/extensions/test/browser/browser_openH264.js +++ b/toolkit/mozapps/extensions/test/browser/browser_openH264.js @@ -262,6 +262,7 @@ add_task(function* testUpdateButton() { yield gInstallDeferred.promise; Assert.equal(gInstalledAddonId, OPENH264_PLUGIN_ID); + delete OpenH264Scope.GMPInstallManager; }); add_task(function* test_cleanup() { From 4bc6b9c1be91793fd5d6f846e81d72ccd9371dd1 Mon Sep 17 00:00:00 2001 From: Shane Caraveo Date: Tue, 12 Aug 2014 11:04:04 -0700 Subject: [PATCH 13/19] Bug 1014332 enable share button by default with default selection of share providers, r=jaws --- browser/app/profile/firefox.js | 9 + browser/base/content/aboutSocialError.xhtml | 21 +-- browser/base/content/browser-sets.inc | 2 +- browser/base/content/browser-social.js | 163 +++++++++++++----- browser/base/content/browser.xul | 6 +- browser/base/content/test/social/browser.ini | 1 + .../base/content/test/social/browser_share.js | 90 +++++++++- .../content/test/social/share_activate.html | 36 ++++ .../locales/en-US/chrome/browser/browser.dtd | 1 + browser/modules/Social.jsm | 5 +- browser/themes/osx/browser.css | 5 + browser/themes/shared/menupanel.inc.css | 5 + toolkit/components/social/SocialService.jsm | 80 +++------ 13 files changed, 304 insertions(+), 120 deletions(-) create mode 100644 browser/base/content/test/social/share_activate.html diff --git a/browser/app/profile/firefox.js b/browser/app/profile/firefox.js index f0605a5ab0c5..24845987daf6 100644 --- a/browser/app/profile/firefox.js +++ b/browser/app/profile/firefox.js @@ -1588,6 +1588,15 @@ pref("services.push.serverURL", "wss://push.services.mozilla.com/"); pref("social.sidebar.unload_timeout_ms", 10000); +// activation from inside of share panel is possible if activationPanelEnabled +// is true. Pref'd off for release while usage testing is done through beta. +#ifdef RELEASE_BUILD +pref("social.share.activationPanelEnabled", false); +#else +pref("social.share.activationPanelEnabled", true); +#endif +pref("social.shareDirectory", "https://activations.cdn.mozilla.net/en-US/sharePanel.html"); + pref("dom.identity.enabled", false); // Block insecure active content on https pages diff --git a/browser/base/content/aboutSocialError.xhtml b/browser/base/content/aboutSocialError.xhtml index eba803a915c8..5cb78accca6a 100644 --- a/browser/base/content/aboutSocialError.xhtml +++ b/browser/base/content/aboutSocialError.xhtml @@ -43,12 +43,17 @@ function parseQueryString() { let url = document.documentURI; - let queryString = url.replace(/^about:socialerror\??/, ""); + var searchParams = new URLSearchParams(url); - let modeMatch = queryString.match(/mode=([^&]+)/); - let mode = modeMatch && modeMatch[1] ? modeMatch[1] : ""; - let originMatch = queryString.match(/origin=([^&]+)/); - config.origin = originMatch && originMatch[1] ? decodeURIComponent(originMatch[1]) : ""; + let mode = searchParams.get("mode"); + config.directory = searchParams.get("directory"); + config.origin = searchParams.get("origin"); + let encodedURL = searchParams.get("url"); + let url = decodeURIComponent(encodedURL); + if (config.directory) { + let URI = Services.io.newURI(url, null, null); + config.origin = Services.scriptSecurityManager.getNoAppCodebasePrincipal(URI).origin; + } switch (mode) { case "compactInfo": @@ -59,10 +64,6 @@ document.getElementById("btnCloseSidebar").style.display = 'none'; //intentional fall-through case "tryAgain": - let urlMatch = queryString.match(/url=([^&]+)/); - let encodedURL = urlMatch && urlMatch[1] ? urlMatch[1] : ""; - let url = decodeURIComponent(encodedURL); - config.tryAgainCallback = loadQueryURL; config.queryURL = url; break; @@ -80,7 +81,7 @@ let productName = brandBundle.GetStringFromName("brandShortName"); let provider = Social._getProviderFromOrigin(config.origin); - let providerName = provider && provider.name; + let providerName = provider ? provider.name : config.origin; // Sets up the error message let msg = browserBundle.formatStringFromName("social.error.message", [productName, providerName], 2); diff --git a/browser/base/content/browser-sets.inc b/browser/base/content/browser-sets.inc index b9afa3ab09f3..1cf108785da7 100644 --- a/browser/base/content/browser-sets.inc +++ b/browser/base/content/browser-sets.inc @@ -119,7 +119,7 @@ #endif - +