Bug 150442

Summary: Support for SVG `beginEvent` event and `onbegin` attribute
Product: WebKit Reporter: Antoine Quint <graouts>
Component: SVGAssignee: Antoine Quint <graouts>
Status: RESOLVED FIXED    
Severity: Normal CC: commit-queue, graouts, webkit-bug-importer, zimmermann
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch for landing none

Description Antoine Quint 2015-10-22 03:33:57 PDT
We've added support for the SVG `endEvent` event (see https://bugs.webkit.org/show_bug.cgi?id=150393) and the `onend` attribute (see https://bugs.webkit.org/show_bug.cgi?id=121587). We should also implement the matching event and attribute for when an SVG timing element begins.
Comment 1 Radar WebKit Bug Importer 2015-10-22 03:34:19 PDT
<rdar://problem/23216574>
Comment 2 Antoine Quint 2015-10-22 03:39:25 PDT
Created attachment 263815 [details]
Patch
Comment 3 Said Abou-Hallawa 2015-10-22 09:02:54 PDT
Comment on attachment 263815 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=263815&action=review

> Source/WebCore/ChangeLog:17
> +               svg/animations/begin-event-syncbase.svg

I think the expected files should not be included in this section of the ChangeLog. It might be a bug in prepare-ChangeLog tool.

> LayoutTests/svg/animations/begin-event-attribute.svg:3
> +    <animate id="anim" attributeName="visibility" to="visible" begin="1s" end="2s" onbegin="handleBeginEvent()" />

What is the point in starting at "1s" and calling document.documentElement.setCurrentTime(1) when the document is loaded? Why do not we start at "0s"?

> LayoutTests/svg/animations/begin-event-script.svg:3
> +    <animate id="anim" attributeName="visibility" to="visible" begin="1s" end="2s" />

Ditto.

> LayoutTests/svg/animations/begin-event-syncbase.svg:3
> +    <animate id="anim" attributeName="visibility" to="visible" begin="1s" end="2s" />

Ditto.
Comment 4 Antoine Quint 2015-10-22 09:20:53 PDT
(In reply to comment #3)
> Comment on attachment 263815 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=263815&action=review
> 
> > Source/WebCore/ChangeLog:17
> > +               svg/animations/begin-event-syncbase.svg
> 
> I think the expected files should not be included in this section of the
> ChangeLog. It might be a bug in prepare-ChangeLog tool.

Possible, I ran `webkit-patch upload` and just added my comments. Would you like me to manually remove the `-expected` files?

> > LayoutTests/svg/animations/begin-event-attribute.svg:3
> > +    <animate id="anim" attributeName="visibility" to="visible" begin="1s" end="2s" onbegin="handleBeginEvent()" />
> 
> What is the point in starting at "1s" and calling
> document.documentElement.setCurrentTime(1) when the document is loaded? Why
> do not we start at "0s"?

I did this so it was more explicit that we were seeking to the begin time rather than running script at the same time the `beginEvent` event may have been triggered and risking the possibility of missing the event. This may be ill-founded and if you like I could remove the explicit begin and call to `setCurrentTime()` to just wait for the document timeline to start post-load.
Comment 5 Dean Jackson 2015-10-22 11:14:25 PDT
Comment on attachment 263815 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=263815&action=review

>>> Source/WebCore/ChangeLog:17
>>> +               svg/animations/begin-event-syncbase.svg
>> 
>> I think the expected files should not be included in this section of the ChangeLog. It might be a bug in prepare-ChangeLog tool.
> 
> Possible, I ran `webkit-patch upload` and just added my comments. Would you like me to manually remove the `-expected` files?

Yes please.
Comment 6 Antoine Quint 2015-10-23 00:43:53 PDT
Created attachment 263912 [details]
Patch for landing
Comment 7 WebKit Commit Bot 2015-10-23 01:39:44 PDT
Comment on attachment 263912 [details]
Patch for landing

Clearing flags on attachment: 263912

Committed r191494: <http://trac.webkit.org/changeset/191494>
Comment 8 WebKit Commit Bot 2015-10-23 01:39:48 PDT
All reviewed patches have been landed.  Closing bug.