removed overloaded GetAttribute on nsInput
git-svn-id: svn://10.0.0.236/trunk@7566 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -357,21 +357,6 @@ nsContentAttr nsInput::GetCacheAttribute(PRInt32 aLoc, nsHTMLValue& aValue, nsHT
|
||||
}
|
||||
}
|
||||
|
||||
nsContentAttr nsInput::GetAttribute(nsIAtom* aAttribute, nsString& aValue) const
|
||||
{
|
||||
nsHTMLValue htmlValue;
|
||||
nsContentAttr result = GetAttribute(aAttribute, htmlValue);
|
||||
if (eContentAttr_HasValue == result) {
|
||||
htmlValue.GetStringValue(aValue);
|
||||
return eContentAttr_HasValue;
|
||||
}
|
||||
else {
|
||||
//aValue = ""; // XXX string class was crashing on this line
|
||||
aValue.SetLength(0);
|
||||
return eContentAttr_NoValue;
|
||||
}
|
||||
}
|
||||
|
||||
nsContentAttr nsInput::GetAttribute(nsIAtom* aAttribute, PRInt32& aValue) const
|
||||
{
|
||||
nsHTMLValue htmlValue;
|
||||
|
||||
@@ -121,7 +121,6 @@ public:
|
||||
virtual nsContentAttr GetAttribute(nsIAtom* aAttribute,
|
||||
nsHTMLValue& aValue) const;
|
||||
|
||||
virtual nsContentAttr GetAttribute(nsIAtom* aAttribute, nsString& aValue) const;
|
||||
virtual nsContentAttr GetAttribute(nsIAtom* aAttribute, PRInt32& aValue) const;
|
||||
|
||||
/**
|
||||
|
||||
@@ -592,7 +592,7 @@ nsInputButtonFrame::PostCreateWidget(nsIPresContext* aPresContext, nsIView *aVie
|
||||
}
|
||||
|
||||
nsString value;
|
||||
nsContentAttr status = content->GetAttribute(nsHTMLAtoms::value, value);
|
||||
nsContentAttr status = ((nsHTMLTagContent*)content)->GetAttribute(nsHTMLAtoms::value, value);
|
||||
if (eContentAttr_HasValue == status) {
|
||||
button->SetLabel(value);
|
||||
}
|
||||
|
||||
@@ -500,7 +500,7 @@ nsInputFrame::CalculateSize (nsIPresContext* aPresContext, nsInputFrame* aFrame,
|
||||
nsAutoString valAttr;
|
||||
nsContentAttr valStatus = eContentAttr_NotThere;
|
||||
if (nsnull != aSpec.mColValueAttr) {
|
||||
valStatus = content->GetAttribute(aSpec.mColValueAttr, valAttr);
|
||||
valStatus = ((nsHTMLTagContent*)content)->GetAttribute(aSpec.mColValueAttr, valAttr);
|
||||
}
|
||||
nsHTMLValue colAttr;
|
||||
nsContentAttr colStatus = eContentAttr_NotThere;
|
||||
|
||||
@@ -286,7 +286,7 @@ nsInputTextFrame::PostCreateWidget(nsIPresContext* aPresContext, nsIView *aView)
|
||||
nsInputText* content;
|
||||
GetContent((nsIContent *&) content);
|
||||
nsAutoString valAttr;
|
||||
nsContentAttr valStatus = ((nsInput *)content)->GetAttribute(nsHTMLAtoms::value, valAttr);
|
||||
nsContentAttr valStatus = ((nsHTMLTagContent *)content)->GetAttribute(nsHTMLAtoms::value, valAttr);
|
||||
text->SetText(valAttr);
|
||||
PRInt32 maxLength = content->GetMaxLength();
|
||||
if (ATTR_NOTSET != maxLength) {
|
||||
|
||||
@@ -705,7 +705,7 @@ nsOption::GetNamesValues(PRInt32 aMaxNumValues, PRInt32& aNumValues,
|
||||
}
|
||||
|
||||
nsString valAttr;
|
||||
nsContentAttr stat = nsOptionSuper::GetAttribute(nsHTMLAtoms::value, valAttr);
|
||||
nsContentAttr stat = nsHTMLTagContent::GetAttribute(nsHTMLAtoms::value, valAttr);
|
||||
if (eContentAttr_HasValue == stat) {
|
||||
aValues[0] = valAttr;
|
||||
aNumValues = 1;
|
||||
|
||||
Reference in New Issue
Block a user