Closed Bug 1307057 Opened 8 years ago Closed 8 years ago

Eyedropper doesn't work in image tabs

Categories

(DevTools :: Inspector, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED DUPLICATE of bug 1306937

People

(Reporter: pbro, Unassigned)

Details

STR:
- Open a tab
- Navigate to https://dl.dropboxusercontent.com/u/714210/grid-highlighter-blurry-lines.png (or any other image URL)
- Open the inspector

Expected: the eyedropper icon should be present in the inspector toolbar
Actual: it's hidden
Since bug 1262437, the eyedropper is actually a "highlighter", which means that it can only work in HTML documents.
In fact, in devtools/client/inspector/inspector-panel.js we check if the document is HTML to decide whether the icon should be shown or hidden.

Now, in case the HTTP response is an image (e.g. content-type "image/png"), then Firefox does something special where it injects an HTML page to present the image nicely rather than just simply showing the image.

So, the document is indeed HTML, but the content-type is "image/png", and since our code uses content-type, then we just assume the document isn't HTML, and the icon is hidden.

http://searchfox.org/mozilla-central/rev/d1276b5b84e6cf7991c8e640b5e0ffffd54575a6/devtools/server/actors/inspector.js#279-280
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → DUPLICATE
Product: Firefox → DevTools
You need to log in before you can comment on or make changes to this bug.