Merge branch '3.0'

Conflicts:
	chrome/content/zotero/xpcom/translation/translate_firefox.js
	install.rdf
	update.rdf
This commit is contained in:
Simon Kornblith 2012-10-29 18:04:42 -04:00
commit 1bc98edba4
6 changed files with 16 additions and 30 deletions

@ -1 +1 @@
Subproject commit 36d26a584ac869f2dfbdd528f57141a3bbcf016f Subproject commit 92270bbba9fb59a57042003a7637afc8e694a94f

View file

@ -41,18 +41,6 @@ const ZoteroStandalone = new function() {
ZoteroPane.init(); ZoteroPane.init();
ZoteroPane.makeVisible(); ZoteroPane.makeVisible();
// Run check for corrupt installation, where the wrong Gecko runtime is being used
if(Zotero.isMac && Zotero.isStandalone) {
var greDir = Components.classes["@mozilla.org/file/directory_service;1"]
.getService(Components.interfaces.nsIProperties)
.get("GreD", Components.interfaces.nsIFile);
if(greDir.isSymlink() || greDir.leafName !== "Current") {
var ps = Components.classes["@mozilla.org/embedcomp/prompt-service;1"]
.getService(Components.interfaces.nsIPromptService);
ps.alert(null, "", Zotero.getString('standalone.corruptInstallation'));
}
}
// Don't ask before handing http and https URIs // Don't ask before handing http and https URIs
var eps = Components.classes['@mozilla.org/uriloader/external-protocol-service;1'] var eps = Components.classes['@mozilla.org/uriloader/external-protocol-service;1']
.getService(Components.interfaces.nsIExternalProtocolService); .getService(Components.interfaces.nsIExternalProtocolService);

View file

@ -667,8 +667,9 @@ Zotero.HTTP = new function() {
* @inner * @inner
*/ */
var onLoad = function() { var onLoad = function() {
var doc = hiddenBrowser.contentDocument, var doc = hiddenBrowser.contentDocument;
url = doc.location.href.toString(); if(!doc) return;
var url = doc.location.href.toString();
if(url == "about:blank") return; if(url == "about:blank") return;
if(doc.readyState === "loading" && firedLoadEvent < 120) { if(doc.readyState === "loading" && firedLoadEvent < 120) {
// Try again in a second // Try again in a second

View file

@ -402,14 +402,13 @@ Zotero.Translate.SandboxManager = function(sandboxLocation) {
this.sandbox.DOMParser = function() { this.sandbox.DOMParser = function() {
var uri, principal; var uri, principal;
// get URI // get URI
// DEBUG: In Fx 4 we can just use document.nodePrincipal, but in Fx 3.6 this doesn't work
if(typeof sandboxLocation === "string") { // if sandbox specified by URI if(typeof sandboxLocation === "string") { // if sandbox specified by URI
// if sandbox specified by URI, get codebase principal from security manager
var secMan = Services.scriptSecurityManager; var secMan = Services.scriptSecurityManager;
principal = (secMan.getCodebasePrincipal || secMan.getSimpleCodebasePrincipal) uri = Services.io.newURI(sandboxLocation, "UTF-8", null);
(Services.io.newURI(sandboxLocation, "UTF-8", null)); principal = (secMan.getCodebasePrincipal || secMan.getSimpleCodebasePrincipal)(uri);
} else { // if sandbox specified by DOM document } else { // if sandbox specified by DOM document
uri = sandboxLocation.document.nodePrincipal; principal = sandboxLocation.document.nodePrincipal;
uri = sandboxLocation.document.documentURIObject;
} }
// initialize DOM parser // initialize DOM parser
@ -419,13 +418,11 @@ Zotero.Translate.SandboxManager = function(sandboxLocation) {
// expose parseFromString // expose parseFromString
this.__exposedProps__ = {"parseFromString":"r"}; this.__exposedProps__ = {"parseFromString":"r"};
if(Zotero.isFx5) {
this.parseFromString = function(str, contentType) { this.parseFromString = function(str, contentType) {
return Zotero.Translate.DOMWrapper.wrap(_DOMParser.parseFromString(str, contentType)); return Zotero.Translate.SandboxManager.Fx5DOMWrapper(_DOMParser.parseFromString(str, contentType));
}
}
} }
}; };
}
this.sandbox.DOMParser.__exposedProps__ = {"prototype":"r"}; this.sandbox.DOMParser.__exposedProps__ = {"prototype":"r"};
this.sandbox.DOMParser.prototype = {}; this.sandbox.DOMParser.prototype = {};
this.sandbox.XMLSerializer = function() { this.sandbox.XMLSerializer = function() {

View file

@ -24,8 +24,8 @@
<em:targetApplication> <em:targetApplication>
<Description> <Description>
<em:id>{ec8030f7-c20a-464f-9b0e-13a3a9e97384}</em:id> <em:id>{ec8030f7-c20a-464f-9b0e-13a3a9e97384}</em:id>
<em:minVersion>5</em:minVersion> <em:minVersion>5.0</em:minVersion>
<em:maxVersion>15.0a1</em:maxVersion> <em:maxVersion>19.0a1</em:maxVersion>
</Description> </Description>
</em:targetApplication> </em:targetApplication>

View file

@ -11,8 +11,8 @@
<targetApplication> <targetApplication>
<RDF:Description> <RDF:Description>
<id>{ec8030f7-c20a-464f-9b0e-13a3a9e97384}</id> <id>{ec8030f7-c20a-464f-9b0e-13a3a9e97384}</id>
<minVersion>5</minVersion> <minVersion>5.0</minVersion>
<maxVersion>15.0a1</maxVersion> <maxVersion>19.0a1</maxVersion>
<updateLink>http://download.zotero.org/extension/zotero.xpi</updateLink> <updateLink>http://download.zotero.org/extension/zotero.xpi</updateLink>
<updateHash>sha1:</updateHash> <updateHash>sha1:</updateHash>
</RDF:Description> </RDF:Description>