mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-11 16:32:59 +00:00
Fixed places where SetProperty and Reset were missing the nsIPresContext argument.
This fixed 6 warnings and cases where reset and set property where not working properly for all form elements. r = rods@netscape.com.
This commit is contained in:
parent
e673e2cab5
commit
7872e769f6
@ -162,7 +162,7 @@ void
|
||||
nsFileControlFrame::Reset(nsIPresContext* aPresContext)
|
||||
{
|
||||
if (mTextFrame) {
|
||||
mTextFrame->Reset();
|
||||
mTextFrame->Reset(aPresContext);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -104,7 +104,7 @@ public:
|
||||
|
||||
virtual PRBool GetNamesValues(PRInt32 aMaxNumValues, PRInt32& aNumValues,
|
||||
nsString* aValues, nsString* aNames)=0;
|
||||
virtual void Reset()=0;
|
||||
virtual void Reset(nsIPresContext* aPresContext)=0;
|
||||
|
||||
NS_IMETHOD Paint(nsIPresContext& aPresContext,
|
||||
nsIRenderingContext& aRenderingContext,
|
||||
|
@ -333,7 +333,7 @@ nsButtonControlFrame::Redraw(nsIPresContext* aPresContext)
|
||||
}
|
||||
|
||||
|
||||
NS_IMETHODIMP nsButtonControlFrame::SetProperty(nsIAtom* aName, const nsString& aValue)
|
||||
NS_IMETHODIMP nsButtonControlFrame::SetProperty(nsIPresContext* aPresContext, nsIAtom* aName, const nsString& aValue)
|
||||
{
|
||||
return NS_OK;
|
||||
}
|
||||
|
@ -32,7 +32,7 @@ public:
|
||||
nsresult RequiresWidget(PRBool &aHasWidget);
|
||||
|
||||
// nsIFormControlFrame
|
||||
NS_IMETHOD SetProperty(nsIAtom* aName, const nsString& aValue);
|
||||
NS_IMETHOD SetProperty(nsIPresContext* aPresContext, nsIAtom* aName, const nsString& aValue);
|
||||
NS_IMETHOD GetProperty(nsIAtom* aName, nsString& aValue);
|
||||
|
||||
#ifdef DEBUG
|
||||
|
@ -162,7 +162,7 @@ void
|
||||
nsFileControlFrame::Reset(nsIPresContext* aPresContext)
|
||||
{
|
||||
if (mTextFrame) {
|
||||
mTextFrame->Reset();
|
||||
mTextFrame->Reset(aPresContext);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -635,7 +635,7 @@ nsGfxTextControlFrame::GetNamesValues(PRInt32 aMaxNumValues, PRInt32& aNumValues
|
||||
|
||||
|
||||
void
|
||||
nsGfxTextControlFrame::Reset()
|
||||
nsGfxTextControlFrame::Reset(nsIPresContext* aPresContext)
|
||||
{
|
||||
nsAutoString value;
|
||||
nsresult valStatus = GetText(&value, PR_TRUE);
|
||||
|
@ -395,7 +395,7 @@ public:
|
||||
|
||||
virtual PRBool GetNamesValues(PRInt32 aMaxNumValues, PRInt32& aNumValues,
|
||||
nsString* aValues, nsString* aNames);
|
||||
virtual void Reset();
|
||||
virtual void Reset(nsIPresContext* aPresContext);
|
||||
|
||||
// override to interact with webshell
|
||||
NS_IMETHOD Reflow(nsIPresContext& aPresContext,
|
||||
|
@ -766,7 +766,7 @@ nsNativeSelectControlFrame::GetNamesValues(PRInt32 aMaxNumValues, PRInt32& aNumV
|
||||
|
||||
|
||||
void
|
||||
nsNativeSelectControlFrame::Reset(nsIPresContext* aPresContext)
|
||||
nsNativeSelectControlFrame::Reset(nsIPresContext* aPresContext)
|
||||
{
|
||||
if (mCachedState) {
|
||||
mCachedState = PR_FALSE;
|
||||
|
@ -319,7 +319,7 @@ nsNativeTextControlFrame::GetNamesValues(PRInt32 aMaxNumValues, PRInt32& aNumVal
|
||||
|
||||
|
||||
void
|
||||
nsNativeTextControlFrame::Reset()
|
||||
nsNativeTextControlFrame::Reset(nsIPresContext* aPresContext)
|
||||
{
|
||||
if (!mWidget) {
|
||||
return;
|
||||
|
@ -52,7 +52,7 @@ public:
|
||||
|
||||
virtual PRBool GetNamesValues(PRInt32 aMaxNumValues, PRInt32& aNumValues,
|
||||
nsString* aValues, nsString* aNames);
|
||||
virtual void Reset();
|
||||
virtual void Reset(nsIPresContext* aPresContext);
|
||||
|
||||
NS_IMETHOD Paint(nsIPresContext& aPresContext,
|
||||
nsIRenderingContext& aRenderingContext,
|
||||
|
@ -157,7 +157,7 @@ nsRadioControlFrame::GetNamesValues(PRInt32 aMaxNumValues, PRInt32& aNumValues,
|
||||
}
|
||||
|
||||
void
|
||||
nsRadioControlFrame::Reset()
|
||||
nsRadioControlFrame::Reset(nsIPresContext* aPresContext)
|
||||
{
|
||||
PRBool checked = PR_TRUE;
|
||||
GetDefaultCheckState(&checked);
|
||||
|
@ -62,7 +62,7 @@ public:
|
||||
nsString* aValues, nsString* aNames);
|
||||
|
||||
virtual void MouseUp(nsIPresContext* aPresContext);
|
||||
virtual void Reset();
|
||||
virtual void Reset(nsIPresContext* aPresContext);
|
||||
virtual const nsIID& GetCID();
|
||||
|
||||
virtual const nsIID& GetIID();
|
||||
|
@ -96,7 +96,7 @@ public:
|
||||
nsString* aValues, nsString* aNames);
|
||||
|
||||
NS_METHOD GetMultiple(PRBool* aResult, nsIDOMHTMLSelectElement* aSelect = nsnull);
|
||||
virtual void Reset();
|
||||
virtual void Reset(nsIPresContext* aPresContext);
|
||||
|
||||
//
|
||||
// XXX: The following paint methods are TEMPORARY. It is being used to get printing working
|
||||
@ -122,7 +122,7 @@ public:
|
||||
virtual void ControlChanged(nsIPresContext* aPresContext);
|
||||
|
||||
// nsIFormControLFrame
|
||||
NS_IMETHOD SetProperty(nsIAtom* aName, const nsString& aValue);
|
||||
NS_IMETHOD SetProperty(nsIPresContext* aPresContext, nsIAtom* aName, const nsString& aValue);
|
||||
NS_IMETHOD GetProperty(nsIAtom* aName, nsString& aValue);
|
||||
|
||||
NS_IMETHOD AttributeChanged(nsIPresContext* aPresContext,
|
||||
@ -604,7 +604,7 @@ nsSelectControlFrame::PostCreateWidget(nsIPresContext* aPresContext,
|
||||
}
|
||||
}
|
||||
|
||||
Reset(); // initializes selections
|
||||
Reset(aPresContext); // initializes selections
|
||||
}
|
||||
|
||||
|
||||
@ -691,7 +691,7 @@ nsSelectControlFrame::GetNamesValues(PRInt32 aMaxNumValues, PRInt32& aNumValues,
|
||||
|
||||
|
||||
void
|
||||
nsSelectControlFrame::Reset()
|
||||
nsSelectControlFrame::Reset(nsIPresContext* aPresContext)
|
||||
{
|
||||
nsIDOMHTMLCollection* options = GetOptions();
|
||||
if (!options) {
|
||||
@ -1198,7 +1198,7 @@ nsSelectControlFrame::AttributeChanged(nsIPresContext* aPresContext,
|
||||
}
|
||||
|
||||
|
||||
NS_IMETHODIMP nsSelectControlFrame::SetProperty(nsIAtom* aName, const nsString& aValue)
|
||||
NS_IMETHODIMP nsSelectControlFrame::SetProperty(nsIPresContext* aPresContext, nsIAtom* aName, const nsString& aValue)
|
||||
{
|
||||
if (nsHTMLAtoms::selected == aName) {
|
||||
return NS_ERROR_INVALID_ARG; // Selected is readonly according to spec.
|
||||
@ -1367,7 +1367,7 @@ NS_IMETHODIMP nsSelectControlFrame::SetProperty(nsIAtom* aName, const nsString&
|
||||
if (saveOptionSelected)
|
||||
delete [] saveOptionSelected;
|
||||
} else {
|
||||
return nsFormControlFrame::SetProperty(aName, aValue);
|
||||
return nsFormControlFrame::SetProperty(aPresContext, aName, aValue);
|
||||
}
|
||||
return NS_OK;
|
||||
}
|
||||
|
@ -104,7 +104,7 @@ public:
|
||||
|
||||
virtual PRBool GetNamesValues(PRInt32 aMaxNumValues, PRInt32& aNumValues,
|
||||
nsString* aValues, nsString* aNames)=0;
|
||||
virtual void Reset()=0;
|
||||
virtual void Reset(nsIPresContext* aPresContext)=0;
|
||||
|
||||
NS_IMETHOD Paint(nsIPresContext& aPresContext,
|
||||
nsIRenderingContext& aRenderingContext,
|
||||
|
Loading…
Reference in New Issue
Block a user