Bug 1461793 - Remove the "popup-base" binding and import the "popup.css" file as a document stylesheet. r=bgrins draft
authorPaolo Amadini <paolo.mozmail@amadzone.org>
Tue, 17 Jul 2018 19:04:43 +0100
changeset 819353 a06a200098013d5dbc42c2431f845ca1dd8b0b76
parent 819215 547144f5596c1a146b208d68d93950a6313080ca
push id116528
push userpaolo.mozmail@amadzone.org
push dateTue, 17 Jul 2018 18:07:59 +0000
reviewersbgrins
bugs1461793
milestone63.0a1
Bug 1461793 - Remove the "popup-base" binding and import the "popup.css" file as a document stylesheet. r=bgrins The new "tooltip.css" file allows styling the default tooltip, which is created as native anonymous content. MozReview-Commit-ID: ADWsFTNPfhw
devtools/client/themes/tooltips.css
mobile/android/installer/allowed-dupes.mn
toolkit/content/widgets.css
toolkit/content/widgets/popup.xml
toolkit/content/xul.css
toolkit/themes/linux/global/jar.mn
toolkit/themes/linux/global/popup.css
toolkit/themes/linux/global/tooltip.css
toolkit/themes/mobile/jar.mn
toolkit/themes/osx/global/jar.mn
toolkit/themes/osx/global/popup.css
toolkit/themes/osx/global/tooltip.css
toolkit/themes/windows/global/jar.mn
toolkit/themes/windows/global/popup.css
toolkit/themes/windows/global/tooltip.css
--- a/devtools/client/themes/tooltips.css
+++ b/devtools/client/themes/tooltips.css
@@ -167,17 +167,17 @@
 
 .tooltip-flexible-height .tooltip-filler {
   /* In flexible mode the filler should grow as much as possible. */
   flex-grow: 1;
 }
 
 /* type="arrow" overrides: remove arrow decorations for the xul <panel> wrapper */
 
-.tooltip-xul-wrapper[type="arrow"] {
+.tooltip-xul-wrapper[type="arrow"][side] {
   margin: 0;
 }
 
 /* The arrow image is hidden because the panel is opened using openPopupAtScreen(). */
 
 /* Remove all decorations on .panel-arrowcontent is the tooltip content container. */
 .tooltip-xul-wrapper[type="arrow"] .panel-arrowcontent {
   margin: 0;
--- a/mobile/android/installer/allowed-dupes.mn
+++ b/mobile/android/installer/allowed-dupes.mn
@@ -23,16 +23,17 @@ chrome/toolkit/skin/classic/global/radio
 chrome/toolkit/skin/classic/global/richlistbox.css
 chrome/toolkit/skin/classic/global/scrollbars.css
 chrome/toolkit/skin/classic/global/scrollbox.css
 chrome/toolkit/skin/classic/global/splitter.css
 chrome/toolkit/skin/classic/global/tabbox.css
 chrome/toolkit/skin/classic/global/textbox.css
 chrome/toolkit/skin/classic/global/toolbar.css
 chrome/toolkit/skin/classic/global/toolbarbutton.css
+chrome/toolkit/skin/classic/global/tooltip.css
 chrome/toolkit/skin/classic/global/tree.css
 chrome/toolkit/skin/classic/global/wizard.css
 modules/commonjs/sdk/ui/button/view/events.js
 modules/commonjs/sdk/ui/state/events.js
 modules/devtools/Console.jsm
 modules/devtools/Loader.jsm
 modules/devtools/Simulator.jsm
 modules/devtools/shared/Console.jsm
--- a/toolkit/content/widgets.css
+++ b/toolkit/content/widgets.css
@@ -10,12 +10,13 @@
 @import url("chrome://global/skin/autocomplete.css");
 @import url("chrome://formautofill-shared/skin/autocomplete-item.css");
 @import url("chrome://formautofill/skin/autocomplete-item.css");
 @import url("chrome://global/skin/dropmarker.css");
 @import url("chrome://global/skin/groupbox.css");
 @import url("chrome://global/skin/menu.css");
 @import url("chrome://global/skin/menulist.css");
 @import url("chrome://global/skin/notification.css");
+@import url("chrome://global/skin/popup.css");
 @import url("chrome://global/skin/richlistbox.css");
 @import url("chrome://global/skin/splitter.css");
 @import url("chrome://global/skin/toolbar.css");
 @import url("chrome://global/skin/wizard.css");
--- a/toolkit/content/widgets/popup.xml
+++ b/toolkit/content/widgets/popup.xml
@@ -6,25 +6,17 @@
 <!-- This files relies on these specific Chrome/XBL globals -->
 <!-- globals PopupBoxObject -->
 
 <bindings id="popupBindings"
    xmlns="http://www.mozilla.org/xbl"
    xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
    xmlns:xbl="http://www.mozilla.org/xbl">
 
-  <binding id="popup-base">
-    <resources>
-      <stylesheet src="chrome://global/skin/popup.css"/>
-    </resources>
-  </binding>
-
-  <binding id="popup"
-           extends="chrome://global/content/bindings/popup.xml#popup-base">
-
+  <binding id="popup">
     <content>
       <xul:arrowscrollbox class="popup-internal-box" flex="1" orient="vertical"
                           smoothscroll="false">
         <children/>
       </xul:arrowscrollbox>
     </content>
 
     <implementation>
@@ -50,18 +42,17 @@
           }
           for (var i = 0; i < array.length; i++)
             array[i].width = width;
         ]]>
       </handler>
     </handlers>
   </binding>
 
