DXR is a code search and navigation tool aimed at making sense of large projects. It supports full-text and regex searches as well as structural queries.

Mercurial (6ff411885e6f)

VCS Links

Line Code
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318
<?xml version="1.0"?>
# -*- Mode: HTML -*-
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.

<?xml-stylesheet href="chrome://global/skin/" type="text/css"?>

<!DOCTYPE window [
<!ENTITY % brandDTD SYSTEM "chrome://branding/locale/brand.dtd" >
%brandDTD;
#ifndef MOZ_SUITE
<!ENTITY % baseMenuOverlayDTD SYSTEM "chrome://messenger/locale/baseMenuOverlay.dtd">
%baseMenuOverlayDTD;
#endif
<!ENTITY % sourceDTD SYSTEM "chrome://messenger/locale/viewSource.dtd" >
%sourceDTD;
<!ENTITY % charsetDTD SYSTEM "chrome://global/locale/charsetMenu.dtd" >
%charsetDTD;
<!ENTITY % editMenuDTD SYSTEM "chrome://global/locale/editMenuOverlay.dtd" >
%editMenuDTD;
]>

<window id="viewSource"
        xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" xmlns:html="http://www.w3.org/1999/xhtml"
        contenttitlesetting="true"
        title="&mainWindow.title;"
        titlemodifier="&mainWindow.titlemodifier;"
        titlepreface="&mainWindow.preface;"
        titlemenuseparator ="&mainWindow.titlemodifierseparator;"
        windowtype="navigator:view-source"
        width="640" height="480"
        screenX="10" screenY="10"
        persist="screenX screenY width height sizemode">

<linkset>
  <html:link rel="localization" href="messenger/menubar.ftl"/>
  <html:link rel="localization" href="toolkit/global/textActions.ftl"/>
</linkset>

  <script src="chrome://global/content/globalOverlay.js"/>
  <script src="chrome://global/content/printUtils.js"/>
  <script src="chrome://global/content/contentAreaUtils.js"/>
#ifndef MOZ_SUITE
  <script src="chrome://messenger/content/mailCore.js"/>
#endif
  <script src="chrome://messenger/content/viewSource.js"/>
  <script src="chrome://messenger/content/viewZoomOverlay.js"/>
  <script src="chrome://global/content/editMenuOverlay.js"/>

  <stringbundle id="viewSourceBundle" src="chrome://messenger/locale/viewSource.properties"/>

  <command id="cmd_savePage" oncommand="ViewSourceSavePage();"/>
  <command id="cmd_print" oncommand="PrintUtils.printWindow(gBrowser.browsingContext);"/>
  <command id="cmd_printpreview" oncommand="PrintUtils.printPreview(PrintPreviewListener);"/>
  <command id="cmd_pagesetup" oncommand="PrintUtils.showPageSetup();"/>
  <command id="cmd_close" oncommand="window.close();"/>
  <command id="cmd_find"
           oncommand="document.getElementById('FindToolbar').onFindCommand();"/>
  <command id="cmd_findAgain"
           oncommand="document.getElementById('FindToolbar').onFindAgainCommand(false);"/>
  <command id="cmd_findPrevious"
           oncommand="document.getElementById('FindToolbar').onFindAgainCommand(true);"/>
#ifdef XP_MACOSX
  <command id="cmd_findSelection"
           oncommand="document.getElementById('FindToolbar').onFindSelectionCommand();"/>
#endif
  <command id="cmd_reload" oncommand="viewSourceChrome.reload();"/>
  <command id="cmd_goToLine" oncommand="viewSourceChrome.promptAndGoToLine();"/>
  <command id="cmd_wrapLongLines" oncommand="viewSourceChrome.toggleWrapping();"/>
#ifdef MOZ_SUITE
  <command id="cmd_highlightSyntax" oncommand="viewSourceChrome.toggleSyntaxHighlighting();"/>
  <command id="Browser:Back" oncommand="viewSourceChrome.goBack()" class="viewSourceNavigation"/>
  <command id="Browser:Forward" oncommand="viewSourceChrome.goForward()" class="viewSourceNavigation"/>
