From bdf4fa68538551b9fcd95ac208bcb89fcc7ac019 Mon Sep 17 00:00:00 2001 From: "karnaze%netscape.com" Date: Fri, 7 Aug 1998 17:39:27 +0000 Subject: [PATCH] removed overloaded GetAttribute on nsInput git-svn-id: svn://10.0.0.236/trunk@7566 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/layout/html/forms/src/nsInput.cpp | 15 --------------- mozilla/layout/html/forms/src/nsInput.h | 1 - mozilla/layout/html/forms/src/nsInputButton.cpp | 2 +- mozilla/layout/html/forms/src/nsInputFrame.cpp | 2 +- mozilla/layout/html/forms/src/nsInputText.cpp | 2 +- mozilla/layout/html/forms/src/nsSelect.cpp | 2 +- 6 files changed, 4 insertions(+), 20 deletions(-) diff --git a/mozilla/layout/html/forms/src/nsInput.cpp b/mozilla/layout/html/forms/src/nsInput.cpp index 0bab9b17271..c30ddc127d5 100644 --- a/mozilla/layout/html/forms/src/nsInput.cpp +++ b/mozilla/layout/html/forms/src/nsInput.cpp @@ -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; diff --git a/mozilla/layout/html/forms/src/nsInput.h b/mozilla/layout/html/forms/src/nsInput.h index c2a564c7dbc..7d893b8d9cb 100644 --- a/mozilla/layout/html/forms/src/nsInput.h +++ b/mozilla/layout/html/forms/src/nsInput.h @@ -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; /** diff --git a/mozilla/layout/html/forms/src/nsInputButton.cpp b/mozilla/layout/html/forms/src/nsInputButton.cpp index 74c36243a60..3ea3340b7b0 100644 --- a/mozilla/layout/html/forms/src/nsInputButton.cpp +++ b/mozilla/layout/html/forms/src/nsInputButton.cpp @@ -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); } diff --git a/mozilla/layout/html/forms/src/nsInputFrame.cpp b/mozilla/layout/html/forms/src/nsInputFrame.cpp index c5ee79a9f69..c8e39078883 100644 --- a/mozilla/layout/html/forms/src/nsInputFrame.cpp +++ b/mozilla/layout/html/forms/src/nsInputFrame.cpp @@ -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; diff --git a/mozilla/layout/html/forms/src/nsInputText.cpp b/mozilla/layout/html/forms/src/nsInputText.cpp index f3041df4ab6..47a010de7b4 100644 --- a/mozilla/layout/html/forms/src/nsInputText.cpp +++ b/mozilla/layout/html/forms/src/nsInputText.cpp @@ -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) { diff --git a/mozilla/layout/html/forms/src/nsSelect.cpp b/mozilla/layout/html/forms/src/nsSelect.cpp index fad99b658bc..255f82e2034 100644 --- a/mozilla/layout/html/forms/src/nsSelect.cpp +++ b/mozilla/layout/html/forms/src/nsSelect.cpp @@ -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;