diff --git a/dom/base/nsGlobalWindow.cpp b/dom/base/nsGlobalWindow.cpp index 9cf5873154e5..ba70a62b3df2 100644 --- a/dom/base/nsGlobalWindow.cpp +++ b/dom/base/nsGlobalWindow.cpp @@ -7063,6 +7063,9 @@ nsGlobalWindow::Find(const nsAString& aStr, bool aCaseSensitive, bool aSearchInFrames, bool aShowDialog, bool *aDidFind) { + if (Preferences::GetBool("dom.disable_window_find", false)) + return NS_ERROR_NOT_AVAILABLE; + FORWARD_TO_OUTER(Find, (aStr, aCaseSensitive, aBackwards, aWrapAround, aWholeWord, aSearchInFrames, aShowDialog, aDidFind), NS_ERROR_NOT_INITIALIZED); diff --git a/dom/tests/mochitest/bugs/Makefile.in b/dom/tests/mochitest/bugs/Makefile.in index b2f1802e80ed..754857614d7e 100644 --- a/dom/tests/mochitest/bugs/Makefile.in +++ b/dom/tests/mochitest/bugs/Makefile.in @@ -160,6 +160,7 @@ _TEST_FILES = \ test_bug743615.html \ utils_bug743615.js \ worker_bug743615.js \ + test_bug750051.html \ $(NULL) libs:: $(_TEST_FILES) diff --git a/dom/tests/mochitest/bugs/test_bug750051.html b/dom/tests/mochitest/bugs/test_bug750051.html new file mode 100644 index 000000000000..181233a41369 --- /dev/null +++ b/dom/tests/mochitest/bugs/test_bug750051.html @@ -0,0 +1,38 @@ + + + + + Test for Bug 750051 + + + + +Mozilla Bug 750051 +

+ +
+
+
+ + diff --git a/mobile/android/app/mobile.js b/mobile/android/app/mobile.js index 519226ed47d0..f53bb28a106f 100644 --- a/mobile/android/app/mobile.js +++ b/mobile/android/app/mobile.js @@ -252,6 +252,7 @@ pref("privacy.popups.showBrowserMessage", true); pref("dom.disable_window_open_dialog_feature", true); pref("dom.disable_window_showModalDialog", true); pref("dom.disable_window_print", true); +pref("dom.disable_window_find", true); pref("keyword.enabled", true); pref("keyword.URL", "https://www.google.com/m?ie=UTF-8&oe=UTF-8&sourceid=navclient&gfns=1&q=");