diff --git a/browser/base/content/tabbrowser.xml b/browser/base/content/tabbrowser.xml
index 56eda105c18..9ac84b7afc8 100644
--- a/browser/base/content/tabbrowser.xml
+++ b/browser/base/content/tabbrowser.xml
@@ -2753,6 +2753,10 @@
onget="return this.mCurrentBrowser.currentURI;"
readonly="true"/>
+
+
diff --git a/browser/base/content/test/browser_zbug569342.js b/browser/base/content/test/browser_zbug569342.js
index 5395989086e..564cff447c4 100644
--- a/browser/base/content/test/browser_zbug569342.js
+++ b/browser/base/content/test/browser_zbug569342.js
@@ -41,7 +41,11 @@ function nextTest() {
testFindDisabled(url, nextTest);
} else {
// Make sure the find bar is re-enabled after disabled page is closed.
- testFindEnabled("about:blank", finish);
+ testFindEnabled("about:blank", function () {
+ EventUtils.synthesizeKey("VK_ESCAPE", { });
+ ok(gFindBar.hidden, "Find bar should now be hidden");
+ finish();
+ });
}
}
diff --git a/toolkit/components/typeaheadfind/nsTypeAheadFind.cpp b/toolkit/components/typeaheadfind/nsTypeAheadFind.cpp
index bc6124797b6..fbeaf6a448d 100644
--- a/toolkit/components/typeaheadfind/nsTypeAheadFind.cpp
+++ b/toolkit/components/typeaheadfind/nsTypeAheadFind.cpp
@@ -919,15 +919,17 @@ nsTypeAheadFind::Find(const nsAString& aSearchString, bool aLinksOnly,
*aResult = FIND_NOTFOUND;
nsCOMPtr presShell (GetPresShell());
- if (!presShell) {
+ if (!presShell) {
nsCOMPtr ds (do_QueryReferent(mDocShell));
NS_ENSURE_TRUE(ds, NS_ERROR_FAILURE);
presShell = ds->GetPresShell();
- mPresShell = do_GetWeakReference(presShell);
- }
+ NS_ENSURE_TRUE(presShell, NS_ERROR_FAILURE);
+ mPresShell = do_GetWeakReference(presShell);
+ }
+
nsCOMPtr selection;
- nsCOMPtr selectionController =
+ nsCOMPtr selectionController =
do_QueryReferent(mSelectionController);
if (!selectionController) {
GetSelection(presShell, getter_AddRefs(selectionController),
diff --git a/toolkit/content/tests/chrome/findbar_window.xul b/toolkit/content/tests/chrome/findbar_window.xul
index e54e2ed7342..8e902964dc7 100644
--- a/toolkit/content/tests/chrome/findbar_window.xul
+++ b/toolkit/content/tests/chrome/findbar_window.xul
@@ -300,7 +300,8 @@
var searchStr = "Link Test";
enterStringIntoFindField(searchStr);
- ok(gFindBar._foundLink, "testQuickFindLink: failed to find sample link");
+ ok(gBrowser.contentWindow.getSelection() == searchStr,
+ "testQuickFindLink: failed to find sample link");
}
function testQuickFindText() {
diff --git a/toolkit/content/widgets/browser.xml b/toolkit/content/widgets/browser.xml
index cc0083861d3..44608c2b149 100644
--- a/toolkit/content/widgets/browser.xml
+++ b/toolkit/content/widgets/browser.xml
@@ -296,11 +296,24 @@