From 56d700c39810c362c40f327cfcef03b64ebd0528 Mon Sep 17 00:00:00 2001 From: Paolo Amadini Date: Tue, 17 Jul 2018 19:04:43 +0100 Subject: [PATCH] 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 --HG-- rename : toolkit/themes/linux/global/popup.css => toolkit/themes/linux/global/tooltip.css rename : toolkit/themes/osx/global/popup.css => toolkit/themes/osx/global/tooltip.css rename : toolkit/themes/windows/global/popup.css => toolkit/themes/windows/global/tooltip.css extra : rebase_source : bd79b86fb44ac0dc77d0d21fdc003105da6f43eb extra : intermediate-source : a06a200098013d5dbc42c2431f845ca1dd8b0b76 extra : source : 4d511f7fc5b5c16fdfea91242dea6086cd57c8c3 --- devtools/client/themes/tooltips.css | 2 +- mobile/android/installer/allowed-dupes.mn | 1 + toolkit/content/widgets.css | 1 + toolkit/content/widgets/popup.xml | 21 ++++++++------------- toolkit/content/xul.css | 9 +++++++++ toolkit/themes/linux/global/jar.mn | 1 + toolkit/themes/linux/global/popup.css | 17 ----------------- toolkit/themes/linux/global/tooltip.css | 18 ++++++++++++++++++ toolkit/themes/mobile/jar.mn | 1 + toolkit/themes/osx/global/jar.mn | 1 + toolkit/themes/osx/global/popup.css | 20 -------------------- toolkit/themes/osx/global/tooltip.css | 21 +++++++++++++++++++++ toolkit/themes/windows/global/jar.mn | 1 + toolkit/themes/windows/global/popup.css | 20 -------------------- toolkit/themes/windows/global/tooltip.css | 21 +++++++++++++++++++++ 15 files changed, 84 insertions(+), 71 deletions(-) create mode 100644 toolkit/themes/linux/global/tooltip.css create mode 100644 toolkit/themes/osx/global/tooltip.css create mode 100644 toolkit/themes/windows/global/tooltip.css diff --git a/devtools/client/themes/tooltips.css b/devtools/client/themes/tooltips.css index 7c5596512a84..a16a70c61ef2 100644 --- a/devtools/client/themes/tooltips.css +++ b/devtools/client/themes/tooltips.css @@ -172,7 +172,7 @@ /* type="arrow" overrides: remove arrow decorations for the xul wrapper */ -.tooltip-xul-wrapper[type="arrow"] { +.tooltip-xul-wrapper[type="arrow"][side] { margin: 0; } diff --git a/mobile/android/installer/allowed-dupes.mn b/mobile/android/installer/allowed-dupes.mn index efbee37c6ae4..c9eab86db209 100644 --- a/mobile/android/installer/allowed-dupes.mn +++ b/mobile/android/installer/allowed-dupes.mn @@ -28,6 +28,7 @@ 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 diff --git a/toolkit/content/widgets.css b/toolkit/content/widgets.css index e6a567063a46..d74a03774036 100644 --- a/toolkit/content/widgets.css +++ b/toolkit/content/widgets.css @@ -15,6 +15,7 @@ @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"); diff --git a/toolkit/content/widgets/popup.xml b/toolkit/content/widgets/popup.xml index be7f6e0553dc..a4d608b793d7 100644 --- a/toolkit/content/widgets/popup.xml +++ b/toolkit/content/widgets/popup.xml @@ -11,15 +11,7 @@ xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" xmlns:xbl="http://www.mozilla.org/xbl"> - - - - - - - - + @@ -55,8 +47,7 @@ - + 0 @@ -139,6 +130,11 @@ + + + + + @@ -267,8 +263,7 @@ - + diff --git a/toolkit/content/xul.css b/toolkit/content/xul.css index 91bebf950805..914849d7163a 100644 --- a/toolkit/content/xul.css +++ b/toolkit/content/xul.css @@ -19,6 +19,8 @@ * 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 */ @@ -664,6 +666,13 @@ tabpanels { display: -moz-deck; } +/********** tooltip *********/ + +tooltip[titletip="true"] { + /* The width of the tooltip isn't limited on cropped cells. */ + max-width: none; +} + /********** progressmeter **********/ progressmeter { diff --git a/toolkit/themes/linux/global/jar.mn b/toolkit/themes/linux/global/jar.mn index 6b7d9082a281..b963dcd76191 100644 --- a/toolkit/themes/linux/global/jar.mn +++ b/toolkit/themes/linux/global/jar.mn @@ -29,6 +29,7 @@ toolkit.jar: 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) diff --git a/toolkit/themes/linux/global/popup.css b/toolkit/themes/linux/global/popup.css index ca682f4431b1..755d1c1776da 100644 --- a/toolkit/themes/linux/global/popup.css +++ b/toolkit/themes/linux/global/popup.css @@ -80,23 +80,6 @@ panel[type="arrow"][side="right"] { 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 { diff --git a/toolkit/themes/linux/global/tooltip.css b/toolkit/themes/linux/global/tooltip.css new file mode 100644 index 000000000000..fb9c9f1d5732 --- /dev/null +++ b/toolkit/themes/linux/global/tooltip.css @@ -0,0 +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/. */ + +/* + * This file is imported as a UA stylesheet because the default tooltip is + * built as native anonymous content. + */ + +@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; +} diff --git a/toolkit/themes/mobile/jar.mn b/toolkit/themes/mobile/jar.mn index dae5bc7431b5..e0d1b18ac5e4 100644 --- a/toolkit/themes/mobile/jar.mn +++ b/toolkit/themes/mobile/jar.mn @@ -26,6 +26,7 @@ toolkit.jar: 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) diff --git a/toolkit/themes/osx/global/jar.mn b/toolkit/themes/osx/global/jar.mn index 7a2c924eb65d..8fad026d8281 100644 --- a/toolkit/themes/osx/global/jar.mn +++ b/toolkit/themes/osx/global/jar.mn @@ -33,6 +33,7 @@ toolkit.jar: 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) diff --git a/toolkit/themes/osx/global/popup.css b/toolkit/themes/osx/global/popup.css index 39c27bd66539..c175c095b69d 100644 --- a/toolkit/themes/osx/global/popup.css +++ b/toolkit/themes/osx/global/popup.css @@ -88,26 +88,6 @@ panel[type="arrow"][side="right"] { 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 { diff --git a/toolkit/themes/osx/global/tooltip.css b/toolkit/themes/osx/global/tooltip.css new file mode 100644 index 000000000000..7dbf0dd1194a --- /dev/null +++ b/toolkit/themes/osx/global/tooltip.css @@ -0,0 +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/. */ + +/* + * This file is imported as a UA stylesheet because the default tooltip is + * built as native anonymous content. + */ + +@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; +} diff --git a/toolkit/themes/windows/global/jar.mn b/toolkit/themes/windows/global/jar.mn index 65783e5a2012..c1e49cec9de2 100644 --- a/toolkit/themes/windows/global/jar.mn +++ b/toolkit/themes/windows/global/jar.mn @@ -30,6 +30,7 @@ toolkit.jar: 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) diff --git a/toolkit/themes/windows/global/popup.css b/toolkit/themes/windows/global/popup.css index a9c92b70e08d..0c87c2d23770 100644 --- a/toolkit/themes/windows/global/popup.css +++ b/toolkit/themes/windows/global/popup.css @@ -111,26 +111,6 @@ panel[type="arrow"][side="right"] { } %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 { diff --git a/toolkit/themes/windows/global/tooltip.css b/toolkit/themes/windows/global/tooltip.css new file mode 100644 index 000000000000..b02dceab8c6b --- /dev/null +++ b/toolkit/themes/windows/global/tooltip.css @@ -0,0 +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/. */ + +/* + * This file is imported as a UA stylesheet because the default tooltip is + * built as native anonymous content. + */ + +@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; +}