diff options
Diffstat (limited to 'application')
-rw-r--r-- | application/palemoon/base/content/openLocation.js | 2 | ||||
-rw-r--r-- | application/palemoon/base/content/urlbarBindings.xml | 4 | ||||
-rw-r--r-- | application/palemoon/base/content/utilityOverlay.js | 2 | ||||
-rw-r--r-- | application/palemoon/components/feeds/FeedWriter.js | 2 | ||||
-rw-r--r-- | application/palemoon/components/nsBrowserGlue.js | 67 | ||||
-rw-r--r-- | application/palemoon/components/sessionstore/SessionStore.jsm | 30 | ||||
-rw-r--r-- | application/palemoon/themes/linux/Push-16.png | bin | 606 -> 0 bytes | |||
-rw-r--r-- | application/palemoon/themes/linux/Push-64.png | bin | 8056 -> 0 bytes | |||
-rw-r--r-- | application/palemoon/themes/linux/browser.css | 4 | ||||
-rw-r--r-- | application/palemoon/themes/osx/Push-16.png | bin | 312 -> 0 bytes | |||
-rw-r--r-- | application/palemoon/themes/osx/Push-64.png | bin | 8490 -> 0 bytes | |||
-rw-r--r-- | application/palemoon/themes/osx/browser.css | 4 |
12 files changed, 57 insertions, 58 deletions
diff --git a/application/palemoon/base/content/openLocation.js b/application/palemoon/base/content/openLocation.js index 1a10334c7..f39e34666 100644 --- a/application/palemoon/base/content/openLocation.js +++ b/application/palemoon/base/content/openLocation.js @@ -83,7 +83,7 @@ function open() var flags = webNav.LOAD_FLAGS_ALLOW_THIRD_PARTY_FIXUP | webNav.LOAD_FLAGS_FIXUP_SCHEME_TYPOS; if (!mayInheritPrincipal) - flags |= webNav.LOAD_FLAGS_DISALLOW_INHERIT_OWNER; + flags |= webNav.LOAD_FLAGS_DISALLOW_INHERIT_PRINCIPAL; browser.gBrowser.loadURIWithFlags(url, flags, null, null, postData); break; case "1": diff --git a/application/palemoon/base/content/urlbarBindings.xml b/application/palemoon/base/content/urlbarBindings.xml index 985769ec2..d188e6658 100644 --- a/application/palemoon/base/content/urlbarBindings.xml +++ b/application/palemoon/base/content/urlbarBindings.xml @@ -305,12 +305,12 @@ function loadCurrent() { let flags = Ci.nsIWebNavigation.LOAD_FLAGS_ALLOW_THIRD_PARTY_FIXUP; - // Pass LOAD_FLAGS_DISALLOW_INHERIT_OWNER to prevent any loads from + // Pass LOAD_FLAGS_DISALLOW_INHERIT_PRINCIPAL to prevent any loads from // inheriting the currently loaded document's principal, unless this // URL is marked as safe to inherit (e.g. came from a bookmark // keyword). if (!mayInheritPrincipal) - flags |= Ci.nsIWebNavigation.LOAD_FLAGS_DISALLOW_INHERIT_OWNER; + flags |= Ci.nsIWebNavigation.LOAD_FLAGS_DISALLOW_INHERIT_PRINCIPAL; // If the value wasn't typed, we know that we decoded the value as // UTF-8 (see losslessDecodeURI) if (!this.valueIsTyped) diff --git a/application/palemoon/base/content/utilityOverlay.js b/application/palemoon/base/content/utilityOverlay.js index 9763891ba..633cb8853 100644 --- a/application/palemoon/base/content/utilityOverlay.js +++ b/application/palemoon/base/content/utilityOverlay.js @@ -333,7 +333,7 @@ function openLinkIn(url, where, params) { flags |= Ci.nsIWebNavigation.LOAD_FLAGS_FIXUP_SCHEME_TYPOS; } if (aDisallowInheritPrincipal) - flags |= Ci.nsIWebNavigation.LOAD_FLAGS_DISALLOW_INHERIT_OWNER; + flags |= Ci.nsIWebNavigation.LOAD_FLAGS_DISALLOW_INHERIT_PRINCIPAL; if (aForceAllowDataURI) { flags |= Ci.nsIWebNavigation.LOAD_FLAGS_FORCE_ALLOW_DATA_URI; } diff --git a/application/palemoon/components/feeds/FeedWriter.js b/application/palemoon/components/feeds/FeedWriter.js index cbb146564..2ae31dffa 100644 --- a/application/palemoon/components/feeds/FeedWriter.js +++ b/application/palemoon/components/feeds/FeedWriter.js @@ -1173,7 +1173,7 @@ FeedWriter.prototype = { var secman = Cc["@mozilla.org/scriptsecuritymanager;1"]. getService(Ci.nsIScriptSecurityManager); - this._feedPrincipal = secman.getSimpleCodebasePrincipal(this._feedURI); + this._feedPrincipal = secman.createCodebasePrincipal(this._feedURI, {}); LOG("Subscribe Preview: feed uri = " + this._window.location.href); diff --git a/application/palemoon/components/nsBrowserGlue.js b/application/palemoon/components/nsBrowserGlue.js index d6bdfd642..aa24d88ef 100644 --- a/application/palemoon/components/nsBrowserGlue.js +++ b/application/palemoon/components/nsBrowserGlue.js @@ -13,7 +13,11 @@ const XULNS = "http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"; Cu.import("resource://gre/modules/XPCOMUtils.jsm"); Cu.import("resource://gre/modules/Services.jsm"); -// Define Lazy Module Gitters +// Define Lazy Service Getters +XPCOMUtils.defineLazyServiceGetter(this, "AlertsService", + "@mozilla.org/alerts-service;1", "nsIAlertsService"); + +// Define Lazy Module Getters [ ["AddonManager", "resource://gre/modules/AddonManager.jsm"], ["NetUtil", "resource://gre/modules/NetUtil.jsm"], @@ -40,8 +44,15 @@ Cu.import("resource://gre/modules/Services.jsm"); ["ShellService", "resource:///modules/ShellService.jsm"], ].forEach(([name, resource]) => XPCOMUtils.defineLazyModuleGetter(this, name, resource)); -XPCOMUtils.defineLazyServiceGetter(this, "AlertsService", - "@mozilla.org/alerts-service;1", "nsIAlertsService"); +// Define Lazy Getters + +XPCOMUtils.defineLazyGetter(this, "gBrandBundle", function() { + return Services.strings.createBundle('chrome://branding/locale/brand.properties'); +}); + +XPCOMUtils.defineLazyGetter(this, "gBrowserBundle", function() { + return Services.strings.createBundle('chrome://browser/locale/browser.properties'); +}); const PREF_PLUGINS_NOTIFYUSER = "plugins.update.notifyUser"; const PREF_PLUGINS_UPDATEURL = "plugins.update.url"; @@ -464,9 +475,7 @@ BrowserGlue.prototype = { if (!win) return; - let productName = Services.strings - .createBundle("chrome://branding/locale/brand.properties") - .GetStringFromName("brandFullName"); + let productName = gBrandBundle.GetStringFromName("brandFullName"); let message = win.gNavigatorBundle.getFormattedString("slowStartup.message", [productName]); let buttons = [ @@ -713,9 +722,8 @@ BrowserGlue.prototype = { let prompt = Services.prompt; let quitBundle = Services.strings.createBundle("chrome://browser/locale/quitDialog.properties"); - let brandBundle = Services.strings.createBundle("chrome://branding/locale/brand.properties"); - let appName = brandBundle.GetStringFromName("brandShortName"); + let appName = gBrandBundle.GetStringFromName("brandShortName"); let quitDialogTitle = quitBundle.formatStringFromName("quitDialogTitle", [appName], 1); let neverAskText = quitBundle.GetStringFromName("neverAsk2"); @@ -792,9 +800,7 @@ BrowserGlue.prototype = { var formatter = Cc["@mozilla.org/toolkit/URLFormatterService;1"]. getService(Ci.nsIURLFormatter); - var browserBundle = Services.strings.createBundle("chrome://browser/locale/browser.properties"); - var brandBundle = Services.strings.createBundle("chrome://branding/locale/brand.properties"); - var appName = brandBundle.GetStringFromName("brandShortName"); + var appName = gBrandBundle.GetStringFromName("brandShortName"); function getNotifyString(aPropData) { var propValue = update.getProperty(aPropData.propName); @@ -802,11 +808,11 @@ BrowserGlue.prototype = { if (aPropData.prefName) propValue = formatter.formatURLPref(aPropData.prefName); else if (aPropData.stringParams) - propValue = browserBundle.formatStringFromName(aPropData.stringName, - aPropData.stringParams, - aPropData.stringParams.length); + propValue = gBrowserBundle.formatStringFromName(aPropData.stringName, + aPropData.stringParams, + aPropData.stringParams.length); else - propValue = browserBundle.GetStringFromName(aPropData.stringName); + propValue = gBrowserBundle.GetStringFromName(aPropData.stringName); } return propValue; } @@ -1167,8 +1173,7 @@ BrowserGlue.prototype = { * Show the notificationBox for a locked places database. */ _showPlacesLockedNotificationBox: function BG__showPlacesLockedNotificationBox() { - var brandBundle = Services.strings.createBundle("chrome://branding/locale/brand.properties"); - var applicationName = brandBundle.GetStringFromName("brandShortName"); + var applicationName = gBrandBundle.GetStringFromName("brandShortName"); var placesBundle = Services.strings.createBundle("chrome://browser/locale/places/places.properties"); var title = placesBundle.GetStringFromName("lockPrompt.title"); var text = placesBundle.formatStringFromName("lockPrompt.text", [applicationName], 1); @@ -1736,8 +1741,6 @@ ContentPermissionPrompt.prototype = { popup.remove(); } - var browserBundle = Services.strings.createBundle("chrome://browser/locale/browser.properties"); - var requestingWindow = aRequest.window.top; var chromeWin = this._getChromeWindow(requestingWindow).wrappedJSObject; var browser = chromeWin.gBrowser.getBrowserForDocument(requestingWindow.document); @@ -1763,8 +1766,8 @@ ContentPermissionPrompt.prototype = { } var action = { - label: browserBundle.GetStringFromName(promptAction.stringId), - accessKey: browserBundle.GetStringFromName(promptAction.stringId + ".accesskey"), + label: gBrowserBundle.GetStringFromName(promptAction.stringId), + accessKey: gBrowserBundle.GetStringFromName(promptAction.stringId + ".accesskey"), callback: function() { if (promptAction.callback) { promptAction.callback(); @@ -1823,7 +1826,6 @@ ContentPermissionPrompt.prototype = { }, _promptGeo : function(aRequest) { - var browserBundle = Services.strings.createBundle("chrome://browser/locale/browser.properties"); var requestingURI = aRequest.principal.URI; var message; @@ -1839,11 +1841,11 @@ ContentPermissionPrompt.prototype = { }]; if (requestingURI.schemeIs("file")) { - message = browserBundle.formatStringFromName("geolocation.shareWithFile", - [requestingURI.path], 1); + message = gBrowserBundle.formatStringFromName("geolocation.shareWithFile", + [requestingURI.path], 1); } else { - message = browserBundle.formatStringFromName("geolocation.shareWithSite", - [requestingURI.host], 1); + message = gBrowserBundle.formatStringFromName("geolocation.shareWithSite", + [requestingURI.host], 1); // Always share location action. actions.push({ stringId: "geolocation.alwaysShareLocation", @@ -1874,11 +1876,10 @@ ContentPermissionPrompt.prototype = { }, _promptWebNotifications : function(aRequest) { - var browserBundle = Services.strings.createBundle("chrome://browser/locale/browser.properties"); var requestingURI = aRequest.principal.URI; - var message = browserBundle.formatStringFromName("webNotifications.showFromSite", - [requestingURI.host], 1); + var message = gBrowserBundle.formatStringFromName("webNotifications.showFromSite", + [requestingURI.host], 1); var actions; @@ -1926,14 +1927,12 @@ ContentPermissionPrompt.prototype = { }, _promptPointerLock: function CPP_promtPointerLock(aRequest, autoAllow) { - - let browserBundle = Services.strings.createBundle("chrome://browser/locale/browser.properties"); let requestingURI = aRequest.principal.URI; let originString = requestingURI.schemeIs("file") ? requestingURI.path : requestingURI.host; - let message = browserBundle.formatStringFromName(autoAllow ? - "pointerLock.autoLock.title2" : "pointerLock.title2", - [originString], 1); + let message = gBrowserBundle.formatStringFromName(autoAllow ? + "pointerLock.autoLock.title2" : "pointerLock.title2", + [originString], 1); // If this is an autoAllow info prompt, offer no actions. // _showPrompt() will allow the request when it's dismissed. let actions = []; diff --git a/application/palemoon/components/sessionstore/SessionStore.jsm b/application/palemoon/components/sessionstore/SessionStore.jsm index b8d126e21..4f95f10a7 100644 --- a/application/palemoon/components/sessionstore/SessionStore.jsm +++ b/application/palemoon/components/sessionstore/SessionStore.jsm @@ -2085,7 +2085,7 @@ var SessionStoreInternal = { } catch (ex) { debug(ex); } // POSTDATA is tricky - especially since some extensions don't get it right - if (aEntry.owner) { + if (aEntry.triggeringPrincipal) { // Not catching anything specific here, just possible errors // from writeCompoundObject and the like. try { @@ -2094,19 +2094,19 @@ var SessionStoreInternal = { var pipe = Cc["@mozilla.org/pipe;1"].createInstance(Ci.nsIPipe); pipe.init(false, false, 0, 0xffffffff, null); binaryStream.setOutputStream(pipe.outputStream); - binaryStream.writeCompoundObject(aEntry.owner, Ci.nsISupports, true); + binaryStream.writeCompoundObject(aEntry.triggeringPrincipal, Ci.nsIPrincipal, true); binaryStream.close(); // Now we want to read the data from the pipe's input end and encode it. var scriptableStream = Cc["@mozilla.org/binaryinputstream;1"]. createInstance(Ci.nsIBinaryInputStream); scriptableStream.setInputStream(pipe.inputStream); - var ownerBytes = + var triggeringPrincipalBytes = scriptableStream.readByteArray(scriptableStream.available()); // We can stop doing base64 encoding once our serialization into JSON // is guaranteed to handle all chars in strings, including embedded // nulls. - entry.owner_b64 = btoa(String.fromCharCode.apply(null, ownerBytes)); + entry.triggeringPrincipal_b64 = btoa(String.fromCharCode.apply(null, triggeringPrincipalBytes)); } catch (ex) { debug(ex); } } @@ -3400,16 +3400,24 @@ var SessionStoreInternal = { } } - if (aEntry.owner_b64) { - var ownerInput = Cc["@mozilla.org/io/string-input-stream;1"]. - createInstance(Ci.nsIStringInputStream); - var binaryData = atob(aEntry.owner_b64); - ownerInput.setData(binaryData, binaryData.length); + // The field aEntry.owner_b64 got renamed to aEntry.triggeringPricipal_b64 in + // Bug 1286472. To remain backward compatible we still have to support that + // field for a few cycles before we can remove it within Bug 1289785. + if (aEntry.owner_b64) { + aEntry.triggeringPrincipal_b64 = aEntry.owner_b64; + delete aEntry.owner_b64; + } + + if (aEntry.triggeringPrincipal_b64) { + var triggeringPrincipalInput = Cc["@mozilla.org/io/string-input-stream;1"]. + createInstance(Ci.nsIStringInputStream); + var binaryData = atob(aEntry.triggeringPrincipal_b64); + triggeringPrincipalInput.setData(binaryData, binaryData.length); var binaryStream = Cc["@mozilla.org/binaryinputstream;1"]. createInstance(Ci.nsIObjectInputStream); - binaryStream.setInputStream(ownerInput); + binaryStream.setInputStream(triggeringPrincipalInput); try { // Catch possible deserialization exceptions - shEntry.owner = binaryStream.readObject(true); + shEntry.triggeringPrincipal = binaryStream.readObject(true); } catch (ex) { debug(ex); } } diff --git a/application/palemoon/themes/linux/Push-16.png b/application/palemoon/themes/linux/Push-16.png Binary files differdeleted file mode 100644 index 082b17781..000000000 --- a/application/palemoon/themes/linux/Push-16.png +++ /dev/null diff --git a/application/palemoon/themes/linux/Push-64.png b/application/palemoon/themes/linux/Push-64.png Binary files differdeleted file mode 100644 index 6e09ab9c3..000000000 --- a/application/palemoon/themes/linux/Push-64.png +++ /dev/null diff --git a/application/palemoon/themes/linux/browser.css b/application/palemoon/themes/linux/browser.css index 131a63a90..43fd637fb 100644 --- a/application/palemoon/themes/linux/browser.css +++ b/application/palemoon/themes/linux/browser.css @@ -1292,10 +1292,6 @@ toolbar[iconsize="small"] #webrtc-status-button { list-style-image: url(chrome://browser/skin/Geolocation-16.png); } -#push-notification-icon { - list-style-image: url(chrome://browser/skin/Push-16.png); -} - #addons-notification-icon { list-style-image: url(chrome://mozapps/skin/extensions/extensionGeneric-16.png); } diff --git a/application/palemoon/themes/osx/Push-16.png b/application/palemoon/themes/osx/Push-16.png Binary files differdeleted file mode 100644 index 54ef8f8ea..000000000 --- a/application/palemoon/themes/osx/Push-16.png +++ /dev/null diff --git a/application/palemoon/themes/osx/Push-64.png b/application/palemoon/themes/osx/Push-64.png Binary files differdeleted file mode 100644 index 099b9c76f..000000000 --- a/application/palemoon/themes/osx/Push-64.png +++ /dev/null diff --git a/application/palemoon/themes/osx/browser.css b/application/palemoon/themes/osx/browser.css index 58443fa76..d5feadf29 100644 --- a/application/palemoon/themes/osx/browser.css +++ b/application/palemoon/themes/osx/browser.css @@ -1975,10 +1975,6 @@ toolbarbutton.bookmark-item[dragover="true"][open="true"] { list-style-image: url(chrome://browser/skin/Geolocation-16.png); } -#push-notification-icon { - list-style-image: url(chrome://browser/skin/Push-16.png); -} - #addons-notification-icon { list-style-image: url(chrome://mozapps/skin/extensions/extensionGeneric-16.png); } |