#endif
  <command id="cmd_textZoomReduce" oncommand="ZoomManager.reduce();"/>
  <command id="cmd_textZoomEnlarge" oncommand="ZoomManager.enlarge();"/>
  <command id="cmd_textZoomReset" oncommand="ZoomManager.reset();"/>

#includesubst @TOOLKIT_DIR@/content/editMenuKeys.inc.xhtml
  <keyset id="viewSourceKeys">
    <key id="key_savePage" key="&savePageCmd.commandkey;" modifiers="accel" command="cmd_savePage"/>
    <key id="key_print" key="&printCmd.commandkey;" modifiers="accel" command="cmd_print"/>
    <key id="key_close" key="&closeCmd.commandkey;" modifiers="accel" command="cmd_close"/>
    <key id="key_goToLine"     key="&goToLineCmd.commandkey;"  command="cmd_goToLine"  modifiers="accel"/>

    <key id="key_textZoomEnlarge" key="&textEnlarge.commandkey;" command="cmd_textZoomEnlarge" modifiers="accel"/>
    <key id="key_textZoomEnlarge2" key="&textEnlarge.commandkey2;" command="cmd_textZoomEnlarge" modifiers="accel"/>
    <key id="key_textZoomEnlarge3" key="&textEnlarge.commandkey3;" command="cmd_textZoomEnlarge" modifiers="accel"/>
    <key id="key_textZoomReduce"  key="&textReduce.commandkey;" command="cmd_textZoomReduce" modifiers="accel"/>
    <key id="key_textZoomReduce2"  key="&textReduce.commandkey2;" command="cmd_textZoomReduce" modifiers="accel"/>
    <key id="key_textZoomReset" key="&textReset.commandkey;" command="cmd_textZoomReset" modifiers="accel"/>
    <key id="key_textZoomReset2" key="&textReset.commandkey2;" command="cmd_textZoomReset" modifiers="accel"/>

    <key id="key_reload" key="&reloadCmd.commandkey;" command="cmd_reload" modifiers="accel"/>
    <key key="&reloadCmd.commandkey;" command="cmd_reload" modifiers="accel,shift"/>
    <key keycode="VK_F5" command="cmd_reload"/>
    <key keycode="VK_F5" command="cmd_reload" modifiers="accel"/>
    <key id="key_find" key="&findOnCmd.commandkey;" command="cmd_find" modifiers="accel"/>
    <key id="key_findAgain" key="&findAgainCmd.commandkey;" command="cmd_findAgain" modifiers="accel"/>
    <key id="key_findPrevious" key="&findAgainCmd.commandkey;" command="cmd_findPrevious" modifiers="accel,shift"/>
#ifdef XP_MACOSX
    <key id="key_findSelection" key="&findSelectionCmd.commandkey;" command="cmd_findSelection" modifiers="accel"/>
#endif
    <key keycode="&findAgainCmd.commandkey2;" command="cmd_findAgain"/>
    <key keycode="&findAgainCmd.commandkey2;"  command="cmd_findPrevious" modifiers="shift"/>

    <key keycode="VK_BACK" command="Browser:Back"/>
    <key keycode="VK_BACK" command="Browser:Forward" modifiers="shift"/>
#ifndef XP_MACOSX
    <key id="goBackKb" keycode="VK_LEFT" command="Browser:Back" modifiers="alt"/>
    <key id="goForwardKb" keycode="VK_RIGHT" command="Browser:Forward" modifiers="alt"/>
#else
    <key id="goBackKb" keycode="VK_LEFT" command="Browser:Back" modifiers="accel" />
    <key id="goForwardKb" keycode="VK_RIGHT" command="Browser:Forward" modifiers="accel" />
#endif
#ifdef XP_UNIX
    <key id="goBackKb2" key="&goBackCmd.commandKey;" command="Browser:Back" modifiers="accel"/>
    <key id="goForwardKb2" key="&goForwardCmd.commandKey;" command="Browser:Forward" modifiers="accel"/>
#endif
#ifndef MOZ_SUITE
    <key id="key_openHelp"
         oncommand="openSupportURL();"
