Summary: | [Web IDL] Specify default values for optional parameters of type 'float' / 'unrestricted float' | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Chris Dumez <cdumez> | ||||||
Component: | Bindings | Assignee: | Chris Dumez <cdumez> | ||||||
Status: | RESOLVED FIXED | ||||||||
Severity: | Normal | CC: | cgarcia, commit-queue, darin, esprehn+autocc, gyuyoung.kim, kondapallykalyan, sam, youennf | ||||||
Priority: | P2 | ||||||||
Version: | WebKit Nightly Build | ||||||||
Hardware: | Unspecified | ||||||||
OS: | Unspecified | ||||||||
Attachments: |
|
Description
Chris Dumez
2016-04-25 14:20:21 PDT
Created attachment 277283 [details]
Patch
Comment on attachment 277283 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=277283&action=review > Source/WebCore/html/canvas/CanvasRenderingContext2D.cpp:1267 > + setShadow(FloatSize(width, height), blur, alpha ? colorWithOverrideAlpha(rgba, alpha.value()) : rgba); Seems like we it would be elegant to add an overload of colorWithOverrideAlpha that takes an Optional. It can be inlined, but it would be nice to have it there, rather than writing it out here. > Source/WebCore/html/canvas/CanvasRenderingContext2D.idl:131 > + void setStrokeColor(unrestricted float grayLevel, optional float alpha = 1.0); I think just "= 1" would be nicer. > Source/WebCore/html/canvas/CanvasRenderingContext2D.idl:136 > + void setFillColor(unrestricted float grayLevel, optional unrestricted float alpha = 1.0); Ditto. > Source/WebCore/html/canvas/CanvasRenderingContext2D.idl:166 > + optional unrestricted float alpha = 1.0); Ditto. Created attachment 277293 [details]
Patch
Comment on attachment 277293 [details] Patch Clearing flags on attachment: 277293 Committed r200058: <http://trac.webkit.org/changeset/200058> All reviewed patches have been landed. Closing bug. |