From 0e49486b51fa9df1abf42f2ba130e1cd5e797979 Mon Sep 17 00:00:00 2001 From: kipp Date: Thu, 9 Jul 1998 17:08:40 +0000 Subject: [PATCH] Added debug code that syncs up the display when running slow so that incremental loading reflow can be visible git-svn-id: svn://10.0.0.236/trunk@5236 18797224-902f-48f8-a5cc-f745e15eee43 --- .../html/document/src/nsHTMLContentSink.cpp | 18 ++++++++++++++++++ .../html/document/src/nsHTMLContentSink.cpp | 18 ++++++++++++++++++ 2 files changed, 36 insertions(+) diff --git a/mozilla/content/html/document/src/nsHTMLContentSink.cpp b/mozilla/content/html/document/src/nsHTMLContentSink.cpp index a0b0f0bf250..85738a684e5 100644 --- a/mozilla/content/html/document/src/nsHTMLContentSink.cpp +++ b/mozilla/content/html/document/src/nsHTMLContentSink.cpp @@ -724,6 +724,24 @@ HTMLContentSink::CloseContainer(const nsIParserNode& aNode) parent->AppendChild(container, allowReflow); #ifdef NS_DEBUG if (allowReflow && (((PRInt32)gSinkLogModuleInfo->level) > 127)) { + PRInt32 i, ns = mDocument->GetNumberOfShells(); + for (i = 0; i < ns; i++) { + nsIPresShell* shell = mDocument->GetShellAt(i); + if (nsnull != shell) { + nsIViewManager* vm = shell->GetViewManager(); + if(vm) { + nsIView* rootView = vm->GetRootView(); + nsRect rect; + rootView->GetBounds(rect); + rect.x = 0; + rect.y = 0; + vm->Refresh(rootView, nsnull, &rect, NS_VMREFRESH_IMMEDIATE); + NS_RELEASE(rootView); + } + NS_RELEASE(vm); + NS_RELEASE(shell); + } + } printf("tick...\n"); PR_Sleep(PR_SecondsToInterval(3)); } diff --git a/mozilla/layout/html/document/src/nsHTMLContentSink.cpp b/mozilla/layout/html/document/src/nsHTMLContentSink.cpp index a0b0f0bf250..85738a684e5 100644 --- a/mozilla/layout/html/document/src/nsHTMLContentSink.cpp +++ b/mozilla/layout/html/document/src/nsHTMLContentSink.cpp @@ -724,6 +724,24 @@ HTMLContentSink::CloseContainer(const nsIParserNode& aNode) parent->AppendChild(container, allowReflow); #ifdef NS_DEBUG if (allowReflow && (((PRInt32)gSinkLogModuleInfo->level) > 127)) { + PRInt32 i, ns = mDocument->GetNumberOfShells(); + for (i = 0; i < ns; i++) { + nsIPresShell* shell = mDocument->GetShellAt(i); + if (nsnull != shell) { + nsIViewManager* vm = shell->GetViewManager(); + if(vm) { + nsIView* rootView = vm->GetRootView(); + nsRect rect; + rootView->GetBounds(rect); + rect.x = 0; + rect.y = 0; + vm->Refresh(rootView, nsnull, &rect, NS_VMREFRESH_IMMEDIATE); + NS_RELEASE(rootView); + } + NS_RELEASE(vm); + NS_RELEASE(shell); + } + } printf("tick...\n"); PR_Sleep(PR_SecondsToInterval(3)); }