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 (409f3966645a)

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
/* 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/. */

var EXPORTED_SYMBOLS = ["ThemeVariableMap", "ThemeContentPropertyList"];

const ThemeVariableMap = [
  ["--lwt-accent-color-inactive", {
    lwtProperty: "accentcolorInactive",
  }],
  ["--lwt-background-alignment", {
    isColor: false,
    lwtProperty: "backgroundsAlignment",
  }],
  ["--lwt-background-tiling", {
    isColor: false,
    lwtProperty: "backgroundsTiling",
  }],
  ["--tab-loading-fill", {
    lwtProperty: "tab_loading",
    optionalElementID: "tabbrowser-tabs",
  }],
  ["--lwt-tab-text", {
    lwtProperty: "tab_text",
  }],
  ["--tab-line-color", {
    lwtProperty: "tab_line",
    optionalElementID: "tabbrowser-tabs",
  }],
  ["--lwt-background-tab-separator-color", {
    lwtProperty: "tab_background_separator",
  }],
  ["--toolbar-bgcolor", {
    lwtProperty: "toolbarColor",
  }],
  ["--toolbar-color", {
    lwtProperty: "toolbar_text",
  }],
  ["--urlbar-separator-color", {
    lwtProperty: "toolbar_field_separator",
  }],
  ["--tabs-border-color", {
    lwtProperty: "toolbar_top_separator",
    optionalElementID: "navigator-toolbox",
  }],
  ["--lwt-toolbar-vertical-separator", {
    lwtProperty: "toolbar_vertical_separator",
  }],
  ["--toolbox-border-bottom-color", {
    lwtProperty: "toolbar_bottom_separator",
  }],
  ["--lwt-toolbarbutton-icon-fill", {
    lwtProperty: "icon_color",
  }],
  ["--lwt-toolbarbutton-icon-fill-attention", {
    lwtProperty: "icon_attention_color",
  }],
  ["--lwt-toolbarbutton-hover-background", {
    lwtProperty: "button_background_hover",
  }],
  ["--lwt-toolbarbutton-active-background", {
    lwtProperty: "button_background_active",
  }],
  ["--lwt-selected-tab-background-color", {
    lwtProperty: "tab_selected",
  }],
  ["--autocomplete-popup-background", {
    lwtProperty: "popup",
  }],
  ["--autocomplete-popup-color", {
    lwtProperty: "popup_text",
  }],
  ["--autocomplete-popup-border-color", {
    lwtProperty: "popup_border",
  }],
  ["--autocomplete-popup-highlight-background", {
    lwtProperty: "popup_highlight",
  }],
  ["--autocomplete-popup-highlight-color", {
    lwtProperty: "popup_highlight_text",
  }],
  ["--sidebar-background-color", {
    lwtProperty: "sidebar",
    optionalElementID: "sidebar-box",
    processColor(rgbaChannels, element) {
      if (!rgbaChannels) {
        element.removeAttribute("lwt-sidebar");
        return null;
      }
      const {r, g, b} = rgbaChannels;
      element.setAttribute("lwt-sidebar", "true");
      // Drop alpha channel
      return `rgb(${r}, ${g}, ${b})`;
    },
  }],
  ["--sidebar-text-color", {
    lwtProperty: "sidebar_text",
    optionalElementID: "sidebar-box",
  }],
  ["--sidebar-border-color", {
    lwtProperty: "sidebar_border",
    optionalElementID: "browser",
  }],
];

const ThemeContentPropertyList = [
  "ntp_background",
  "ntp_text",
  "sidebar",
  "sidebar_highlight",
  "sidebar_highlight_text",
  "sidebar_text",
];