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:
karnaze%netscape.com
1998-08-07 17:39:27 +00:00
parent 07da1c6708
commit bdf4fa6853
6 changed files with 4 additions and 20 deletions

View File

@@ -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;

View File

@@ -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;
/**

View File

@@ -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);
}

View File

@@ -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;

View File

@@ -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) {

View File

@@ -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;