summaryrefslogtreecommitdiffstats
path: root/application/palemoon/components
diff options
context:
space:
mode:
Diffstat (limited to 'application/palemoon/components')
-rw-r--r--application/palemoon/components/feeds/FeedWriter.js20
-rw-r--r--application/palemoon/components/places/PlacesUIUtils.jsm40
-rw-r--r--application/palemoon/components/places/content/bookmarkProperties.js5
-rw-r--r--application/palemoon/components/places/content/controller.js17
-rw-r--r--application/palemoon/components/preferences/security.xul19
5 files changed, 62 insertions, 39 deletions
diff --git a/application/palemoon/components/feeds/FeedWriter.js b/application/palemoon/components/feeds/FeedWriter.js
index 2ae31dffa..d704835bb 100644
--- a/application/palemoon/components/feeds/FeedWriter.js
+++ b/application/palemoon/components/feeds/FeedWriter.js
@@ -692,21 +692,6 @@ FeedWriter.prototype = {
},
/**
- * Get moz-icon url for a file
- * @param file
- * A nsIFile object for which the moz-icon:// is returned
- * @returns moz-icon url of the given file as a string
- */
- _getFileIconURL: function FW__getFileIconURL(file) {
- var ios = Cc["@mozilla.org/network/io-service;1"].
- getService(Ci.nsIIOService);
- var fph = ios.getProtocolHandler("file")
- .QueryInterface(Ci.nsIFileProtocolHandler);
- var urlSpec = fph.getURLSpecFromFile(file);
- return "moz-icon://" + urlSpec + "?size=16";
- },
-
- /**
* Helper method to set the selected application and system default
* reader menuitems details from a file object
* @param aMenuItem
@@ -717,7 +702,10 @@ FeedWriter.prototype = {
_initMenuItemWithFile: function(aMenuItem, aFile) {
this._contentSandbox.menuitem = aMenuItem;
this._contentSandbox.label = this._getFileDisplayName(aFile);
- this._contentSandbox.image = this._getFileIconURL(aFile);
+ // For security reasons, access to moz-icon:file://... URIs is
+ // no longer allowed (indirect file system access from content).
+ // We use a dummy application instead to get a generic icon.
+ this._contentSandbox.image = "moz-icon://dummy.exe?size=16";
var codeStr = "menuitem.setAttribute('label', label); " +
"menuitem.setAttribute('image', image);"
Cu.evalInSandbox(codeStr, this._contentSandbox);
diff --git a/application/palemoon/components/places/PlacesUIUtils.jsm b/application/palemoon/components/places/PlacesUIUtils.jsm
index f62535613..05d79241c 100644
--- a/application/palemoon/components/places/PlacesUIUtils.jsm
+++ b/application/palemoon/components/places/PlacesUIUtils.jsm
@@ -146,14 +146,21 @@ this.PlacesUIUtils = {
* annotations are synced from the old one.
* @see this._copyableAnnotations for the list of copyable annotations.
*/
- _getFolderCopyTransaction:
- function PUIU__getFolderCopyTransaction(aData, aContainer, aIndex)
- {
- function getChildItemsTransactions(aChildren)
- {
+ _getFolderCopyTransaction(aData, aContainer, aIndex) {
+ function getChildItemsTransactions(aRoot) {
let transactions = [];
let index = aIndex;
- aChildren.forEach(function (node, i) {
+ for (let i = 0; i < aRoot.childCount; ++i) {
+ let child = aRoot.getChild(i);
+ // Temporary hacks until we switch to PlacesTransactions.jsm.
+ let isLivemark =
+ PlacesUtils.annotations.itemHasAnnotation(child.itemId,
+ PlacesUtils.LMANNO_FEEDURI);
+ let [node] = PlacesUtils.unwrapNodes(
+ PlacesUtils.wrapNode(child, PlacesUtils.TYPE_X_MOZ_PLACE, isLivemark),
+ PlacesUtils.TYPE_X_MOZ_PLACE
+ );
+
// Make sure that items are given the correct index, this will be
// passed by the transaction manager to the backend for the insertion.
// Insertion behaves differently for DEFAULT_INDEX (append).
@@ -184,19 +191,21 @@ this.PlacesUIUtils = {
else {
throw new Error("Unexpected item under a bookmarks folder");
}
- });
+ }
return transactions;
}
- if (aContainer == PlacesUtils.tagsFolderId) { // Copying a tag folder.
+ if (aContainer == PlacesUtils.tagsFolderId) { // Copying into a tag folder.
let transactions = [];
- if (aData.children) {
- aData.children.forEach(function(aChild) {
+ if (!aData.livemark && aData.type == PlacesUtils.TYPE_X_MOZ_PLACE_CONTAINER) {
+ let {root} = PlacesUtils.getFolderContents(aData.id, false, false);
+ let urls = PlacesUtils.getURLsForContainerNode(root);
+ root.containerOpen = false;
+ for (let { uri } of urls) {
transactions.push(
- new PlacesTagURITransaction(PlacesUtils._uri(aChild.uri),
- [aData.title])
+ new PlacesTagURITransaction(NetUtil.newURI(uri), [aData.title])
);
- });
+ }
}
return new PlacesAggregatedTransaction("addTags", transactions);
}
@@ -205,7 +214,10 @@ this.PlacesUIUtils = {
return this._getLivemarkCopyTransaction(aData, aContainer, aIndex);
}
- let transactions = getChildItemsTransactions(aData.children);
+ let {root} = PlacesUtils.getFolderContents(aData.id, false, false);
+ let transactions = getChildItemsTransactions(root);
+ root.containerOpen = false;
+
if (aData.dateAdded) {
transactions.push(
new PlacesEditItemDateAddedTransaction(null, aData.dateAdded)
diff --git a/application/palemoon/components/places/content/bookmarkProperties.js b/application/palemoon/components/places/content/bookmarkProperties.js
index 685ef57d2..e1d1077ab 100644
--- a/application/palemoon/components/places/content/bookmarkProperties.js
+++ b/application/palemoon/components/places/content/bookmarkProperties.js
@@ -382,6 +382,11 @@ var BookmarkPropertiesPanel = {
.addEventListener("input", this, false);
}
}
+
+ // Ensure the Name Picker textbox is focused on load
+ var namePickerElem = document.getElementById('editBMPanel_namePicker');
+ namePickerElem.focus();
+ namePickerElem.select();
}),
// nsIDOMEventListener
diff --git a/application/palemoon/components/places/content/controller.js b/application/palemoon/components/places/content/controller.js
index 7f27e8347..7f5f7f652 100644
--- a/application/palemoon/components/places/content/controller.js
+++ b/application/palemoon/components/places/content/controller.js
@@ -1287,15 +1287,15 @@ PlacesController.prototype = {
if (!didSuppressNotifications)
result.suppressNotifications = true;
- function addData(type, index, overrideURI) {
- let wrapNode = PlacesUtils.wrapNode(node, type, overrideURI, doCopy);
+ function addData(type, index, feedURI) {
+ let wrapNode = PlacesUtils.wrapNode(node, type, feedURI);
dt.mozSetDataAt(type, wrapNode, index);
}
- function addURIData(index, overrideURI) {
- addData(PlacesUtils.TYPE_X_MOZ_URL, index, overrideURI);
- addData(PlacesUtils.TYPE_UNICODE, index, overrideURI);
- addData(PlacesUtils.TYPE_HTML, index, overrideURI);
+ function addURIData(index, feedURI) {
+ addData(PlacesUtils.TYPE_X_MOZ_URL, index, feedURI);
+ addData(PlacesUtils.TYPE_UNICODE, index, feedURI);
+ addData(PlacesUtils.TYPE_HTML, index, feedURI);
}
try {
@@ -1387,12 +1387,11 @@ PlacesController.prototype = {
copiedFolders.push(node);
let livemarkInfo = this.getCachedLivemarkInfo(node);
- let overrideURI = livemarkInfo ? livemarkInfo.feedURI.spec : null;
- let resolveShortcuts = !PlacesControllerDragHelper.canMoveNode(node);
+ let feedURI = livemarkInfo && livemarkInfo.feedURI.spec;
contents.forEach(function (content) {
content.entries.push(
- PlacesUtils.wrapNode(node, content.type, overrideURI, resolveShortcuts)
+ PlacesUtils.wrapNode(node, content.type, feedURI)
);
});
}, this);
diff --git a/application/palemoon/components/preferences/security.xul b/application/palemoon/components/preferences/security.xul
index d3d321b16..b12946f2a 100644
--- a/application/palemoon/components/preferences/security.xul
+++ b/application/palemoon/components/preferences/security.xul
@@ -50,6 +50,15 @@
name="security.cert_pinning.enforcement_level"
type="int"/>
+ <!-- Opportunistic Encryption -->
+
+ <preference id="network.http.upgrade-insecure-requests"
+ name="network.http.upgrade-insecure-requests"
+ type="bool"/>
+ <preference id="network.http.altsvc.oe"
+ name="network.http.altsvc.oe"
+ type="bool"/>
+
<!-- XSS Filter -->
<!--
<preference id="security.xssfilter.enable" name="security.xssfilter.enable" type="bool"/>
@@ -144,6 +153,16 @@
oncommand="gSecurityPane.updateHPKPPref();"/>
</vbox>
</groupbox>
+
+ <groupbox id="OpportunisticEncryption">
+ <caption label="&OpEnc.label;"/>
+ <checkbox id="enableUIROpEnc"
+ label="&enableUIROpEnc.label;"
+ preference="network.http.upgrade-insecure-requests" />
+ <checkbox id="enableAltSvcOpEnc"
+ label="&enableAltSvcOpEnc.label;"
+ preference="network.http.altsvc.oe" />
+ </groupbox>
<!-- XSS Filter -->
<!--