#ifdef XP_MACOSX
         key="&productHelpMac.commandkey;"
         modifiers="&productHelpMac.modifiers;"/>
#else
         keycode="&productHelp.commandkey;"/>
#endif
#endif

  </keyset>

  <tooltip id="aHTMLTooltip" page="true"/>

  <menupopup id="viewSourceContextMenu">
#ifdef MOZ_SUITE
    <menuitem id="context-back"
              label="&backCmd.label;"
              accesskey="&backCmd.accesskey;"
              command="Browser:Back"
              observes="viewSourceNavigation"/>
    <menuitem id="context-forward"
              label="&forwardCmd.label;"
              accesskey="&forwardCmd.accesskey;"
              command="Browser:Forward"
              observes="viewSourceNavigation"/>
    <menuseparator observes="viewSourceNavigation"/>
#endif
    <menuitem id="cMenu_copy"
              data-l10n-id="text-action-copy"
              command="cmd_copy"/>
    <menuseparator/>
#ifdef MOZ_SUITE
    <menuitem id="context-copyLink"
              label="&copyLinkCmd.label;"
              accesskey="&copyLinkCmd.accesskey;"
              oncommand="viewSourceChrome.onContextMenuCopyLinkOrEmail();"/>
    <menuitem id="context-copyEmail"
              label="&copyEmailCmd.label;"
              accesskey="&copyEmailCmd.accesskey;"
              oncommand="viewSourceChrome.onContextMenuCopyLinkOrEmail();"/>
    <menuseparator/>
#endif
    <menuitem id="cMenu_selectAll"
              data-l10n-id="text-action-select-all"
              command="cmd_selectAll"/>
    <menuseparator/>
    <menuitem id="cMenu_find"
              label="&findCmd.label;"
              accesskey="&findCmd.accesskey;"
              command="cmd_find"/>
    <menuitem id="cMenu_findAgain"
              label="&findAgainCmd.label;"
              accesskey="&findAgainCmd.accesskey;"
              command="cmd_findAgain"/>
  </menupopup>

  <!-- Menu -->
  <toolbox id="viewSource-toolbox">
    <toolbar type="menubar">
    <menubar id="viewSource-main-menubar">

      <menu id="menu_file" label="&fileMenu.label;" accesskey="&fileMenu.accesskey;">
        <menupopup id="menu_FilePopup">
          <menuitem key="key_savePage" command="cmd_savePage" id="menu_savePage"
                    label="&savePageCmd.label;" accesskey="&savePageCmd.accesskey;"
                    class="menuitem-iconic"/>
          <menuseparator/>
          <menuitem command="cmd_pagesetup" id="menu_pageSetup"
                    label="&pageSetupCmd.label;" accesskey="&pageSetupCmd.accesskey;"/>
#ifndef XP_MACOSX
          <menuitem command="cmd_printpreview" id="menu_printPreview"
                    label="&printPreviewCmd.label;" accesskey="&printPreviewCmd.accesskey;"
                    class="menuitem-iconic"/>
