summaryrefslogtreecommitdiffstats
path: root/toolkit
diff options
context:
space:
mode:
Diffstat (limited to 'toolkit')
-rw-r--r--toolkit/components/prompts/content/commonDialog.js2
-rw-r--r--toolkit/components/search/orginal/nsSearchService.js20
-rw-r--r--toolkit/content/browser-content.js29
-rw-r--r--toolkit/content/jar.mn2
-rw-r--r--toolkit/content/widgets/findbar.xml5
-rw-r--r--toolkit/mozapps/extensions/internal/AddonUpdateChecker.jsm11
6 files changed, 59 insertions, 10 deletions
diff --git a/toolkit/components/prompts/content/commonDialog.js b/toolkit/components/prompts/content/commonDialog.js
index ef4686654..70b373d1f 100644
--- a/toolkit/components/prompts/content/commonDialog.js
+++ b/toolkit/components/prompts/content/commonDialog.js
@@ -50,8 +50,6 @@ function commonDialogOnLoad() {
Dialog = new CommonDialog(args, ui);
Dialog.onLoad(dialog);
- // resize the window to the content
- window.sizeToContent();
window.getAttention();
}
diff --git a/toolkit/components/search/orginal/nsSearchService.js b/toolkit/components/search/orginal/nsSearchService.js
index 56d378b39..8d81e1a27 100644
--- a/toolkit/components/search/orginal/nsSearchService.js
+++ b/toolkit/components/search/orginal/nsSearchService.js
@@ -2237,7 +2237,10 @@ Engine.prototype = {
get lazySerializeTask() {
if (!this._lazySerializeTask) {
let task = function taskCallback() {
- this._serializeToFile();
+ // This check should be done by caller, but it is better to be safe than sorry.
+ if (!this._readOnly && this._file) {
+ this._serializeToFile();
+ }
}.bind(this);
this._lazySerializeTask = new DeferredTask(task, LAZY_SERIALIZE_DELAY);
}
@@ -2245,6 +2248,17 @@ Engine.prototype = {
return this._lazySerializeTask;
},
+ // This API is required by some search engine management extensions, so let's restore it.
+ // Old API was using a timer to do its work, but this can lead us too far. If extension is
+ // rely on such subtle internal details, that extension should be fixed, not browser.
+ _lazySerializeToFile: function SRCH_ENG_lazySerializeToFile() {
+ // This check should be done by caller, but it is better to be safe than sorry.
+ // Besides, we don't have to create a task for r/o or non-file engines.
+ if (!this._readOnly && this._file) {
+ this.lazySerializeTask.arm();
+ }
+ },
+
/**
* Serializes the engine object to file.
*/
@@ -3058,6 +3072,10 @@ SearchService.prototype = {
continue;
}
+ // Write out serialized search engine files when rebuilding cache.
+ // Do it lazily, to: 1) reuse existing API; 2) make browser interface more responsive
+ engine._lazySerializeToFile();
+
let cacheKey = parent.path;
if (!cache.directories[cacheKey]) {
let cacheEntry = {};
diff --git a/toolkit/content/browser-content.js b/toolkit/content/browser-content.js
index 2276f8a0d..e1114672c 100644
--- a/toolkit/content/browser-content.js
+++ b/toolkit/content/browser-content.js
@@ -841,6 +841,35 @@ var FindBar = {
fakeEvent[k] = event[k];
}
}
+#ifdef MC_PALEMOON
+ let findBarId = "FindToolbar";
+ // The FindBar is in the chrome window's context, not in tabbrowser
+ // - see also bug 537013
+ let chromeWin = null;
+ try {
+ chromeWin = content
+ .QueryInterface(Ci.nsIInterfaceRequestor)
+ .getInterface(Ci.nsIWebNavigation)
+ .QueryInterface(Ci.nsIDocShellTreeItem)
+ .rootTreeItem
+ .QueryInterface(Ci.nsIInterfaceRequestor)
+ .getInterface(Ci.nsIDOMWindow)
+ .QueryInterface(Ci.nsIDOMChromeWindow);
+ } catch (e) {
+ Cu.reportError(
+ "The FindBar - the chrome window's context was not detected:\n" + e);
+ }
+ if (chromeWin && chromeWin.document.getElementById(findBarId)) {
+ try {
+ chromeWin.document.getElementById(findBarId)
+ .browser = Services.wm.getMostRecentWindow("navigator:browser")
+ .gBrowser.mCurrentBrowser;
+ } catch (e) {
+ Cu.reportError(
+ "The FindBar - cannot set the property 'browser':\n" + e);
+ }
+ }
+#endif
// sendSyncMessage returns an array of the responses from all listeners
let rv = sendSyncMessage("Findbar:Keypress", {
diff --git a/toolkit/content/jar.mn b/toolkit/content/jar.mn
index e1d432cb3..c11d3abed 100644
--- a/toolkit/content/jar.mn
+++ b/toolkit/content/jar.mn
@@ -39,7 +39,7 @@ toolkit.jar:
content/global/plugins.html
content/global/plugins.css
content/global/browser-child.js
- content/global/browser-content.js
+* content/global/browser-content.js
* content/global/buildconfig.html
content/global/contentAreaUtils.js
#ifndef MOZ_FENNEC
diff --git a/toolkit/content/widgets/findbar.xml b/toolkit/content/widgets/findbar.xml
index b92fb1d05..c312a6a25 100644
--- a/toolkit/content/widgets/findbar.xml
+++ b/toolkit/content/widgets/findbar.xml
@@ -282,6 +282,7 @@
return this._browser;
]]></getter>
<setter><![CDATA[
+ let prefsvc = this._prefsvc;
if (this._browser) {
if (this._browser.messageManager) {
this._browser.messageManager.removeMessageListener("Findbar:Keypress", this);
@@ -300,7 +301,9 @@
this._browser.messageManager.addMessageListener("Findbar:Mouseup", this);
this._browser.finder.addResultListener(this);
- this._findField.value = this._browser._lastSearchString;
+ if (prefsvc.getBoolPref("findbar.termPerTab") == true) {
+ this._findField.value = this._browser._lastSearchString;
+ }
}
return val;
]]></setter>
diff --git a/toolkit/mozapps/extensions/internal/AddonUpdateChecker.jsm b/toolkit/mozapps/extensions/internal/AddonUpdateChecker.jsm
index f927bc745..c06dca1d5 100644
--- a/toolkit/mozapps/extensions/internal/AddonUpdateChecker.jsm
+++ b/toolkit/mozapps/extensions/internal/AddonUpdateChecker.jsm
@@ -976,12 +976,13 @@ this.AddonUpdateChecker = {
* down in-progress update requests
*/
checkForUpdates: function(aId, aUpdateKey, aUrl, aObserver) {
- // Define an array of internally used IDs to NOT send to AUS such as the
- // Default Theme. Please keep this list in sync with:
- // toolkit/mozapps/extensions/AddonUpdateChecker.jsm
+ // Define an array of internally used IDs to NOT send to AUS.
let internalIDS = [
- '{972ce4c6-7e08-4474-a285-3208198ce6fd}',
- 'modern@themes.mozilla.org'
+ '{972ce4c6-7e08-4474-a285-3208198ce6fd}', // Global Default Theme
+ 'modern@themes.mozilla.org', // Modern Theme for Borealis/Suite-based Applications
+ 'xplatform@interlink.projects.binaryoutcast.com', // Pref-set default theme for Interlink
+ '{e2fda1a4-762b-4020-b5ad-a41df1933103}', // Lightning/Calendar Extension
+ '{a62ef8ec-5fdc-40c2-873c-223b8a6925cc}' // Provider for Google Calendar (gdata) Extension
];
// If the ID is not in the array then go ahead and query AUS