mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-31 22:25:30 +00:00
workaround needed as a result of hyatt's change to frame construction code and attribute notification.
This commit is contained in:
parent
541c8bfb5d
commit
408c05bfea
@ -193,6 +193,7 @@ nsGfxTextControlFrame::nsGfxTextControlFrame()
|
||||
: mWebShell(0), mCreatingViewer(PR_FALSE),
|
||||
mTempObserver(0), mDocObserver(0),
|
||||
mDummyFrame(0), mNeedsStyleInit(PR_TRUE),
|
||||
mIsProcessing(PR_FALSE),
|
||||
mDummyInitialized(PR_FALSE) // DUMMY
|
||||
{
|
||||
}
|
||||
@ -695,14 +696,19 @@ void nsGfxTextControlFrame::SetTextControlFrameState(const nsString& aValue)
|
||||
|
||||
NS_IMETHODIMP nsGfxTextControlFrame::SetProperty(nsIAtom* aName, const nsString& aValue)
|
||||
{
|
||||
if (nsHTMLAtoms::value == aName)
|
||||
if (PR_FALSE==mIsProcessing)
|
||||
{
|
||||
mEditor->EnableUndo(PR_FALSE); // wipe out undo info
|
||||
SetTextControlFrameState(aValue); // set new text value
|
||||
mEditor->EnableUndo(PR_TRUE); // fire up a new txn stack
|
||||
}
|
||||
else {
|
||||
return Inherited::SetProperty(aName, aValue);
|
||||
mIsProcessing = PR_TRUE;
|
||||
if (nsHTMLAtoms::value == aName)
|
||||
{
|
||||
mEditor->EnableUndo(PR_FALSE); // wipe out undo info
|
||||
SetTextControlFrameState(aValue); // set new text value
|
||||
mEditor->EnableUndo(PR_TRUE); // fire up a new txn stack
|
||||
}
|
||||
else {
|
||||
return Inherited::SetProperty(aName, aValue);
|
||||
}
|
||||
mIsProcessing = PR_FALSE;
|
||||
}
|
||||
return NS_OK;
|
||||
}
|
||||
|
@ -504,6 +504,7 @@ protected:
|
||||
|
||||
nsCOMPtr<nsIEditor> mEditor; // ref counted
|
||||
nsCOMPtr<nsIDOMDocument> mDoc; // ref counted
|
||||
PRBool mIsProcessing;
|
||||
nsNativeTextControlFrame *mDummyFrame; //DUMMY
|
||||
|
||||
PRBool mNeedsStyleInit;
|
||||
|
Loading…
Reference in New Issue
Block a user