tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

memory.css (13846B)


      1 /* This Source Code Form is subject to the terms of the Mozilla Public
      2 * License, v. 2.0. If a copy of the MPL was not distributed with this file,
      3 * You can obtain one at http://mozilla.org/MPL/2.0/. */
      4 
      5 /* CSS Variables specific to this panel that aren't defined by the themes */
      6 .theme-dark {
      7  --cell-border-color: rgba(255, 255, 255, 0.15);
      8  --row-alt-background-color: rgba(86, 117, 185, 0.15);
      9  --row-hover-background-color: rgba(86, 117, 185, 0.25);
     10  --link-color: var(--blue-40);
     11  --link-color-active: var(--blue-30);
     12 }
     13 
     14 .theme-light {
     15  --cell-border-color: rgba(0, 0, 0, 0.15);
     16  --row-alt-background-color: rgba(76, 158, 217, 0.1);
     17  --row-hover-background-color: rgba(76, 158, 217, 0.2);
     18  --link-color: var(--theme-link-color);
     19  --link-color-active: var(--blue-70);
     20 }
     21 
     22 html,
     23 body,
     24 #app,
     25 #memory-tool {
     26  height: 100%;
     27 }
     28 
     29 #memory-tool {
     30  /**
     31   * Flex: contains two children: .devtools-toolbar and #memory-tool-container,
     32   * which need to be laid out vertically. The toolbar has a fixed height and
     33   * the container needs to flex to fill out all remaining vertical space.
     34   */
     35  display: flex;
     36  flex-direction: column;
     37  --sidebar-width: 185px;
     38  /**
     39   * If --heap-tree-row-height changes, be sure to change HEAP_TREE_ROW_HEIGHT
     40   * in `devtools/client/memory/components/Heap.js`.
     41   */
     42  --heap-tree-row-height: 18px;
     43  --heap-tree-header-height: 18px;
     44 }
     45 
     46 /**
     47 * Toolbar
     48 */
     49 
     50 .devtools-toolbar {
     51  /**
     52   * Flex: contains several children, which need to be laid out horizontally,
     53   * and aligned vertically in the middle of the container.
     54   */
     55  display: flex;
     56  line-height: initial;
     57  align-items: stretch;
     58 }
     59 
     60 .devtools-toolbar > .toolbar-group:nth-of-type(1) {
     61  /**
     62   * We want this to be exactly at a `--sidebar-width` distance from the
     63   * toolbar's start boundary. A `.devtools-toolbar` has a 3px start padding.
     64   */
     65  flex: 0 0 calc(var(--sidebar-width) - 4px);
     66  border-inline-end: 1px solid var(--theme-splitter-color);
     67  margin-inline-end: 5px;
     68  padding-right: 1px;
     69 }
     70 
     71 .devtools-toolbar > .toolbar-group {
     72  /**
     73   * Flex: contains several children, which need to be laid out horizontally,
     74   * and aligned vertically in the middle of the container.
     75   */
     76  display: flex;
     77  align-items: center;
     78  flex: 1;
     79  white-space: nowrap;
     80  overflow: hidden;
     81  text-overflow: ellipsis;
     82 }
     83 
     84 .devtools-toolbar > .toolbar-group > label {
     85  /**
     86   * Flex: contains form controls and text, which need to be laid out
     87   * horizontally, vertically aligned in the middle of the container.
     88   */
     89  display: flex;
     90  align-items: center;
     91  margin-inline-end: 5px;
     92 }
     93 
     94 .devtools-toolbar > label {
     95  margin-inline-end: 5px;
     96  display: flex;
     97  align-items: center;
     98 }
     99 
    100 .devtools-toolbar > .toolbar-text {
    101  display: flex;
    102  align-items: center;
    103 }
    104 
    105 .devtools-toolbar-select {
    106  margin-inline-start: 5px;
    107 }
    108 
    109 #take-snapshot::before {
    110  background-image: url(images/command-screenshot.svg);
    111 }
    112 
    113 #clear-snapshots::before {
    114  background-image: url(chrome://devtools/skin/images/clear.svg);
    115 }
    116 
    117 #diff-snapshots::before {
    118  background-image: url(chrome://devtools/skin/images/diff.svg);
    119 }
    120 
    121 #import-snapshot::before {
    122  background-image: url(chrome://devtools/skin/images/import.svg);
    123 }
    124 
    125 #record-allocation-stacks-label,
    126 #pop-view-button-label {
    127  border-inline-end: 1px solid var(--theme-splitter-color);
    128  padding-inline-end: 5px;
    129 }
    130 
    131 .spacer {
    132  flex: 1;
    133 }
    134 
    135 #filter {
    136  box-sizing: border-box;
    137  height: 100%;
    138 }
    139 
    140 /**
    141 * Container (sidebar + main panel)
    142 */
    143 
    144 #memory-tool-container {
    145  /**
    146   * Flex: contains two children: .list (sidebar) and #heap-view (main panel),
    147   * which need to be laid out horizontally. The sidebar has a fixed width and
    148   * the main panel needs to flex to fill out all remaining horizontal space.
    149   */
    150  display: flex;
    151  /**
    152   * Flexing to fill out remaining vertical space. The preceeding sibling is
    153   * the toolbar. @see #memory-tool.
    154   */
    155  flex: 1;
    156  overflow: hidden;
    157 }
    158 
    159 /**
    160 * Sidebar
    161 */
    162 
    163 .list {
    164  width: var(--sidebar-width);
    165  min-width: var(--sidebar-width);
    166  overflow-y: auto;
    167  margin: 0;
    168  padding: 0;
    169  background-color: var(--theme-sidebar-background);
    170  border-inline-end: 1px solid var(--theme-splitter-color);
    171 }
    172 
    173 .snapshot-list-item {
    174  /**
    175   * Flex: contains several children, which need to be laid out vertically.
    176   */
    177  display: flex;
    178  flex-direction: column;
    179  color: var(--theme-body-color);
    180  border-bottom: 1px solid var(--theme-splitter-color);
    181  padding: 8px;
    182  cursor: default;
    183 }
    184 
    185 .snapshot-list-item.selected {
    186  background-color: var(--theme-selection-background);
    187  color: var(--theme-selection-color);
    188 }
    189 
    190 .snapshot-list-item.selected ::-moz-selection {
    191  background-color: var(--theme-selection-color);
    192  color: var(--theme-selection-background);
    193 }
    194 
    195 .snapshot-list-item .snapshot-info {
    196  display: flex;
    197  justify-content: space-between;
    198  font-size: 90%;
    199 }
    200 
    201 .snapshot-list-item .snapshot-title {
    202  display: flex;
    203  justify-content: space-between;
    204 }
    205 
    206 .snapshot-list-item .save {
    207  text-decoration: underline;
    208  cursor: pointer;
    209 }
    210 
    211 .snapshot-list-item .delete {
    212  cursor: pointer;
    213  background-color: transparent;
    214  border: 0;
    215  padding: 0;
    216  position: relative;
    217  min-height: 1em;
    218  min-width: 1.3em;
    219  color: currentColor;
    220 }
    221 
    222 .snapshot-list-item .delete::before {
    223  display: block;
    224  width: 16px;
    225  height: 16px;
    226  content: "";
    227  background-image: url("chrome://devtools/skin/images/close.svg");
    228  background-repeat: no-repeat;
    229  -moz-context-properties: fill;
    230  fill: currentColor;
    231 }
    232 
    233 .snapshot-list-item > .snapshot-title {
    234  margin-bottom: 14px;
    235 }
    236 
    237 .snapshot-list-item > .snapshot-title > input[type="checkbox"] {
    238  margin: 0;
    239  margin-inline-end: 5px;
    240 }
    241 
    242 .snapshot-list-item > .snapshot-state,
    243 .snapshot-list-item > .snapshot-totals {
    244  font-size: 90%;
    245  color: var(--theme-text-color-alt);
    246 }
    247 
    248 .snapshot-list-item.selected > .snapshot-state,
    249 .snapshot-list-item.selected > .snapshot-totals {
    250  /* Text inside a selected item should not be custom colored. */
    251  color: inherit !important;
    252 }
    253 
    254 /**
    255 * Main panel
    256 */
    257 
    258 .vbox {
    259  display: flex;
    260  flex-direction: column;
    261  width: 100%;
    262  height: 100%;
    263  overflow: auto;
    264  padding: 0;
    265  margin: 0;
    266 }
    267 
    268 .vbox > * {
    269  flex: 1;
    270 
    271  /**
    272   * By default, flex items have min-width: auto;
    273   * (https://drafts.csswg.org/css-flexbox/#min-size-auto)
    274   */
    275  min-width: 0;
    276 }
    277 
    278 #heap-view {
    279  /**
    280   * Flex: contains a .heap-view-panel which needs to fill out all the
    281   * available space, horizontally and vertically.
    282   */
    283  display: flex;
    284  /**
    285   * Flexing to fill out remaining horizontal space. The preceeding sibling
    286   * is the sidebar. @see #memory-tool-container.
    287   */
    288  flex: 1;
    289  background-color: var(--theme-body-background);
    290 
    291  /**
    292   * By default, flex items have min-width: auto;
    293   * (https://drafts.csswg.org/css-flexbox/#min-size-auto)
    294   */
    295  min-width: 0;
    296  font-size: 90%;
    297 }
    298 
    299 #heap-view > .heap-view-panel {
    300  /**
    301   * Flex: can contain several children, including a tree with a header and
    302   * multiple rows, all of which need to be laid out vertically. When the
    303   * tree is visible, the header has a fixed height and tree body needs to flex
    304   * to fill out all remaining vertical space.
    305   */
    306  display: flex;
    307  flex-direction: column;
    308  /**
    309   * Flexing to fill out remaining horizontal space. @see #heap-view.
    310   */
    311  flex: 1;
    312 
    313  /**
    314   * By default, flex items have min-width: auto;
    315   * (https://drafts.csswg.org/css-flexbox/#min-size-auto)
    316   */
    317  min-width: 0;
    318 }
    319 
    320 #heap-view > .heap-view-panel > .snapshot-status,
    321 #heap-view > .heap-view-panel > .take-snapshot,
    322 #heap-view .empty,
    323 #shortest-paths-select-node-msg {
    324  margin: auto;
    325  margin-top: 65px;
    326  font-size: 120%;
    327 }
    328 
    329 #heap-view > .heap-view-panel[data-state="snapshot-state-error"] pre {
    330  background-color: var(--theme-body-background);
    331  margin: 20px;
    332  padding: 20px;
    333 }
    334 
    335 /**
    336 * Heap tree view header
    337 */
    338 
    339 .header {
    340  /**
    341   * Flex: contains several span columns, all of which need to be laid out
    342   * horizontally. All columns except the last one have percentage widths, and
    343   * the last one needs to flex to fill out all remaining horizontal space.
    344   */
    345  display: flex;
    346  color: var(--theme-body-color);
    347  background-color: var(--theme-tab-toolbar-background);
    348  border-bottom: 1px solid var(--cell-border-color);
    349  flex: 0;
    350 }
    351 
    352 .header > span,
    353 #shortest-paths-header {
    354  text-overflow: ellipsis;
    355  line-height: var(--heap-tree-header-height);
    356  justify-content: center;
    357  justify-self: center;
    358  white-space: nowrap;
    359 }
    360 
    361 .header > span {
    362  overflow: hidden;
    363 }
    364 
    365 .header > .heap-tree-item-name {
    366  justify-content: flex-start;
    367 }
    368 
    369 #shortest-paths {
    370  background-color: var(--theme-body-background);
    371  overflow: hidden;
    372  height: 100%;
    373  width: 100%;
    374 }
    375 
    376 #shortest-paths-select-node-msg {
    377  justify-self: center;
    378 }
    379 
    380 /**
    381 * Heap tree view body
    382 */
    383 
    384 .tree {
    385  /**
    386   * Flexing to fill out remaining vertical space. @see .heap-view-panel
    387   */
    388  flex: 1;
    389  overflow-y: auto;
    390  background-color: var(--theme-body-background);
    391 }
    392 
    393 .tree-node {
    394  height: var(--heap-tree-row-height);
    395  line-height: var(--heap-tree-row-height);
    396  cursor: default;
    397 }
    398 
    399 .tree > :nth-child(2n of .tree-node):not(.focused) {
    400  background-color: var(--row-alt-background-color);
    401 }
    402 
    403 /**
    404 * Override Tree.css rule as the .tree-node-odd background are of the same color
    405 * as the default hovered background.
    406 */
    407 .tree .tree-node:not(.focused):hover {
    408  background-color: var(--row-hover-background-color);
    409 }
    410 
    411 .children-pointer {
    412  display: inline-block;
    413  /* We use transform to reverse the icon in RTL,
    414   * so `padding-right` will get reversed as well. */
    415  padding-right: 5px;
    416 }
    417 
    418 .children-pointer:dir(rtl) {
    419  transform: scaleX(-1);
    420 }
    421 
    422 /**
    423 * Heap tree view columns
    424 */
    425 
    426 .heap-tree-item {
    427  /**
    428   * Flex: contains several span columns, all of which need to be laid out
    429   * horizontally. All columns except the last one have percentage widths, and
    430   * the last one needs to flex to fill out all remaining horizontal space.
    431   */
    432  display: flex;
    433 }
    434 
    435 .heap-tree-item-individuals,
    436 .heap-tree-item-bytes,
    437 .heap-tree-item-count,
    438 .heap-tree-item-total-bytes,
    439 .heap-tree-item-total-count {
    440  /**
    441   * Flex: contains several subcolumns, which need to be laid out horizontally.
    442   * These subcolumns may have specific widths or need to flex.
    443   */
    444  display: flex;
    445  /* Make sure units/decimals/... are always vertically aligned to right in both LTR and RTL locales */
    446  text-align: right;
    447  border-inline-end: var(--cell-border-color) 1px solid;
    448 }
    449 
    450 .heap-tree-item-count,
    451 .heap-tree-item-total-count,
    452 .heap-tree-item-bytes,
    453 .heap-tree-item-total-bytes {
    454  width: 10%;
    455  /*
    456   * Provision for up to 19 characters:
    457   *
    458   *     GG_MMM_KKK_BBB_100%
    459   *     |            |||  |
    460   *     '------------'|'--'
    461   *     14 ch for 10s | 4 ch for the largest % we will
    462   *     of GB and     | normally see: "100%"
    463   *     spaces every  |
    464   *     3 digits      |
    465   *                   |
    466   *             A space between the number and percent
    467   */
    468  min-width: 19ch;
    469 }
    470 
    471 .heap-tree-item-name {
    472  /**
    473   * Flexing to fill out remaining vertical space.
    474   * @see .header and .heap-tree-item */
    475  flex: 1;
    476  padding-inline-start: 5px;
    477  overflow: hidden;
    478  text-overflow: ellipsis;
    479 }
    480 
    481 .heap-tree-item-name .theme-twisty {
    482  display: inline-block;
    483  vertical-align: middle;
    484 }
    485 
    486 /**
    487 * Heap tree view subcolumns
    488 */
    489 
    490 .heap-tree-number,
    491 .heap-tree-percent,
    492 .heap-tree-item-name {
    493  white-space: nowrap;
    494 }
    495 
    496 .heap-tree-number {
    497  padding: 0 3px;
    498  flex: 1;
    499  color: var(--theme-text-color-alt);
    500  /* Make sure number doesn't appear backwards on RTL locales */
    501  direction: ltr;
    502 }
    503 
    504 .heap-tree-percent {
    505  padding-inline-start: 3px;
    506  padding-inline-end: 3px;
    507 }
    508 
    509 .heap-tree-number,
    510 .heap-tree-percent {
    511  font-family: var(--monospace-font-family);
    512 }
    513 
    514 .heap-tree-percent {
    515  width: 4ch;
    516 }
    517 
    518 .tree-node.focused :is(.heap-tree-number, .heap-tree-percent) {
    519  color: inherit;
    520 }
    521 
    522 .heap-tree-item-individuals {
    523  min-width: 38px;
    524  overflow: hidden;
    525  margin: 0;
    526 }
    527 
    528 .heap-tree-item-individuals > button {
    529  width: 32px;
    530  /* Override default styles for toolbar buttons to fix entire row height. */
    531  margin: 0 auto !important;
    532  color: inherit;
    533 }
    534 
    535 /**
    536 * Tree map
    537 */
    538 
    539 .tree-map-container {
    540  width: 100%;
    541  height: 100%;
    542  position: relative;
    543  overflow: hidden;
    544 }
    545 
    546 .load-more-link {
    547  cursor: pointer;
    548  color: var(--link-color);
    549 }
    550 
    551 .load-more-link:hover {
    552  text-decoration: underline;
    553 }
    554 
    555 .load-more-link:active {
    556  color: var(--link-color-active);
    557 }
    558 
    559 /**
    560 * Heap tree errors.
    561 */
    562 
    563 .error::before {
    564  content: "";
    565  display: inline-block;
    566  vertical-align: -2px;
    567  width: 12px;
    568  height: 12px;
    569  max-height: 12px;
    570  margin-inline-end: 5px;
    571  background-image: url(resource://devtools-shared-images/alert-small.svg);
    572  background-repeat: no-repeat;
    573  background-size: contain;
    574  -moz-context-properties: fill;
    575  fill: var(--yellow-60);
    576 }
    577 
    578 /**
    579 * Frame View components
    580 */
    581 
    582 .separator,
    583 .not-available,
    584 .heap-tree-item-address {
    585  opacity: 0.5;
    586  margin-left: 0.5em;
    587  margin-right: 0.5em;
    588 }
    589 
    590 .heap-tree-item-address {
    591  font-family: monospace;
    592 }
    593 
    594 .no-allocation-stacks {
    595  border-color: var(--theme-splitter-color);
    596  border-style: solid;
    597  border-width: 0 0 1px 0;
    598  text-align: center;
    599  padding: 5px;
    600 }
    601 
    602 /**
    603 * Dagre-D3 graphs
    604 */
    605 
    606 svg {
    607  --arrow-color: var(--theme-splitter-color);
    608  --text-color: var(--theme-body-color);
    609 }
    610 
    611 .theme-dark svg {
    612  --arrow-color: var(--theme-text-color-alt);
    613 }
    614 
    615 svg #arrowhead {
    616  fill: var(--arrow-color);
    617 }
    618 
    619 .edgePath path {
    620  stroke-width: 1px;
    621  fill: none;
    622  stroke: var(--arrow-color);
    623 }
    624 
    625 g.edgeLabel rect {
    626  fill: var(--theme-body-background);
    627 }
    628 
    629 g.edgeLabel tspan {
    630  fill: var(--text-color);
    631 }
    632 
    633 .nodes rect {
    634  stroke-width: 1px;
    635  stroke: var(--theme-splitter-color);
    636  fill: var(--theme-toolbar-background);
    637 }
    638 
    639 text {
    640  font-size: 1.25em;
    641  fill: var(--text-color);
    642  /* Make sure text stays inside its container in RTL locales */
    643  direction: ltr;
    644 }