зеркало из https://github.com/mozilla/pjs.git
fix for 51410 - xbl syntax change, r=danm
This commit is contained in:
Родитель
cc848473e2
Коммит
ce31959433
|
@ -1538,15 +1538,15 @@ nsXBLBinding::ConstructAttributeTable(nsIContent* aElement)
|
|||
|
||||
// Figure out if this token contains a :.
|
||||
nsAutoString attrTok; attrTok.AssignWithConversion(token);
|
||||
PRInt32 index = attrTok.Find(":", PR_TRUE);
|
||||
PRInt32 index = attrTok.Find("=", PR_TRUE);
|
||||
if (index != -1) {
|
||||
// This attribute maps to something different.
|
||||
nsAutoString left, right;
|
||||
attrTok.Left(left, index);
|
||||
attrTok.Right(right, attrTok.Length()-index-1);
|
||||
|
||||
atom = getter_AddRefs(NS_NewAtom(left.GetUnicode()));
|
||||
attribute = getter_AddRefs(NS_NewAtom(right.GetUnicode()));
|
||||
atom = getter_AddRefs(NS_NewAtom(right.GetUnicode()));
|
||||
attribute = getter_AddRefs(NS_NewAtom(left.GetUnicode()));
|
||||
}
|
||||
else {
|
||||
nsAutoString tok; tok.AssignWithConversion(token);
|
||||
|
@ -1600,6 +1600,10 @@ nsXBLBinding::ConstructAttributeTable(nsIContent* aElement)
|
|||
}
|
||||
}
|
||||
|
||||
// Now remove the inherits attribute from the cloned element. It is used
|
||||
// on the template only, and we don't need it anymore.
|
||||
aElement->UnsetAttribute(kNameSpaceID_None, kInheritsAtom, PR_FALSE);
|
||||
|
||||
token = nsCRT::strtok( newStr, ", ", &newStr );
|
||||
}
|
||||
|
||||
|
|
|
@ -1538,15 +1538,15 @@ nsXBLBinding::ConstructAttributeTable(nsIContent* aElement)
|
|||
|
||||
// Figure out if this token contains a :.
|
||||
nsAutoString attrTok; attrTok.AssignWithConversion(token);
|
||||
PRInt32 index = attrTok.Find(":", PR_TRUE);
|
||||
PRInt32 index = attrTok.Find("=", PR_TRUE);
|
||||
if (index != -1) {
|
||||
// This attribute maps to something different.
|
||||
nsAutoString left, right;
|
||||
attrTok.Left(left, index);
|
||||
attrTok.Right(right, attrTok.Length()-index-1);
|
||||
|
||||
atom = getter_AddRefs(NS_NewAtom(left.GetUnicode()));
|
||||
attribute = getter_AddRefs(NS_NewAtom(right.GetUnicode()));
|
||||
atom = getter_AddRefs(NS_NewAtom(right.GetUnicode()));
|
||||
attribute = getter_AddRefs(NS_NewAtom(left.GetUnicode()));
|
||||
}
|
||||
else {
|
||||
nsAutoString tok; tok.AssignWithConversion(token);
|
||||
|
@ -1600,6 +1600,10 @@ nsXBLBinding::ConstructAttributeTable(nsIContent* aElement)
|
|||
}
|
||||
}
|
||||
|
||||
// Now remove the inherits attribute from the cloned element. It is used
|
||||
// on the template only, and we don't need it anymore.
|
||||
aElement->UnsetAttribute(kNameSpaceID_None, kInheritsAtom, PR_FALSE);
|
||||
|
||||
token = nsCRT::strtok( newStr, ", ", &newStr );
|
||||
}
|
||||
|
||||
|
|
|
@ -10,7 +10,7 @@ extends="chrome://global/content/xulBindings.xml#menuitem">
|
|||
<content autostretch="never" excludes="template,observes,menupopup">
|
||||
<xul:text class="composemenu-text" inherits="value,accesskey,crop"
|
||||
crop="right"/>
|
||||
<xul:text class="composemenu-text-2" inherits="accountname:value"
|
||||
<xul:text class="composemenu-text-2" inherits="value=accountname"
|
||||
crop="right"/>
|
||||
</content>
|
||||
</binding>
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
<content excludes="observes,template,menupopup">
|
||||
<xul:stack>
|
||||
<xul:button class="menubutton-dual-button button-toolbar-1 top" allowevents="true"
|
||||
inherits="buttontooltiptext:tooltiptext,buttonaction:oncommand,src,value,crop,accesskey,disabled"/>
|
||||
inherits="tooltiptext=buttontooltiptext,oncommand=buttonaction,src,value,crop,accesskey,disabled"/>
|
||||
<xul:box class="menubutton-dual-dropmarker-box" autostretch="never" valign="bottom" flex="1">
|
||||
<xul:image class="menubutton-dual-dropmarker" inherits="disabled"/>
|
||||
</xul:box>
|
||||
|
@ -21,7 +21,7 @@
|
|||
<content excludes="observes,template,menupopup">
|
||||
<xul:stack>
|
||||
<xul:button class="menubutton-dual-button button-toolbar-2 top" allowevents="true"
|
||||
inherits="buttontooltiptext:tooltiptext,buttonaction:oncommand,src,value,crop,accesskey,disabled"/>
|
||||
inherits="tooltiptext=buttontooltiptext,oncommand=buttonaction,src,value,crop,accesskey,disabled"/>
|
||||
<xul:box class="menubutton-dual-dropmarker-box" autostretch="never" valign="bottom" flex="1">
|
||||
<xul:image class="menubutton-dual-dropmarker" inherits="disabled"/>
|
||||
</xul:box>
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
<binding id="menubutton-toolbar">
|
||||
<content excludes="observes,template,menupopup">
|
||||
<xul:button class="menubutton-dual-button button-toolbar-1 top" allowevents="true"
|
||||
inherits="buttontooltiptext:tooltiptext,buttonaction:oncommand,src,value,crop,accesskey,disabled"/>
|
||||
inherits="tooltiptext=buttontooltiptext,oncommand=buttonaction,src,value,crop,accesskey,disabled"/>
|
||||
<xul:box class="menubutton-dual-dropmarker-box" autostretch="never" valign="middle" flex="1">
|
||||
<xul:image class="menubutton-dual-dropmarker" inherits="disabled"/>
|
||||
</xul:box>
|
||||
|
|
|
@ -80,13 +80,13 @@
|
|||
|
||||
<binding id="scrollbar">
|
||||
<content>
|
||||
<xul:scrollbarbutton type="decrement" inherits="align:sborient">
|
||||
<xul:scrollbarbutton type="decrement" inherits="sborient=align">
|
||||
<xul:image inherits="src"/>
|
||||
</xul:scrollbarbutton>
|
||||
<xul:slider flex="1" inherits="curpos,maxpos,pageincrement,increment,align">
|
||||
<xul:thumb inherits="align,src" flex="1"/>
|
||||
</xul:slider>
|
||||
<xul:scrollbarbutton type="increment" inherits="align:sborient">
|
||||
<xul:scrollbarbutton type="increment" inherits="sborient=align">
|
||||
<xul:image inherits="src"/>
|
||||
</xul:scrollbarbutton>
|
||||
</content>
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
<content excludes="observes,template,menupopup">
|
||||
<xul:box class="classic-simplebutton-box" autostretch="never" flex="1">
|
||||
<xul:button class="classic-simplebutton" allowevents="true" flex="1"
|
||||
inherits="value,src,accesskey,crop,disabled,buttonaction:oncommand"
|
||||
inherits="value,src,accesskey,crop,disabled,oncommand=buttonaction"
|
||||
onmousedown="this.parentNode.setAttribute('buttondown','true');"
|
||||
onmouseup="this.parentNode.removeAttribute('buttondown');"
|
||||
onmouseover="this.parentNode.setAttribute('buttonover','true');"
|
||||
|
|
|
@ -74,11 +74,11 @@
|
|||
|
||||
<binding id="scrollbar">
|
||||
<content>
|
||||
<xul:scrollbarbutton type="decrement" inherits="align:sborient"/>
|
||||
<xul:scrollbarbutton type="decrement" inherits="sborient=align"/>
|
||||
<xul:slider flex="1" inherits="curpos,maxpos,pageincrement,increment">
|
||||
<xul:thumb inherits="align,src" flex="1"/>
|
||||
</xul:slider>
|
||||
<xul:scrollbarbutton type="increment" inherits="align:sborient"/>
|
||||
<xul:scrollbarbutton type="increment" inherits="sborient=align"/>
|
||||
</content>
|
||||
</binding>
|
||||
|
||||
|
@ -119,7 +119,7 @@
|
|||
</xul:box>
|
||||
<xul:spring class="menuitem-iconic-spring"/>
|
||||
<xul:text class="menu-iconic-text" flex="1" align="left" inherits="value,accesskey,crop" crop="right"/>
|
||||
<xul:text class="menu-iconic-accel" inherits="acceltext:value"/>
|
||||
<xul:text class="menu-iconic-accel" inherits="value=acceltext"/>
|
||||
</content>
|
||||
</binding>
|
||||
|
||||
|
@ -128,8 +128,8 @@
|
|||
<xul:box class="largeheader-box" flex="1">
|
||||
<xul:box class="largeheader-text-container" orient="vertical">
|
||||
<xul:spring flex="1"/>
|
||||
<xul:text class="largeheader-header-text" inherits="title:value" crop="right"/>
|
||||
<xul:html class="largeheader-desc-text" inherits="description:value"/>
|
||||
<xul:text class="largeheader-header-text" inherits="value=title" crop="right"/>
|
||||
<xul:html class="largeheader-desc-text" inherits="value=description"/>
|
||||
<xul:spring flex="1"/>
|
||||
</xul:box>
|
||||
<xul:box class="largeheader-icon-container" autostretch="never">
|
||||
|
@ -173,7 +173,7 @@
|
|||
<!--
|
||||
<binding id="throbber" extends="xul:box">
|
||||
<content autostretch="never">
|
||||
<button allowevents="true" class="throbber-button" inherits="throbberaction:oncommand,throbbertooltip:tooltip,throbbertooltiptext:tooltiptext"/>
|
||||
<button allowevents="true" class="throbber-button" inherits="oncommand=throbberaction,tooltip=throbbertooltip,tooltiptext=throbbertooltiptext"/>
|
||||
</content>
|
||||
</binding>
|
||||
-->
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
<content excludes="observes,template,menupopup">
|
||||
<xul:stack class="menubutton-dual-stack">
|
||||
<xul:button class="menubutton-dual-button button-toolbar-1 top" allowevents="true"
|
||||
inherits="buttontooltiptext:tooltiptext,buttonaction:oncommand,src,value,crop,accesskey,disabled"/>
|
||||
inherits="tooltiptext=buttontooltiptext,oncommand=buttonaction,src,value,crop,accesskey,disabled"/>
|
||||
<xul:box class="menubutton-dual-dropmarker-box" autostretch="never" flex="1">
|
||||
<xul:image class="menubutton-dual-dropmarker" inherits="disabled"/>
|
||||
</xul:box>
|
||||
|
@ -21,7 +21,7 @@
|
|||
<content excludes="observes,template,menupopup">
|
||||
<xul:stack class="menubutton-dual-stack">
|
||||
<xul:button class="menubutton-dual-button button-toolbar-2 top" allowevents="true"
|
||||
inherits="buttontooltiptext:tooltiptext,buttonaction:oncommand,src,value,crop,accesskey,disabled"/>
|
||||
inherits="tooltiptext=buttontooltiptext,oncommand=buttonaction,src,value,crop,accesskey,disabled"/>
|
||||
<xul:box class="menubutton-dual-dropmarker-box" autostretch="never" flex="1">
|
||||
<xul:image class="menubutton-dual-dropmarker" inherits="disabled"/>
|
||||
</xul:box>
|
||||
|
|
|
@ -19,13 +19,13 @@
|
|||
</binding>
|
||||
|
||||
<binding id="toolbar-primary" extends="chrome://global/content/toolbarBindings.xml#toolbar">
|
||||
<content inherits="false">
|
||||
<content>
|
||||
<xul:box class="toolbar-primary-image-left">
|
||||
<xul:toolbargrippy inherits="grippytooltiptext:tooltiptext,grippytooltip:tooltip,last-toolbar"
|
||||
<xul:toolbargrippy inherits="tooltiptext=grippytooltiptext,tooltip=grippytooltip,last-toolbar"
|
||||
onclick="this.grippyClicked();" tbattr="toolbar-grippy"
|
||||
class="toolbar-primary-grippy"/>
|
||||
</xul:box>
|
||||
<xul:box flex="1" class="toolbar-primary-image-middle toolbar-holder" inherits="collapsed,last-toolbar,tborient:orient,tbautostretch:autostretch" autostretch="never">
|
||||
<xul:box flex="1" class="toolbar-primary-image-middle toolbar-holder" inherits="collapsed,last-toolbar,orient=tborient,autostretch=tbautostretch" autostretch="never">
|
||||
<children/>
|
||||
</xul:box>
|
||||
<xul:spring class="toolbar-primary-image-right"/>
|
||||
|
|
|
@ -8,9 +8,9 @@
|
|||
<binding id="smallheader">
|
||||
<content>
|
||||
<xul:box class="box-smallheader-box toolbar-primary" autostretch="never" flex="1">
|
||||
<xul:text class="box-smallheader-left" inherits="title:value"/>
|
||||
<xul:text class="box-smallheader-left" inherits="value=title"/>
|
||||
<xul:spring flex="1"/>
|
||||
<xul:text class="box-smallheader-right" inherits="description:value"/>
|
||||
<xul:text class="box-smallheader-right" inherits="value=description"/>
|
||||
</xul:box>
|
||||
</content>
|
||||
<interface>
|
||||
|
@ -40,7 +40,7 @@
|
|||
<xul:box class="box-status-bg toolbar-standard" flex="1">
|
||||
<xul:text class="box-status-text" inherits="value"/>
|
||||
<xul:spring flex="1"/>
|
||||
<xul:text class="box-status-progress" inherits="progress:value"/>
|
||||
<xul:text class="box-status-progress" inherits="value=progress"/>
|
||||
</xul:box>
|
||||
</content>
|
||||
</binding>
|
||||
|
|
|
@ -15,20 +15,20 @@
|
|||
</xul:box>
|
||||
<xul:box orient="vertical" flex="1">
|
||||
<xul:box autostretch="never" valign="top">
|
||||
<xul:text class="label" inherits="typetext:value"/>
|
||||
<xul:html inherits="msg:value" flex="1"/>
|
||||
<xul:text class="label" inherits="value=typetext"/>
|
||||
<xul:html inherits="value=msg" flex="1"/>
|
||||
</xul:box>
|
||||
<xul:box>
|
||||
<xul:text class="label" value="&url.label;"/>
|
||||
<xul:text class="label" inherits="url:value" crop="right"/>
|
||||
<xul:text class="label" inherits="value=url" crop="right"/>
|
||||
</xul:box>
|
||||
<xul:box>
|
||||
<xul:text class="label" value="&line.label;"/>
|
||||
<xul:text class="label" inherits="line:value" flex="1"/>
|
||||
<xul:text class="label" inherits="value=line" flex="1"/>
|
||||
<xul:text class="label" value="&col.label;"/>
|
||||
<xul:text class="label" inherits="col:value" flex="1"/>
|
||||
<xul:text class="label" inherits="value=col" flex="1"/>
|
||||
</xul:box>
|
||||
<xul:html inherits="error:value"/>
|
||||
<xul:html inherits="value=error"/>
|
||||
</xul:box>
|
||||
</xul:box>
|
||||
</content>
|
||||
|
|
|
@ -8,9 +8,9 @@
|
|||
<binding id="smallheader">
|
||||
<content>
|
||||
<xul:box class="toolbar-primary" autostretch="never" flex="1">
|
||||
<xul:text class="box-smallheader-left" inherits="title:value"/>
|
||||
<xul:text class="box-smallheader-left" inherits="value=title"/>
|
||||
<xul:spring flex="1"/>
|
||||
<xul:text class="box-smallheader-right" inherits="description:value"/>
|
||||
<xul:text class="box-smallheader-right" inherits="value=description"/>
|
||||
</xul:box>
|
||||
</content>
|
||||
<implementation>
|
||||
|
@ -38,7 +38,7 @@
|
|||
<xul:box class="box-status-bg toolbar-standard" flex="1">
|
||||
<xul:text class="box-status-text" inherits="value"/>
|
||||
<xul:spring flex="1"/>
|
||||
<xul:text class="box-status-progress" inherits="progress:value"/>
|
||||
<xul:text class="box-status-progress" inherits="value=progress"/>
|
||||
</xul:box>
|
||||
</content>
|
||||
</binding>
|
||||
|
|
|
@ -81,7 +81,7 @@
|
|||
<content excludes="template,observes,menupopup">
|
||||
<xul:box class="menubutton-internal-box">
|
||||
<xul:button class="menubutton-dual-button top" allowevents="true"
|
||||
inherits="buttontooltiptext:tooltiptext,buttonaction:oncommand,src,value,crop,accesskey"/>
|
||||
inherits="tooltiptext=buttontooltiptext,oncommand=buttonaction,src,value,crop,accesskey"/>
|
||||
<xul:box class="menubutton-dual-dropmarker-box" autostretch="never" valign="middle">
|
||||
<xul:image class="menubutton-dropmarker"/>
|
||||
</xul:box>
|
||||
|
@ -93,7 +93,7 @@
|
|||
<content excludes="template,observes,menupopup">
|
||||
<xul:box class="menubutton-internal-box">
|
||||
<xul:button class="menubutton-dual-button left" allowevents="true"
|
||||
inherits="buttontooltiptext:tooltiptext,buttonaction:oncommand,src,value,crop,accesskey"/>
|
||||
inherits="tooltiptext=buttontooltiptext,oncommand=buttonaction,src,value,crop,accesskey"/>
|
||||
<xul:box class="menubutton-dual-dropmarker-box" autostretch="never" valign="middle">
|
||||
<xul:image class="menubutton-dropmarker"/>
|
||||
</xul:box>
|
||||
|
@ -105,7 +105,7 @@
|
|||
<content excludes="template,observes,menupopup">
|
||||
<xul:box class="menubutton-internal-box">
|
||||
<xul:button class="menubutton-dual-button right" allowevents="true"
|
||||
inherits="buttontooltiptext:tooltiptext,buttonaction:oncommand,src,value,crop,accesskey"/>
|
||||
inherits="tooltiptext=buttontooltiptext,oncommand=buttonaction,src,value,crop,accesskey"/>
|
||||
<xul:box class="menubutton-dual-dropmarker-box" autostretch="never" valign="middle">
|
||||
<xul:image class="menubutton-dropmarker"/>
|
||||
</xul:box>
|
||||
|
@ -117,7 +117,7 @@
|
|||
<content excludes="template,observes,menupopup">
|
||||
<xul:box class="menubutton-internal-box">
|
||||
<xul:button class="menubutton-dual-button bottom" allowevents="true"
|
||||
inherits="buttontooltiptext:tooltiptext,buttonaction:oncommand,src,value,crop,accesskey"/>
|
||||
inherits="tooltiptext=buttontooltiptext,oncommand=buttonaction,src,value,crop,accesskey"/>
|
||||
<xul:box class="menubutton-dual-dropmarker-box" autostretch="never" valign="middle">
|
||||
<xul:image class="menubutton-dropmarker"/>
|
||||
</xul:box>
|
||||
|
@ -128,7 +128,7 @@
|
|||
<binding id="menubutton-dual-ex" extends="chrome://global/content/menulistBindings.xml#menubutton-dual-top">
|
||||
<content excludes="template,observes,menupopup">
|
||||
<xul:button class="menubutton-dual-ex-button top" allowevents="true"
|
||||
inherits="buttontooltiptext:tooltiptext,buttonaction:oncommand,src,value,crop,accesskey,disabled"
|
||||
inherits="tooltiptext=buttontooltiptext,oncommand=buttonaction,src,value,crop,accesskey,disabled"
|
||||
onmouseover="this.parentNode.buttonover = true;"
|
||||
onmouseout="this.parentNode.buttonover = false;"
|
||||
onmousedown="this.parentNode.buttondown = true;"
|
||||
|
|
|
@ -196,10 +196,10 @@ Contributor(s):
|
|||
|
||||
<binding id="toolbar" extends="xul:box">
|
||||
<content>
|
||||
<xul:toolbargrippy inherits="grippytooltiptext:tooltiptext,grippytooltip:tooltip,last-toolbar"
|
||||
<xul:toolbargrippy inherits="tooltiptext=grippytooltiptext,tooltip=grippytooltip,last-toolbar"
|
||||
onclick="this.grippyClicked();" tbattr="toolbar-grippy"
|
||||
class="toolbar-grippy"/>
|
||||
<xul:box flex="1" class="toolbar-holder" inherits="collapsed,last-toolbar,tborient:orient,tbautostretch:autostretch" autostretch="never">
|
||||
<xul:box flex="1" class="toolbar-holder" inherits="collapsed,last-toolbar,orient=tborient,autostretch=tbautostretch" autostretch="never">
|
||||
<children/>
|
||||
</xul:box>
|
||||
</content>
|
||||
|
@ -226,7 +226,7 @@ Contributor(s):
|
|||
|
||||
<binding id="menubar" extends="xul:menubar">
|
||||
<content>
|
||||
<xul:toolbargrippy inherits="grippytooltiptext:tooltiptext,grippytooltip:tooltip,last-toolbar"
|
||||
<xul:toolbargrippy inherits="tooltiptext=grippytooltiptext,tooltip=grippytooltip,last-toolbar"
|
||||
onclick="this.grippyClicked();" tbattr="toolbar-grippy"
|
||||
class="toolbar-grippy"/>
|
||||
<xul:box flex="1" class="toolbar-holder" inherits="collapsed,last-toolbar" autostretch="never">
|
||||
|
|
|
@ -71,7 +71,7 @@
|
|||
<binding id="menuitem">
|
||||
<content autostretch="never" excludes="template,observes,menupopup">
|
||||
<xul:text class="menu-text" flex="1" align="left" inherits="value,accesskey,crop" crop="right"/>
|
||||
<xul:text class="menu-accel" inherits="acceltext:value"/>
|
||||
<xul:text class="menu-accel" inherits="value=acceltext"/>
|
||||
</content>
|
||||
<implementation>
|
||||
<property name="data" onset="this.setAttribute('data',val); return val;"
|
||||
|
@ -85,7 +85,7 @@
|
|||
<xul:image/>
|
||||
</xul:box>
|
||||
<xul:text class="menu-iconic-text" flex="1" align="left" inherits="value,accesskey,crop" crop="right"/>
|
||||
<xul:text class="menu-iconic-accel" inherits="acceltext:value"/>
|
||||
<xul:text class="menu-iconic-accel" inherits="value=acceltext"/>
|
||||
</content>
|
||||
<implementation>
|
||||
<property name="data" onset="this.setAttribute('data',val); return val;"
|
||||
|
@ -99,7 +99,7 @@
|
|||
<xul:image/>
|
||||
</xul:box>
|
||||
<xul:text class="menu-iconic-text" flex="1" align="left" inherits="value,accesskey,crop" crop="right"/>
|
||||
<xul:text class="menu-iconic-accel" inherits="acceltext:value"/>
|
||||
<xul:text class="menu-iconic-accel" inherits="value=acceltext"/>
|
||||
<xul:box orient="vertical" autostretch="never" class="menu-right" inherits="menuactive,disabled">
|
||||
<xul:image/>
|
||||
</xul:box>
|
||||
|
|
Загрузка…
Ссылка в новой задаче