mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 927424 - Allow findbar binding to cancel content focusing when using RemoteFinder in an e10s window. r=evilpie.
--HG-- extra : source : 2f6420722723035b1ed11e5de8e1829e827552fa
This commit is contained in:
parent
3a5ea8be83
commit
75a5bb9529
@ -197,9 +197,12 @@ Finder.prototype = {
|
||||
// Allow Finder listeners to cancel focusing the content.
|
||||
for (let l of this._listeners) {
|
||||
try {
|
||||
if (!l.shouldFocusContent())
|
||||
if ("shouldFocusContent" in l &&
|
||||
!l.shouldFocusContent())
|
||||
return;
|
||||
} catch (ex) {}
|
||||
} catch (ex) {
|
||||
Cu.reportError(ex);
|
||||
}
|
||||
}
|
||||
|
||||
let fastFind = this._fastFind;
|
||||
|
@ -83,6 +83,17 @@ RemoteFinder.prototype = {
|
||||
},
|
||||
|
||||
focusContent: function () {
|
||||
// Allow Finder listeners to cancel focusing the content.
|
||||
for (let l of this._listeners) {
|
||||
try {
|
||||
if ("shouldFocusContent" in l &&
|
||||
!l.shouldFocusContent())
|
||||
return;
|
||||
} catch (ex) {
|
||||
Cu.reportError(ex);
|
||||
}
|
||||
}
|
||||
|
||||
this._browser.messageManager.sendAsyncMessage("Finder:FocusContent");
|
||||
},
|
||||
|
||||
@ -134,12 +145,6 @@ RemoteFinderListener.prototype = {
|
||||
this._global.sendAsyncMessage("Finder:MatchesResult", aData);
|
||||
},
|
||||
|
||||
//XXXmikedeboer-20131016: implement |shouldFocusContent| here to mitigate
|
||||
// issues like bug 921338 and bug 921308.
|
||||
shouldFocusContent: function () {
|
||||
return true;
|
||||
},
|
||||
|
||||
receiveMessage: function (aMessage) {
|
||||
let data = aMessage.data;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user