Bug 65717 - Remove LegacyDefaultOptionalArguments flag from Document.idl
: Remove LegacyDefaultOptionalArguments flag from Document.idl
Status: RESOLVED FIXED
: WebKit
New Bugs
: 528+ (Nightly build)
: Unspecified Unspecified
: P2 Normal
Assigned To:
:
:
:
:
  Show dependency treegraph
 
Reported: 2011-08-04 14:19 PST by
Modified: 2011-08-04 17:39 PST (History)


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


Note

You need to log in before you can comment on or make changes to this bug.


Description From 2011-08-04 14:19:09 PST
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 From 2011-08-04 14:19:50 PST -------
Created an attachment (id=102979) [details]
Patch
------- Comment #2 From 2011-08-04 14:30:01 PST -------
(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.

> 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 From 2011-08-04 16:36:41 PST -------
(In reply to comment #2)
> (From update of attachment 102979 [details] [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 From 2011-08-04 17:39:41 PST -------
(From update of attachment 102979 [details])
Clearing flags on attachment: 102979

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