[Webkit-unassigned] [Bug 12073] Implement setCurrentTime() and pauseAnimations() on SVGSVGElement

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Nov 21 07:57:08 PST 2011


https://bugs.webkit.org/show_bug.cgi?id=12073





--- Comment #15 from Joel Webber <jgw at chromium.org>  2011-11-21 07:57:08 PST ---
This patch is incomplete -- I'm writing more tests right now. But I wanted to get feedback on the SVGSMILElement::reset() method, which makes me feel a bit squirrely.

The underlying issue that makes the implementation tricky comes up when you have multiple <animate> elements associated with the same target element. When you just have a single <animate> in the Active state, progress()ing it backwards in time works fine. But when you have more than one, or the current one has become Inactive or Frozen, things get weird. To make matters worse, the TimeContainer removes Inactive SMILElements from m_scheduledAnimations, making it impossible to go backwards in time across the boundary between them.

The only solution I could think of that seemed likely to not break in subtle ways was to
- Not remove inactive SMILElements from m_scheduledAnimations, and
- Implement SMILElement::reset() to take it back to a known-good state (with its parsed attributes preserved).

The one thing that still worries me about this approach is that it looks like SMILElement::[m_beginTimes m_endTimes] might not be maintained correctly. I don't clear them in reset(), because they contain state that's initialized in insertedIntoDocument() and parseBeginOrEnd(). But it looks like they're also modified in handleConditionEvent(), which appears to happen post-initialization, and seems like it should be reverted in reset().

I'm open to any other approaches, of course, and if anyone can offer suggestions on test-cases that would trigger the handleConditionEvent() case, it would be greatly appreciated.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list