From 52b207f812426355c8b77bd9c34c1ee5160f3b6e Mon Sep 17 00:00:00 2001 From: "locka%iol.ie" Date: Mon, 4 Jan 1999 21:58:15 +0000 Subject: [PATCH] Bug 2111: Implemented temporary kludge fix pending ideas from others on the matter git-svn-id: svn://10.0.0.236/trunk@17107 18797224-902f-48f8-a5cc-f745e15eee43 --- .../embed/ActiveX/WebShellContainer.cpp | 31 +++++++++++++++++-- 1 file changed, 29 insertions(+), 2 deletions(-) diff --git a/mozilla/webshell/embed/ActiveX/WebShellContainer.cpp b/mozilla/webshell/embed/ActiveX/WebShellContainer.cpp index de987673c26..f0d26e9ad80 100644 --- a/mozilla/webshell/embed/ActiveX/WebShellContainer.cpp +++ b/mozilla/webshell/embed/ActiveX/WebShellContainer.cpp @@ -18,6 +18,8 @@ #include "stdafx.h" +#include + #include "WebShellContainer.h" @@ -145,14 +147,39 @@ CWebShellContainer::BeginLoadURL(nsIWebShell* aShell, const PRUnichar* aURL) } +#define FPKLUDGE +#ifdef FPKLUDGE +#include +#endif + NS_IMETHODIMP CWebShellContainer::ProgressLoadURL(nsIWebShell* aShell, const PRUnichar* aURL, PRInt32 aProgress, PRInt32 aProgressMax) { USES_CONVERSION; NG_TRACE(_T("CWebShellContainer::ProgressLoadURL(..., \"%s\", %d, %d)\n"), W2T(aURL), (int) aProgress, (int) aProgressMax); - m_pEvents1->Fire_ProgressChange(aProgress, aProgressMax); - m_pEvents2->Fire_ProgressChange(aProgress, aProgressMax); + long nProgress = aProgress; + long nProgressMax = aProgressMax; + + if (nProgress == 0) + { + } + if (nProgressMax == 0) + { + nProgressMax = LONG_MAX; + } + if (nProgress > nProgressMax) + { + nProgress = nProgressMax; // Progress complete + } + +#ifdef FPKLUDGE + _fpreset(); +#endif + + m_pEvents1->Fire_ProgressChange(nProgress, nProgressMax); + m_pEvents2->Fire_ProgressChange(nProgress, nProgressMax); + return NS_OK; }