Backed out changeset 6f3797124c84: Relanding: Fire resize events every 200ms during resizing, not just 200ms after resizing stops. (Bug 114649) r+sr=roc

This commit is contained in:
L. David Baron 2008-10-01 20:11:44 -07:00
parent 7c8c7d48e3
commit 4c2a55f0ee
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();
}