diff --git a/application/palemoon/base/content/tabbrowser.xml b/application/palemoon/base/content/tabbrowser.xml
index d5735149e1..e99b813c95 100644
--- a/application/palemoon/base/content/tabbrowser.xml
+++ b/application/palemoon/base/content/tabbrowser.xml
@@ -1104,11 +1104,9 @@
this.mCurrentTab.removeAttribute("unread");
this.selectedTab.lastAccessed = Date.now();
- let oldFindBar = oldTab._findBar;
- if (oldFindBar &&
- oldFindBar.findMode == oldFindBar.FIND_NORMAL &&
- !oldFindBar.hidden)
- this._lastFindValue = oldFindBar._findField.value;
+ // Bug 666816 - TypeAheadFind support for e10s
+ if (!gMultiProcessBrowser)
+ this._fastFind.setDocShell(this.mCurrentBrowser.docShell);
this.updateTitlebar();
@@ -1159,11 +1157,6 @@
// Adjust focus
oldBrowser._urlbarFocused = (gURLBar && gURLBar.focused);
- if (this.isFindBarInitialized(oldTab)) {
- let findBar = this.getFindBar(oldTab);
- oldTab._findBarFocused = (!findBar.hidden &&
- findBar._findField.getAttribute("focused") == "true");
- }
do {
// When focus is in the tab bar, retain it there.
if (document.activeElement == oldTab) {
@@ -1199,12 +1192,11 @@
}
}
- // Focus the find bar if it was previously focused for that tab.
- if (gFindBarInitialized && !gFindBar.hidden &&
- this.selectedTab._findBarFocused) {
- gFindBar._findField.focus();
+ // If the find bar is focused, keep it focused.
+ if (gFindBarInitialized &&
+ !gFindBar.hidden &&
+ gFindBar.getElement("findbar-textbox").getAttribute("focused") == "true")
break;
- }
// Otherwise, focus the content area.
let fm = Cc["@mozilla.org/focus-manager;1"].getService(Ci.nsIFocusManager);
@@ -1622,6 +1614,7 @@
this.mTabListeners[position] = tabListener;
this.mTabFilters[position] = filter;
+ b._fastFind = this.fastFind;
b.droppedLinkHandler = handleDroppedLink;
// If we just created a new tab that loads the default
@@ -2873,6 +2866,21 @@
onget="return this.mCurrentBrowser.currentURI;"
readonly="true"/>
+ null
+
+
+
+
+
+
null
false
@@ -3176,28 +3184,6 @@
window.focus();
break;
}
- case "Findbar:Keypress":
- let tab = this.getTabForBrowser(browser);
- // If the find bar for this tab is not yet alive, only initialize
- // it if there's a possibility FindAsYouType will be used.
- // There's no point in doing it for most random keypresses.
- if (!this.isFindBarInitialized(tab) &&
- aMessage.data.shouldFastFind) {
- let shouldFastFind = this._findAsYouType;
- if (!shouldFastFind) {
- // Please keep in sync with toolkit/content/widgets/findbar.xml
- const FAYT_LINKS_KEY = "'";
- const FAYT_TEXT_KEY = "/";
- let charCode = aMessage.data.fakeEvent.charCode;
- let key = charCode ? String.fromCharCode(charCode) : null;
- shouldFastFind = key == FAYT_LINKS_KEY || key == FAYT_TEXT_KEY;
- }
- if (shouldFastFind) {
- // Make sure we return the result.
- return this.getFindBar(tab).receiveMessage(aMessage);
- }
- }
- break;
}
]]>