-  <binding id="panel"
-           extends="chrome://global/content/bindings/popup.xml#popup-base">
+  <binding id="panel">
     <implementation>
       <field name="_prevFocus">0</field>
     </implementation>
 
     <handlers>
       <handler event="popupshowing"><![CDATA[
         // Capture the previous focus before has a chance to get set inside the panel
         try {
@@ -134,16 +125,21 @@
             currentFocus = currentFocus.parentNode;
           }
         }
       ]]></handler>
     </handlers>
   </binding>
 
   <binding id="arrowpanel" extends="chrome://global/content/bindings/popup.xml#panel">
+    <resources>
+      <!-- Fixes an issue with the "test_arrowpanel.xul" animation on Mac, see bug 1470880. -->
+      <stylesheet src="data:text/css,"/>
+    </resources>
+
     <content flip="both" side="top" position="bottomcenter topleft" consumeoutsideclicks="false">
       <xul:vbox anonid="container" class="panel-arrowcontainer" flex="1"
                xbl:inherits="side,panelopen">
         <xul:box anonid="arrowbox" class="panel-arrowbox">
           <xul:image anonid="arrow" class="panel-arrow" xbl:inherits="side"/>
         </xul:box>
         <xul:box class="panel-arrowcontent" xbl:inherits="side,align,dir,orient,pack" flex="1">
           <children/>
@@ -262,18 +258,17 @@
         }
       </handler>
       <handler event="popuppositioned" phase="target">
         this.adjustArrowPosition();
       </handler>
     </handlers>
   </binding>
 
-  <binding id="tooltip"
-           extends="chrome://global/content/bindings/popup.xml#popup-base">
+  <binding id="tooltip">
     <content>
       <children>
         <xul:label class="tooltip-label" xbl:inherits="xbl:text=label" flex="1"/>
       </children>
     </content>
 
     <implementation>
       <field name="_mouseOutCount">0</field>
--- a/toolkit/content/xul.css
+++ b/toolkit/content/xul.css
@@ -14,16 +14,18 @@
  * widgets of a particular application should be in that application's style
  * sheet.  For example, style definitions for navigator can be found in
  * navigator.css.
  *
  * THIS FILE IS LOCKED DOWN.  YOU ARE NOT ALLOWED TO MODIFY IT WITHOUT FIRST
  * HAVING YOUR CHANGES REVIEWED BY enndeakin@gmail.com
  */
 
+@import url("chrome://global/skin/tooltip.css");
+
 @namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"); /* set default namespace to XUL */
 @namespace html url("http://www.w3.org/1999/xhtml"); /* namespace for HTML elements */
 @namespace xbl url("http://www.mozilla.org/xbl"); /* namespace for XBL elements */
 
 :root {
   --animation-easing-function: cubic-bezier(.07, .95, 0, 1);
 }
 
