From 20eabb8db51bf2791daaa3eccd2bdf1e444629f7 Mon Sep 17 00:00:00 2001 From: "dcone%netscape.com" Date: Fri, 29 Jun 2001 05:42:47 +0000 Subject: [PATCH] bug 84017. Added a StyleReflow to set in the history.. because endobserving document no longer generates this needed reflow for the history/content update for text fields. r=kmcclusk@netscape.com, sr=attinasi git-svn-id: svn://10.0.0.236/trunk@98255 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/content/base/src/nsDocumentViewer.cpp | 18 ++++++++++++++++++ mozilla/layout/base/nsDocumentViewer.cpp | 18 ++++++++++++++++++ 2 files changed, 36 insertions(+) diff --git a/mozilla/content/base/src/nsDocumentViewer.cpp b/mozilla/content/base/src/nsDocumentViewer.cpp index 7409fda5f57..e4f08653a79 100644 --- a/mozilla/content/base/src/nsDocumentViewer.cpp +++ b/mozilla/content/base/src/nsDocumentViewer.cpp @@ -2849,6 +2849,21 @@ DocumentViewerImpl::ReflowPrintObject(PrintObject * aPO) } } + +#ifdef DEBUG_dcone + // Dump all the frames and view to a a file + FILE * fd = fopen("dump.txt", "w"); + if (fd) { + nsIFrame *theFrame; + aPO->mPresShell->GetRootFrame(&theFrame); + fprintf(fd, "--------------- Frames ----------------\n"); + nsCOMPtr renderingContext; + mPrt->mPrintDocDC->CreateRenderingContext(*getter_AddRefs(renderingContext)); + DumpFrames(fd, aPO->mPresContext, renderingContext, theFrame, 0); + fclose(fd); + } +#endif + // update the history from the old presentation shell nsCOMPtr fm; rv = aPO->mPresShell->GetFrameManager(getter_AddRefs(fm)); @@ -2860,6 +2875,9 @@ DocumentViewerImpl::ReflowPrintObject(PrintObject * aPO) } aPO->mPresShell->EndObservingDocument(); + // EndObserving document no longer does a reflow.. which history needs.. or we + // get a blank page for text fields. this will reflow.. fixes bug 84017. + aPO->mPresShell->StyleChangeReflow(); return rv; } diff --git a/mozilla/layout/base/nsDocumentViewer.cpp b/mozilla/layout/base/nsDocumentViewer.cpp index 7409fda5f57..e4f08653a79 100644 --- a/mozilla/layout/base/nsDocumentViewer.cpp +++ b/mozilla/layout/base/nsDocumentViewer.cpp @@ -2849,6 +2849,21 @@ DocumentViewerImpl::ReflowPrintObject(PrintObject * aPO) } } + +#ifdef DEBUG_dcone + // Dump all the frames and view to a a file + FILE * fd = fopen("dump.txt", "w"); + if (fd) { + nsIFrame *theFrame; + aPO->mPresShell->GetRootFrame(&theFrame); + fprintf(fd, "--------------- Frames ----------------\n"); + nsCOMPtr renderingContext; + mPrt->mPrintDocDC->CreateRenderingContext(*getter_AddRefs(renderingContext)); + DumpFrames(fd, aPO->mPresContext, renderingContext, theFrame, 0); + fclose(fd); + } +#endif + // update the history from the old presentation shell nsCOMPtr fm; rv = aPO->mPresShell->GetFrameManager(getter_AddRefs(fm)); @@ -2860,6 +2875,9 @@ DocumentViewerImpl::ReflowPrintObject(PrintObject * aPO) } aPO->mPresShell->EndObservingDocument(); + // EndObserving document no longer does a reflow.. which history needs.. or we + // get a blank page for text fields. this will reflow.. fixes bug 84017. + aPO->mPresShell->StyleChangeReflow(); return rv; }