Comment 0 for bug 294712

Created an attachment (id=303318)
Patch (v1)

Spinoff from bug 218142 comment 59.

We need to ignore the image blocking status when the user right-clicks on an unloaded image and selects Show Image.

(In reply to bug 218142 comment #56)
> This doesn't work (nothing happens, no error msgs) if "Load images
> automatically" is disabled in Options->Content, if I add the hack from the 2006
> patch it does work.
> Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.9b4pre) Gecko/2008021304
> Minefield/3.0b4pre

My first reaction was something along the lines of "we must respect user prefs
if they don't want to load an image, but we present this option in the UI as
"Load images _automatically_". So, a logical use case would be for a user to
disable this pref, and then use the new Show Image menu item on image
placeholders to individually load the ones she may be interested in. This
actually looks like a valid point to me, so I'll provide a followup patch soon
based on bug 218142 comment 26.

Here is a patch to implement this.
This patch adds the checkContentPolicy attribute to the nsIImageLoadingContent
interface, and skips the content policy check for the image blocking status if
it's set to false in nsImageLoadingContent::LoadImage(). This is implemented
in nsContentUtils::CanLoadImage().

Requesting review and super-review on the content/ part from sicking, and
review on the browser/ part from gavin.