Implement Open Link in New Window context menu item for simple XLinks

VERIFIED FIXED in M17

Status

()

Core
XML
P3
normal
VERIFIED FIXED
18 years ago
18 years ago

People

(Reporter: Heikki Toivonen (remove -bugzilla when emailing directly), Assigned: Heikki Toivonen (remove -bugzilla when emailing directly))

Tracking

Trunk
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: Fix attached)

Attachments

(1 attachment)

This works for HTML documents and when you use the A element from the HTML 
namespace in an XML document.
Status: NEW → ASSIGNED
Created attachment 9873 [details] [diff] [review]
Fix for all except relative XLink URLs
The patch fixes this, as well one other bug: JavaScript URLs (protocol) must be 
case insensitive.

There is no implementation for relative URLs. We would really need XML Base 
support in DOM, but it will be addressed in DOM 3. We have XML Base 
implementation in C++, but at the moment there is no way to call this code from 
JavaScript. I could make the nsIXMLElement interface scriptable and add the 
GetXMLBaseURI method there, but...
Whiteboard: Fix attached
I also found that if we have HTML A links with empty href attribute, we get 
exceptions in the nsContextMenu.js code when the context menu is opened. With 
XLinks we do not get exceptions (using the patch).

If the href attribute is empty, and you try to "save link as..." (HTML A link) 
you get exception. With XLink you get save as dialog with the current doc. I 
guess I should throw something in function linkURL() if I see href is empty to 
have the same kind of behaviour(?)

Comment 4

18 years ago
Heikki, I've asked Bill Law to review this for you.
I checked in a fix. We throw error in linkURL() if XLink href is empty. HTML 
seems to throw as well if href is empty. Without the throw, if we have empty 
href and you try to Save Link As... we will try to save the current document.

Relative URIs and XML Base not taken care of yet.
Status: ASSIGNED → RESOLVED
Last Resolved: 18 years ago
Resolution: --- → FIXED
Summary: Implement Open Link in New Window context menu item for XML links → Implement Open Link in New Window context menu item for simple XLinks
Target Milestone: --- → M17

Comment 6

18 years ago
Yes, this is working with absolute paths in simple links. Marking verified fixed 
in the July 6 th build.
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.