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 (d8847129d134)

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
<?xml version="1.0"?>
<!-- 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/. -->
<!DOCTYPE window [
<!ENTITY % styleEditorDTD SYSTEM "chrome://browser/locale/devtools/styleeditor.dtd" >
 %styleEditorDTD;
<!ENTITY % editMenuStrings SYSTEM "chrome://global/locale/editMenuOverlay.dtd">
 %editMenuStrings;
<!ENTITY % sourceEditorStrings SYSTEM "chrome://browser/locale/devtools/sourceeditor.dtd">
 %sourceEditorStrings;
<!ENTITY % csscoverageDTD SYSTEM "chrome://global/locale/devtools/csscoverage.dtd">
 %csscoverageDTD;
]>

<?xml-stylesheet href="chrome://global/skin/global.css" type="text/css"?>
<?xml-stylesheet href="chrome://browser/content/devtools/widgets.css" type="text/css"?>
<?xml-stylesheet href="chrome://browser/content/devtools/splitview.css" type="text/css"?>
<?xml-stylesheet href="chrome://browser/skin/devtools/common.css" type="text/css"?>
<?xml-stylesheet href="chrome://browser/skin/devtools/widgets.css" type="text/css"?>
<?xml-stylesheet href="chrome://browser/skin/devtools/splitview.css" type="text/css"?>
<?xml-stylesheet href="chrome://browser/content/devtools/styleeditor.css" type="text/css"?>
<?xml-stylesheet href="chrome://browser/skin/devtools/styleeditor.css" type="text/css"?>
<?xul-overlay href="chrome://global/content/editMenuOverlay.xul"?>

