RESOLVED FIXED 65715
Remove LegacyDefaultOptionalArguments flag from DOM-related files except Document.idl
https://bugs.webkit.org/show_bug.cgi?id=65715
Summary Remove LegacyDefaultOptionalArguments flag from DOM-related files except Docu...
Mark Pilgrim (Google)
Reported 2011-08-04 13:39:03 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 all remaining IDL files in the dom/ directory *except* 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.
Attachments
Patch (34.82 KB, patch)
2011-08-04 13:40 PDT, Mark Pilgrim (Google)
no flags
Patch (34.16 KB, patch)
2011-08-04 16:37 PDT, Mark Pilgrim (Google)
no flags
Mark Pilgrim (Google)
Comment 1 2011-08-04 13:40:06 PDT
Adam Barth
Comment 2 2011-08-04 13:52:34 PDT
Comment on attachment 102972 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=102972&action=review > Source/WebCore/dom/Clipboard.idl:-32 > - LegacyDefaultOptionalArguments, is RequiresAllArguments still needed for setData ? > Source/WebCore/dom/MediaStreamList.idl:31 > - MediaStream item(in [IsIndex] unsigned long index); > + MediaStream item(in [IsIndex,Optional=CallWithDefaultValue] unsigned long index); I'm slightly unsure about this one. The MediaStream stuff is very new, so maybe it doesn't need it? On the other hand, having all these fake vectors be consistent seems beneficial. > Source/WebCore/dom/MediaStreamTrackList.idl:31 > - MediaStreamTrack item(in [IsIndex] unsigned long index); > + MediaStreamTrack item(in [IsIndex,Optional=CallWithDefaultValue] unsigned long index); This probably isn't needed.
Adam Barth
Comment 3 2011-08-04 13:53:11 PDT
Comment on attachment 102972 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=102972&action=review > Source/WebCore/dom/TouchList.idl:34 > - Touch item(in unsigned long index); > + Touch item(in [Optional=CallWithDefaultValue] unsigned long index); Same thing here. TOUCH_EVENTS are very new. I think we should skip these even though it's somewhat inconsistent.
Mark Pilgrim (Google)
Comment 4 2011-08-04 13:59:00 PDT
(In reply to comment #2) > (From update of attachment 102972 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=102972&action=review > > > Source/WebCore/dom/Clipboard.idl:-32 > > - LegacyDefaultOptionalArguments, > > is RequiresAllArguments still needed for setData ? Yes. [RequiresAllArguments] is different from [RequiresAllArguments=Raise]. > > > Source/WebCore/dom/MediaStreamList.idl:31 > > - MediaStream item(in [IsIndex] unsigned long index); > > + MediaStream item(in [IsIndex,Optional=CallWithDefaultValue] unsigned long index); > > I'm slightly unsure about this one. The MediaStream stuff is very new, so maybe it doesn't need it? On the other hand, having all these fake vectors be consistent seems beneficial. > > > Source/WebCore/dom/MediaStreamTrackList.idl:31 > > - MediaStreamTrack item(in [IsIndex] unsigned long index); > > + MediaStreamTrack item(in [IsIndex,Optional=CallWithDefaultValue] unsigned long index); > > This probably isn't needed. New patch coming up...
Adam Barth
Comment 5 2011-08-04 14:03:15 PDT
(In reply to comment #4) > (In reply to comment #2) > > (From update of attachment 102972 [details] [details]) > > View in context: https://bugs.webkit.org/attachment.cgi?id=102972&action=review > > > > > Source/WebCore/dom/Clipboard.idl:-32 > > > - LegacyDefaultOptionalArguments, > > > > is RequiresAllArguments still needed for setData ? > > Yes. [RequiresAllArguments] is different from [RequiresAllArguments=Raise]. Because it returns undefined? It might be good to test other browsers to see if we're really not supposed to Raise in this situation.
Mark Pilgrim (Google)
Comment 6 2011-08-04 16:37:57 PDT
Mark Pilgrim (Google)
Comment 7 2011-08-04 16:38:52 PDT
This patch changes the behavior of MediaStreamList and MediaTrackList, but it doesn't change Clipboard.
WebKit Review Bot
Comment 8 2011-08-04 17:03:27 PDT
Comment on attachment 103003 [details] Patch Clearing flags on attachment: 103003 Committed r92433: <http://trac.webkit.org/changeset/92433>
WebKit Review Bot
Comment 9 2011-08-04 17:03:32 PDT
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.