Bug 626985 accessibility.typeaheadfind.usefindbar=false broken in View Source and Help windows. r=Neil

This commit is contained in:
Philip Chee 2011-01-22 11:14:05 +08:00
Родитель cfbaa78022
Коммит 1cd3a85821
4 изменённых файлов: 44 добавлений и 0 удалений

Просмотреть файл

@ -36,6 +36,8 @@
*
* ***** END LICENSE BLOCK ***** */
Components.utils.import("resource://gre/modules/Services.jsm");
var helpExternal;
var helpContentListener = {
@ -105,3 +107,15 @@ function contentClick(event) {
function showSidebar() {
document.getElementById("help-sidebar-splitter").setAttribute("state", "open");
}
// needed by findUtils.js
var gFindInstData;
function getFindInstData()
{
if (!gFindInstData) {
gFindInstData = new nsFindInstData();
gFindInstData.browser = getBrowser();
// defaults for rootSearchWindow and currentSearchWindow are fine here
}
return gFindInstData;
}

Просмотреть файл

@ -47,6 +47,14 @@
<window id="help" onload="init(); initOverlay();"/>
<script type="application/javascript" src="chrome://communicator/content/helpOverlay.js"/>
<script type="application/javascript" src="chrome://communicator/content/findUtils.js"/>
<command id="cmd_find"
oncommand="findInPage(getFindInstData());"/>
<command id="cmd_findAgain"
oncommand="findAgainInPage(getFindInstData(), false);"/>
<command id="cmd_findPrevious"
oncommand="findAgainInPage(getFindInstData(), true);"/>
<browser id="help-content" onclick="return contentClick(event);" />

Просмотреть файл

@ -51,3 +51,15 @@ function onLoadViewSourceOverlay() {
function ViewSourceEditPage() {
editPage(window.content.location.href);
}
// needed by findUtils.js
var gFindInstData;
function getFindInstData()
{
if (!gFindInstData) {
gFindInstData = new nsFindInstData();
gFindInstData.browser = getBrowser();
// defaults for rootSearchWindow and currentSearchWindow are fine here
}
return gFindInstData;
}

Просмотреть файл

@ -58,12 +58,22 @@
src="chrome://communicator/content/viewSourceOverlay.js"/>
<script type="application/javascript"
src="chrome://editor/content/editorApplicationOverlay.js"/>
<script type="application/javascript"
src="chrome://communicator/content/findUtils.js"/>
<window id="viewSource">
<commandset id="tasksCommands"/>
<command id="cmd_newNavigator"/>
<command id="cmd_newEditor"/>
<command id="cmd_editPage" oncommand="ViewSourceEditPage();"/>
<command id="cmd_find"
oncommand="findInPage(getFindInstData());"/>
<command id="cmd_findAgain"
oncommand="findAgainInPage(getFindInstData(), false);"/>
<command id="cmd_findPrevious"
oncommand="findAgainInPage(getFindInstData(), true);"/>
<stringbundle id="findBundle"
src="chrome://global/locale/finddialog.properties"/>
</window>
<keyset id="viewSourceKeys">