Closed
Bug 1311747
Opened 8 years ago
Closed 8 years ago
SVGTransform API calls don't trigger mutation observer records
Categories
(Core :: DOM: Events, defect)
Tracking
()
RESOLVED
INVALID
People
(Reporter: benneb123, Unassigned)
Details
Attachments
(1 file)
1.08 KB,
text/html
|
Details |
User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/54.0.2840.59 Safari/537.36 Steps to reproduce: 1. Use a MutationObserver to observe an SVG element 2. Use the SVGTransform API to transform the element Actual results: The MutationObserver's callback isn't called Expected results: The MutationObserver's callback should be passed a MutationRecord describing the svg transformation
Comment 1•8 years ago
|
||
SMIL transforms wouldn't cause MutationObservers to fire as they don't change the DOM, but there's no SMIL in your testcase, should there be?
Flags: needinfo?(benneb123)
Sorry - I meant SVGTransform API calls. They modify the transform attribute of the svg element. So I think the last javascript line in my testcase should set off the MutationObserver because it changes the transform attribute of the rect.
Updated•8 years ago
|
Flags: needinfo?(benneb123)
Summary: SVG SMIL transformations don't trigger mutation observer records → SVGTransform API calls don't trigger mutation observer records
Comment 3•8 years ago
|
||
It does seem to me that DOM Events would be the right component for this issue.
Component: Untriaged → DOM: Events
Product: Firefox → Core
Comment 4•8 years ago
|
||
(In reply to benneb123 from comment #2) > Sorry - I meant SVGTransform API calls. They modify the transform attribute > of the svg element. So I think the last javascript line in my testcase > should set off the MutationObserver because it changes the transform > attribute of the rect. If I understand the spec correctly, the current behaviour on Firefox 49 looks right to me. That is, MutationObserver callback is called once (not twice as attachment 8802994 [details] expects). Also, when the callback is triggered, it is supplied a list of the changes to the DOM; in this case, the length of the list is two. Anne, did I misunderstand anything? Thanks!
Flags: needinfo?(annevk)
Comment 5•8 years ago
|
||
Yeah, there should only be a single callback here and I think a list of two is correct as well, although I'm not sure how well-defined the SVG specification is for its APIs and what those require exactly. It does seem Chrome has a bug in that it changes the DOM but doesn't queue a mutation record for the transform change.
Flags: needinfo?(annevk)
Comment 6•8 years ago
|
||
Sounds like this isn't a bug in Gecko.
Status: UNCONFIRMED → RESOLVED
Closed: 8 years ago
Resolution: --- → INVALID
You need to log in
before you can comment on or make changes to this bug.
Description
•