Fix for bug #37650: Initial values in text boxes not being displayed.
Modified AttributeChanged() to allow us to set the value attribute even though mEditor is null. r=morse@netscape.com a=beppe@netscape.com git-svn-id: svn://10.0.0.236/trunk@71167 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
parent
112434216b
commit
6ad77ab6e2
@ -1175,19 +1175,17 @@ nsGfxTextControlFrame::AttributeChanged(nsIPresContext* aPresContext,
|
||||
nsIAtom* aAttribute,
|
||||
PRInt32 aHint)
|
||||
{
|
||||
if (PR_FALSE==IsInitialized()) {return NS_ERROR_NOT_INITIALIZED;}
|
||||
nsresult result = NS_OK;
|
||||
|
||||
if (nsHTMLAtoms::value == aAttribute)
|
||||
{
|
||||
if (mEditor)
|
||||
{
|
||||
nsString value;
|
||||
GetText(&value, PR_TRUE); // get the initial value from the content attribute
|
||||
mEditor->EnableUndo(PR_FALSE); // wipe out undo info
|
||||
SetTextControlFrameState(value); // set new text value
|
||||
nsString value;
|
||||
GetText(&value, PR_TRUE); // get the initial value from the content attribute
|
||||
SetTextControlFrameState(value); // set new text value
|
||||
if (mEditor)
|
||||
mEditor->EnableUndo(PR_TRUE); // fire up a new txn stack
|
||||
}
|
||||
if (aHint != NS_STYLE_HINT_REFLOW)
|
||||
nsFormFrame::StyleChangeReflow(aPresContext, this);
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user