From 6b82fe01dc0b2f972528e142d2eba9d199f8aabb Mon Sep 17 00:00:00 2001 From: "karnaze%netscape.com" Date: Mon, 14 May 2001 14:37:13 +0000 Subject: [PATCH] bug 78291 - disable processing the dummy layout request during special table reflow command cancel, sr=attinasi git-svn-id: svn://10.0.0.236/trunk@94890 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/layout/base/nsPresShell.cpp | 19 ++++++++++++------- mozilla/layout/html/base/src/nsPresShell.cpp | 19 ++++++++++++------- 2 files changed, 24 insertions(+), 14 deletions(-) diff --git a/mozilla/layout/base/nsPresShell.cpp b/mozilla/layout/base/nsPresShell.cpp index b633b86cf90..858b1cc3a35 100644 --- a/mozilla/layout/base/nsPresShell.cpp +++ b/mozilla/layout/base/nsPresShell.cpp @@ -858,7 +858,8 @@ public: nsIReflowCommand::ReflowType* aCmdType); NS_IMETHOD CancelReflowCommandInternal(nsIFrame* aTargetFrame, nsIReflowCommand::ReflowType* aCmdType, - nsVoidArray& aQueue); + nsVoidArray& aQueue, + PRBool aProcessDummyLayoutRequest = PR_TRUE); NS_IMETHOD CancelAllReflowCommands(); NS_IMETHOD IsSafeToFlush(PRBool& aIsSafeToFlush); NS_IMETHOD FlushPendingNotifications(); @@ -3515,9 +3516,10 @@ PresShell :: IsDragInProgress ( ) const NS_IMETHODIMP -PresShell::CancelReflowCommandInternal(nsIFrame* aTargetFrame, +PresShell::CancelReflowCommandInternal(nsIFrame* aTargetFrame, nsIReflowCommand::ReflowType* aCmdType, - nsVoidArray& aQueue) + nsVoidArray& aQueue, + PRBool aProcessDummyLayoutRequest) { PRInt32 i, n = aQueue.Count(); for (i = 0; i < n; i++) { @@ -3554,7 +3556,9 @@ PresShell::CancelReflowCommandInternal(nsIFrame* aTargetFrame, } } - DoneRemovingReflowCommands(); + if (aProcessDummyLayoutRequest) { + DoneRemovingReflowCommands(); + } return NS_OK; } @@ -5862,11 +5866,12 @@ PresShell::SendInterruptNotificationTo(nsIFrame* aFrame, } nsresult -PresShell::CancelInterruptNotificationTo(nsIFrame* aFrame, - nsIPresShell:: InterruptType aInterruptType) +PresShell::CancelInterruptNotificationTo(nsIFrame* aFrame, + nsIPresShell::InterruptType aInterruptType) { - return CancelReflowCommandInternal(aFrame, nsnull, mTimeoutReflowCommands); + // cancel the reflow command without affecting the dummy layout request + return CancelReflowCommandInternal(aFrame, nsnull, mTimeoutReflowCommands, PR_FALSE); } nsresult diff --git a/mozilla/layout/html/base/src/nsPresShell.cpp b/mozilla/layout/html/base/src/nsPresShell.cpp index b633b86cf90..858b1cc3a35 100644 --- a/mozilla/layout/html/base/src/nsPresShell.cpp +++ b/mozilla/layout/html/base/src/nsPresShell.cpp @@ -858,7 +858,8 @@ public: nsIReflowCommand::ReflowType* aCmdType); NS_IMETHOD CancelReflowCommandInternal(nsIFrame* aTargetFrame, nsIReflowCommand::ReflowType* aCmdType, - nsVoidArray& aQueue); + nsVoidArray& aQueue, + PRBool aProcessDummyLayoutRequest = PR_TRUE); NS_IMETHOD CancelAllReflowCommands(); NS_IMETHOD IsSafeToFlush(PRBool& aIsSafeToFlush); NS_IMETHOD FlushPendingNotifications(); @@ -3515,9 +3516,10 @@ PresShell :: IsDragInProgress ( ) const NS_IMETHODIMP -PresShell::CancelReflowCommandInternal(nsIFrame* aTargetFrame, +PresShell::CancelReflowCommandInternal(nsIFrame* aTargetFrame, nsIReflowCommand::ReflowType* aCmdType, - nsVoidArray& aQueue) + nsVoidArray& aQueue, + PRBool aProcessDummyLayoutRequest) { PRInt32 i, n = aQueue.Count(); for (i = 0; i < n; i++) { @@ -3554,7 +3556,9 @@ PresShell::CancelReflowCommandInternal(nsIFrame* aTargetFrame, } } - DoneRemovingReflowCommands(); + if (aProcessDummyLayoutRequest) { + DoneRemovingReflowCommands(); + } return NS_OK; } @@ -5862,11 +5866,12 @@ PresShell::SendInterruptNotificationTo(nsIFrame* aFrame, } nsresult -PresShell::CancelInterruptNotificationTo(nsIFrame* aFrame, - nsIPresShell:: InterruptType aInterruptType) +PresShell::CancelInterruptNotificationTo(nsIFrame* aFrame, + nsIPresShell::InterruptType aInterruptType) { - return CancelReflowCommandInternal(aFrame, nsnull, mTimeoutReflowCommands); + // cancel the reflow command without affecting the dummy layout request + return CancelReflowCommandInternal(aFrame, nsnull, mTimeoutReflowCommands, PR_FALSE); } nsresult