Closed
Bug 828815
Opened 11 years ago
Closed 11 years ago
SVGRectElement["onxxx"] = Function does not work, No Tooltip on SVG graphic (StatCounter)
Categories
(Core :: DOM: Core & HTML, defect)
Tracking
()
VERIFIED
FIXED
mozilla21
Tracking | Status | |
---|---|---|
firefox19 | --- | unaffected |
firefox20 | + | verified |
firefox21 | + | verified |
People
(Reporter: markus.popp, Assigned: dzbarsky)
References
Details
(Keywords: regression, testcase)
Attachments
(3 files, 5 obsolete files)
821 bytes,
text/html
|
Details | |
868 bytes,
text/html
|
Details | |
7.38 KB,
patch
|
dzbarsky
:
review+
bajaj
:
approval-mozilla-aurora+
|
Details | Diff | Splinter Review |
Access http://gs.statcounter.com/#browser-ww-daily-20130109-20130109-bar with Firefox 20 or 21, with Flash disabled. There should be a tooltip on each (SVG) bar in the graph to show the percentage. While up to Firefox 19 this works, in Firefox 20 and 21 there is no tooltip.
Comment 1•11 years ago
|
||
WFM: On a current OS X nightly, I get a tooltip on that graph, showing the name of the browser and a percentage. I don't see any SVG here, though. If I right-click on the graph, I get a context menu for Flash (and the "tooltips" are clearly not browser tooltips).
Summary: No Tooltip on SVG graphic (StatCounter) → No Tooltip on Flash graphic (StatCounter)
Reporter | ||
Comment 2•11 years ago
|
||
Flash needs to be disabled, then an SVG version will show up instead.
Comment 3•11 years ago
|
||
Last good nightly: 2013-01-06 First bad nightly: 2013-01-07 Pushlog: http://hg.mozilla.org/mozilla-central/pushloghtml?fromchange=20d1a5916ef6&tochange=605ae260b7c8 I guess that this is caused by one of David's checkins and I would bisect the exact changeset if required
Component: General → SVG
Keywords: regression
OS: Linux → All
Product: Firefox → Core
Summary: No Tooltip on Flash graphic (StatCounter) → No Tooltip on SVG graphic (StatCounter)
Updated•11 years ago
|
tracking-firefox20:
--- → ?
tracking-firefox21:
--- → ?
Comment 4•11 years ago
|
||
The first bad revision is: changeset: 117786:04feda337f8b user: David Zbarsky <dzbarsky@gmail.com> date: Sun Jan 06 04:32:01 2013 -0500 summary: Bug 825147: Convert SVGRectElement to WebIDL r=bz
Updated•11 years ago
|
status-firefox19:
--- → unaffected
status-firefox20:
--- → affected
status-firefox21:
--- → affected
Comment 6•11 years ago
|
||
FWIW I don't think the tooltips are created by having <title> children. I think they are programatically generated. There is a TypeError: src is null in the Error Console. That may be where the problem is perhaps?
Comment 7•11 years ago
|
||
TypeError is generated even on Firefox 18. I suppose it's unrelated to the tooltip problem.
Assignee | ||
Comment 8•11 years ago
|
||
The tooltips appear if I disable the new bindings for SVGRectElement. Unfortunately, I haven't been able to figure out how to save the site locally and still have it work so I can't reduce it. Maybe the tooltips are broken because event handlers on new binding nodes do something different?
Comment 9•11 years ago
|
||
Event handlers on new-binding nodes shouldn't do anything different... Alice0775, do you think you can make a more-reduced testcase here?
Keywords: testcase-wanted
Comment 10•11 years ago
|
||
The chart seems to be based on highcharts. Highcharts have a demo site and that seems to have the same issue i.e. no tooltips on trunk: http://www.highcharts.com/demo/column-basic Since this includes a way to copy to jsfiddle perhaps that will be more amenable to debugging/reduction.
Comment 11•11 years ago
|
||
Yes, that should be way simpler to reduce. Thanks!
Comment 12•11 years ago
|
||
Color should change by mouse hover.
Comment 13•11 years ago
|
||
in highcharts.js, on: function (a, b) { if (Ba && a === "click") this.element.ontouchstart = function (a) { a.preventDefault(); b() }; this.element["on" + a] = b; return this }, |this.element["on" + a] = b;| does not work in Aurora20.0a1 and Nightly21.0a1, but works in Firefox19.0beta and earlier
Comment 14•11 years ago
|
||
Color should change by mouse hover.
Updated•11 years ago
|
Attachment #702209 -
Attachment is obsolete: true
Updated•11 years ago
|
Keywords: testcase-wanted → testcase
Summary: No Tooltip on SVG graphic (StatCounter) → SVGRectElement.["onxxx"] = Function does not work, No Tooltip on SVG graphic (StatCounter)
Comment 15•11 years ago
|
||
onxxx attributes are only available on HTML elements. Evang matter.
Component: SVG → English US
Product: Core → Tech Evangelism
Summary: SVGRectElement.["onxxx"] = Function does not work, No Tooltip on SVG graphic (StatCounter) → SVGRectElement["onxxx"] = Function does not work, No Tooltip on SVG graphic (StatCounter)
Version: 20 Branch → unspecified
Comment 16•11 years ago
|
||
(In reply to Masatoshi Kimura [:emk] from comment #15) > onxxx attributes are only available on HTML elements. Evang matter. However this onmouseover="mouseover_colorsize(evt)" attributes of SVGRectElement works in Nightly21.0a1. What is going on?
Comment 17•11 years ago
|
||
Setting |svgElement.onxxx = func| used to work, and for backwards compatibility and consistency with HTML I think it should continue to work.
Comment 18•11 years ago
|
||
(In reply to Alice0775 White from comment #16) > What is going on? Sounds like setting of the JS property on SVG elements isn't being mapped to setting the attribute/event handler.
Comment 19•11 years ago
|
||
Alice0775, thank you for the testcase! > Setting |svgElement.onxxx = func| used to work, and for backwards compatibility and > consistency with HTML I think it should continue to work. That's trivial enough to do in our WebIDL code. Can we get this specced on the SVG end? Right now it's certainly not in the spec... The reason this used to work is that DOM_CLASSINFO_SVG_ELEMENT_MAP_ENTRIES includes nsIInlineEventHandlers and nsITouchEventReceiver, but that stuff is not present on SVGElement in the WebIDL. David, you want to fix this? You'll need to do the prefcontrolled hackery for touch events that HTMLElement does... On Aurora this will probably just need copy/paste. On trunk, bug 829072 will make things nicer here eventually, but you can do copy/paste for now.
Updated•11 years ago
|
Component: English US → DOM
Product: Tech Evangelism → Core
Assignee | ||
Comment 20•11 years ago
|
||
This fixes the testcase.
Attachment #702470 -
Flags: review?(bzbarsky)
Comment 21•11 years ago
|
||
Comment on attachment 702470 [details] [diff] [review] Patch You need to make the interface [PrefControlled] and have SVGElement::PrefEnabled() call nsGenericHTMLElement::PrefEnabled(). Otherwise the touch stuff won't work right. r=me with that change, assuming you just copied that list from HTMLElement.
Attachment #702470 -
Flags: review?(bzbarsky) → review+
Assignee | ||
Comment 22•11 years ago
|
||
[Approval Request Comment] Bug caused by (feature/regressing bug #): 823394 User impact if declined: Websites that set event handlers on svg elements from script may not work Testing completed (on m-c, etc.): Risk to taking this patch (and alternatives if risky): Low String or UUID changes made by this patch: None
Attachment #702470 -
Attachment is obsolete: true
Attachment #702482 -
Flags: review+
Attachment #702482 -
Flags: approval-mozilla-aurora?
Assignee | ||
Comment 23•11 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/d21cb6921b71
Comment 24•11 years ago
|
||
We have already resolved to include event listener IDL attributes in SVG 2: https://svgwg.org/svg2-draft/interact.html#SVGEvents (annotation 2 there) so it should happen in due course.
Comment 25•11 years ago
|
||
Sounds fine. Note that HTML has moved these out into interfaces it pulls in via "implements", so SVG could just use those.
Comment 26•11 years ago
|
||
Oh, and.... this bug needs a test!
Comment 27•11 years ago
|
||
(In reply to Boris Zbarsky (:bz) from comment #25) > Sounds fine. Note that HTML has moved these out into interfaces it pulls in > via "implements", so SVG could just use those. Great!
Comment 28•11 years ago
|
||
Attachment #702646 -
Flags: review?(peterv)
Comment 29•11 years ago
|
||
Attachment #702649 -
Flags: review?(peterv)
Comment 30•11 years ago
|
||
Attachment #702650 -
Flags: review?(peterv)
Comment 31•11 years ago
|
||
Comment on attachment 702646 [details]
Part 1 merged to
Wrong bug. :(
Attachment #702646 -
Attachment is obsolete: true
Attachment #702646 -
Attachment is patch: false
Attachment #702646 -
Flags: review?(peterv)
Updated•11 years ago
|
Attachment #702649 -
Attachment is obsolete: true
Attachment #702649 -
Flags: review?(peterv)
Updated•11 years ago
|
Attachment #702650 -
Attachment is obsolete: true
Attachment #702650 -
Flags: review?(peterv)
Comment 32•11 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/d21cb6921b71
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla21
Comment 33•11 years ago
|
||
Comment on attachment 702482 [details] [diff] [review] Patch for checkin low risk and early in aurora so approving.
Attachment #702482 -
Flags: approval-mozilla-aurora? → approval-mozilla-aurora+
Updated•11 years ago
|
Flags: in-testsuite?
Comment 35•11 years ago
|
||
Mozilla/5.0 (X11; Linux x86_64; rv:20.0) Gecko/20100101 Firefox/20.0 Mozilla/5.0 (Windows NT 6.2; WOW64; rv:20.0) Gecko/20100101 Firefox/20.0 Verified as fixed in Firefox 20 beta 6 (buildID: 20130320062118) using provided test case.
Comment 36•11 years ago
|
||
Verified as fixed in Firefox 21 beta 2 (build ID: 20130401192816), using the attached test case. Mozilla/5.0 (Windows NT 6.1; WOW64; rv:21.0) Gecko/20100101 Firefox/21.0 Mozilla/5.0 (Windows NT 6.2; rv:21.0) Gecko/20100101 Firefox/21.0 Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:21.0) Gecko/20100101 Firefox/21.0 Mozilla/5.0 (X11; Linux x86_64; rv:21.0) Gecko/20100101 Firefox/21.0
Status: RESOLVED → VERIFIED
Updated•5 years ago
|
Component: DOM → DOM: Core & HTML
You need to log in
before you can comment on or make changes to this bug.
Description
•