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


git-svn-id: svn://10.0.0.236/trunk@210092 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
bzbarsky%mit.edu
2006-09-14 00:54:44 +00:00
parent e51e5c0181
commit 8945cce7f6

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"));
}