diff options
author | New Tobin Paradigm <email@mattatobin.com> | 2018-04-13 11:15:36 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-04-13 11:15:36 -0400 |
commit | aedeefe89855b36da07a021a772cd02c37d6b887 (patch) | |
tree | 0b8376f33206c8c0c6232d122597e3a4c591cb98 /application/palemoon/base/content/tabbrowser.xml | |
parent | 12c1588b940ca8bbaff5632a847189ebb9a430f0 (diff) | |
parent | da92d3703332ad41e8a2bf3aa66cb867c336e0b0 (diff) | |
download | UXP-aedeefe89855b36da07a021a772cd02c37d6b887.tar UXP-aedeefe89855b36da07a021a772cd02c37d6b887.tar.gz UXP-aedeefe89855b36da07a021a772cd02c37d6b887.tar.lz UXP-aedeefe89855b36da07a021a772cd02c37d6b887.tar.xz UXP-aedeefe89855b36da07a021a772cd02c37d6b887.zip |
Merge pull request #141 from janekptacijarabaci/pm_findbar_1
Fix: Findbar broken
Diffstat (limited to 'application/palemoon/base/content/tabbrowser.xml')
-rw-r--r-- | application/palemoon/base/content/tabbrowser.xml | 101 |
1 files changed, 76 insertions, 25 deletions
diff --git a/application/palemoon/base/content/tabbrowser.xml b/application/palemoon/base/content/tabbrowser.xml index b5395bbd9..0b471043d 100644 --- a/application/palemoon/base/content/tabbrowser.xml +++ b/application/palemoon/base/content/tabbrowser.xml @@ -2730,6 +2730,9 @@ get finder() { return this.mTabBrowser.mCurrentBrowser.finder; }, + destroy: function() { + this.finder.destroy(); + }, addResultListener: function(aListener) { this.mListeners.add(aListener); this.finder.addResultListener(aListener); @@ -2750,21 +2753,33 @@ set caseSensitive(val) { return this.finder.caseSensitive = val; }, - fastFind: function(aSearchString, aLinksOnly, aDrawOutline) { - this.finder.fastFind(aSearchString, aLinksOnly, aDrawOutline); + set entireWord(val) { + return this.finder.entireWord = val; + }, + get highlighter() { + return this.finder.highlighter; + }, + get matchesCountLimit() { + return this.finder.matchesCountLimit; }, - findAgain: function(aFindBackwards, aLinksOnly, aDrawOutline) { - this.finder.findAgain(aFindBackwards, aLinksOnly, aDrawOutline); + fastFind: function(...args) { + this.finder.fastFind(...args); + }, + findAgain: function(...args) { + this.finder.findAgain(...args); }, setSearchStringToSelection: function() { return this.finder.setSearchStringToSelection(); }, - highlight: function(aHighlight, aWord) { - this.finder.highlight(aHighlight, aWord); + highlight: function(...args) { + this.finder.highlight(...args); }, getInitialSelection: function() { this.finder.getInitialSelection(); }, + getActiveSelectionText: function() { + return this.finder.getActiveSelectionText(); + }, enableSelection: function() { this.finder.enableSelection(); }, @@ -2774,11 +2789,38 @@ focusContent: function() { this.finder.focusContent(); }, + onFindbarClose: function() { + this.finder.onFindbarClose(); + }, + onFindbarOpen: function() { + this.finder.onFindbarOpen(); + }, + onModalHighlightChange: function(...args) { + return this.finder.onModalHighlightChange(...args); + }, + onHighlightAllChange: function(...args) { + return this.finder.onHighlightAllChange(...args); + }, keyPress: function(aEvent) { this.finder.keyPress(aEvent); }, - requestMatchesCount: function(aWord, aMatchLimit, aLinksOnly) { - this.finder.requestMatchesCount(aWord, aMatchLimit, aLinksOnly); + requestMatchesCount: function(...args) { + this.finder.requestMatchesCount(...args); + }, + onIteratorRangeFound: function(...args) { + this.finder.onIteratorRangeFound(...args); + }, + onIteratorReset: function() { + this.finder.onIteratorReset(); + }, + onIteratorRestart: function(...args) { + this.finder.onIteratorRestart(...args); + }, + onIteratorStart: function(...args) { + this.finder.onIteratorStart(...args); + }, + onLocationChange: function(...args) { + this.finder.onLocationChange(...args); } }) ]]></field> @@ -2787,6 +2829,19 @@ onget="return this.mCurrentBrowser.docShell" readonly="true"/> + <property name="messageManager" + readonly="true"> + <getter> + <![CDATA[ + let frameLoader = this.mCurrentBrowser.frameLoader; + if (!frameLoader) { + return null; + } + return frameLoader.messageManager; + ]]> + </getter> + </property> + <property name="webNavigation" onget="return this.mCurrentBrowser.webNavigation" readonly="true"/> @@ -2803,6 +2858,10 @@ readonly="true" onget="return this.mCurrentBrowser.contentWindow"/> + <property name="contentWindowAsCPOW" + readonly="true" + onget="return this.mCurrentBrowser.contentWindow;"/> + <property name="sessionHistory" onget="return this.mCurrentBrowser.sessionHistory;" readonly="true"/> @@ -2873,23 +2932,6 @@ } } - // We need to take care of FAYT-watching as long as the findbar - // isn't initialized. The checks on aEvent are copied from - // _shouldFastFind (see findbar.xml). - if (!gFindBarInitialized && - !(aEvent.ctrlKey || aEvent.metaKey) && - !aEvent.defaultPrevented) { - let charCode = aEvent.charCode; - if (charCode) { - let char = String.fromCharCode(charCode); - if (char == "'" || char == "/" || - Services.prefs.getBoolPref("accessibility.typeaheadfind")) { - gFindBar._onBrowserKeypress(aEvent); - return; - } - } - } - #ifdef XP_MACOSX if (!aEvent.metaKey) return; @@ -2981,6 +3023,14 @@ window.focus(); break; } + case "Findbar:Keypress": + if (!gFindBarInitialized) { + // If the find bar for this tab is not yet alive, change that, + // and make sure we return the result: + return gFindBar.receiveMessage(aMessage); + } + break; + } ]]></body> </method> @@ -3047,6 +3097,7 @@ this.mCurrentBrowser); } messageManager.addMessageListener("DOMWebNotificationClicked", this); + messageManager.addMessageListener("Findbar:Keypress", this); ]]> </constructor> |