From 7670a72df2e5b53b2e886623322015872b93aef4 Mon Sep 17 00:00:00 2001 From: "rods%netscape.com" Date: Tue, 26 Oct 1999 23:34:46 +0000 Subject: [PATCH] At kipp's suggestion I added a EnterReflowLock before and a ExitReflowLock after my AppendReflowCommand. The reflow command gets "kicked off" and it is now fixed. r=kipp, b=14771 --- layout/forms/nsComboboxControlFrame.cpp | 5 ++++- layout/html/forms/src/nsComboboxControlFrame.cpp | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/layout/forms/nsComboboxControlFrame.cpp b/layout/forms/nsComboboxControlFrame.cpp index cd6264f43613..4298a5dd9779 100644 --- a/layout/forms/nsComboboxControlFrame.cpp +++ b/layout/forms/nsComboboxControlFrame.cpp @@ -1045,7 +1045,10 @@ nsComboboxControlFrame::SelectionChanged() nsCOMPtr shell; rv = mPresContext->GetShell(getter_AddRefs(shell)); if (NS_SUCCEEDED(rv) && shell) { - shell->AppendReflowCommand(cmd); + if (NS_SUCCEEDED(shell->EnterReflowLock())) { + shell->AppendReflowCommand(cmd); + shell->ExitReflowLock(); + } } NS_RELEASE(cmd); } diff --git a/layout/html/forms/src/nsComboboxControlFrame.cpp b/layout/html/forms/src/nsComboboxControlFrame.cpp index cd6264f43613..4298a5dd9779 100644 --- a/layout/html/forms/src/nsComboboxControlFrame.cpp +++ b/layout/html/forms/src/nsComboboxControlFrame.cpp @@ -1045,7 +1045,10 @@ nsComboboxControlFrame::SelectionChanged() nsCOMPtr shell; rv = mPresContext->GetShell(getter_AddRefs(shell)); if (NS_SUCCEEDED(rv) && shell) { - shell->AppendReflowCommand(cmd); + if (NS_SUCCEEDED(shell->EnterReflowLock())) { + shell->AppendReflowCommand(cmd); + shell->ExitReflowLock(); + } } NS_RELEASE(cmd); }