Anatoly Kaverin wrote:
We need to get an image physical size (not dimentions) from Web page loaded into Firefox browser.

Is it possible to get it via XPCOM without additional reloading???

From
  chrome\browser\content\browser\metaData.js

function getSize(url) {
  try
  {
var cacheEntryDescriptor = httpCacheSession.openCacheEntry(url, Components.interfaces.nsICache.ACCESS_READ, false);
    if(cacheEntryDescriptor)
      return cacheEntryDescriptor.dataSize;
  }
  catch(ex) {}
  try
  {
cacheEntryDescriptor = ftpCacheSession.openCacheEntry(url, Components.interfaces.nsICache.ACCESS_READ, false);
    if (cacheEntryDescriptor)
      return cacheEntryDescriptor.dataSize;
  }
  catch(ex) {}
  return -1;
}

Daniel

F'up set to netscape.public.mozilla.xpcom
_______________________________________________
Mozilla-xpcom mailing list
[email protected]
http://mail.mozilla.org/listinfo/mozilla-xpcom

Reply via email to