mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-11 08:13:35 +00:00
Bug 978861: disable prefillWithSelection on OSX by default, fix its semantics when enabled. r=ehsan
This commit is contained in:
parent
6ef0a43d82
commit
62551ad323
@ -523,7 +523,11 @@ pref("accessibility.typeaheadfind.timeout", 4000);
|
||||
pref("accessibility.typeaheadfind.enabletimeout", true);
|
||||
pref("accessibility.typeaheadfind.soundURL", "beep");
|
||||
pref("accessibility.typeaheadfind.enablesound", true);
|
||||
#ifdef XP_MACOSX
|
||||
pref("accessibility.typeaheadfind.prefillwithselection", false);
|
||||
#else
|
||||
pref("accessibility.typeaheadfind.prefillwithselection", true);
|
||||
#endif
|
||||
pref("accessibility.typeaheadfind.matchesCountTimeout", 250);
|
||||
pref("accessibility.typeaheadfind.matchesCountLimit", 100);
|
||||
|
||||
|
@ -359,12 +359,10 @@
|
||||
highlightButton.click();
|
||||
ok(highlightButton.checked, "testFindWithHighlight 3: Highlight All should be checked.");
|
||||
|
||||
if (!gHasFindClipboard) {
|
||||
a = gFindBar._findField.value;
|
||||
b = gFindBar._browser.finder._fastFind.searchString;
|
||||
c = gFindBar._browser.finder.searchString;
|
||||
ok(a == searchStr && b == c, "testFindWithHighlight 4: " + a + ", " + b + ", " + c + ".");
|
||||
}
|
||||
a = gFindBar._findField.value;
|
||||
b = gFindBar._browser.finder._fastFind.searchString;
|
||||
c = gFindBar._browser.finder.searchString;
|
||||
ok(a == searchStr && b == c, "testFindWithHighlight 4: " + a + ", " + b + ", " + c + ".");
|
||||
|
||||
gFindBar.onFindAgainCommand();
|
||||
a = gFindBar._findField.value;
|
||||
|
@ -31,8 +31,15 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=288254
|
||||
|
||||
/** Test for Bug 257061 and Bug 288254 **/
|
||||
SimpleTest.waitForExplicitFinish();
|
||||
window.open("findbar_window.xul", "findbartest",
|
||||
"chrome,width=600,height=600");
|
||||
|
||||
// Since bug 978861, this pref is set to `false` on OSX. For this test, we'll
|
||||
// set it `true` to disable the find clipboard on OSX, which interferes with
|
||||
// our tests.
|
||||
SpecialPowers.pushPrefEnv({
|
||||
set: [["accessibility.typeaheadfind.prefillwithselection", true]]
|
||||
}, () => {
|
||||
window.open("findbar_window.xul", "findbartest", "chrome,width=600,height=600");
|
||||
});
|
||||
|
||||
]]>
|
||||
</script>
|
||||
|
@ -1198,6 +1198,13 @@
|
||||
|
||||
<method name="_onFindFieldFocus">
|
||||
<body><![CDATA[
|
||||
let prefsvc =
|
||||
Components.classes["@mozilla.org/preferences-service;1"]
|
||||
.getService(Components.interfaces.nsIPrefBranch);
|
||||
const kPref = "accessibility.typeaheadfind.prefillwithselection";
|
||||
if (this.prefillWithSelection && prefsvc.getBoolPref(kPref))
|
||||
return;
|
||||
|
||||
let clipboardSearchString = this._browser.finder.clipboardSearchString;
|
||||
if (clipboardSearchString && this._findField.value != clipboardSearchString) {
|
||||
this._findField.value = clipboardSearchString;
|
||||
|
Loading…
Reference in New Issue
Block a user