<xul:window xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
        xmlns="http://www.w3.org/1999/xhtml"
        id="style-editor-chrome-window">

  <script type="application/javascript;version=1.8"
          src="chrome://browser/content/devtools/theme-switching.js"/>
  <xul:script type="application/javascript" src="chrome://global/content/globalOverlay.js"/>
  <xul:script type="application/javascript">
    function goUpdateSourceEditorMenuItems() {
      goUpdateGlobalEditMenuItems();

      ['cmd_undo', 'cmd_redo', 'cmd_cut', 'cmd_paste',
       'cmd_delete', 'cmd_find', 'cmd_findAgain'].forEach(goUpdateCommand);
    }
  </xul:script>

  <xul:popupset id="style-editor-popups">
    <xul:menupopup id="sourceEditorContextMenu"
                  onpopupshowing="goUpdateSourceEditorMenuItems()">
      <xul:menuitem id="cMenu_undo"/>
      <xul:menuseparator/>
      <xul:menuitem id="cMenu_cut"/>
      <xul:menuitem id="cMenu_copy"/>
      <xul:menuitem id="cMenu_paste"/>
      <xul:menuitem id="cMenu_delete"/>
      <xul:menuseparator/>
      <xul:menuitem id="cMenu_selectAll"/>
      <xul:menuseparator/>
      <xul:menuitem id="se-menu-find"
        label="&findCmd.label;" accesskey="&findCmd.accesskey;" command="cmd_find"/>
      <xul:menuitem id="cMenu_findAgain"/>
      <xul:menuseparator/>
      <xul:menuitem id="se-menu-gotoLine"
          label="&gotoLineCmd.label;"
          accesskey="&gotoLineCmd.accesskey;"
          key="key_gotoLine"
          command="cmd_gotoLine"/>
    </xul:menupopup>
    <xul:menupopup id="style-editor-options-popup"
                   position="before_start">
      <xul:menuitem id="options-origsources"
                    type="checkbox"
                    label="&showOriginalSources.label;"
                    accesskey="&showOriginalSources.accesskey;"/>
      <xul:menuitem id="options-show-media"
                    type="checkbox"
                    label="&showMediaSidebar.label;"
                    accesskey="&showMediaSidebar.accesskey;"/>
    </xul:menupopup>
  </xul:popupset>

  <xul:commandset id="editMenuCommands"/>

  <xul:commandset id="sourceEditorCommands">
    <xul:command id="cmd_gotoLine" oncommand="goDoCommand('cmd_gotoLine')"/>
    <xul:command id="cmd_find" oncommand="goDoCommand('cmd_find')"/>
    <xul:command id="cmd_findAgain" oncommand="goDoCommand('cmd_findAgain')"/>
  </xul:commandset>

  <xul:keyset id="sourceEditorKeys"/>

  <xul:stack id="style-editor-chrome" class="loading theme-body">

    <xul:box class="splitview-root" context="sidebar-context">
      <xul:box class="splitview-controller">
        <xul:box class="splitview-main">
          <xul:toolbar class="devtools-toolbar">
             <xul:hbox class="devtools-toolbarbutton-group">
              <xul:toolbarbutton class="style-editor-newButton devtools-toolbarbutton"
                          accesskey="&newButton.accesskey;"
                          tooltiptext="&newButton.tooltip;"
                          label="&newButton.label;"/>
              <xul:toolbarbutton class="style-editor-importButton devtools-toolbarbutton"
                          accesskey="&importButton.accesskey;"
                          tooltiptext="&importButton.tooltip;"
                          label="&importButton.label;"/>
            </xul:hbox>
            <xul:spacer/>
            <xul:toolbarbutton id="style-editor-options"
                        class="devtools-toolbarbutton devtools-option-toolbarbutton"
                        tooltiptext="&optionsButton.tooltip;"
                        popup="style-editor-options-popup"/>
          </xul:toolbar>
        </xul:box>
        <xul:box id="splitview-resizer-target" class="theme-sidebar splitview-nav-container"
                persist="height">
          <ol class="splitview-nav" tabindex="0"></ol>
          <div class="splitview-nav placeholder empty">
            <p><strong>&noStyleSheet.label;</strong></p>
            <p>&noStyleSheet-tip-start.label;
              <a href="#"
                class="style-editor-newButton">&noStyleSheet-tip-action.label;</a>
              &noStyleSheet-tip-end.label;</p>
          </div>
        </xul:box> <!-- .splitview-nav-container -->
      </xul:box>   <!-- .splitview-controller -->
      <xul:splitter class="devtools-side-splitter splitview-landscape-splitter devtools-invisible-splitter"/>
      <xul:box class="splitview-side-details devtools-main-content"/>

      <div id="splitview-templates" hidden="true">
        <li id="splitview-tpl-summary-stylesheet" tabindex="0">
          <xul:label class="stylesheet-enabled" tabindex="0"
            tooltiptext="&visibilityToggle.tooltip;"
            accesskey="&saveButton.accesskey;"></xul:label>
          <hgroup class="stylesheet-info">
            <h1><a class="stylesheet-name" tabindex="0"><xul:label crop="start"/></a></h1>
            <div class="stylesheet-more">
              <h3 class="stylesheet-title"></h3>
              <h3 class="stylesheet-linked-file"></h3>
              <h3 class="stylesheet-rule-count"></h3>
              <xul:spacer/>
              <h3><xul:label class="stylesheet-saveButton"
                    tooltiptext="&saveButton.tooltip;"
                    accesskey="&saveButton.accesskey;">&saveButton.label;</xul:label></h3>
            </div>
          </hgroup>
        </li>

        <xul:box id="splitview-tpl-details-stylesheet" class="splitview-details">
          <xul:resizer class="splitview-portrait-resizer"
                      dir="bottom"
                      element="splitview-resizer-target"/>
          <xul:hbox class="stylesheet-details-container">
            <xul:box class="stylesheet-editor-input textbox"
                     data-placeholder="&editorTextbox.placeholder;"/>
            <xul:splitter class="devtools-side-splitter"/>
            <xul:vbox class="stylesheet-sidebar theme-sidebar" hidden="true">
              <xul:toolbar class="devtools-toolbar">
                &mediaRules.label;
              </xul:toolbar>
              <xul:vbox class="stylesheet-media-container" flex="1">
                <div class="stylesheet-media-list" />
              </xul:vbox>
            </xul:vbox>
          </xul:hbox>
        </xul:box>
      </div> <!-- #splitview-templates -->
    </xul:box>   <!-- .splitview-root -->

    <xul:box class="csscoverage-template" hidden="true">
      <xul:toolbar class="devtools-toolbar csscoverage-toolbar">
        <xul:button class="devtools-toolbarbutton csscoverage-toolbarbutton"
            label="&csscoverage.backButton;"
            onclick="${onback}"/>
      </xul:toolbar>
      <!-- The data for this comes from CSSUsageActor.createPageReport -->
      <div class="csscoverage-report-container">
        <div class="csscoverage-report-content">
          <div class="csscoverage-report-summary">
            <div class="csscoverage-report-chart"/>
          </div>
          <div class="csscoverage-report-unused">
            <h2>&csscoverage.unused;</h2>
            <p>&csscoverage.noMatches;</p>
            <div foreach="page in ${unused}">
              <h3>${page.url}</h3>
              <code foreach="rule in ${page.rules}"
                    href="${rule.url}"
                    class="csscoverage-list">${rule.selectorText}</code>
            </div>
          </div>
          <div class="csscoverage-report-optimize">
            <h2>&csscoverage.optimize.header;</h2>
            <p>
              &csscoverage.optimize.body1;
              <code>&lt;link ...></code>
              &csscoverage.optimize.body2;
              <code>&lt;style>...</code>
              &csscoverage.optimize.body3;
            </p>
            <div if="${preload.length == 0}">&csscoverage.optimize.bodyX;</div>
            <div if="${preload.length > 0}">
              <div foreach="page in ${preload}">
                <h3>${page.url}</h3>
                <textarea>&lt;style>
<loop foreach="rule in ${page.rules}"
                      onclick="${rule.onclick}">${rule.formattedCssText}</loop>&lt;/style></textarea>
              </div>
            </div>
            <p>
              &csscoverage.footer1;
              <a target="_blank" href="&csscoverage.footer2a;">&csscoverage.footer3;</a>
              &csscoverage.footer4;
            </p>
          </div>
          <p>&#160;</p>
        </div>
      </div>
    </xul:box>

    <xul:box class="csscoverage-report" hidden="true">
    </xul:box>

  </xul:stack>

</xul:window>