Context menu's objectIsImage is totally bogus (and throws exceptions)

RESOLVED FIXED

Status

--
major
RESOLVED FIXED
15 years ago
11 years ago

People

(Reporter: bzbarsky, Unassigned)

Tracking

Dependency tree / graph

Firefox Tracking Flags

(Not tracked)

Details

(URL)

Attachments

(1 attachment)

There are two issues in this function:

1)  If "type" is not set you'll get back null and then trying to call indexOf on
    it will throw.
2)  You'd be better off detecting an image by going through
    nsIImageLoadingContent and looking for an actual image hanging off the node.

#1 is extremely bad -- it makes very broken context menus come up (think every
single item enabled).

You can test with the testcase (and patch) in bug 122685
(Reporter)

Updated

15 years ago
Blocks: 242302
(Reporter)

Updated

15 years ago
Blocks: 242303
(Reporter)

Updated

15 years ago
Depends on: 185714
I meant bug 185714 (as the dependencies say).
Created attachment 147520 [details]
Testcase that needs no patches

This breaks today's seamonkey build; no need for patch from bug 185714 or
anything.
Product: Core → Mozilla Application Suite
This was fixed in bug 196380.
Status: NEW → RESOLVED
Last Resolved: 14 years ago
Resolution: --- → FIXED

Updated

11 years ago
Component: XP Apps: GUI Features → UI Design
You need to log in before you can comment on or make changes to this bug.