From 16b5714c4360baa55bb2a1ed2cba2d7104f930bc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?D=C3=A3o=20Gottwald?= Date: Sun, 24 May 2015 00:12:49 +0200 Subject: [PATCH 01/12] Bug 1167716 - Make max-width for popup notifications work again. r=dtownsend --- browser/themes/linux/browser.css | 8 ++++---- browser/themes/osx/browser.css | 8 ++++---- browser/themes/windows/browser.css | 8 ++++---- toolkit/content/widgets/notification.xml | 2 +- toolkit/themes/linux/global/notification.css | 4 ++-- toolkit/themes/osx/global/notification.css | 4 ++-- toolkit/themes/windows/global/notification.css | 4 ++-- 7 files changed, 19 insertions(+), 19 deletions(-) diff --git a/browser/themes/linux/browser.css b/browser/themes/linux/browser.css index 7f1c78c38f5..3eaaad32f9e 100644 --- a/browser/themes/linux/browser.css +++ b/browser/themes/linux/browser.css @@ -1136,10 +1136,10 @@ toolbarbutton[constrain-size="true"][cui-areatype="toolbar"] > .toolbarbutton-ba %include ../shared/notification-icons.inc.css -.popup-notification-description[popupid="addon-progress"], -.popup-notification-description[popupid="addon-install-confirmation"] { - width: 27em; - max-width: 27em; +.popup-notification-body[popupid="addon-progress"], +.popup-notification-body[popupid="addon-install-confirmation"] { + width: 28em; + max-width: 28em; } .addon-install-confirmation-name { diff --git a/browser/themes/osx/browser.css b/browser/themes/osx/browser.css index f9374c1d5d4..43beabb6e0f 100644 --- a/browser/themes/osx/browser.css +++ b/browser/themes/osx/browser.css @@ -3687,10 +3687,10 @@ notification[value="loop-sharing-notification"] .messageImage { } } -.popup-notification-description[popupid="addon-progress"], -.popup-notification-description[popupid="addon-install-confirmation"] { - width: 27em; - max-width: 27em; +.popup-notification-body[popupid="addon-progress"], +.popup-notification-body[popupid="addon-install-confirmation"] { + width: 28em; + max-width: 28em; } #addon-progress-notification-progresstext, diff --git a/browser/themes/windows/browser.css b/browser/themes/windows/browser.css index b9ab4250e5f..63ff6fb0df5 100644 --- a/browser/themes/windows/browser.css +++ b/browser/themes/windows/browser.css @@ -2153,10 +2153,10 @@ toolbarbutton.bookmark-item[dragover="true"][open="true"] { %include ../shared/notification-icons.inc.css -.popup-notification-description[popupid="addon-progress"], -.popup-notification-description[popupid="addon-install-confirmation"] { - width: 27em; - max-width: 27em; +.popup-notification-body[popupid="addon-progress"], +.popup-notification-body[popupid="addon-install-confirmation"] { + width: 28em; + max-width: 28em; } .addon-install-confirmation-name { diff --git a/toolkit/content/widgets/notification.xml b/toolkit/content/widgets/notification.xml index 028a6681342..d2cb07916d6 100644 --- a/toolkit/content/widgets/notification.xml +++ b/toolkit/content/widgets/notification.xml @@ -475,7 +475,7 @@ - + Date: Sat, 23 May 2015 18:17:50 -0500 Subject: [PATCH 02/12] Bug 1067325 - Fix line endings in several browser / toolkit files. r=mconley --- browser/app/profile/firefox.js | 18 +++++++------- browser/base/content/browser.js | 12 +++++----- browser/base/content/nsContextMenu.js | 24 +++++++++---------- .../viewsource/content/viewPartialSource.js | 2 +- .../viewsource/content/viewPartialSource.xul | 20 ++++++++-------- .../viewsource/content/viewSource.xul | 24 +++++++++---------- .../viewsource/content/viewSourceUtils.js | 12 +++++----- 7 files changed, 56 insertions(+), 56 deletions(-) diff --git a/browser/app/profile/firefox.js b/browser/app/profile/firefox.js index d4a6fb71093..3fdcc75af52 100644 --- a/browser/app/profile/firefox.js +++ b/browser/app/profile/firefox.js @@ -198,7 +198,7 @@ pref("app.update.url", "https://aus4.mozilla.org/update/3/%PRODUCT%/%VERSION%/%B pref("app.update.idletime", 60); // Whether or not we show a dialog box informing the user that the update was -// successfully applied. This is off in Firefox by default since we show a +// successfully applied. This is off in Firefox by default since we show a // upgrade start page instead! Other apps may wish to show this UI, and supply // a whatsNewURL field in their brand.properties that contains a link to a page // which tells users what's new in this new update. @@ -225,10 +225,10 @@ pref("app.update.service.enabled", true); pref("extensions.update.enabled", true); pref("extensions.update.url", "https://versioncheck.addons.mozilla.org/update/VersionCheck.php?reqVersion=%REQ_VERSION%&id=%ITEM_ID%&version=%ITEM_VERSION%&maxAppVersion=%ITEM_MAXAPPVERSION%&status=%ITEM_STATUS%&appID=%APP_ID%&appVersion=%APP_VERSION%&appOS=%APP_OS%&appABI=%APP_ABI%&locale=%APP_LOCALE%¤tAppVersion=%CURRENT_APP_VERSION%&updateType=%UPDATE_TYPE%&compatMode=%COMPATIBILITY_MODE%"); pref("extensions.update.background.url", "https://versioncheck-bg.addons.mozilla.org/update/VersionCheck.php?reqVersion=%REQ_VERSION%&id=%ITEM_ID%&version=%ITEM_VERSION%&maxAppVersion=%ITEM_MAXAPPVERSION%&status=%ITEM_STATUS%&appID=%APP_ID%&appVersion=%APP_VERSION%&appOS=%APP_OS%&appABI=%APP_ABI%&locale=%APP_LOCALE%¤tAppVersion=%CURRENT_APP_VERSION%&updateType=%UPDATE_TYPE%&compatMode=%COMPATIBILITY_MODE%"); -pref("extensions.update.interval", 86400); // Check for updates to Extensions and +pref("extensions.update.interval", 86400); // Check for updates to Extensions and // Themes every day // Non-symmetric (not shared by extensions) extension-specific [update] preferences -pref("extensions.dss.enabled", false); // Dynamic Skin Switching +pref("extensions.dss.enabled", false); // Dynamic Skin Switching pref("extensions.dss.switchPending", false); // Non-dynamic switch pending after next // restart. @@ -359,7 +359,7 @@ pref("browser.altClickSave", false); pref("browser.download.debug", false); // Number of milliseconds to wait for the http headers (and thus -// the Content-Disposition filename) before giving up and falling back to +// the Content-Disposition filename) before giving up and falling back to // picking a filename without that info in hand so that the user sees some // feedback from their action. pref("browser.download.saveLinkAsFilenameTimeout", 4000); @@ -390,7 +390,7 @@ pref("browser.search.jarURIs", "chrome://browser/locale/searchplugins/"); // pointer to the default engine name pref("browser.search.defaultenginename", "chrome://browser-region/locale/region.properties"); -// Ordering of Search Engines in the Engine list. +// Ordering of Search Engines in the Engine list. pref("browser.search.order.1", "chrome://browser-region/locale/region.properties"); pref("browser.search.order.2", "chrome://browser-region/locale/region.properties"); pref("browser.search.order.3", "chrome://browser-region/locale/region.properties"); @@ -462,7 +462,7 @@ pref("browser.tabs.drawInTitlebar", false); pref("browser.tabs.drawInTitlebar", true); #endif -// When tabs opened by links in other tabs via a combination of +// When tabs opened by links in other tabs via a combination of // browser.link.open_newwindow being set to 3 and target="_blank" etc are // closed: // true return to the tab that opened this tab (its owner) @@ -476,7 +476,7 @@ pref("browser.ctrlTab.previews", false); // be exported as HTML to the bookmarks.html file. pref("browser.bookmarks.autoExportHTML", false); -// The maximum number of daily bookmark backups to +// The maximum number of daily bookmark backups to // keep in {PROFILEDIR}/bookmarkbackups. Special values: // -1: unlimited // 0: no backups created (and deletes all existing backups) @@ -489,7 +489,7 @@ pref("javascript.options.showInConsole", true); pref("general.warnOnAboutConfig", false); #endif -// This is the pref to control the location bar, change this to true to +// This is the pref to control the location bar, change this to true to // force this - this makes the origin of popup windows more obvious to avoid // spoofing. We would rather not do it by default because it affects UE for web // applications, but without it there isn't a really good way to prevent chrome @@ -917,7 +917,7 @@ pref("browser.audioFeeds.handler", "ask"); // At startup, if the handler service notices that the version number in the // region.properties file is newer than the version number in the handler // service datastore, it will add any new handlers it finds in the prefs (as -// seeded by this file) to its datastore. +// seeded by this file) to its datastore. pref("gecko.handlerService.defaultHandlersVersion", "chrome://browser-region/locale/region.properties"); // The default set of web-based protocol handlers shown in the application diff --git a/browser/base/content/browser.js b/browser/base/content/browser.js index f6c3bdaf831..2c93704cdc9 100644 --- a/browser/base/content/browser.js +++ b/browser/base/content/browser.js @@ -5560,7 +5560,7 @@ function middleMousePaste(event) { clipboard = stripUnsafeProtocolOnPaste(clipboard); - // if it's not the current tab, we don't need to do anything because the + // if it's not the current tab, we don't need to do anything because the // browser doesn't exist. let where = whereToOpenLink(event, true, false); let lastLocationChange; @@ -6278,10 +6278,10 @@ function warnAboutClosingWindow() { otherPBWindowExists = true; if (win.toolbar.visible) nonPopupPresent = true; - // If the current window is not in private browsing mode we don't need to - // look for other pb windows, we can leave the loop when finding the - // first non-popup window. If however the current window is in private - // browsing mode then we need at least one other pb and one non-popup + // If the current window is not in private browsing mode we don't need to + // look for other pb windows, we can leave the loop when finding the + // first non-popup window. If however the current window is in private + // browsing mode then we need at least one other pb and one non-popup // window to break out early. if ((!isPBWindow || otherPBWindowExists) && nonPopupPresent) break; @@ -7099,7 +7099,7 @@ var gIdentityHandler = { dt.setData("text/html", htmlString); dt.setDragImage(gProxyFavIcon, 16, 16); }, - + handleEvent: function (event) { switch (event.type) { case "blur": diff --git a/browser/base/content/nsContextMenu.js b/browser/base/content/nsContextMenu.js index 99adf4f76de..d7cdd7e830a 100644 --- a/browser/base/content/nsContextMenu.js +++ b/browser/base/content/nsContextMenu.js @@ -1153,7 +1153,7 @@ nsContextMenu.prototype = { urlSecurityCheck(this.target.currentURI.spec, this.principal); // Confirm since it's annoying if you hit this accidentally. - const kDesktopBackgroundURL = + const kDesktopBackgroundURL = "chrome://browser/content/setDesktopBackground.xul"; #ifdef XP_MACOSX // On Mac, the Set Desktop Background window is not modal. @@ -1196,7 +1196,7 @@ nsContextMenu.prototype = { // file picker function saveAsListener() {} saveAsListener.prototype = { - extListener: null, + extListener: null, onStartRequest: function saveLinkAs_onStartRequest(aRequest, aContext) { @@ -1229,17 +1229,17 @@ nsContextMenu.prototype = { return; } - let extHelperAppSvc = + let extHelperAppSvc = Cc["@mozilla.org/uriloader/external-helper-app-service;1"]. getService(Ci.nsIExternalHelperAppService); let channel = aRequest.QueryInterface(Ci.nsIChannel); this.extListener = - extHelperAppSvc.doContent(channel.contentType, aRequest, + extHelperAppSvc.doContent(channel.contentType, aRequest, null, true, window); this.extListener.onStartRequest(aRequest, aContext); - }, + }, - onStopRequest: function saveLinkAs_onStopRequest(aRequest, aContext, + onStopRequest: function saveLinkAs_onStopRequest(aRequest, aContext, aStatusCode) { if (aStatusCode == NS_ERROR_SAVE_LINK_AS_TIMEOUT) { // do it the old fashioned way, which will pick the best filename @@ -1272,12 +1272,12 @@ nsContextMenu.prototype = { channel.cancel(NS_ERROR_SAVE_LINK_AS_TIMEOUT); } throw Cr.NS_ERROR_NO_INTERFACE; - } + } } - // if it we don't have the headers after a short time, the user + // if it we don't have the headers after a short time, the user // won't have received any feedback from their click. that's bad. so - // we give up waiting for the filename. + // we give up waiting for the filename. function timerCallback() {} timerCallback.prototype = { notify: function sLA_timer_notify(aTimer) { @@ -1319,8 +1319,8 @@ nsContextMenu.prototype = { channel.forceAllowThirdPartyCookie = true; } - // fallback to the old way if we don't see the headers quickly - var timeToWait = + // fallback to the old way if we don't see the headers quickly + var timeToWait = gPrefService.getIntPref("browser.download.saveLinkAsFilenameTimeout"); var timer = Cc["@mozilla.org/timer;1"].createInstance(Ci.nsITimer); timer.initWithCallback(new timerCallback(), timeToWait, @@ -1499,7 +1499,7 @@ nsContextMenu.prototype = { // Generate fully qualified URL for clicked-on link. getLinkURL: function() { - var href = this.link.href; + var href = this.link.href; if (href) return href; diff --git a/toolkit/components/viewsource/content/viewPartialSource.js b/toolkit/components/viewsource/content/viewPartialSource.js index 7b8f0b00e39..ba42d26e3cb 100644 --- a/toolkit/components/viewsource/content/viewPartialSource.js +++ b/toolkit/components/viewsource/content/viewPartialSource.js @@ -86,7 +86,7 @@ function viewPartialSourceForSelection(selection) // is _very_ important. // XXXbz wish there were a less hacky way to create an untrusted document here var isHTML = (doc.createElement("div").tagName == "DIV"); - var dataDoc = isHTML ? + var dataDoc = isHTML ? ancestorContainer.ownerDocument.implementation.createHTMLDocument("") : ancestorContainer.ownerDocument.implementation.createDocument("", "", null); ancestorContainer = dataDoc.importNode(ancestorContainer, true); diff --git a/toolkit/components/viewsource/content/viewPartialSource.xul b/toolkit/components/viewsource/content/viewPartialSource.xul index cd90437bbd1..9bb19808b6e 100644 --- a/toolkit/components/viewsource/content/viewPartialSource.xul +++ b/toolkit/components/viewsource/content/viewPartialSource.xul @@ -4,8 +4,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/. - - + + @@ -20,10 +20,10 @@ xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" onload="onLoadViewPartialSource();" contenttitlesetting="true" - title="&mainWindow.title;" - titlemodifier="&mainWindow.titlemodifier;" + title="&mainWindow.title;" + titlemodifier="&mainWindow.titlemodifier;" titlepreface="" - titlemenuseparator ="&mainWindow.titlemodifierseparator;" + titlemenuseparator ="&mainWindow.titlemodifierseparator;" windowtype="navigator:view-source" width="500" height="300" screenX="10" screenY="10" @@ -89,7 +89,7 @@ - + @@ -131,11 +131,11 @@ - - + - @@ -151,7 +151,7 @@ label="&menu_highlightSyntax.label;" accesskey="&menu_highlightSyntax.accesskey;"/> - + diff --git a/toolkit/components/viewsource/content/viewSource.xul b/toolkit/components/viewsource/content/viewSource.xul index 5cbc8ae06f9..b8d81843da2 100644 --- a/toolkit/components/viewsource/content/viewSource.xul +++ b/toolkit/components/viewsource/content/viewSource.xul @@ -4,7 +4,7 @@ # 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/. - + @@ -21,10 +21,10 @@