Stop exposing imgIRequest to script

NEW
Unassigned

Status

()

Core
ImageLib
P3
normal
2 years ago
a year ago

People

(Reporter: jrmuizel, Unassigned)

Tracking

(Blocks: 1 bug)

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [gfx-noted])

(Reporter)

Description

2 years ago
This interface is not widely used and usually the users would prefer something more generic.

Devtools has code like:
    
    if (request instanceof Ci.imgIRequest) {
      let imgIRequest = request.QueryInterface(Ci.imgIRequest);
      uri = imgIRequest.URI;
    } else if (request instanceof Ci.nsIChannel) {
      let nsIChannel = request.QueryInterface(Ci.nsIChannel);
      uri = nsIChannel.URI;
    }

Firebug does:

function getRequestElement(request)
{
    if (request instanceof imgIRequest)
    {
        if (request.decoderObserver && request.decoderObserver instanceof Element)
        {
            return request.decoderObserver;
        }
    }    
}

It seems like this functionality should be exposed through another mechanism.
(Reporter)

Comment 1

2 years ago
To implement this we should probably unify image requests with other kinds of requests (scripts, fonts, video etc.)
(Reporter)

Updated

2 years ago
Blocks: 1293755

Updated

2 years ago
Whiteboard: [gfx-noted]
You need to log in before you can comment on or make changes to this bug.