зеркало из 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 int GetOwnerId()=0;
|
||||
|
||||
virtual void SetOwnerId(int)=0;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
|
@ -102,6 +102,10 @@ public:
|
|||
|
||||
virtual void SetBackgroundLoad(PRBool aBgload);
|
||||
|
||||
virtual int GetOwnerId();
|
||||
|
||||
virtual void SetOwnerId(int aOwnerId);
|
||||
|
||||
URL_Struct *GetURLStruct() { return mURLS; }
|
||||
|
||||
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();
|
||||
if(reader)
|
||||
{
|
||||
#if 0
|
||||
/* This change is not fully merged from the MODULAR_IMGLIB_BRANCH landing. */
|
||||
/* Extreme editor hack! This value is used when loading images
|
||||
so we use the converter we did in 4.06 code.
|
||||
If we don't, this code triggers parsing of the image URL,
|
||||
which has very bad effects in the editor! */
|
||||
if((urls && urls->owner_id == 0x000000ED) || (ic && ic->multi))
|
||||
#endif
|
||||
if(reader->IsMulti()) {
|
||||
if((iurl->GetOwnerId() == 0x000000ED) || reader->IsMulti()) {
|
||||
NS_RELEASE(reader);
|
||||
return IL_NewStream(format_out, IL_UNKNOWN, urls, cx);
|
||||
}
|
||||
|
|
|
@ -1874,14 +1874,11 @@ IL_GetImage(const char* image_url,
|
|||
ic->net_cx->AddReferer(url);
|
||||
#endif
|
||||
|
||||
#if 0
|
||||
/* This change is not fully merged from the MODULAR_IMGLIB_BRANCH landing. */
|
||||
/* EXTREME HACK ALERT!
|
||||
Special signal for Composer (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) */
|
||||
urls->owner_id = (int)flags;
|
||||
#endif
|
||||
url->SetOwnerId((int)flags);
|
||||
|
||||
ic->is_looping = FALSE;
|
||||
ic->url = url;
|
||||
|
|
Загрузка…
Ссылка в новой задаче