Open Bug 1293763 Opened 8 years ago Updated 2 years ago

Stop exposing imgIRequest to script

Categories

(Core :: Graphics: ImageLib, defect, P3)

defect

Tracking

()

People

(Reporter: jrmuizel, Unassigned)

References

(Blocks 1 open bug)

Details

(Whiteboard: [gfx-noted])

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.
To implement this we should probably unify image requests with other kinds of requests (scripts, fonts, video etc.)
Blocks: 1293755
Whiteboard: [gfx-noted]
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.