Bug 339075, xul's ephemeral messages are shown in wrong place, r=me+aaronr, p=surkov

This commit is contained in:
Olli.Pettay%helsinki.fi 2006-08-30 15:01:43 +00:00
Родитель 5ba891f3a8
Коммит 9998f2e17d
2 изменённых файлов: 17 добавлений и 13 удалений

Просмотреть файл

@ -391,12 +391,12 @@
extends="#xformswidget-alert">
<content>
<xul:popup anonid="popup">
<xul:tooltip anonid="popup">
<xul:deck anonid="contentswitcher" flex="1" selectedIndex="1">
<xul:label anonid="implicitcontent" xbl:inherits="orient"/>
<xul:label xbl:inherits="orient"><children/></xul:label>
</xul:deck>
</xul:popup>
</xul:tooltip>
</content>
<implementation implements="nsIXFormsEphemeralMessageUI">
@ -404,10 +404,21 @@
<parameter name="aPosX"/>
<parameter name="aPosY"/>
<body>
aPosX += this.ownerDocument.defaultView.screenX;
aPosY += this.ownerDocument.defaultView.screenY;
this.popup.showPopup(this.ownerDocument.documentElement, aPosX, aPosY,
"popup", null, null);
// Since the method gets coordinates relative document but tooltip can
// be shown relative screen then we should do the following magic.
// We use passed coordinates to save the logic of xtf part of
// message. Also we substract 21 from y coordinate to revoke tooltip
// logic.
var boxObject = this.ownerDocument.getBoxObjectFor(this.parentNode);
var deltaX = aPosX - boxObject.x;
var deltaY = aPosY - boxObject.y;
aPosX = boxObject.screenX + deltaX;
aPosY = boxObject.screenY + deltaY - 21;
this.popup.showPopup(this.ownerDocument.documentElement,
aPosX, aPosY, "tooltip", null, null);
</body>
</method>

Просмотреть файл

@ -150,13 +150,6 @@ html|*:root message[level="ephemeral"], html|*:root hint {
display: block;
}
xul|*:root message[level="ephemeral"] xul|deck , xul|*:root hint xul|deck {
background-color: InfoBackground;
color: InfoText;
padding: 2px 3px;
font: message-box;
}
html|*:root message[level="ephemeral"] > html|div.-moz-xforms-message-container,
html|*:root hint > html|div.-moz-xforms-message-container {
background-color: inherit;