mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-30 08:12:05 +00:00
Added use of flag in IL_GetImage to identify an Editor when loading images, and use of that flag in IL_ViewStream to do use IL_NewStream instead (fixes regresion bug)
This commit is contained in:
parent
67c2c7307c
commit
549bf8e895
@ -119,13 +119,18 @@ IL_ViewStream(FO_Present_Types format_out, void *newshack, URL_Struct *urls,
|
||||
char *image_url;
|
||||
|
||||
/* multi-part reconnect hack */
|
||||
|
||||
ic = (il_container*)urls->fe_data;
|
||||
if(ic && ic->multi)
|
||||
|
||||
/* 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))
|
||||
{
|
||||
return IL_NewStream(format_out, IL_UNKNOWN, urls, cx);
|
||||
}
|
||||
|
||||
|
||||
/* Create stream object */
|
||||
if (!(stream = XP_NEW_ZAP(NET_StreamClass))) {
|
||||
XP_TRACE(("il: IL_ViewStream memory lossage"));
|
||||
|
@ -1886,6 +1886,12 @@ IL_GetImage(const char* image_url,
|
||||
|
||||
/* Add the referer to the URL. */
|
||||
IL_AddReferer(ic->net_cx, urls);
|
||||
|
||||
/* 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;
|
||||
|
||||
ic->is_looping = FALSE;
|
||||
ic->url = urls;
|
||||
|
Loading…
Reference in New Issue
Block a user