From f6db301b4de7e2d0ed4a8a8179ff5e101d0e049c Mon Sep 17 00:00:00 2001 From: "kipp%netscape.com" Date: Tue, 4 Aug 1998 21:16:13 +0000 Subject: [PATCH] Enable refresh after document is loaded git-svn-id: svn://10.0.0.236/trunk@7261 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/content/html/document/src/nsImageDocument.cpp | 10 ++++++++++ mozilla/layout/html/document/src/nsImageDocument.cpp | 10 ++++++++++ 2 files changed, 20 insertions(+) diff --git a/mozilla/content/html/document/src/nsImageDocument.cpp b/mozilla/content/html/document/src/nsImageDocument.cpp index b681a95b2de..fc1642efde4 100644 --- a/mozilla/content/html/document/src/nsImageDocument.cpp +++ b/mozilla/content/html/document/src/nsImageDocument.cpp @@ -29,6 +29,7 @@ #include "nsIHTMLCSSStyleSheet.h" #include "nsIPresShell.h" #include "nsIPresContext.h" +#include "nsIViewManager.h" // XXX TODO: @@ -262,6 +263,15 @@ nsImageDocument::StartLayout() cx->GetVisibleArea(r); shell->ResizeReflow(r.width, r.height); NS_RELEASE(cx); + + // Now trigger a refresh + // XXX It's unfortunate that this has to be here + nsIViewManager* vm = shell->GetViewManager(); + if (nsnull != vm) { + vm->EnableRefresh(); + NS_RELEASE(vm); + } + NS_RELEASE(shell); } } diff --git a/mozilla/layout/html/document/src/nsImageDocument.cpp b/mozilla/layout/html/document/src/nsImageDocument.cpp index b681a95b2de..fc1642efde4 100644 --- a/mozilla/layout/html/document/src/nsImageDocument.cpp +++ b/mozilla/layout/html/document/src/nsImageDocument.cpp @@ -29,6 +29,7 @@ #include "nsIHTMLCSSStyleSheet.h" #include "nsIPresShell.h" #include "nsIPresContext.h" +#include "nsIViewManager.h" // XXX TODO: @@ -262,6 +263,15 @@ nsImageDocument::StartLayout() cx->GetVisibleArea(r); shell->ResizeReflow(r.width, r.height); NS_RELEASE(cx); + + // Now trigger a refresh + // XXX It's unfortunate that this has to be here + nsIViewManager* vm = shell->GetViewManager(); + if (nsnull != vm) { + vm->EnableRefresh(); + NS_RELEASE(vm); + } + NS_RELEASE(shell); } }