Bug 160385
Summary: | Drop [StrictTypeChecking] support for operation parameters of DOMString / enumeration types | ||
---|---|---|---|
Product: | WebKit | Reporter: | Chris Dumez <cdumez> |
Component: | Bindings | Assignee: | Chris Dumez <cdumez> |
Status: | RESOLVED DUPLICATE | ||
Severity: | Normal | CC: | cdumez |
Priority: | P2 | Keywords: | WebExposed |
Version: | WebKit Nightly Build | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Bug Depends on: | 160394 | ||
Bug Blocks: | 160382 |
Chris Dumez
Drop [StrictTypeChecking] support for operation parameters of DOMString / enumeration types. Using [StrictTypeChecking] would cause us to throw a TypeError if the value passed by JS is not null / undefined / a string / an object. This behavior is non-standard as the WebIDL says we should merely call ToString() on the value:
- http://heycam.github.io/webidl/#es-DOMString
- http://heycam.github.io/webidl/#es-enumeration
Attachments | ||
---|---|---|
Add attachment proposed patch, testcase, etc. |
Chris Dumez
It looks like this is used only for the following overloaded operations to help with overload resolution:
Source/WebCore/html/canvas/CanvasRenderingContext2D.idl: void setStrokeColor([StrictTypeChecking] DOMString color, optional unrestricted float alpha);
Source/WebCore/html/canvas/CanvasRenderingContext2D.idl: void setFillColor([StrictTypeChecking] DOMString color, optional unrestricted float alpha);
I will find a better way to implement this without requiring an additional IDL attribute.
Chris Dumez
Should get fixed by https://bugs.webkit.org/show_bug.cgi?id=160394.
Chris Dumez
*** This bug has been marked as a duplicate of bug 160394 ***