#endif
          <menuitem key="key_print" command="cmd_print" id="menu_print"
                    label="&printCmd.label;" accesskey="&printCmd.accesskey;"
                    class="menuitem-iconic"/>
          <menuseparator/>
          <menuitem key="key_close" command="cmd_close" id="menu_close"
                    label="&closeCmd.label;" accesskey="&closeCmd.accesskey;"
                    class="menuitem-iconic"/>
        </menupopup>
      </menu>

      <menu id="menu_edit" label="&editMenu.label;"
            accesskey="&editMenu.accesskey;">
        <menupopup id="editmenu-popup">
          <menuitem id="menu_copy"
                    data-l10n-id="text-action-copy"
                    key="key_copy"
                    command="cmd_copy"
                    class="menuitem-iconic"/>
          <menuseparator/>
          <menuitem id="menu_selectAll"
                    data-l10n-id="text-action-select-all"
                    key="key_selectAll"
                    command="cmd_selectAll"/>
          <menuseparator/>
          <menuitem id="menu_find" label="&findCmd.label;"
                    key="key_find" accesskey="&findCmd.accesskey;"
                    command="cmd_find"/>
          <menuitem id="menu_findAgain" label="&findAgainCmd.label;"
                    key="key_findAgain" accesskey="&findAgainCmd.accesskey;"
                    command="cmd_findAgain"/>
          <menuseparator/>
          <menuitem id="menu_goToLine" key="key_goToLine" command="cmd_goToLine"
                    label="&goToLineCmd.label;" accesskey="&goToLineCmd.accesskey;"/>
        </menupopup>
      </menu>

      <menu id="menu_view" label="&viewMenu.label;" accesskey="&viewMenu.accesskey;">
        <menupopup id="viewmenu-popup">
          <menuitem id="menu_reload" command="cmd_reload" accesskey="&reloadCmd.accesskey;"
                    label="&reloadCmd.label;" key="key_reload"/>
          <menuseparator />
          <menu id="viewTextZoomMenu" label="&menu_textSize.label;" accesskey="&menu_textSize.accesskey;">
            <menupopup>
              <menuitem id="menu_textEnlarge" command="cmd_textZoomEnlarge"
                        label="&menu_textEnlarge.label;" accesskey="&menu_textEnlarge.accesskey;"
                        key="key_textZoomEnlarge" class="menuitem-iconic"/>
              <menuitem id="menu_textReduce" command="cmd_textZoomReduce"
                        label="&menu_textReduce.label;" accesskey="&menu_textReduce.accesskey;"
                        key="key_textZoomReduce" class="menuitem-iconic"/>
              <menuseparator/>
              <menuitem id="menu_textReset" command="cmd_textZoomReset"
                        label="&menu_textReset.label;" accesskey="&menu_textReset.accesskey;"
                        key="key_textZoomReset" class="menuitem-iconic"/>
            </menupopup>
          </menu>

          <!-- Charset Menu -->
          <menu id="charsetMenu"
                data-l10n-id="menu-view-charset"
                oncommand="viewSourceChrome.onSetCharacterSet(event);"
                onpopupshowing="CharsetMenu.build(event.target);
                                CharsetMenu.update(event.target, content.document.characterSet);">
            <menupopup/>
          </menu>
          <menuseparator/>
          <menuitem id="menu_wrapLongLines" type="checkbox" command="cmd_wrapLongLines"
                    label="&menu_wrapLongLines.title;" accesskey="&menu_wrapLongLines.accesskey;"/>
#ifdef MOZ_SUITE
          <menuitem type="checkbox" id="menu_highlightSyntax" command="cmd_highlightSyntax"
                    label="&menu_highlightSyntax.label;" accesskey="&menu_highlightSyntax.accesskey;"/>
#endif
        </menupopup>
      </menu>
#ifndef MOZ_SUITE
      <menu id="helpMenu"
#ifdef XP_WIN
            label="&helpMenuWin.label;" accesskey="&helpMenuWin.accesskey;">
#else
            label="&helpMenu.label;" accesskey="&helpMenu.accesskey;">
#endif
        <menupopup id="menu_HelpPopup">
          <menuitem id="menu_openHelp"
                    label="&productHelp.label;"
#ifndef XP_MACOSX
                    accesskey="&productHelp.accesskey;"
#endif
                    key="key_openHelp"
                    oncommand="openSupportURL();"
                    class="menuitem-iconic"/>
        </menupopup>
      </menu>
#endif
    </menubar>
    </toolbar>
  </toolbox>

  <box>
    <!--
      The print preview toolbar is dynamically added here.
      It's inside a box so that it takes up no more room than necessary.
    -->
    <box id="toolbar-placeholder" hidden="true"/>
  </box>
  <vbox id="appcontent" flex="1">

    <browser id="content"
             type="content"
             name="content"
             src="about:blank"
             flex="1"
             primary="true"
#ifndef MOZ_SUITE
             disableglobalhistory="true"
#endif
             context="viewSourceContextMenu"
             showcaret="true"
             tooltip="aHTMLTooltip"
             messagemanagergroup="browsers"/>
    <findbar id="FindToolbar" browserid="content"/>
  </vbox>

</window>