[Pkg-mozext-commits] [adblock-plus] 451/464: Issue 455 - Find function in Filter Preferences - No indication when keyword is not found
David Prévot
taffit at moszumanska.debian.org
Tue Jul 22 20:44:43 UTC 2014
This is an automated email from the git hooks/post-receive script.
taffit pushed a commit to branch master
in repository adblock-plus.
commit 57515274765956a5564acd86314e9e1398199d53
Author: Wladimir Palant <trev at adblockplus.org>
Date: Tue Jul 15 13:34:32 2014 +0200
Issue 455 - Find function in Filter Preferences - No indication when keyword is not found
--HG--
extra : rebase_source : 2cd70d60cb529a8789ee76dd41942961ef287dcc
---
chrome/content/ui/filters-search.js | 22 ++++++++++++++++++++--
1 file changed, 20 insertions(+), 2 deletions(-)
diff --git a/chrome/content/ui/filters-search.js b/chrome/content/ui/filters-search.js
index 4e817ac..88f97ca 100644
--- a/chrome/content/ui/filters-search.js
+++ b/chrome/content/ui/filters-search.js
@@ -144,8 +144,25 @@ FilterSearch.fakeBrowser =
_notifyResultListeners: function(result, findBackwards)
{
this.lastResult = result;
- for each (let listener in this._resultListeners)
- listener.onFindResult(result, findBackwards);
+ for (let listener of this._resultListeners)
+ {
+ // See https://bugzilla.mozilla.org/show_bug.cgi?id=958101, starting
+ // with Gecko 29 only one parameter is expected.
+ try
+ {
+ if (listener.onFindResult.length == 1)
+ {
+ listener.onFindResult({searchString: this.searchString,
+ result: result, findBackwards: findBackwards});
+ }
+ else
+ listener.onFindResult(result, findBackwards);
+ }
+ catch (e)
+ {
+ Cu.reportError(e);
+ }
+ }
},
fastFind: function(searchString, linksOnly, drawOutline)
@@ -178,6 +195,7 @@ FilterSearch.fakeBrowser =
},
// Irrelevant for us
+ requestMatchesCount: function(searchString, matchLimit, linksOnly) {},
highlight: function(highlight, word) {},
enableSelection: function() {},
removeSelection: function() {},
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-mozext/adblock-plus.git
More information about the Pkg-mozext-commits
mailing list