The default bug view has changed. See this FAQ.

Status

()

Firefox
Menus
--
enhancement
11 years ago
a year ago

People

(Reporter: Doug Schepers, Unassigned)

Tracking

(Blocks: 1 bug)

Trunk
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment, 3 obsolete attachments)

(Reporter)

Description

11 years ago
User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.0.6) Gecko/20060728 Firefox/1.5.0.6
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.0.6) Gecko/20060728 Firefox/1.5.0.6

There should be a bool for onSVG in the context menu interface.  This is not a request for special SVG context menu items (like zoom and pan) though that would be nice.  This is just a request that extension authors can find when the user has clicked on SVG content (either inline or as a reference).  This will be very useful for SVG specific menu items like zooming, panning, and rotating.


Reproducible: Always

Steps to Reproduce:
1. Build an extension
2. try to use the context menu to find out if the user clicked on SVG content.
3. fail.

Actual Results:  
no indication of presence of SVG

Expected Results:  
having available a boolean onSVG value in the context menu interface that reports the presence of SVG

In http://lxr.mozilla.org/seamonkey/source/browser/base/content/browser.js , there should be code something like this pseudocode:

function nsContextMenu( xulMenu ) {
 ...
 this.onSVG          = false;
}

nsContextMenu.prototype = {
 ...
 setTarget : function ( node, rangeParent, rangeOffset ) {
  ...
  // See if the user clicked on SVG
  const NS_SVG = "http://www.w3.org/2000/svg";
  if ((this.target.parentNode.namespaceURI == NS_SVG)
       || (this.target.namespaceURI == NS_SVG))
     this.onSVG = true;
 }
}
(Reporter)

Comment 1

11 years ago
Created attachment 235847 [details] [diff] [review]
Patch that adds onSVG bool to context menu

Patch that adds onSVG bool to context menu (like onImage or onMathML)... 
belongs in ~\Mozilla Firefox\chrome\browser.jar\content\browser 

Necessary for effective SVG-specific extensions.
Assignee: general → nobody
Status: UNCONFIRMED → NEW
Component: SVG → General
Ever confirmed: true
Product: Core → Firefox
QA Contact: ian → general
Component: General → Menus
QA Contact: general → menus
Created attachment 235850 [details] [diff] [review]
CVS diff of submitted file
Attachment #235847 - Attachment is obsolete: true
Attachment #235850 - Flags: superreview?
Attachment #235850 - Flags: review?
Assignee: nobody → doug
Severity: major → enhancement
Created attachment 235887 [details] [diff] [review]
patch with ifdefs, additional onSVGDoc and additional reset

Argh, sorry Doug. Completely forgot about this. Here's what I had which should preempt some of the reasons that may be given for r-. Requesting review for you too to speed this along.
Attachment #235850 - Attachment is obsolete: true
Attachment #235887 - Flags: superreview?(mconners)
Attachment #235887 - Flags: review?(mconners)
Attachment #235850 - Flags: superreview?
Attachment #235850 - Flags: review?

Updated

11 years ago
Attachment #235887 - Flags: superreview?(mconnor)
Attachment #235887 - Flags: superreview?(mconners)
Attachment #235887 - Flags: review?(mconnor)
Attachment #235887 - Flags: review?(mconners)
Doug: I recommend you update the patch and change request review from another reviewer:

http://www.mozilla.org/projects/firefox/review.html
Comment on attachment 235887 [details] [diff] [review]
patch with ifdefs, additional onSVGDoc and additional reset

based on jwatt's comments, patch needs updating before review.  I'm getting back into the review slog, so feel free to request from me again.
Attachment #235887 - Flags: superreview?(mconnor)
Attachment #235887 - Flags: review?(mconnor)

Comment 6

10 years ago
Created attachment 276538 [details] [diff] [review]
update to tip
Attachment #235887 - Attachment is obsolete: true
Assignee: doug → nobody

Updated

a year ago
Blocks: 1235179
You need to log in before you can comment on or make changes to this bug.