Closed Bug 41908 Opened 25 years ago Closed 25 years ago

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

Categories

(Core :: XML, defect, P3)

defect

Tracking

()

VERIFIED FIXED

People

(Reporter: hjtoi-bugzilla, Assigned: hjtoi-bugzilla)

Details

(Whiteboard: Fix attached)

Attachments

(1 file)

This works for HTML documents and when you use the A element from the HTML namespace in an XML document.
Status: NEW → ASSIGNED
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(?)
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
Closed: 25 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
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.

Attachment

General

Created:
Updated:
Size: