Bug 13058: (Fixed Solaris bustage by removing Inherited typedef)
This commit is contained in:
@@ -71,6 +71,19 @@ NS_NewNativeTextControlFrame(nsIFrame** aNewFrame)
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
nsNativeTextControlFrame::nsNativeTextControlFrame()
|
||||
: mCachedState(nsnull)
|
||||
{
|
||||
}
|
||||
|
||||
nsNativeTextControlFrame::~nsNativeTextControlFrame()
|
||||
{
|
||||
if (mCachedState) {
|
||||
delete mCachedState;
|
||||
mCachedState = nsnull;
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
nsNativeTextControlFrame::EnterPressed(nsIPresContext& aPresContext)
|
||||
{
|
||||
@@ -177,7 +190,7 @@ nsNativeTextControlFrame::AttributeChanged(nsIPresContext* aPresContext,
|
||||
// Allow the base class to handle common attributes supported
|
||||
// by all form elements...
|
||||
else {
|
||||
result = Inherited::AttributeChanged(aPresContext, aChild, aAttribute, aHint);
|
||||
result = nsNativeFormControlFrame::AttributeChanged(aPresContext, aChild, aAttribute, aHint);
|
||||
}
|
||||
NS_RELEASE(text);
|
||||
}
|
||||
@@ -208,12 +221,12 @@ nsNativeTextControlFrame::AttributeChanged(nsIPresContext* aPresContext,
|
||||
// Allow the base class to handle common attributes supported
|
||||
// by all form elements...
|
||||
else {
|
||||
result = Inherited::AttributeChanged(aPresContext, aChild, aAttribute, aHint);
|
||||
result = nsNativeFormControlFrame::AttributeChanged(aPresContext, aChild, aAttribute, aHint);
|
||||
}
|
||||
NS_RELEASE(textArea);
|
||||
}
|
||||
else { // We didn't get a Text or TextArea. Uh oh...
|
||||
result = Inherited::AttributeChanged(aPresContext, aChild, aAttribute, aHint);
|
||||
result = nsNativeFormControlFrame::AttributeChanged(aPresContext, aChild, aAttribute, aHint);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -244,7 +257,12 @@ nsNativeTextControlFrame::PostCreateWidget(nsIPresContext* aPresContext,
|
||||
nsITextAreaWidget* textArea = nsnull;
|
||||
nsITextWidget* text = nsnull;
|
||||
if (NS_OK == mWidget->QueryInterface(kITextWidgetIID,(void**)&text)) {
|
||||
GetText(&value, PR_TRUE);
|
||||
if (mCachedState) {
|
||||
value = *mCachedState;
|
||||
delete mCachedState;
|
||||
mCachedState = nsnull;
|
||||
} else
|
||||
GetText(&value, PR_TRUE);
|
||||
text->SetText(value, ignore);
|
||||
PRInt32 maxLength;
|
||||
nsresult result = GetMaxLength(&maxLength);
|
||||
@@ -253,7 +271,12 @@ nsNativeTextControlFrame::PostCreateWidget(nsIPresContext* aPresContext,
|
||||
}
|
||||
NS_RELEASE(text);
|
||||
} else if (NS_OK == mWidget->QueryInterface(kITextAreaWidgetIID,(void**)&textArea)) {
|
||||
GetText(&value, PR_TRUE);
|
||||
if (mCachedState) {
|
||||
value = *mCachedState;
|
||||
delete mCachedState;
|
||||
mCachedState = nsnull;
|
||||
} else
|
||||
GetText(&value, PR_TRUE);
|
||||
textArea->SetText(value, ignore);
|
||||
NS_RELEASE(textArea);
|
||||
}
|
||||
@@ -333,7 +356,7 @@ nsNativeTextControlFrame::PaintTextControlBackground(nsIPresContext& aPresContex
|
||||
nsIRenderingContext& aRenderingContext,
|
||||
const nsRect& aDirtyRect,
|
||||
nsFramePaintLayer aWhichLayer) {
|
||||
Inherited::Paint(aPresContext, aRenderingContext, aDirtyRect, aWhichLayer);
|
||||
nsNativeFormControlFrame::Paint(aPresContext, aRenderingContext, aDirtyRect, aWhichLayer);
|
||||
}
|
||||
|
||||
void
|
||||
@@ -539,7 +562,9 @@ void nsNativeTextControlFrame::SetTextControlFrameState(const nsString& aValue)
|
||||
textArea->SetText(aValue,size);
|
||||
NS_RELEASE(textArea);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
mCachedState = new nsString(aValue);
|
||||
}
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsNativeTextControlFrame::SetProperty(nsIAtom* aName, const nsString& aValue)
|
||||
@@ -565,7 +590,7 @@ NS_IMETHODIMP nsNativeTextControlFrame::SetProperty(nsIAtom* aName, const nsStri
|
||||
}
|
||||
}
|
||||
else {
|
||||
return Inherited::SetProperty(aName, aValue);
|
||||
return nsNativeFormControlFrame::SetProperty(aName, aValue);
|
||||
}
|
||||
return rv;
|
||||
}
|
||||
@@ -579,7 +604,7 @@ NS_IMETHODIMP nsNativeTextControlFrame::GetProperty(nsIAtom* aName, nsString& aV
|
||||
GetTextControlFrameState(aValue);
|
||||
}
|
||||
else {
|
||||
return Inherited::GetProperty(aName, aValue);
|
||||
return nsNativeFormControlFrame::GetProperty(aName, aValue);
|
||||
}
|
||||
|
||||
return NS_OK;
|
||||
|
||||
Reference in New Issue
Block a user