Last Comment Bug 323589 - Trying to access .style of <svg:marker> throws "Component does not have requested interface" (NS_NOINTERFACE)
: Trying to access .style of <svg:marker> throws "Component does not have reque...
Status: RESOLVED FIXED
:
Product: Core
Classification: Components
Component: SVG (show other bugs)
: Trunk
: PowerPC Mac OS X
: -- normal (vote)
: ---
Assigned To: Robert Longson
: Hixie (not reading bugmail)
Mentors:
Depends on:
Blocks: randomstyles
  Show dependency treegraph
 
Reported: 2006-01-15 21:51 PST by Jesse Ruderman
Modified: 2006-11-10 12:00 PST (History)
5 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
correct interface map as per comment 1 (1.65 KB, patch)
2006-01-23 03:49 PST, Robert Longson
jwatt: review+
tor: superreview+
Details | Diff | Splinter Review

Description Jesse Ruderman 2006-01-15 21:51:30 PST
Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.9a1) Gecko/20060113 Firefox/1.6a1

Steps to reproduce:
1. Load 
data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg'><marker/></svg>
2. javascript:alert(document.getElementsByTagName("marker")[0].style)

Result: 
  Error: uncaught exception: [Exception... "Component does not have requested interface [nsIDOMSVGStylable.style]"  nsresult: "0x80004002 (NS_NOINTERFACE)"  location: "JS frame :: javascript:alert(document.getElementsByTagName("marker")[0].style) :: <TOP_LEVEL> :: line 1"  data: no]

Expected:
  undefined or a normal style object.

This bug is similar to bug 313078, which was fixed.  That bug was for <svg:script> while this bug is for <svg:marker>.
Comment 1 Boris Zbarsky [:bz] 2006-01-15 22:03:11 PST
Is there a reason that nsSVGMarkerElement does

123 NS_INTERFACE_MAP_END_INHERITING(nsSVGElement)

Instead of its actual superclass (which would be nsSVGMarkerElementBase and which would allow it to QI to nsIDOMSVGStylable, as well as nsIDOMSVGLocatable and nsIDOMSVGTransformable?
Comment 2 tor 2006-01-16 11:29:58 PST
No reason, just a mistake.
Comment 3 Robert Longson 2006-01-23 03:49:07 PST
Created attachment 209344 [details] [diff] [review]
correct interface map as per comment 1
Comment 4 Jonathan Watt [:jwatt] (back in October - email directly if necessary) 2006-01-23 04:00:30 PST
Comment on attachment 209344 [details] [diff] [review]
correct interface map as per comment 1

r=me
Comment 5 Jonathan Watt [:jwatt] (back in October - email directly if necessary) 2006-01-23 10:08:41 PST
Checked in.

Note You need to log in before you can comment on or make changes to this bug.