Bug #22960 --> rewrite the email address widget so it extends from xul:box instead of

base text. Remove needless box from the widget. This gets rid of the awful assertion
saying the widget had bad xul whenever we created one.
r=alecf
This commit is contained in:
mscott%netscape.com 2000-08-17 07:21:51 +00:00
Родитель 563180a5f3
Коммит 8552041716
1 изменённых файлов: 16 добавлений и 8 удалений

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

@ -5,23 +5,31 @@
xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
<!-- Message Pane Widgets -->
<binding id="mail-emailaddress" extends="chrome://global/content/xulBindings.xml#basetext">
<content excludes="observes,template">
<binding id="mail-emailaddress" extends="xul:box">
<content>
<xul:box inherits="orient" autostretch="never" flex="1">
<xul:box orient="vertical" autostretch="never" flex="1">
<xul:text class="emailDisplayButton" popup="emailAddressPopup" context="emailAddressPopup" inherits="value,accesskey,crop"/>
</xul:box>
<xul:image class="emailDisplayImage" inherits="src"/>
<xul:text class="emailDisplayButton" popup="emailAddressPopup" context="emailAddressPopup" inherits="value,crop"/>
<xul:image class="emailDisplayImage"/>
</xul:box>
</content>
<interface>
<property name="value" onset="return document.getAnonymousNodes(this)[0].firstChild.setAttribute('value',val);"
onget="return document.getAnonymousNodes(this)[0].firstChild.getAttribute('value');"/>
<property name="crop" onset="return document.getAnonymousNodes(this)[0].firstChild.setAttribute('crop',val);"
onget="return document.getAnonymousNodes(this)[0].firstChild.getAttribute('crop');"/>
<property name="disabled" onset="return document.getAnonymousNodes(this)[0].firstChild.setAttribute('disabled',val);"
onget="return document.getAnonymousNodes(this)[0].firstChild.getAttribute('disabled');"/>
<property name="src" onset="return document.getAnonymousNodes(this)[0].childNodes[1].setAttribute('src',val);"
onget="return document.getAnonymousNodes(this)[0].childNodes[1].getAttribute('src');"/>
<property name="imgalign" onset="return document.getAnonymousNodes(this)[0].childNodes[1].setAttribute('imgalign',val);"
onget="return document.getAnonymousNodes(this)[0].childNodes[1].getAttribute('imgalign');"/>
<method name="setTextAttribute">
<argument name="attributeName"/>
<argument name="attributeValue"/>
<body>
<![CDATA[
var textNode = document.getAnonymousNodes(this)[0].firstChild.firstChild;
var textNode = document.getAnonymousNodes(this)[0].firstChild;
textNode.setAttribute(attributeName, attributeValue);
]]>
</body>
@ -32,7 +40,7 @@
<argument name="attributeValue"/>
<body>
<![CDATA[
var textNode = document.getAnonymousNodes(this)[0].firstChild.firstChild;
var textNode = document.getAnonymousNodes(this)[0].firstChild;
return textNode.getAttribute(attributeName, attributeValue);
]]>
</body>