Bug 160296 - First parameter to SVGDocument.createEvent() should be mandatory
Summary: First parameter to SVGDocument.createEvent() should be mandatory
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: SVG (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Chris Dumez
URL:
Keywords: WebExposed
Depends on:
Blocks:
 
Reported: 2016-07-28 09:01 PDT by Chris Dumez
Modified: 2016-07-28 11:15 PDT (History)
8 users (show)

See Also:


Attachments
Patch (4.09 KB, patch)
2016-07-28 09:04 PDT, Chris Dumez
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Chris Dumez 2016-07-28 09:01:46 PDT
First parameter to SVGDocument.createEvent() should be mandatory:
- https://www.w3.org/TR/SVG2/struct.html#InterfaceDocumentExtensions
- https://dom.spec.whatwg.org/#document

Firefox and Chrome agree with the specification.
Comment 1 Chris Dumez 2016-07-28 09:04:39 PDT
Created attachment 284784 [details]
Patch
Comment 2 Alex Christensen 2016-07-28 10:40:20 PDT
Comment on attachment 284784 [details]
Patch

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

> LayoutTests/svg/dom/SVGDocument-createEvent-expected.txt:6
> +PASS svgDocument.createEvent() threw exception TypeError: Not enough arguments.

Chrome canary and firefox fail this test :(
Comment 3 Chris Dumez 2016-07-28 10:45:39 PDT
(In reply to comment #2)
> Comment on attachment 284784 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=284784&action=review
> 
> > LayoutTests/svg/dom/SVGDocument-createEvent-expected.txt:6
> > +PASS svgDocument.createEvent() threw exception TypeError: Not enough arguments.
> 
> Chrome canary and firefox fail this test :(

Only because my test checks for a specific exception message and their exception message is different?
Comment 4 Alex Christensen 2016-07-28 10:51:11 PDT
Comment on attachment 284784 [details]
Patch

Yep, I just saw the red FAIL.  They indeed just have a different message.  No problem
Comment 5 WebKit Commit Bot 2016-07-28 11:15:32 PDT
Comment on attachment 284784 [details]
Patch

Clearing flags on attachment: 284784

Committed r203821: <http://trac.webkit.org/changeset/203821>
Comment 6 WebKit Commit Bot 2016-07-28 11:15:37 PDT
All reviewed patches have been landed.  Closing bug.