Bug 160296

Summary: First parameter to SVGDocument.createEvent() should be mandatory
Product: WebKit Reporter: Chris Dumez <cdumez>
Component: SVGAssignee: Chris Dumez <cdumez>
Status: RESOLVED FIXED    
Severity: Normal CC: achristensen, commit-queue, darin, dbates, rniwa, sabouhallawa, sam, zimmermann
Priority: P2 Keywords: WebExposed
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch none

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.