Bug 65717 - Remove LegacyDefaultOptionalArguments flag from Document.idl
: Remove LegacyDefaultOptionalArguments flag from Document.idl
Status: RESOLVED FIXED
Product: WebKit
Classification: Unclassified
Component: New Bugs
: 528+ (Nightly build)
: Unspecified Unspecified
: P2 Normal
Assigned To: Nobody
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2011-08-04 14:19 PDT by Mark Pilgrim (Google)
Modified: 2011-08-04 17:39 PDT (History)
2 users (show)

See Also:


Attachments
Patch (15.62 KB, patch)
2011-08-04 14:19 PDT, Mark Pilgrim (Google)
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Mark Pilgrim (Google) 2011-08-04 14:19:09 PDT
As discussed in IRC, we are migrating our IDL files away from the interface-level "LegacyDefaultOptionalArguments" flag and onto argument-level [Optional] or [Optional=CallWithDefaultValue] flags. This patch migrates Document.idl. It does not change any behavior, i.e. it does not make any arguments required that were previously optional, nor vice-versa.

All existing tests pass.
Comment 1 Mark Pilgrim (Google) 2011-08-04 14:19:50 PDT
Created attachment 102979 [details]
Patch
Comment 2 Adam Barth 2011-08-04 14:30:01 PDT
Comment on attachment 102979 [details]
Patch

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

> Source/WebCore/dom/Document.idl:46
> -        [ReturnsNew] EntityReference createEntityReference(in DOMString name)
> +        [ReturnsNew] EntityReference createEntityReference(in [Optional=CallWithDefaultValue] DOMString name)

Crazy.  I have no idea what ReturnsNew means.

> Source/WebCore/dom/Document.idl:332
> +        [ReturnsNew, EnabledAtRuntime] Touch createTouch(in [Optional=CallWithDefaultValue] DOMWindow window,
> +                                                         in [Optional=CallWithDefaultValue] EventTarget target,
> +                                                         in [Optional=CallWithDefaultValue] long identifier,
> +                                                         in [Optional=CallWithDefaultValue] long pageX,
> +                                                         in [Optional=CallWithDefaultValue] long pageY,
> +                                                         in [Optional=CallWithDefaultValue] long screenX,
> +                                                         in [Optional=CallWithDefaultValue] long screenY,
> +                                                         in [Optional=CallWithDefaultValue] long webkitRadiusX,
> +                                                         in [Optional=CallWithDefaultValue] long webkitRadiusY,
> +                                                         in [Optional=CallWithDefaultValue] float webkitRotationAngle,
> +                                                         in [Optional=CallWithDefaultValue] float webkitForce)

This API seems poorly designed, but that's another story.  What does it mean to have prefixed argument names?
Comment 3 Mark Pilgrim (Google) 2011-08-04 16:36:41 PDT
(In reply to comment #2)
> (From update of attachment 102979 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=102979&action=review
> 
> > Source/WebCore/dom/Document.idl:46
> > -        [ReturnsNew] EntityReference createEntityReference(in DOMString name)
> > +        [ReturnsNew] EntityReference createEntityReference(in [Optional=CallWithDefaultValue] DOMString name)
> 
> Crazy.  I have no idea what ReturnsNew means.

In NativeToJSValue, it adds an extra ", true" parameter when calling toV8(). No idea what that does though.
Comment 4 WebKit Review Bot 2011-08-04 17:39:41 PDT
Comment on attachment 102979 [details]
Patch

Clearing flags on attachment: 102979

Committed r92436: <http://trac.webkit.org/changeset/92436>
Comment 5 WebKit Review Bot 2011-08-04 17:39:45 PDT
All reviewed patches have been landed.  Closing bug.