From 011cbdbc29d95ffdaad898657d4d4fa20f34b564 Mon Sep 17 00:00:00 2001 From: "mark%moxienet.com" Date: Tue, 20 Jun 2006 00:30:18 +0000 Subject: [PATCH] 209989 After Find Again (Ctrl-G/F3), text highlighting color becomes green. Patch (tweak) by Peter Kasting . r=dbaron git-svn-id: svn://10.0.0.236/trunk@200377 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/layout/generic/nsSelection.cpp | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/mozilla/layout/generic/nsSelection.cpp b/mozilla/layout/generic/nsSelection.cpp index d7158cb4ab0..ce9fac1234a 100644 --- a/mozilla/layout/generic/nsSelection.cpp +++ b/mozilla/layout/generic/nsSelection.cpp @@ -4253,6 +4253,13 @@ nsTypedSelection::Clear(nsPresContext* aPresContext) } // Reset direction so for more dependable table selection range handling SetDirection(eDirNext); + + // If this was an ATTENTION selection, change it back to normal now + if (mFrameSelection->GetDisplaySelection() == + nsISelectionController::SELECTION_ATTENTION) { + mFrameSelection->SetDisplaySelection(nsISelectionController::SELECTION_ON); + } + return NS_OK; } @@ -5151,12 +5158,6 @@ nsTypedSelection::RemoveAllRanges() // Turn off signal for table selection mFrameSelection->ClearTableCellSelection(); - // If this was an ATTENTION selection, change it back to normal now - if (mFrameSelection->GetDisplaySelection() == - nsISelectionController::SELECTION_ATTENTION) { - mFrameSelection->SetDisplaySelection(nsISelectionController::SELECTION_ON); - } - return mFrameSelection->NotifySelectionListeners(GetType()); // Also need to notify the frames! // PresShell::CharacterDataChanged should do that on DocumentChanged