Remove the business about not knowing our collapsed state at first. We do know

it, and we're collapsed.  Bug 352394, r=mats, sr=roc
This commit is contained in:
bzbarsky%mit.edu 2006-09-14 00:54:44 +00:00
parent ca17ae3ad9
commit b7a3c71cc9

View File

@ -235,7 +235,6 @@ protected:
nsTextControlFrame* mFrame; // weak reference
PRPackedBool mSelectionWasCollapsed;
PRPackedBool mKnowSelectionCollapsed;
/**
* Whether we had undo items or not the last time we got EditAction()
* notification (when this state changes we update undo and redo menus)
@ -256,7 +255,6 @@ protected:
nsTextInputListener::nsTextInputListener()
: mFrame(nsnull)
, mSelectionWasCollapsed(PR_TRUE)
, mKnowSelectionCollapsed(PR_FALSE)
, mHadUndoItems(PR_FALSE)
, mHadRedoItems(PR_FALSE)
{
@ -325,11 +323,10 @@ nsTextInputListener::NotifySelectionChanged(nsIDOMDocument* aDoc, nsISelection*
}
// if the collapsed state did not change, don't fire notifications
if (mKnowSelectionCollapsed && collapsed == mSelectionWasCollapsed)
if (collapsed == mSelectionWasCollapsed)
return NS_OK;
mSelectionWasCollapsed = collapsed;
mKnowSelectionCollapsed = PR_TRUE;
return UpdateTextInputCommands(NS_LITERAL_STRING("select"));
}