Summary: | WebKit SVG lacks relevant context menu | ||
---|---|---|---|
Product: | WebKit | Reporter: | Daniel Udey <dan> |
Component: | SVG | Assignee: | Nobody <webkit-unassigned> |
Status: | RESOLVED FIXED | ||
Severity: | Normal | CC: | ian, sullivan |
Priority: | P2 | ||
Version: | 420+ | ||
Hardware: | Mac | ||
OS: | OS X 10.4 | ||
Bug Depends on: | 5971, 10882 | ||
Bug Blocks: |
Description
Daniel Udey
2005-10-15 20:48:29 PDT
The contextual menus seem to be there these days. Can you confirm? (In reply to comment #1) > The contextual menus seem to be there these days. Can you confirm? The bug was specific to SVG canvases - right-clicking on an SVG canvas gets you the same context menu as you get in an HTML document - no option for 'Copy Image Location', etc. is provided (i.e. no SVG-specific options are available). So I'm assuming you'd like this reopened. Are there other contextual menus you would like to see besides "Copy Image Location"? Would you like to see existing ones removed? The way this code is currently implemented, we can't make this work until SVG has Obj-C DOM bindings. The code which generates this menu can be found in: - (NSArray *)contextMenuItemsForElement:(NSDictionary *)element defaultMenuItems:(NSArray *)defaultMenuItems inside WebDefaultContextMenuItemsForElement in WebKit. Once we have SVG Obj-C DOM bindings, we could consider adding an "absoluteImageURL" method on the SVGSVGElement Obj-C class. I'm not sure that would be correct however. SVG, unlike an image, is interactive. Thus clicking in the SVG means the SVG has a chance to respond to the mouse event. When SVGs are referenced from inside <img> tags (not yet possible: bug 5971) then this type of operation will work for automatically. When SVGs are inside <embed> or <object> tags, I'm not sure we'd want these menu items at all. Adding dependency links to the bug 5971 about svgs in <img> tags and bug 10882 about the SVG Obj-C bindings. SVGImage support is in. And this "just works" at least when SVGs are referenced from <img> tags. I'm going to close this. Feel free to re-open if you feel there is something we still haven't covered. You can grab a nightly from http://nightly.webkit.org/ You'll have to make your own html file which references an svg from an <img> tag, since I don't have an easy example to point you to on the web. |