Fix bug#309770 (refresh urltimer bug). added a new member (the reload policy) to CHTMLView so that it can be set correctly in SpendTime(). Now passing the eitire URL_Struct to SetURLTimer() to avoid long param lists.

git-svn-id: svn://10.0.0.236/trunk@9753 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
pinkerton%netscape.com 1998-09-10 20:42:05 +00:00
parent a445aaa66a
commit 4d371c0d95
3 changed files with 11 additions and 6 deletions

View File

@ -205,7 +205,7 @@ void FE_SetRefreshURLTimer(
URL_Struct* URL_s)
{
if (ExtractHyperView(context))
ExtractHyperView(context)->SetTimerURL(URL_s->refresh, URL_s->refresh_url);
ExtractHyperView(context)->SetTimerURL(URL_s);
}
void FE_ShowScrollBars(MWContext *context, XP_Bool show)

View File

@ -724,7 +724,7 @@ void CHTMLView::SpendTime(const EventRecord& /* inMacEvent */)
( XP_IsContextBusy(*mContext) == false) &&
CFrontApp::GetApplication() && CFrontApp::GetApplication()->HasProperlyStartedUp())
{
URL_Struct * request = NET_CreateURLStruct (mTimerURLString, NET_NORMAL_RELOAD);
URL_Struct * request = NET_CreateURLStruct (mTimerURLString, mTimerURLReloadPolicy);
ClearTimerURL(); // ...frees mTimerURLString, so must do this _after_ |NET_CreateURLStruct|.
if (request)
{
@ -4801,13 +4801,17 @@ void CHTMLView::DoDragSendData(FlavorType inFlavor,
//
// ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ
void CHTMLView::SetTimerURL(Uint32 inSeconds, const char* inURL)
void CHTMLView::SetTimerURL(const URL_Struct* inURL)
{
if (inURL)
mTimerURLString = XP_STRDUP(inURL);
mTimerURLString = XP_STRDUP(inURL->refresh_url);
else
return;
mTimerURLFireTime = ::TickCount() + inSeconds * 60;
mTimerURLFireTime = ::TickCount() + inURL->refresh * 60;
if ( inURL->dont_cache )
mTimerURLReloadPolicy = NET_SUPER_RELOAD;
else
mTimerURLReloadPolicy = inURL->force_reload;
StartRepeating();
}

View File

@ -250,7 +250,7 @@ class CHTMLView :
virtual void ImageToAvailScreenPoint(const SPoint32 &inImagePoint, Point &outPoint) const;
// TIMER URL
virtual void SetTimerURL(Uint32 inSeconds, const char* inURL);
virtual void SetTimerURL(const URL_Struct* inURL);
virtual void ClearTimerURL(void);
inline CCharSet GetCharSet() { return mCharSet; }
@ -796,6 +796,7 @@ class CHTMLView :
Uint32 mTimerURLFireTime;
char* mTimerURLString;
NET_ReloadMethod mTimerURLReloadPolicy;
CRouterDrawable* mOnscreenDrawable;
COffscreenDrawable* mOffscreenDrawable;