Closed Bug 80116 Opened 23 years ago Closed 20 years ago

Need "content analyzing" APIs


(Core :: DOM: Core & HTML, defect)

Not set





(Reporter: dr, Assigned: dr)



(Whiteboard: [blocks 78021])

Several places in the code need to figure out difficult things about "what sort
of content I'm looking at" -- for example, to figure out whether a content node
is within a link, you need to determine whether you or any of your ancestors are
an HTML <a>, an imagemap <area> with |href| attributes, an XLink, etc.

Code which needs this includes UI code for context menus (eg., you only want to
show the "copy link location" context menu item, and enable that command, if you
clicked on a link), as well as drag and drop (different content behaves
differently in DnD).

We need a single "content analyzing" API to determine useful information about
content nodes.

For reference, see code currently in nsContextMenu.js, nsPresShell.cpp, etc.
Priority: -- → P2
Target Milestone: --- → mozilla1.0
Blocks: 78021

Netscape 6.0 went out with Copy Link Location working with imagemaps. The next
Netscape RTM should not go out with it broken. Bug 80116 and bug 78021 should be
fixed for 0.9.2.

This should be a simple task of filling in a new XPCOM API with Bill Law's
content-sniffing code in nsContextMenu.js. (More content analyzing APIs should
be filled in post-RTM as needed).

Severity: enhancement → major
Target Milestone: mozilla1.0 → mozilla0.9.2
Whiteboard: [blocks 78021]
Target Milestone: mozilla0.9.2 → mozilla0.9.3
Priority: P2 → P1
Keywords: nsBranch
Priority: P1 → P2
Marked nsBranch on behalf of blocked bug 78021. This should be minimal, though,
in the spirit of low-risk and high-impact. For the branch, this will be one or
two methods on a new interface which will support only that functionality needed
to detect imagemaps.
Target Milestone: mozilla0.9.3 → mozilla0.9.4
[spam] -> 0.9.5
Target Milestone: mozilla0.9.4 → mozilla0.9.5
[spam]'s bugs subject to redistribution by chofmann. R!
Assignee: dr → chofmann
Priority: P2 → --
Target Milestone: mozilla0.9.5 → ---
oops, this is still mine.
Assignee: chofmann → dr
jst, peterv, sicking, what do you think?
I'm not entierly sure what all is requested here. Just a way to check if a node
is a link and what url it has?
I think I don't care. Reopen if you disagree and want to take this somewhere...
Closed: 20 years ago
Resolution: --- → WONTFIX
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.