зеркало из https://github.com/mozilla/pjs.git
Reenable Charlie's editor hack to deal with IL_ViewStream/IL_NewStream problems
This commit is contained in:
Родитель
028eed743b
Коммит
638b2a5976
|
@ -42,6 +42,9 @@ public:
|
||||||
|
|
||||||
virtual void SetBackgroundLoad(PRBool aBgload)=0;
|
virtual void SetBackgroundLoad(PRBool aBgload)=0;
|
||||||
|
|
||||||
|
virtual int GetOwnerId()=0;
|
||||||
|
|
||||||
|
virtual void SetOwnerId(int)=0;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -102,6 +102,10 @@ public:
|
||||||
|
|
||||||
virtual void SetBackgroundLoad(PRBool aBgload);
|
virtual void SetBackgroundLoad(PRBool aBgload);
|
||||||
|
|
||||||
|
virtual int GetOwnerId();
|
||||||
|
|
||||||
|
virtual void SetOwnerId(int aOwnerId);
|
||||||
|
|
||||||
URL_Struct *GetURLStruct() { return mURLS; }
|
URL_Struct *GetURLStruct() { return mURLS; }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
@ -518,4 +522,24 @@ URLImpl::SetBackgroundLoad(PRBool bgload)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int
|
||||||
|
URLImpl::GetOwnerId()
|
||||||
|
{
|
||||||
|
if (mURLS) {
|
||||||
|
return mURLS->owner_id;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void
|
||||||
|
URLImpl::SetOwnerId(int ownerId)
|
||||||
|
{
|
||||||
|
if (mURLS) {
|
||||||
|
mURLS->owner_id = ownerId;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -216,15 +216,11 @@ IL_ViewStream(FO_Present_Types format_out, void *newshack, URL_Struct *urls,
|
||||||
reader = iurl->GetReader();
|
reader = iurl->GetReader();
|
||||||
if(reader)
|
if(reader)
|
||||||
{
|
{
|
||||||
#if 0
|
/* Extreme editor hack! This value is used when loading images
|
||||||
/* This change is not fully merged from the MODULAR_IMGLIB_BRANCH landing. */
|
so we use the converter we did in 4.06 code.
|
||||||
/* Extreme editor hack! This value is used when loading images
|
If we don't, this code triggers parsing of the image URL,
|
||||||
so we use the converter we did in 4.06 code.
|
which has very bad effects in the editor! */
|
||||||
If we don't, this code triggers parsing of the image URL,
|
if((iurl->GetOwnerId() == 0x000000ED) || reader->IsMulti()) {
|
||||||
which has very bad effects in the editor! */
|
|
||||||
if((urls && urls->owner_id == 0x000000ED) || (ic && ic->multi))
|
|
||||||
#endif
|
|
||||||
if(reader->IsMulti()) {
|
|
||||||
NS_RELEASE(reader);
|
NS_RELEASE(reader);
|
||||||
return IL_NewStream(format_out, IL_UNKNOWN, urls, cx);
|
return IL_NewStream(format_out, IL_UNKNOWN, urls, cx);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1874,14 +1874,11 @@ IL_GetImage(const char* image_url,
|
||||||
ic->net_cx->AddReferer(url);
|
ic->net_cx->AddReferer(url);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if 0
|
|
||||||
/* This change is not fully merged from the MODULAR_IMGLIB_BRANCH landing. */
|
|
||||||
/* EXTREME HACK ALERT!
|
/* EXTREME HACK ALERT!
|
||||||
Special signal for Composer (Editor)
|
Special signal for Composer (Editor)
|
||||||
This will be used in IL_ViewStream to tell we are an editor
|
This will be used in IL_ViewStream to tell we are an editor
|
||||||
and use IL_NewStream instead (as we did in 4.06 code) */
|
and use IL_NewStream instead (as we did in 4.06 code) */
|
||||||
urls->owner_id = (int)flags;
|
url->SetOwnerId((int)flags);
|
||||||
#endif
|
|
||||||
|
|
||||||
ic->is_looping = FALSE;
|
ic->is_looping = FALSE;
|
||||||
ic->url = url;
|
ic->url = url;
|
||||||
|
|
Загрузка…
Ссылка в новой задаче