From 8945cce7f64b3e14f1083c3f26b3b60aadbc6e9e Mon Sep 17 00:00:00 2001 From: "bzbarsky%mit.edu" Date: Thu, 14 Sep 2006 00:54:44 +0000 Subject: [PATCH] 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 --- mozilla/layout/forms/nsTextControlFrame.cpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/mozilla/layout/forms/nsTextControlFrame.cpp b/mozilla/layout/forms/nsTextControlFrame.cpp index 767028ee6f8..ed8959bce4c 100644 --- a/mozilla/layout/forms/nsTextControlFrame.cpp +++ b/mozilla/layout/forms/nsTextControlFrame.cpp @@ -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")); }