mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 869919 - Find bar should hide on disablefastfind pages. r=dao
--HG-- extra : rebase_source : 851224b741bef5b8020d91eb93b8d22ccff47db2
This commit is contained in:
parent
36df22ee4c
commit
6461c5ee08
@ -3911,7 +3911,16 @@ var XULBrowserWindow = {
|
||||
else
|
||||
elt.removeAttribute("disabled");
|
||||
}
|
||||
if (gFindBarInitialized) {
|
||||
if (!gFindBar.hidden && aDisable) {
|
||||
gFindBar.hidden = true;
|
||||
this._findbarTemporarilyHidden = true;
|
||||
} else if (this._findbarTemporarilyHidden && !aDisable) {
|
||||
gFindBar.hidden = false;
|
||||
this._findbarTemporarilyHidden = false;
|
||||
}
|
||||
}
|
||||
}.bind(this);
|
||||
|
||||
var onContentRSChange = function onContentRSChange(e) {
|
||||
if (e.target.readyState != "interactive" && e.target.readyState != "complete")
|
||||
|
@ -20,7 +20,12 @@ function load(url, cb) {
|
||||
function test() {
|
||||
waitForExplicitFinish();
|
||||
|
||||
ok(gFindBar.hidden, "Find bar should not be visible");
|
||||
ok(gFindBar.hidden, "Find bar should not be visible by default");
|
||||
|
||||
// Open the Find bar before we navigate to pages that shouldn't have it.
|
||||
EventUtils.synthesizeKey("f", { accelKey: true });
|
||||
ok(!gFindBar.hidden, "Find bar should be visible");
|
||||
|
||||
nextTest();
|
||||
}
|
||||
|
||||
@ -60,6 +65,13 @@ function testFindEnabled(url, cb) {
|
||||
ok(!document.getElementById("cmd_find").getAttribute("disabled"),
|
||||
"Find command should not be disabled");
|
||||
|
||||
ok(!gFindBar.hidden, "Find bar should be visible again");
|
||||
|
||||
// Give focus to the Find bar and then close it.
|
||||
EventUtils.synthesizeKey("f", { accelKey: true });
|
||||
EventUtils.synthesizeKey("VK_ESCAPE", { });
|
||||
ok(gFindBar.hidden, "Find bar should now be hidden");
|
||||
|
||||
gBrowser.removeTab(gTab);
|
||||
cb();
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user