зеркало из https://github.com/mozilla/pjs.git
Fix for 94944. r=danm, sr=hewitt
This commit is contained in:
Родитель
6d42a5c899
Коммит
79dffa3202
|
@ -42,6 +42,9 @@ public:
|
|||
NS_IMETHOD SetDefaultContent(nsIContent* aDefaultContent)=0;
|
||||
NS_IMETHOD GetDefaultContent(nsIContent** aDefaultContent)=0;
|
||||
|
||||
NS_IMETHOD SetDefaultContentTemplate(nsIContent* aDefaultContent)=0;
|
||||
NS_IMETHOD GetDefaultContentTemplate(nsIContent** aDefaultContent)=0;
|
||||
|
||||
NS_IMETHOD AddChild(nsIContent* aChildElement)=0;
|
||||
NS_IMETHOD InsertChildAt(PRInt32 aIndex, nsIContent* aChildElement)=0;
|
||||
NS_IMETHOD RemoveChild(nsIContent* aChildElement)=0;
|
||||
|
|
|
@ -600,7 +600,7 @@ PRBool PR_CALLBACK RealizeDefaultContent(nsHashKey* aKey, void* aData, void* aCl
|
|||
|
||||
if (insCount == 0) {
|
||||
nsCOMPtr<nsIContent> defContent;
|
||||
currPoint->GetDefaultContent(getter_AddRefs(defContent));
|
||||
currPoint->GetDefaultContentTemplate(getter_AddRefs(defContent));
|
||||
if (defContent) {
|
||||
// We need to take this template and use it to realize the
|
||||
// actual default content (through cloning).
|
||||
|
@ -743,8 +743,6 @@ nsXBLBinding::GenerateAnonymousContent()
|
|||
clonedContent = do_QueryInterface(clonedNode);
|
||||
SetAnonymousContent(clonedContent);
|
||||
|
||||
mPrototypeBinding->SetInitialAttributes(mBoundElement, mContent);
|
||||
|
||||
if (hasInsertionPoints) {
|
||||
// Now check and see if we have a single insertion point
|
||||
// or multiple insertion points.
|
||||
|
@ -847,6 +845,8 @@ nsXBLBinding::GenerateAnonymousContent()
|
|||
mInsertionPointTable->Enumerate(RealizeDefaultContent, &data);
|
||||
}
|
||||
}
|
||||
|
||||
mPrototypeBinding->SetInitialAttributes(mBoundElement, mContent);
|
||||
}
|
||||
|
||||
// Always check the content element for potential attributes.
|
||||
|
|
|
@ -32,7 +32,7 @@ nsXBLInsertionPoint::nsXBLInsertionPoint(nsIContent* aParentElement, PRUint32 aI
|
|||
NS_INIT_REFCNT();
|
||||
mParentElement = aParentElement;
|
||||
mIndex = aIndex;
|
||||
mDefaultContent = aDefaultContent;
|
||||
mDefaultContentTemplate = aDefaultContent;
|
||||
}
|
||||
|
||||
nsXBLInsertionPoint::~nsXBLInsertionPoint()
|
||||
|
@ -71,6 +71,22 @@ nsXBLInsertionPoint::GetDefaultContent(nsIContent** aDefaultContent)
|
|||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsXBLInsertionPoint::SetDefaultContentTemplate(nsIContent* aDefaultContent)
|
||||
{
|
||||
mDefaultContentTemplate = aDefaultContent;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsXBLInsertionPoint::GetDefaultContentTemplate(nsIContent** aDefaultContent)
|
||||
{
|
||||
*aDefaultContent = mDefaultContentTemplate;
|
||||
NS_IF_ADDREF(*aDefaultContent);
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsXBLInsertionPoint::AddChild(nsIContent* aChildElement)
|
||||
{
|
||||
|
|
|
@ -43,6 +43,9 @@ public:
|
|||
NS_IMETHOD SetDefaultContent(nsIContent* aDefaultContent);
|
||||
NS_IMETHOD GetDefaultContent(nsIContent** aDefaultContent);
|
||||
|
||||
NS_IMETHOD SetDefaultContentTemplate(nsIContent* aDefaultContent);
|
||||
NS_IMETHOD GetDefaultContentTemplate(nsIContent** aDefaultContent);
|
||||
|
||||
NS_IMETHOD AddChild(nsIContent* aChildElement);
|
||||
NS_IMETHOD InsertChildAt(PRInt32 aIndex, nsIContent* aChildElement);
|
||||
NS_IMETHOD RemoveChild(nsIContent* aChildElement);
|
||||
|
@ -57,7 +60,9 @@ protected:
|
|||
nsIContent* mParentElement; // This ref is weak. The parent of the <children> element.
|
||||
PRInt32 mIndex; // The index of this insertion point. -1 is a pseudo-point.
|
||||
nsCOMPtr<nsISupportsArray> mElements; // An array of elements present at the insertion point.
|
||||
nsCOMPtr<nsIContent> mDefaultContent; // The default content at this insertion point.
|
||||
nsCOMPtr<nsIContent> mDefaultContentTemplate ; // The template default content that will be cloned if
|
||||
// the insertion point is empty.
|
||||
nsCOMPtr<nsIContent> mDefaultContent; // The cloned default content obtained by cloning mDefaultContentTemplate.
|
||||
};
|
||||
|
||||
extern nsresult
|
||||
|
|
|
@ -641,7 +641,7 @@ nsXBLPrototypeBinding::AttributeChanged(nsIAtom* aAttribute, PRInt32 aNameSpaceI
|
|||
xblAttr->GetElement(getter_AddRefs(element));
|
||||
|
||||
nsCOMPtr<nsIContent> realElement;
|
||||
LocateInstance(content, aAnonymousContent, element, getter_AddRefs(realElement));
|
||||
LocateInstance(aChangedElement, content, aAnonymousContent, element, getter_AddRefs(realElement));
|
||||
|
||||
xblAttr->GetDstAttribute(getter_AddRefs(dstAttr));
|
||||
|
||||
|
@ -737,7 +737,7 @@ PRBool PR_CALLBACK InstantiateInsertionPoint(nsHashKey* aKey, void* aData, void*
|
|||
binding->GetAnonymousContent(getter_AddRefs(instanceRoot));
|
||||
nsCOMPtr<nsIContent> templRoot;
|
||||
proto->GetImmediateChild(nsXBLPrototypeBinding::kContentAtom, getter_AddRefs(templRoot));
|
||||
proto->LocateInstance(templRoot, instanceRoot, content, getter_AddRefs(realContent));
|
||||
proto->LocateInstance(nsnull, templRoot, instanceRoot, content, getter_AddRefs(realContent));
|
||||
if (!realContent)
|
||||
binding->GetBoundElement(getter_AddRefs(realContent));
|
||||
|
||||
|
@ -806,7 +806,7 @@ nsXBLPrototypeBinding::GetInsertionPoint(nsIContent* aBoundElement, nsIContent*
|
|||
entry->GetDefaultContent(aDefaultContent); // Addref happens here.
|
||||
nsCOMPtr<nsIContent> templContent;
|
||||
GetImmediateChild(kContentAtom, getter_AddRefs(templContent));
|
||||
LocateInstance(templContent, aCopyRoot, content, getter_AddRefs(realContent));
|
||||
LocateInstance(nsnull, templContent, aCopyRoot, content, getter_AddRefs(realContent));
|
||||
}
|
||||
else {
|
||||
// We got nothin'. Bail.
|
||||
|
@ -844,7 +844,7 @@ nsXBLPrototypeBinding::GetSingleInsertionPoint(nsIContent* aBoundElement,
|
|||
entry->GetDefaultContent(aDefaultContent); // Addref happens here.
|
||||
nsCOMPtr<nsIContent> templContent;
|
||||
GetImmediateChild(kContentAtom, getter_AddRefs(templContent));
|
||||
LocateInstance(templContent, aCopyRoot, content, getter_AddRefs(realContent));
|
||||
LocateInstance(nsnull, templContent, aCopyRoot, content, getter_AddRefs(realContent));
|
||||
}
|
||||
else {
|
||||
// The only insertion point specified was actually a filtered insertion point.
|
||||
|
@ -964,29 +964,93 @@ nsXBLPrototypeBinding::ConstructHandlers()
|
|||
}
|
||||
|
||||
void
|
||||
nsXBLPrototypeBinding::LocateInstance(nsIContent* aTemplRoot, nsIContent* aCopyRoot,
|
||||
nsXBLPrototypeBinding::LocateInstance(nsIContent* aBoundElement, nsIContent* aTemplRoot, nsIContent* aCopyRoot,
|
||||
nsIContent* aTemplChild, nsIContent** aCopyResult)
|
||||
{
|
||||
// XXX We will get in trouble if the binding instantiation deviates from the template
|
||||
// in the prototype.
|
||||
if (aTemplChild == aTemplRoot) {
|
||||
if (aTemplChild == aTemplRoot || !aTemplChild) {
|
||||
*aCopyResult = nsnull;
|
||||
return;
|
||||
}
|
||||
|
||||
nsCOMPtr<nsIContent> templParent;
|
||||
nsCOMPtr<nsIContent> copyParent;
|
||||
|
||||
nsCOMPtr<nsIContent> childPoint;
|
||||
aTemplChild->GetParent(*getter_AddRefs(templParent));
|
||||
|
||||
|
||||
if (aBoundElement) {
|
||||
nsCOMPtr<nsIAtom> tag;
|
||||
templParent->GetTag(*getter_AddRefs(tag));
|
||||
if (tag == kChildrenAtom) {
|
||||
childPoint = templParent;
|
||||
childPoint->GetParent(*getter_AddRefs(templParent));
|
||||
}
|
||||
}
|
||||
|
||||
if (!templParent)
|
||||
return;
|
||||
|
||||
if (templParent.get() == aTemplRoot)
|
||||
copyParent = aCopyRoot;
|
||||
else
|
||||
LocateInstance(aTemplRoot, aCopyRoot, templParent, getter_AddRefs(copyParent));
|
||||
LocateInstance(aBoundElement, aTemplRoot, aCopyRoot, templParent, getter_AddRefs(copyParent));
|
||||
|
||||
PRInt32 index;
|
||||
templParent->IndexOf(aTemplChild, index);
|
||||
copyParent->ChildAt(index, *aCopyResult); // Addref happens here.
|
||||
if (childPoint && aBoundElement) {
|
||||
// First we have to locate this insertion point and use its index and its
|
||||
// count to detemine our precise position within the template.
|
||||
nsCOMPtr<nsIDocument> doc;
|
||||
aBoundElement->GetDocument(*getter_AddRefs(doc));
|
||||
nsCOMPtr<nsIBindingManager> bm;
|
||||
doc->GetBindingManager(getter_AddRefs(bm));
|
||||
nsCOMPtr<nsIXBLBinding> binding;
|
||||
bm->GetBinding(aBoundElement, getter_AddRefs(binding));
|
||||
|
||||
nsCOMPtr<nsIXBLBinding> currBinding = binding;
|
||||
while (currBinding) {
|
||||
nsCOMPtr<nsIContent> anonContent;
|
||||
currBinding->GetAnonymousContent(getter_AddRefs(anonContent));
|
||||
if (anonContent)
|
||||
break;
|
||||
nsCOMPtr<nsIXBLBinding> tempBinding = currBinding;
|
||||
tempBinding->GetBaseBinding(getter_AddRefs(currBinding));
|
||||
}
|
||||
|
||||
nsCOMPtr<nsISupportsArray> points;
|
||||
currBinding->GetInsertionPointsFor(copyParent, getter_AddRefs(points));
|
||||
nsCOMPtr<nsIXBLInsertionPoint> insertionPoint;
|
||||
PRUint32 count;
|
||||
points->Count(&count);
|
||||
for (PRUint32 i = 0; i < count; i++) {
|
||||
// Next we have to find the real insertion point for this proto insertion
|
||||
// point. If it does not contain any default content, then we should
|
||||
// return null, since the content is not in the clone.
|
||||
nsCOMPtr<nsIXBLInsertionPoint> currPoint = getter_AddRefs((nsIXBLInsertionPoint*)points->ElementAt(i));
|
||||
nsCOMPtr<nsIContent> defContent;
|
||||
currPoint->GetDefaultContentTemplate(getter_AddRefs(defContent));
|
||||
if (defContent == childPoint) {
|
||||
// Now check to see if we even built default content at this
|
||||
// insertion point.
|
||||
currPoint->GetDefaultContent(getter_AddRefs(defContent));
|
||||
if (defContent) {
|
||||
// Find out the index of the template element within the <children> elt.
|
||||
PRInt32 index;
|
||||
childPoint->IndexOf(aTemplChild, index);
|
||||
|
||||
// Now we just have to find the corresponding elt underneath the cloned
|
||||
// default content.
|
||||
defContent->ChildAt(index, *aCopyResult);
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (copyParent)
|
||||
{
|
||||
PRInt32 index;
|
||||
templParent->IndexOf(aTemplChild, index);
|
||||
copyParent->ChildAt(index, *aCopyResult); // Addref happens here.
|
||||
}
|
||||
}
|
||||
|
||||
struct nsXBLAttrChangeData
|
||||
|
@ -1039,7 +1103,8 @@ PRBool PR_CALLBACK SetAttrs(nsHashKey* aKey, void* aData, void* aClosure)
|
|||
curr->GetElement(getter_AddRefs(element));
|
||||
|
||||
nsCOMPtr<nsIContent> realElement;
|
||||
changeData->mProto->LocateInstance(content, changeData->mContent, element, getter_AddRefs(realElement));
|
||||
changeData->mProto->LocateInstance(changeData->mBoundElement,
|
||||
content, changeData->mContent, element, getter_AddRefs(realElement));
|
||||
if (realElement) {
|
||||
realElement->SetAttribute(kNameSpaceID_None, dst, value, PR_FALSE);
|
||||
nsCOMPtr<nsIAtom> tag;
|
||||
|
@ -1240,7 +1305,7 @@ nsXBLPrototypeBinding::ConstructInsertionTable(nsIContent* aContent)
|
|||
nsISupportsKey key(atom);
|
||||
mInsertionPointTable->Put(&key, xblIns);
|
||||
|
||||
token = nsCRT::strtok( newStr, ", ", &newStr );
|
||||
token = nsCRT::strtok( newStr, "| ", &newStr );
|
||||
}
|
||||
|
||||
nsMemory::Free(str);
|
||||
|
@ -1267,8 +1332,14 @@ nsXBLPrototypeBinding::ConstructInsertionTable(nsIContent* aContent)
|
|||
// in situations where no content ends up being placed at the insertion point.
|
||||
PRInt32 defaultCount;
|
||||
child->ChildCount(defaultCount);
|
||||
if (defaultCount > 0)
|
||||
if (defaultCount > 0) {
|
||||
// Annotate the insertion point with our default content.
|
||||
xblIns->SetDefaultContent(child);
|
||||
|
||||
// Reconnect back to our parent for access later. This makes "inherits" easier
|
||||
// to work with on default content.
|
||||
child->SetParent(parent);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -138,7 +138,7 @@ public:
|
|||
// Internal member functions
|
||||
public:
|
||||
void GetImmediateChild(nsIAtom* aTag, nsIContent** aResult);
|
||||
void LocateInstance(nsIContent* aTemplRoot, nsIContent* aCopyRoot,
|
||||
void LocateInstance(nsIContent* aBoundElt, nsIContent* aTemplRoot, nsIContent* aCopyRoot,
|
||||
nsIContent* aTemplChild, nsIContent** aCopyResult);
|
||||
|
||||
protected:
|
||||
|
|
|
@ -264,6 +264,13 @@ nsTextBoxFrame::PaintTitle(nsIPresContext* aPresContext,
|
|||
nsRect textRect(aRect);
|
||||
textRect.width = mTitleWidth;
|
||||
|
||||
// Align our text within the overall rect by checking our text-align property.
|
||||
const nsStyleText* textStyle = (const nsStyleText*)mStyleContext->GetStyleData(eStyleStruct_Text);
|
||||
if (textStyle->mTextAlign == NS_STYLE_TEXT_ALIGN_CENTER)
|
||||
textRect.x += (aRect.width - textRect.width)/2;
|
||||
else if (textStyle->mTextAlign == NS_STYLE_TEXT_ALIGN_RIGHT)
|
||||
textRect.x += (aRect.width - textRect.width);
|
||||
|
||||
// don't draw if the title is not dirty
|
||||
if (PR_FALSE == aDirtyRect.Intersects(textRect))
|
||||
return NS_OK;
|
||||
|
|
|
@ -41,9 +41,7 @@
|
|||
</xul:hbox>
|
||||
</xul:hbox>
|
||||
<xul:image class="radio-icon" inherits="src,disabled"/>
|
||||
<xul:html class="radio-text" inherits="value=label,accesskey,crop,disabled" flex="1">
|
||||
<children/>
|
||||
</xul:html>
|
||||
<xul:html class="radio-text" inherits="value=label,accesskey,crop,disabled" flex="1"/>
|
||||
</xul:hbox>
|
||||
</content>
|
||||
</binding>
|
||||
|
@ -57,9 +55,7 @@
|
|||
</xul:hbox>
|
||||
</xul:hbox>
|
||||
<xul:image class="checkbox-icon" inherits="src,disabled"/>
|
||||
<xul:html class="checkbox-text" inherits="value=label,accesskey,crop,disabled" flex="1">
|
||||
<children/>
|
||||
</xul:html>
|
||||
<xul:html class="checkbox-text" inherits="value=label,accesskey,crop,disabled" flex="1"/>
|
||||
</xul:hbox>
|
||||
</content>
|
||||
</binding>
|
||||
|
|
|
@ -14,6 +14,10 @@
|
|||
-moz-user-focus : normal;
|
||||
}
|
||||
|
||||
.button-text {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
button,
|
||||
button[disabled="true"][default],
|
||||
button[disabled="true"]:hover:active
|
||||
|
|
|
@ -6,15 +6,17 @@
|
|||
|
||||
<binding id="buttonleft" extends="chrome://global/content/bindings/button.xml#button-base">
|
||||
<content>
|
||||
<xul:hbox class="button-box-1" flex="1">
|
||||
<xul:hbox class="button-box-2" align="center" flex="1">
|
||||
<xul:image class="button-icon" inherits="src"/>
|
||||
<xul:hbox class="button-box-text" flex="1" align="center" pack="center">
|
||||
<xul:text class="button-text" inherits="disabled,value=label,accesskey,crop"/>
|
||||
<children/>
|
||||
<children includes="observes|template|menupopup|tooltip"/>
|
||||
<xul:box class="box-inherit button-box-1" orient="horizontal" flex="1">
|
||||
<xul:hbox class="box-inherit button-box-2" flex="1">
|
||||
<xul:hbox class="box-inherit button-box-text" inherits="orient,dir,align,pack" flex="1" align="center" pack="center">
|
||||
<children>
|
||||
<xul:image class="button-icon" inherits="src=image"/>
|
||||
<xul:label class="button-text" flex="1" inherits="disabled,value=label,accesskey,crop"/>
|
||||
</children>
|
||||
</xul:hbox>
|
||||
</xul:hbox>
|
||||
</xul:hbox>
|
||||
</xul:box>
|
||||
</content>
|
||||
</binding>
|
||||
|
||||
|
|
|
@ -43,9 +43,7 @@
|
|||
</xul:hbox>
|
||||
<xul:hbox class="radio-text-container" flex="1" align="center">
|
||||
<xul:image class="radio-icon" inherits="src,disabled"/>
|
||||
<xul:html class="radio-text" inherits="value=label,accesskey,crop,disabled" flex="1">
|
||||
<children/>
|
||||
</xul:html>
|
||||
<xul:html class="radio-text" inherits="value=label,accesskey,crop,disabled" flex="1"/>
|
||||
</xul:hbox>
|
||||
</xul:hbox>
|
||||
</content>
|
||||
|
@ -60,9 +58,7 @@
|
|||
</xul:hbox>
|
||||
</xul:hbox>
|
||||
<xul:image class="checkbox-icon" inherits="src,disabled"/>
|
||||
<xul:html class="checkbox-text" inherits="value=label,accesskey,crop,disabled" flex="1">
|
||||
<children/>
|
||||
</xul:html>
|
||||
<xul:html class="checkbox-text" inherits="value=label,accesskey,crop,disabled" flex="1"/>
|
||||
</xul:hbox>
|
||||
</content>
|
||||
</binding>
|
||||
|
|
|
@ -47,9 +47,12 @@ button {
|
|||
padding: 3px 2px 3px 2px;
|
||||
}
|
||||
|
||||
.button-text-mid,
|
||||
.button-icon-mid {
|
||||
.button-text-mid {
|
||||
margin-left: 3px;
|
||||
margin-right: 3px;
|
||||
margin-top: 0px;
|
||||
margin-bottom: 0px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
/* .......... focused state .......... */
|
||||
|
@ -122,48 +125,48 @@ button[open="true"] {
|
|||
color: #FFFFFF;
|
||||
}
|
||||
|
||||
button:hover:active > .button-box-left > .button-left-top,
|
||||
button:hover:active > .box-inherit > .button-box-left > .button-left-top,
|
||||
button[open="true"] > .button-box-left > .button-left-top {
|
||||
background-image: url("chrome://global/skin/button/btn-act-lft-top.gif");
|
||||
}
|
||||
|
||||
button:hover:active > .button-box-left > .button-left-mid,
|
||||
button[open="true"] > .button-box-left > .button-left-mid {
|
||||
button:hover:active > .box-inherit > .button-box-left > .button-left-mid,
|
||||
button[open="true"] > .box-inherit > .button-box-left > .button-left-mid {
|
||||
background-image: url("chrome://global/skin/button/btn-act-lft-mid.gif");
|
||||
}
|
||||
|
||||
button:hover:active > .button-box-left > .button-left-btm,
|
||||
button[open="true"] > .button-box-left > .button-left-btm {
|
||||
button:hover:active > .box-inherit > .button-box-left > .button-left-btm,
|
||||
button[open="true"] > .box-inherit > .button-box-left > .button-left-btm {
|
||||
background-image: url("chrome://global/skin/button/btn-act-lft-btm.gif");
|
||||
}
|
||||
|
||||
button:hover:active > .button-stack > .button-box-mid,
|
||||
button[open="true"] > .button-stack > .button-box-mid {
|
||||
button:hover:active > .box-inherit > .button-stack > .button-box-mid,
|
||||
button[open="true"] > .box-inherit > .button-stack > .button-box-mid {
|
||||
background-color: #90A1B3;
|
||||
}
|
||||
|
||||
button:hover:active > .button-stack > .button-box-mid > .button-mid-top,
|
||||
button[open="true"] > .button-stack > .button-box-mid > .button-mid-top {
|
||||
button:hover:active > .box-inherit > .button-stack > .button-box-mid > .button-mid-top,
|
||||
button[open="true"] > .box-inherit > .button-stack > .button-box-mid > .button-mid-top {
|
||||
background-image: url("chrome://global/skin/button/btn-act-mid-top.gif");
|
||||
}
|
||||
|
||||
button:hover:active > .button-stack > .button-box-mid > .button-mid-btm,
|
||||
button[open="true"] > .button-stack > .button-box-mid > .button-mid-btm {
|
||||
button:hover:active > .box-inherit > .button-stack > .button-box-mid > .button-mid-btm,
|
||||
button[open="true"] > .box-inherit > .button-stack > .button-box-mid > .button-mid-btm {
|
||||
background-image: url("chrome://global/skin/button/btn-act-mid-btm.gif");
|
||||
}
|
||||
|
||||
button:hover:active > .button-box-right > .button-right-top,
|
||||
button[open="true"] > .button-box-right > .button-right-top {
|
||||
button:hover:active > .box-inherit > .button-box-right > .button-right-top,
|
||||
button[open="true"] > .box-inherit > .button-box-right > .button-right-top {
|
||||
background-image: url("chrome://global/skin/button/btn-act-rit-top.gif");
|
||||
}
|
||||
|
||||
button:hover:active > .button-box-right > .button-right-mid,
|
||||
button[open="true"] > .button-box-right > .button-right-mid {
|
||||
button:hover:active > .box-inherit > .button-box-right > .button-right-mid,
|
||||
button[open="true"] > .box-inherit > .button-box-right > .button-right-mid {
|
||||
background-image: url("chrome://global/skin/button/btn-act-rit-mid.gif");
|
||||
}
|
||||
|
||||
button:hover:active > .button-box-right > .button-right-btm,
|
||||
button[open="true"] > .button-box-right > .button-right-btm {
|
||||
button:hover:active > .box-inherit > .button-box-right > .button-right-btm,
|
||||
button[open="true"] > .box-inherit > .button-box-right > .button-right-btm {
|
||||
background-image: url("chrome://global/skin/button/btn-act-rit-btm.gif");
|
||||
}
|
||||
|
||||
|
@ -174,47 +177,47 @@ button[disabled="true"]:hover:active {
|
|||
color: #8C99AB;
|
||||
}
|
||||
|
||||
button:hover:active > .button-box-left > .button-left-top[disabled="true"],
|
||||
button:hover:active > .box-inherit > .button-box-left > .button-left-top[disabled="true"],
|
||||
.button-left-top[disabled="true"] {
|
||||
background-image: url("chrome://global/skin/button/btn-dis-lft-top.gif");
|
||||
}
|
||||
|
||||
button:hover:active > .button-box-left > .button-left-mid[disabled="true"],
|
||||
button:hover:active > .box-inherit > .button-box-left > .button-left-mid[disabled="true"],
|
||||
.button-left-mid[disabled="true"] {
|
||||
background-image: url("chrome://global/skin/button/btn-dis-lft-mid.gif");
|
||||
}
|
||||
|
||||
button:hover:active > .button-box-left > .button-left-btm[disabled="true"],
|
||||
button:hover:active > .box-inherit > .button-box-left > .button-left-btm[disabled="true"],
|
||||
.button-left-btm[disabled="true"] {
|
||||
background-image: url("chrome://global/skin/button/btn-dis-lft-btm.gif");
|
||||
}
|
||||
|
||||
button:hover:active > .button-stack > .button-box-mid[disabled="true"],
|
||||
button:hover:active > .box-inherit > .button-stack > .button-box-mid[disabled="true"],
|
||||
.button-box-mid[disabled="true"] {
|
||||
background-color: #B7BFCB;
|
||||
}
|
||||
|
||||
button:hover:active > .button-stack > .button-box-mid > .button-mid-top[disabled="true"],
|
||||
button:hover:active > .box-inherit > .button-stack > .button-box-mid > .button-mid-top[disabled="true"],
|
||||
.button-mid-top[disabled="true"] {
|
||||
background-image: url("chrome://global/skin/button/btn-dis-mid-top.gif");
|
||||
}
|
||||
|
||||
button:hover:active > .button-stack > .button-box-mid > .button-mid-btm[disabled="true"],
|
||||
button:hover:active > .box-inherit > .button-stack > .button-box-mid > .button-mid-btm[disabled="true"],
|
||||
.button-mid-btm[disabled="true"] {
|
||||
background-image: url("chrome://global/skin/button/btn-dis-mid-btm.gif");
|
||||
}
|
||||
|
||||
button:hover:active > .button-box-right > .button-right-top[disabled="true"],
|
||||
button:hover:active > .box-inherit > .button-box-right > .button-right-top[disabled="true"],
|
||||
.button-right-top[disabled="true"] {
|
||||
background-image: url("chrome://global/skin/button/btn-dis-rit-top.gif");
|
||||
}
|
||||
|
||||
button:hover:active > .button-box-right > .button-right-mid[disabled="true"],
|
||||
button:hover:active > .box-inherit > .button-box-right > .button-right-mid[disabled="true"],
|
||||
.button-right-mid[disabled="true"] {
|
||||
background-image: url("chrome://global/skin/button/btn-dis-rit-mid.gif");
|
||||
}
|
||||
|
||||
button:hover:active > .button-box-right > .button-right-btm[disabled="true"],
|
||||
button:hover:active > .box-inherit > .button-box-right > .button-right-btm[disabled="true"],
|
||||
.button-right-btm[disabled="true"] {
|
||||
background-image: url("chrome://global/skin/button/btn-dis-rit-btm.gif");
|
||||
}
|
||||
|
@ -273,35 +276,35 @@ button[default="true"] {
|
|||
|
||||
/* .......... default active state .......... */
|
||||
|
||||
:hover:active > .button-box-left > .button-left-top[default="true"] {
|
||||
:hover:active > .box-inherit > .button-box-left > .button-left-top[default="true"] {
|
||||
background-image: url("chrome://global/skin/button/btn-def-act-lft-top.gif");
|
||||
}
|
||||
|
||||
:hover:active > .button-box-left > .button-left-mid[default="true"] {
|
||||
:hover:active > .box-inherit > .button-box-left > .button-left-mid[default="true"] {
|
||||
background-image: url("chrome://global/skin/button/btn-def-act-lft-mid.gif");
|
||||
}
|
||||
|
||||
:hover:active > .button-box-left > .button-left-btm[default="true"] {
|
||||
:hover:active > .box-inherit > .button-box-left > .button-left-btm[default="true"] {
|
||||
background-image: url("chrome://global/skin/button/btn-def-act-lft-btm.gif");
|
||||
}
|
||||
|
||||
:hover:active > .button-stack > .button-box-mid > .button-mid-top[default="true"] {
|
||||
:hover:active > .box-inherit > .button-stack > .button-box-mid > .button-mid-top[default="true"] {
|
||||
background-image: url("chrome://global/skin/button/btn-def-act-mid-top.gif");
|
||||
}
|
||||
|
||||
:hover:active > .button-stack > .button-box-mid > .button-mid-btm[default="true"] {
|
||||
:hover:active > .box-inherit > .button-stack > .button-box-mid > .button-mid-btm[default="true"] {
|
||||
background-image: url("chrome://global/skin/button/btn-def-act-mid-btm.gif");
|
||||
}
|
||||
|
||||
:hover:active > .button-box-right > .button-right-top[default="true"] {
|
||||
:hover:active > .box-inherit > .button-box-right > .button-right-top[default="true"] {
|
||||
background-image: url("chrome://global/skin/button/btn-def-act-rit-top.gif");
|
||||
}
|
||||
|
||||
:hover:active > .button-box-right > .button-right-mid[default="true"] {
|
||||
:hover:active > .box-inherit > .button-box-right > .button-right-mid[default="true"] {
|
||||
background-image: url("chrome://global/skin/button/btn-def-act-rit-mid.gif");
|
||||
}
|
||||
|
||||
:hover:active > .button-box-right > .button-right-btm[default="true"] {
|
||||
:hover:active > .box-inherit > .button-box-right > .button-right-btm[default="true"] {
|
||||
background-image: url("chrome://global/skin/button/btn-def-act-rit-btm.gif");
|
||||
}
|
||||
|
||||
|
@ -312,7 +315,7 @@ button[default="true"][disabled="true"] {
|
|||
margin-bottom: 3px;
|
||||
}
|
||||
|
||||
:hover:active > .button-box-left > .button-left-top[disabled="true"][default="true"],
|
||||
:hover:active > .box-inherit > .button-box-left > .button-left-top[disabled="true"][default="true"],
|
||||
.button-left-top[disabled="true"][default="true"] {
|
||||
background-image: url("chrome://global/skin/button/btn-dis-lft-top.gif");
|
||||
height: 9px;
|
||||
|
@ -322,29 +325,29 @@ button[default="true"][disabled="true"] {
|
|||
width: 6px;
|
||||
}
|
||||
|
||||
:hover:active > .button-box-left > .button-left-mid[disabled="true"][default="true"],
|
||||
:hover:active > .box-inherit > .button-box-left > .button-left-mid[disabled="true"][default="true"],
|
||||
.button-left-mid[disabled="true"][default="true"] {
|
||||
background-image: url("chrome://global/skin/button/btn-dis-lft-mid.gif");
|
||||
}
|
||||
|
||||
:hover:active > .button-box-left > .button-left-btm[disabled="true"][default="true"],
|
||||
:hover:active > .box-inherit > .button-box-left > .button-left-btm[disabled="true"][default="true"],
|
||||
.button-left-btm[disabled="true"][default="true"] {
|
||||
background-image: url("chrome://global/skin/button/btn-dis-lft-btm.gif");
|
||||
height: 8px;
|
||||
}
|
||||
|
||||
:hover:active > .button-stack > .button-box-mid[disabled="true"][default="true"],
|
||||
:hover:active > .box-inherit > .button-stack > .button-box-mid[disabled="true"][default="true"],
|
||||
.button-box-mid[disabled="true"][default="true"] {
|
||||
background-color: #B7BFCB;
|
||||
}
|
||||
|
||||
:hover:active > .button-stack > .button-box-mid > .button-mid-top[disabled="true"][default="true"],
|
||||
:hover:active > .box-inherit > .button-stack > .button-box-mid > .button-mid-top[disabled="true"][default="true"],
|
||||
.button-mid-top[disabled="true"][default="true"] {
|
||||
background-image: url("chrome://global/skin/button/btn-dis-mid-top.gif");
|
||||
height: 9px;
|
||||
}
|
||||
|
||||
:hover:active > .button-stack > .button-box-mid > .button-mid-btm[disabled="true"][default="true"],
|
||||
:hover:active > .box-inherit > .button-stack > .button-box-mid > .button-mid-btm[disabled="true"][default="true"],
|
||||
.button-mid-btm[disabled="true"][default="true"] {
|
||||
background-image: url("chrome://global/skin/button/btn-dis-mid-btm.gif");
|
||||
height: 8px;
|
||||
|
@ -354,18 +357,18 @@ button[default="true"][disabled="true"] {
|
|||
width: 6px;
|
||||
}
|
||||
|
||||
:hover:active > .button-box-right > .button-right-top[disabled="true"][default="true"],
|
||||
:hover:active > .box-inherit > .button-box-right > .button-right-top[disabled="true"][default="true"],
|
||||
.button-right-top[disabled="true"][default="true"] {
|
||||
background-image: url("chrome://global/skin/button/btn-dis-rit-top.gif");
|
||||
height: 9px;
|
||||
}
|
||||
|
||||
:hover:active > .button-box-right > .button-right-mid[disabled="true"][default="true"],
|
||||
:hover:active > .box-inherit > .button-box-right > .button-right-mid[disabled="true"][default="true"],
|
||||
.button-right-mid[disabled="true"][default="true"] {
|
||||
background-image: url("chrome://global/skin/button/btn-dis-rit-mid.gif");
|
||||
}
|
||||
|
||||
:hover:active > .button-box-right > .button-right-btm[disabled="true"][default="true"],
|
||||
:hover:active > .box-inherit > .button-box-right > .button-right-btm[disabled="true"][default="true"],
|
||||
.button-right-btm[disabled="true"][default="true"] {
|
||||
background-image: url("chrome://global/skin/button/btn-dis-rit-btm.gif");
|
||||
height: 8px;
|
||||
|
|
|
@ -26,33 +26,36 @@
|
|||
|
||||
<binding id="button" extends="chrome://global/content/bindings/button.xml#button-base">
|
||||
<content>
|
||||
<xul:vbox class="button-box-left" inherits="default,disabled">
|
||||
<xul:spring class="button-left-top" inherits="default,disabled"/>
|
||||
<xul:spring class="button-left-mid" inherits="default,disabled" flex="1"/>
|
||||
<xul:spring class="button-left-btm" inherits="default,disabled"/>
|
||||
</xul:vbox>
|
||||
|
||||
<xul:stack class="button-stack" flex="1">
|
||||
<xul:vbox class="button-box-mid" inherits="default,disabled">
|
||||
<xul:spring class="button-mid-top" inherits="default,disabled"/>
|
||||
<xul:spring class="button-mid-mid" inherits="default,disabled" flex="1"/>
|
||||
<xul:spring class="button-mid-btm" inherits="default,disabled"/>
|
||||
<children includes="observes|template|menupopup|tooltip"/>
|
||||
<xul:box class="box-inherit" orient="horizontal" flex="1">
|
||||
<xul:vbox class="button-box-left" inherits="default,disabled">
|
||||
<xul:spring class="button-left-top" inherits="default,disabled"/>
|
||||
<xul:spring class="button-left-mid" inherits="default,disabled" flex="1"/>
|
||||
<xul:spring class="button-left-btm" inherits="default,disabled"/>
|
||||
</xul:vbox>
|
||||
|
||||
<xul:stack class="box-inherit button-stack" flex="1">
|
||||
<xul:vbox class="button-box-mid" inherits="default,disabled">
|
||||
<xul:spring class="button-mid-top" inherits="default,disabled"/>
|
||||
<xul:spring class="button-mid-mid" inherits="default,disabled" flex="1"/>
|
||||
<xul:spring class="button-mid-btm" inherits="default,disabled"/>
|
||||
</xul:vbox>
|
||||
|
||||
<xul:hbox class="button-text-box" align="center" pack="center">
|
||||
<xul:image class="button-icon-mid" inherits="src"/>
|
||||
<xul:text class="button-text-mid" inherits="default,value=label,crop,accesskey"/>
|
||||
<children/>
|
||||
</xul:hbox>
|
||||
</xul:stack>
|
||||
<xul:hbox inherits="orient,align,pack,dir" class="box-inherit button-text-box" align="center" pack="center">
|
||||
<children>
|
||||
<xul:image class="button-icon-mid" inherits="src=image"/>
|
||||
<xul:label class="button-text-mid" flex="1"
|
||||
inherits="default,value=label,crop,accesskey"/>
|
||||
</children>
|
||||
</xul:hbox>
|
||||
</xul:stack>
|
||||
|
||||
<xul:vbox class="button-box-right" inherits="default,disabled">
|
||||
<xul:spring class="button-right-top" inherits="default,disabled"/>
|
||||
<xul:spring class="button-right-mid" inherits="default,disabled" flex="1"/>
|
||||
<xul:spring class="button-right-btm" inherits="default,disabled"/>
|
||||
</xul:vbox>
|
||||
|
||||
<children includes="menupopup"/>
|
||||
<xul:vbox class="button-box-right" inherits="default,disabled">
|
||||
<xul:spring class="button-right-top" inherits="default,disabled"/>
|
||||
<xul:spring class="button-right-mid" inherits="default,disabled" flex="1"/>
|
||||
<xul:spring class="button-right-btm" inherits="default,disabled"/>
|
||||
</xul:vbox>
|
||||
</xul:box>
|
||||
</content>
|
||||
|
||||
<resources>
|
||||
|
|
|
@ -17,9 +17,7 @@
|
|||
<xul:image class="checkbox-check"/>
|
||||
</xul:hbox>
|
||||
<xul:image class="checkbox-icon" inherits="src"/>
|
||||
<xul:html class="checkbox-label" inherits="value=label,accesskey,crop" flex="1">
|
||||
<children/>
|
||||
</xul:html>
|
||||
<xul:html class="checkbox-label" inherits="value=label,accesskey,crop" flex="1"/>
|
||||
</xul:hbox>
|
||||
</content>
|
||||
|
||||
|
|
|
@ -438,6 +438,16 @@ progressmeter {
|
|||
-moz-binding: url("chrome://global/content/bindings/progressmeter.xml#progressmeter");
|
||||
}
|
||||
|
||||
/********** basic rule for anonymous content that needs to pass box properties through
|
||||
********** to an insertion point parent that holds the real kids **************/
|
||||
|
||||
.box-inherit {
|
||||
-moz-box-orient: inherit;
|
||||
-moz-box-pack: inherit;
|
||||
-moz-box-align: inherit;
|
||||
-moz-box-direction: inherit;
|
||||
}
|
||||
|
||||
/********** label **********/
|
||||
|
||||
/* XXXdwh <text>, <html> and <spring> are deprecated. */
|
||||
|
|
Загрузка…
Ссылка в новой задаче