diff --git a/mozilla/layout/base/nsPresShell.cpp b/mozilla/layout/base/nsPresShell.cpp index b41ebe2eae7..965aa9badb3 100644 --- a/mozilla/layout/base/nsPresShell.cpp +++ b/mozilla/layout/base/nsPresShell.cpp @@ -1073,6 +1073,8 @@ protected: // This method should be called after a reflow commands have been // removed from the queue, but after the state in the presshell is // such that it's safe to flush (i.e. mIsReflowing == PR_FALSE) + // If we are not reflowing and ther are no load-crated reflow commands, then + // the dummyLayoutRequest is removed void DoneRemovingReflowCommands(); nsresult AddDummyLayoutRequest(void); @@ -6121,7 +6123,7 @@ PresShell::ReflowCommandRemoved(nsIReflowCommand* aRC) void PresShell::DoneRemovingReflowCommands() { - if (mRCCreatedDuringLoad == 0 && mDummyLayoutRequest) { + if (mRCCreatedDuringLoad == 0 && mDummyLayoutRequest && !mIsReflowing) { RemoveDummyLayoutRequest(); } } diff --git a/mozilla/layout/html/base/src/nsPresShell.cpp b/mozilla/layout/html/base/src/nsPresShell.cpp index b41ebe2eae7..965aa9badb3 100644 --- a/mozilla/layout/html/base/src/nsPresShell.cpp +++ b/mozilla/layout/html/base/src/nsPresShell.cpp @@ -1073,6 +1073,8 @@ protected: // This method should be called after a reflow commands have been // removed from the queue, but after the state in the presshell is // such that it's safe to flush (i.e. mIsReflowing == PR_FALSE) + // If we are not reflowing and ther are no load-crated reflow commands, then + // the dummyLayoutRequest is removed void DoneRemovingReflowCommands(); nsresult AddDummyLayoutRequest(void); @@ -6121,7 +6123,7 @@ PresShell::ReflowCommandRemoved(nsIReflowCommand* aRC) void PresShell::DoneRemovingReflowCommands() { - if (mRCCreatedDuringLoad == 0 && mDummyLayoutRequest) { + if (mRCCreatedDuringLoad == 0 && mDummyLayoutRequest && !mIsReflowing) { RemoveDummyLayoutRequest(); } }