@@ -659,16 +661,23 @@ tab[selected="true"]:not([ignorefocus="t
   -moz-user-focus: normal;
 }
 
 tabpanels {
   -moz-binding: url("chrome://global/content/bindings/tabbox.xml#tabpanels");
   display: -moz-deck;
 }
 
+/********** tooltip *********/
+
+tooltip[titletip="true"] {
+  /* The width of the tooltip isn't limited on cropped <tree> cells. */
+  max-width: none;
+}
+
 /********** progressmeter **********/
 
 progressmeter {
   -moz-binding: url("chrome://global/content/bindings/progressmeter.xml#progressmeter");
 }
 
 /********** basic rule for anonymous content that needs to pass box properties through
  ********** to an insertion point parent that holds the real kids **************/
--- a/toolkit/themes/linux/global/jar.mn
+++ b/toolkit/themes/linux/global/jar.mn
@@ -24,16 +24,17 @@ toolkit.jar:
    skin/classic/global/radio.css
    skin/classic/global/richlistbox.css
    skin/classic/global/scrollbox.css
    skin/classic/global/splitter.css
    skin/classic/global/tabbox.css
    skin/classic/global/textbox.css
    skin/classic/global/toolbar.css
    skin/classic/global/toolbarbutton.css
+   skin/classic/global/tooltip.css
    skin/classic/global/tree.css
 *  skin/classic/global/alerts/alert.css                        (alerts/alert.css)
 
    skin/classic/global/icons/Authentication.png                (icons/Authentication.png)
    skin/classic/global/icons/blacklist_favicon.png             (icons/blacklist_favicon.png)
    skin/classic/global/icons/blacklist_large.png               (icons/blacklist_large.png)
    skin/classic/global/icons/Close.gif                         (icons/Close.gif)
    skin/classic/global/icons/Minimize.gif                      (icons/Minimize.gif)
--- a/toolkit/themes/linux/global/popup.css
+++ b/toolkit/themes/linux/global/popup.css
@@ -75,33 +75,16 @@ panel[type="arrow"][side="right"] {
   margin-right: -5px;
 }
 
 .panel-arrow[side="right"] {
   transform: scaleX(-1);
   margin-left: -5px;
 }
 
-/* ::::: tooltip ::::: */
-
-tooltip {
-  -moz-appearance: tooltip;
-  margin-top: 21px;
-  max-width: 40em;
-  color: InfoText;
-  font: message-box;
-}
-
-tooltip[titletip="true"] {
- /* See bug 32157 comment 128
-  * margin: -2px 0px 0px -3px;
-  */
-  max-width: none;
-}
-
 /* rules for popups associated with menulists */
 
 menulist > menupopup {
   padding: 0px;
   min-width: 0px;
 }
 
 menupopup[customoptionstyling="true"] {
copy from toolkit/themes/linux/global/popup.css
copy to toolkit/themes/linux/global/tooltip.css
--- a/toolkit/themes/linux/global/popup.css
+++ b/toolkit/themes/linux/global/tooltip.css
@@ -1,109 +1,18 @@
 /* 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/. */
 
-@namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul");
-
-/* ::::: menupopup ::::: */
-
-menupopup,
-panel {
-  -moz-appearance: menupopup;
-  min-width: 1px;
-  color: MenuText;
-}
-
-/* ::::: arrow panel ::::: */
-
-panel[type="arrow"] {
-  -moz-appearance: none;
-}
-
-panel[type="arrow"][side="top"],
-panel[type="arrow"][side="bottom"] {
-  margin-left: -20px;
-  margin-right: -20px;
-}
-
-panel[type="arrow"][side="left"],
-panel[type="arrow"][side="right"] {
-  margin-top: -20px;
-  margin-bottom: -20px;
-}
-
-.panel-arrowcontent {
-  padding: var(--arrowpanel-padding);
-  color: var(--arrowpanel-color);
-  background: var(--arrowpanel-background);
-  border: 1px solid var(--arrowpanel-border-color);
-  box-shadow: 0 0 4px hsla(0,0%,0%,.2);
-  margin: 4px;
-}
+/*
+ * This file is imported as a UA stylesheet because the default tooltip is
+ * built as native anonymous content.
+ */
 
-.panel-arrow {
-  -moz-context-properties: fill, stroke;
-  fill: var(--arrowpanel-background);
-  stroke: var(--arrowpanel-border-color);
-}
-
-.panel-arrow[side="top"],
-.panel-arrow[side="bottom"] {
-  list-style-image: url("chrome://global/skin/arrow/panelarrow-vertical.svg");
-  position: relative;
-  margin-left: 10px;
-  margin-right: 10px;
-}
-
-.panel-arrow[side="top"] {
-  margin-bottom: -5px;
-}
-
-.panel-arrow[side="bottom"] {
-  transform: scaleY(-1);
-  margin-top: -5px;
-}
-
-.panel-arrow[side="left"],
-.panel-arrow[side="right"] {
-  list-style-image: url("chrome://global/skin/arrow/panelarrow-horizontal.svg");
-  position: relative;
-  margin-top: 10px;
-  margin-bottom: 10px;
-}
-
-.panel-arrow[side="left"] {
-  margin-right: -5px;
-}
-
-.panel-arrow[side="right"] {
-  transform: scaleX(-1);
-  margin-left: -5px;
-}
-
-/* ::::: tooltip ::::: */
+@namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul");
 
 tooltip {
   -moz-appearance: tooltip;
   margin-top: 21px;
   max-width: 40em;
   color: InfoText;
   font: message-box;
 }
-
-tooltip[titletip="true"] {
- /* See bug 32157 comment 128
-  * margin: -2px 0px 0px -3px;
-  */
-  max-width: none;
-}
-
-/* rules for popups associated with menulists */
-
-menulist > menupopup {
-  padding: 0px;
-  min-width: 0px;
-}
-
-menupopup[customoptionstyling="true"] {
-  -moz-appearance: none;
-}
--- a/toolkit/themes/mobile/jar.mn
+++ b/toolkit/themes/mobile/jar.mn
@@ -21,16 +21,17 @@ toolkit.jar:
    skin/classic/global/radio.css                           (global/empty.css)
    skin/classic/global/richlistbox.css                     (global/empty.css)
    skin/classic/global/scrollbox.css                       (global/empty.css)
    skin/classic/global/splitter.css                        (global/empty.css)
    skin/classic/global/tabbox.css                          (global/empty.css)
    skin/classic/global/textbox.css                         (global/empty.css)
    skin/classic/global/toolbar.css                         (global/empty.css)
    skin/classic/global/toolbarbutton.css                   (global/empty.css)
+   skin/classic/global/tooltip.css                         (global/empty.css)
    skin/classic/global/tree.css                            (global/empty.css)
    skin/classic/global/wizard.css                          (global/empty.css)
    skin/classic/global/scrollbars.css                      (global/empty.css)
 
    skin/classic/global/media/TopLevelImageDocument.css     (global/media/TopLevelImageDocument.css)
    skin/classic/global/media/TopLevelVideoDocument.css     (global/media/TopLevelVideoDocument.css)
    skin/classic/global/media/imagedoc-lightnoise.png       (global/media/imagedoc-lightnoise.png)
    skin/classic/global/media/imagedoc-darknoise.png        (global/media/imagedoc-darknoise.png)
--- a/toolkit/themes/osx/global/jar.mn
+++ b/toolkit/themes/osx/global/jar.mn
@@ -28,16 +28,17 @@ toolkit.jar:
   skin/classic/global/scrollbars.css                                 (nativescrollbars.css)
   skin/classic/global/scrollbox.css
   skin/classic/global/splitter.css
   skin/classic/global/tabprompts.css
   skin/classic/global/tabbox.css
   skin/classic/global/textbox.css
   skin/classic/global/toolbar.css
   skin/classic/global/toolbarbutton.css
+  skin/classic/global/tooltip.css
 * skin/classic/global/tree.css
   skin/classic/global/wizard.css
 * skin/classic/global/alerts/alert.css                               (alerts/alert.css)
   skin/classic/global/arrow/arrow-dn-dis.gif                         (arrow/arrow-dn-dis.gif)
   skin/classic/global/arrow/arrow-dn-dis.png                         (arrow/arrow-dn-dis.png)
   skin/classic/global/arrow/arrow-dn-sharp.gif                       (arrow/arrow-dn-sharp.gif)
   skin/classic/global/arrow/arrow-dn.gif                             (arrow/arrow-dn.gif)
   skin/classic/global/arrow/arrow-dn.png                             (arrow/arrow-dn.png)
--- a/toolkit/themes/osx/global/popup.css
+++ b/toolkit/themes/osx/global/popup.css
@@ -83,36 +83,16 @@ panel[type="arrow"][side="right"] {
 .panel-arrow[side="right"] {
   list-style-image: url("chrome://global/skin/arrow/panelarrow-horizontal.svg");
   transform: scaleX(-1);
   margin-top: 16px;
   margin-bottom: 16px;
   margin-left: -1px;
 }
 
-/* ::::: tooltip ::::: */
-
-tooltip {
-  -moz-appearance: tooltip;
-  -moz-font-smoothing-background-color: -moz-mac-tooltip;
-  margin-top: 18px;
-  padding: 2px 3px;
-  max-width: 40em;
-  color: InfoText;
-  font: message-box;
-  cursor: default;
-}
-
-tooltip[titletip="true"] {
- /* See bug 32157 comment 128
-  * margin: -2px 0px 0px -3px;
-  */
-  max-width: none;
-}
-
 /* rules for popups associated with menulists */
 
 menulist > menupopup {
   min-width: 0px;
 }
 
 menulist > menupopup:not([position]) {
   margin-inline-start: -13px;
copy from toolkit/themes/osx/global/popup.css
copy to toolkit/themes/osx/global/tooltip.css
--- a/toolkit/themes/osx/global/popup.css
+++ b/toolkit/themes/osx/global/tooltip.css
@@ -1,138 +1,21 @@
 /* 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/. */
 
-@namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul");
-
-menupopup,
-panel {
-  -moz-appearance: menupopup;
-  -moz-font-smoothing-background-color: -moz-mac-menupopup;
-  background-color: Menu;
-}
-
-menupopup > menu > menupopup {
-  margin-top: -4px;
-}
-
-.popup-internal-box {
-  padding: 4px 0;
-}
-
-panel[titlebar] {
-  -moz-appearance: none; /* to disable rounded corners */
-}
-
-panel[type="arrow"] {
-  -moz-appearance: none;
-  background: transparent;
-}
-
-panel[type="arrow"][side="top"],
-panel[type="arrow"][side="bottom"] {
-  margin-left: -25px;
-  margin-right: -25px;
-}
-
-panel[type="arrow"][side="left"],
-panel[type="arrow"][side="right"] {
-  margin-top: -25px;
-  margin-bottom: -25px;
-}
+/*
+ * This file is imported as a UA stylesheet because the default tooltip is
+ * built as native anonymous content.
+ */
 
-.panel-arrowcontent {
-  -moz-appearance: none;
-  -moz-font-smoothing-background-color: var(--arrowpanel-background);
-  background: var(--arrowpanel-background);
-  border-radius: var(--arrowpanel-border-radius);
-  box-shadow: 0 0 0 1px var(--arrowpanel-border-color);
-  color: var(--arrowpanel-color);
-  border: none;
-  padding: var(--arrowpanel-padding);
-  margin: 1px;
-}
-
-.panel-arrow {
-  -moz-context-properties: fill, stroke;
-  fill: var(--arrowpanel-background);
-  stroke: var(--arrowpanel-border-color);
-}
-
-.panel-arrow[side="top"] {
-  list-style-image: url("chrome://global/skin/arrow/panelarrow-vertical.svg");
-  margin-left: 16px;
-  margin-right: 16px;
-  margin-bottom: -1px;
-}
-
-.panel-arrow[side="bottom"] {
-  list-style-image: url("chrome://global/skin/arrow/panelarrow-vertical.svg");
-  -moz-transform: scaleY(-1);
-  margin-left: 16px;
-  margin-right: 16px;
-  margin-top: -1px;
-}
-
-.panel-arrow[side="left"] {
-  list-style-image: url("chrome://global/skin/arrow/panelarrow-horizontal.svg");
-  margin-top: 16px;
-  margin-bottom: 16px;
-  margin-right: -1px;
-}
-
-.panel-arrow[side="right"] {
-  list-style-image: url("chrome://global/skin/arrow/panelarrow-horizontal.svg");
-  transform: scaleX(-1);
-  margin-top: 16px;
-  margin-bottom: 16px;
-  margin-left: -1px;
-}
-
-/* ::::: tooltip ::::: */
+@namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul");
 
 tooltip {
   -moz-appearance: tooltip;
   -moz-font-smoothing-background-color: -moz-mac-tooltip;
   margin-top: 18px;
   padding: 2px 3px;
   max-width: 40em;
   color: InfoText;
   font: message-box;
   cursor: default;
 }
-
-tooltip[titletip="true"] {
- /* See bug 32157 comment 128
-  * margin: -2px 0px 0px -3px;
-  */
-  max-width: none;
-}
-
-/* rules for popups associated with menulists */
-
-menulist > menupopup {
-  min-width: 0px;
-}
-
-menulist > menupopup:not([position]) {
-  margin-inline-start: -13px;
-  margin-top: -2px;
-}
-
-menulist[editable="true"] > menupopup {
-  -moz-appearance: none;
-}
-
-menulist > menupopup > .popup-internal-box {
-  padding: 0;
-}
-
-menulist:not([editable="true"]) > menupopup {
-  padding: 4px 0;
-}
-
-menupopup[customoptionstyling="true"] {
-  -moz-appearance: none;
-  padding-top: 0;
-  padding-bottom: 0;
-}
--- a/toolkit/themes/windows/global/jar.mn
+++ b/toolkit/themes/windows/global/jar.mn
@@ -25,16 +25,17 @@ toolkit.jar:
 * skin/classic/global/numberbox.css
 * skin/classic/global/notification.css
   skin/classic/global/printPageSetup.css
   skin/classic/global/richlistbox.css
   skin/classic/global/scrollbox.css
   skin/classic/global/splitter.css
   skin/classic/global/toolbar.css
   skin/classic/global/toolbarbutton.css
+  skin/classic/global/tooltip.css
 * skin/classic/global/tree.css
 * skin/classic/global/alerts/alert.css                     (alerts/alert.css)
   skin/classic/global/arrow/arrow-lft.gif                  (arrow/arrow-lft.gif)
   skin/classic/global/arrow/arrow-lft-dis.gif              (arrow/arrow-lft-dis.gif)
   skin/classic/global/arrow/arrow-rit.gif                  (arrow/arrow-rit.gif)
   skin/classic/global/arrow/arrow-rit-dis.gif              (arrow/arrow-rit-dis.gif)
   skin/classic/global/arrow/arrow-up-dis.gif               (arrow/arrow-up-dis.gif)
   skin/classic/global/arrow/arrow-dn-dis.gif               (arrow/arrow-dn-dis.gif)
--- a/toolkit/themes/windows/global/popup.css
+++ b/toolkit/themes/windows/global/popup.css
@@ -106,35 +106,15 @@ panel[type="arrow"][side="right"] {
 %ifdef XP_WIN
 @media (-moz-windows-default-theme) {
   .panel-arrowcontent {
     box-shadow: 0 0 4px hsla(210,4%,10%,.2);
   }
 }
 %endif
 
-/* ::::: tooltip ::::: */
-
-tooltip {
-  -moz-appearance: tooltip;
-  margin-top: 21px;
-  border: 1px solid InfoText;
-  padding: 2px 3px;
-  max-width: 40em;
-  background-color: InfoBackground;
-  color: InfoText;
-  font: message-box;
-}
-
-tooltip[titletip="true"] {
- /* See bug 32157 comment 128
-  * margin: -2px 0px 0px -3px;
-  */
-  max-width: none;
-}
-
 /* rules for popups associated with menulists */
 
 menulist > menupopup {
   -moz-appearance: none;
   min-width: 0;
   background-color: -moz-Field;
 }
copy from toolkit/themes/windows/global/popup.css
copy to toolkit/themes/windows/global/tooltip.css
--- a/toolkit/themes/windows/global/popup.css
+++ b/toolkit/themes/windows/global/tooltip.css
@@ -1,140 +1,21 @@
 /* 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/. */
 
-@namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul");
-
-/* ::::: menupopup ::::: */
-
-menupopup,
-panel {
-  border: 1px solid ThreeDShadow;
-  padding: 0;
-  min-width: 1px;
-  background: Menu;
-  color: MenuText;
-}
-
-menupopup {
-  -moz-appearance: menupopup;
-}
-
-menupopup > menu > menupopup {
- /* align submenus */
-  margin-inline-start: -3px;
-  margin-top: -3px;
-}
-
-panel[type="arrow"] {
-  -moz-appearance: none;
-  background: transparent;
-  border: none;
-}
-
-panel[type="arrow"][side="top"],
-panel[type="arrow"][side="bottom"] {
-  margin-left: -20px;
-  margin-right: -20px;
-}
-
-panel[type="arrow"][side="left"],
-panel[type="arrow"][side="right"] {
-  margin-top: -20px;
-  margin-bottom: -20px;
-}
-
-.panel-arrowcontent {
-  padding: var(--arrowpanel-padding);
-  color: var(--arrowpanel-color);
-  background: var(--arrowpanel-background);
-  background-clip: padding-box;
-  border: 1px solid var(--arrowpanel-border-color);
-  box-shadow: 0 0 4px hsla(0,0%,0%,.2);
-  margin: 4px;
-}
+/*
+ * This file is imported as a UA stylesheet because the default tooltip is
+ * built as native anonymous content.
+ */
 
-%ifdef XP_WIN
-@media (-moz-os-version: windows-win7) {
-%endif
-.panel-arrowcontent {
-  border-radius: 4px;
-}
-%ifdef XP_WIN
-}
-%endif
-
-.panel-arrow {
-  -moz-context-properties: fill, stroke;
-  fill: var(--arrowpanel-background);
-  stroke: var(--arrowpanel-border-color);
-}
-
-.panel-arrow[side="top"],
-.panel-arrow[side="bottom"] {
-  list-style-image: url("chrome://global/skin/arrow/panelarrow-vertical.svg");
-  position: relative;
-  margin-left: 10px;
-  margin-right: 10px;
-}
-
-.panel-arrow[side="top"] {
-  margin-bottom: -5px;
-}
-
-.panel-arrow[side="bottom"] {
-  transform: scaleY(-1);
-  margin-top: -5px;
-}
-
-.panel-arrow[side="left"],
-.panel-arrow[side="right"] {
-  list-style-image: url("chrome://global/skin/arrow/panelarrow-horizontal.svg");
-  position: relative;
-  margin-top: 10px;
-  margin-bottom: 10px;
-}
-
-.panel-arrow[side="left"] {
-  margin-right: -5px;
-}
-
-.panel-arrow[side="right"] {
-  transform: scaleX(-1);
-  margin-left: -5px;
-}
-
-%ifdef XP_WIN
-@media (-moz-windows-default-theme) {
-  .panel-arrowcontent {
-    box-shadow: 0 0 4px hsla(210,4%,10%,.2);
-  }
-}
-%endif
-
-/* ::::: tooltip ::::: */
+@namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul");
 
 tooltip {
   -moz-appearance: tooltip;
   margin-top: 21px;
   border: 1px solid InfoText;
   padding: 2px 3px;
   max-width: 40em;
   background-color: InfoBackground;
   color: InfoText;
   font: message-box;
 }
-
-tooltip[titletip="true"] {
- /* See bug 32157 comment 128
-  * margin: -2px 0px 0px -3px;
-  */
-  max-width: none;
-}
-
-/* rules for popups associated with menulists */
-
-menulist > menupopup {
-  -moz-appearance: none;
-  min-width: 0;
-  background-color: -moz-Field;
-}