The default bug view has changed. See this FAQ.

Trying to access .style of <svg:marker> throws "Component does not have requested interface" (NS_NOINTERFACE)

RESOLVED FIXED

Status

()

Core
SVG
RESOLVED FIXED
11 years ago
11 years ago

People

(Reporter: Jesse Ruderman, Assigned: Robert Longson)

Tracking

(Blocks: 1 bug)

Trunk
PowerPC
Mac OS X
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Reporter)

Description

11 years ago
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>.
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?
Flags: blocking1.9a1?

Comment 2

11 years ago
No reason, just a mistake.
(Assignee)

Updated

11 years ago
Status: NEW → ASSIGNED
(Assignee)

Updated

11 years ago
Assignee: general → longsonr
Status: ASSIGNED → NEW
(Assignee)

Comment 3

11 years ago
Created attachment 209344 [details] [diff] [review]
correct interface map as per comment 1
Attachment #209344 - Flags: review?(jwatt)
Comment on attachment 209344 [details] [diff] [review]
correct interface map as per comment 1

r=me
Attachment #209344 - Flags: review?(jwatt) → review+
(Assignee)

Updated

11 years ago
Attachment #209344 - Flags: superreview?(tor)

Updated

11 years ago
Attachment #209344 - Flags: superreview?(tor) → superreview+
Checked in.
Status: NEW → RESOLVED
Last Resolved: 11 years ago
Resolution: --- → FIXED
Flags: blocking1.9a1?
You need to log in before you can comment on or make changes to this bug.