Sounds like a bug, especially because browser behavior differs. Can you open a
report?
Thanks for researching this!
Am 13.09.2011 um 18:15 schrieb Tobias Oetiker:
> Hi Tristan,
>
> Today Tristan Koch wrote:
>
>> Hi Tobias,
>>
>>> ImageLoader.js:202 (qooxdoo 1.4.2)
>>
>> Loads the image (unmanged, I suppose?) to determine its dimensions.
>
> it is a chart generated on the server ...
>
>>> and the second one from
>>>
>>> Appear.js:181 (qooxdoo 1.4.2)
>>
>> Not sure here but I guess the lookup of offsetWidth forces the
>> browser to render (that is, paint the visual representation of
>> the current document). But I'm surprised another request is made.
>> Do you see log messages for the image in your HTTP server's log?
>> Is the URL exactly identical?
>
> yes the server gets two requests fro exactly the same chart. It
> only happens when running the application on chrome ... firefox
> only does one request ...
>
>>> if I load a chart which I loaded before, the ImageLoader GET does
>>> not happen, but the Appear GET does ...
>>
>> Thats because the dimensions of the image have already been determined.
>
> hmmm I tried reproducing the problem with playground but there it
> does not happen ...
>
> // Create a button
> var image = new qx.ui.basic.Image().set({
> allowGrowX : true,
> allowGrowY : true,
> allowShrinkX : true,
> allowShrinkY : true,
> width: 300,
> height: 400
> });
> this.getRoot().add(image,{left:0,top:0});
> image.hide();
> qx.html.Element.flush();
> image.addListener('loaded',function(){image.show();});
> image.addListener('appear',function(){this.debug("hello");});
> var src = "http://oss.oetiker.ch/extopus/screenshot.png?rnd="+Math.random();
> if (!qx.io.ImageLoader.isLoaded(src)){
> image.setSource(src);
> }
> else {
> image.setSource(src);
> image.show();
> }
>
>> Regards
>> Tristan
>>
>>
>> ------------------------------------------------------------------------------
>> BlackBerry® DevCon Americas, Oct. 18-20, San Francisco, CA
>> Learn about the latest advances in developing for the
>> BlackBerry® mobile platform with sessions, labs & more.
>> See new tools and technologies. Register for BlackBerry® DevCon today!
>> http://p.sf.net/sfu/rim-devcon-copy1
>> _______________________________________________
>> qooxdoo-devel mailing list
>> [email protected]
>> https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
>>
>>
>
> --
> Tobi Oetiker, OETIKER+PARTNER AG, Aarweg 15 CH-4600 Olten, Switzerland
> http://it.oetiker.ch [email protected] ++41 62 775 9902 / sb: -9900
>
> ------------------------------------------------------------------------------
> BlackBerry® DevCon Americas, Oct. 18-20, San Francisco, CA
> Learn about the latest advances in developing for the
> BlackBerry® mobile platform with sessions, labs & more.
> See new tools and technologies. Register for BlackBerry® DevCon today!
> http://p.sf.net/sfu/rim-devcon-copy1
> _______________________________________________
> qooxdoo-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
------------------------------------------------------------------------------
BlackBerry® DevCon Americas, Oct. 18-20, San Francisco, CA
Learn about the latest advances in developing for the
BlackBerry® mobile platform with sessions, labs & more.
See new tools and technologies. Register for BlackBerry® DevCon today!
http://p.sf.net/sfu/rim-devcon-copy1
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel