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 : source : 4d511f7fc5b5c16fdfea91242dea6086cd57c8c3
extra : intermediate-source : b880ba94f5241a755282431a17cd9cb0f5f24e78
This commit is contained in:
Paolo Amadini 2018-07-14 21:21:57 +01:00
parent b1988a7306
commit 238fce2988
14 changed files with 83 additions and 71 deletions

View File

@ -172,7 +172,7 @@
/* type="arrow" overrides: remove arrow decorations for the xul <panel> wrapper */
.tooltip-xul-wrapper[type="arrow"] {
.tooltip-xul-wrapper[type="arrow"][side] {
margin: 0;
}

View File

@ -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");

View File

@ -11,15 +11,7 @@
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">
@ -55,8 +47,7 @@
</handlers>
</binding>
<binding id="panel"
extends="chrome://global/content/bindings/popup.xml#popup-base">
<binding id="panel">
<implementation>
<field name="_prevFocus">0</field>
</implementation>
@ -139,6 +130,11 @@
</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">
@ -267,8 +263,7 @@
</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"/>

View File

@ -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 <tree> cells. */
max-width: none;
}
/********** progressmeter **********/
progressmeter {

View File

@ -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)

View File

@ -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 {

View File

@ -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;
}

View File

@ -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)

View File

@ -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)

View File

@ -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 {

View File

@ -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;
}

View File

@ -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)

View File

@ -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 {

View File

@ -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;
}