Closed Bug 332227 Opened 19 years ago Closed 14 years ago

SVGLoad doesn't have a capture or bubble phase, only @target

Categories

(Core :: SVG, defect)

defect
Not set
normal

Tracking

()

RESOLVED WORKSFORME

People

(Reporter: jwatt, Unassigned)

Details

Attachments

(1 file)

Filing this while I remember. In SVG, many (if not all - I can't be bothered to check right now) SVG elements should be sent an SVGLoad event. There is no capture or bubble phase for these events for performance reasons. Only the target's listeners should be activated. We might be able to quite easily implement this by setting aVisitor.mCanHandle to PR_FALSE in nsSVGElement::PreHandleEvent (smaug you are my hero!) - except that the node that does this isn't included in the event chain. Maybe we could set mCanHandle if a check for |this == target| fails. In fact, yeah, that could work I think. I've not checked whether smaug's event dispatch rewrite plays happily with a single item event target chain, but I should think so.
Attached image testcase
Yes, it plays nicely with only one item in the chain :) I still wonder whether it is a bug in svg spec that there shouldn't be even the capture phase or whether that is something the spec authors really want.
Assignee: general → nobody
QA Contact: ian → general
WFM now. I imagine all the html5 parser rework fixed it.
Status: NEW → RESOLVED
Closed: 14 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: