Merge relanding of bug 114649.

This commit is contained in:
L. David Baron 2008-10-01 20:12:08 -07:00
commit 0ae542dabc
2 changed files with 8 additions and 3 deletions

View File

@ -2581,7 +2581,9 @@ PresShell::ResizeReflow(nscoord aWidth, nscoord aHeight)
void
PresShell::CreateResizeEventTimer ()
{
KillResizeEventTimer();
// if we already have a timer set, ignore this call
if (mResizeEventTimer)
return;
if (mIsDocumentGone)
return;
@ -2617,6 +2619,9 @@ PresShell::FireResizeEvent()
if (mIsDocumentGone)
return;
// allow a new timer to be set
mResizeEventTimer = nsnull;
//Send resize event from here.
nsEvent event(PR_TRUE, NS_RESIZE_EVENT);
nsEventStatus status = nsEventStatus_eIgnore;

View File

@ -55,8 +55,8 @@ function handle_child_resize()
function check_for_resize_events()
{
todo(gGotEventsAt.length >= 2, "got continuous events");
todo_isnot(gGotEventsAt[0], 400, "got continuous events");
ok(gGotEventsAt.length >= 2, "got continuous events");
isnot(gGotEventsAt[0], 400, "got continuous events");
is(gGotEventsAt[gGotEventsAt.length - 1], 400, "got last event");
SimpleTest.finish();
}