From 6f5651c414888d52b380bd95503797f8e1fb40fb Mon Sep 17 00:00:00 2001 From: "bzbarsky%mit.edu" Date: Mon, 28 Jul 2003 20:45:38 +0000 Subject: [PATCH] Tabbing through textfields should repaint instead of leaving them looking selected. Bug 214115, r=brade, sr=dbaron git-svn-id: svn://10.0.0.236/trunk@145278 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/layout/generic/nsTextFrame.cpp | 7 ++----- mozilla/layout/html/base/src/nsTextFrame.cpp | 7 ++----- 2 files changed, 4 insertions(+), 10 deletions(-) diff --git a/mozilla/layout/generic/nsTextFrame.cpp b/mozilla/layout/generic/nsTextFrame.cpp index 59e3c74251e..4feece69644 100644 --- a/mozilla/layout/generic/nsTextFrame.cpp +++ b/mozilla/layout/generic/nsTextFrame.cpp @@ -3610,7 +3610,6 @@ nsTextFrame::SetSelected(nsIPresContext* aPresContext, return NS_OK;//do not continue no selection for this frame. PRBool found = PR_FALSE; - PRBool wholeContentFound = PR_FALSE;//if the entire content we look at is selected. if (aRange) { //lets see if the range contains us, if so we must redraw! nsCOMPtr endNode; @@ -3645,7 +3644,6 @@ nsTextFrame::SetSelected(nsIPresContext* aPresContext, else { found = PR_FALSE; - wholeContentFound = PR_TRUE; } } else @@ -3654,9 +3652,8 @@ nsTextFrame::SetSelected(nsIPresContext* aPresContext, } } else { - if (aSelected != ((GetStateBits() & NS_FRAME_SELECTED_CONTENT) != 0)) { - found = PR_TRUE; - } + // null range means the whole thing + found = PR_TRUE; } if ( aSelected ) diff --git a/mozilla/layout/html/base/src/nsTextFrame.cpp b/mozilla/layout/html/base/src/nsTextFrame.cpp index 59e3c74251e..4feece69644 100644 --- a/mozilla/layout/html/base/src/nsTextFrame.cpp +++ b/mozilla/layout/html/base/src/nsTextFrame.cpp @@ -3610,7 +3610,6 @@ nsTextFrame::SetSelected(nsIPresContext* aPresContext, return NS_OK;//do not continue no selection for this frame. PRBool found = PR_FALSE; - PRBool wholeContentFound = PR_FALSE;//if the entire content we look at is selected. if (aRange) { //lets see if the range contains us, if so we must redraw! nsCOMPtr endNode; @@ -3645,7 +3644,6 @@ nsTextFrame::SetSelected(nsIPresContext* aPresContext, else { found = PR_FALSE; - wholeContentFound = PR_TRUE; } } else @@ -3654,9 +3652,8 @@ nsTextFrame::SetSelected(nsIPresContext* aPresContext, } } else { - if (aSelected != ((GetStateBits() & NS_FRAME_SELECTED_CONTENT) != 0)) { - found = PR_TRUE; - } + // null range means the whole thing + found = PR_TRUE; } if ( aSelected )