text content longer gets set to "" which it ignores, it

gets set to " " when thedisplay should be ""
bug 36459
Add ifdef'ed Performance Reflow Counting code
This commit is contained in:
rods%netscape.com 2000-04-21 21:53:38 +00:00
Родитель 7adb844995
Коммит 7bc1440f39
4 изменённых файлов: 20 добавлений и 6 удалений

Просмотреть файл

@ -1019,6 +1019,8 @@ nsComboboxControlFrame::Reflow(nsIPresContext* aPresContext,
const nsHTMLReflowState& aReflowState,
nsReflowStatus& aStatus)
{
DO_GLOBAL_REFLOW_COUNT("nsComboboxControlFrame", aReflowState.reason);
aStatus = NS_FRAME_COMPLETE;
REFLOW_COUNTER_REQUEST();
@ -1860,7 +1862,12 @@ nsComboboxControlFrame::SelectionChanged()
REFLOW_DEBUG_MSG3("**** SelectionChanged Old[%s] New[%s]\n", value.ToNewCString(), mTextStr.ToNewCString());
}
if (shouldSetValue) {
rv = mDisplayContent->SetText(mTextStr.GetUnicode(), mTextStr.Length(), PR_TRUE);
if (mTextStr.Length() == 0) {
nsAutoString space(" ");
rv = mDisplayContent->SetText(space.GetUnicode(), space.Length(), PR_TRUE);
} else {
rv = mDisplayContent->SetText(mTextStr.GetUnicode(), mTextStr.Length(), PR_TRUE);
}
nsFrameState state;
//mTextFrame->GetFrameState(&state);
//state |= NS_FRAME_IS_DIRTY;

Просмотреть файл

@ -28,8 +28,8 @@
#endif
#ifdef DEBUG_rods
#define DO_REFLOW_DEBUG
#define DO_REFLOW_COUNTER
//#define DO_REFLOW_DEBUG
//#define DO_REFLOW_COUNTER
//#define DO_UNCONSTRAINED_CHECK
//#define DO_PIXELS
//#define DO_NEW_REFLOW

Просмотреть файл

@ -1019,6 +1019,8 @@ nsComboboxControlFrame::Reflow(nsIPresContext* aPresContext,
const nsHTMLReflowState& aReflowState,
nsReflowStatus& aStatus)
{
DO_GLOBAL_REFLOW_COUNT("nsComboboxControlFrame", aReflowState.reason);
aStatus = NS_FRAME_COMPLETE;
REFLOW_COUNTER_REQUEST();
@ -1860,7 +1862,12 @@ nsComboboxControlFrame::SelectionChanged()
REFLOW_DEBUG_MSG3("**** SelectionChanged Old[%s] New[%s]\n", value.ToNewCString(), mTextStr.ToNewCString());
}
if (shouldSetValue) {
rv = mDisplayContent->SetText(mTextStr.GetUnicode(), mTextStr.Length(), PR_TRUE);
if (mTextStr.Length() == 0) {
nsAutoString space(" ");
rv = mDisplayContent->SetText(space.GetUnicode(), space.Length(), PR_TRUE);
} else {
rv = mDisplayContent->SetText(mTextStr.GetUnicode(), mTextStr.Length(), PR_TRUE);
}
nsFrameState state;
//mTextFrame->GetFrameState(&state);
//state |= NS_FRAME_IS_DIRTY;

Просмотреть файл

@ -28,8 +28,8 @@
#endif
#ifdef DEBUG_rods
#define DO_REFLOW_DEBUG
#define DO_REFLOW_COUNTER
//#define DO_REFLOW_DEBUG
//#define DO_REFLOW_COUNTER
//#define DO_UNCONSTRAINED_CHECK
//#define DO_PIXELS
//#define DO_NEW_REFLOW