RESOLVED FIXED170759
[WebIDL] Add support for extended attributes on types in WebIDL
https://bugs.webkit.org/show_bug.cgi?id=170759
Summary [WebIDL] Add support for extended attributes on types in WebIDL
Sam Weinig
Reported 2017-04-11 18:29:42 PDT
With https://github.com/heycam/webidl/pull/286, WebIDL has updated its grammar and added added support for extended attributes directly associated with types.
Attachments
Patch (59.66 KB, patch)
2017-04-11 19:32 PDT, Sam Weinig
no flags
Patch (74.85 KB, patch)
2017-04-11 20:38 PDT, Sam Weinig
achristensen: review+
commit-queue: commit-queue-
Sam Weinig
Comment 1 2017-04-11 19:32:37 PDT
Sam Weinig
Comment 2 2017-04-11 20:38:28 PDT
WebKit Commit Bot
Comment 3 2017-04-13 10:40:51 PDT
Comment on attachment 306884 [details] Patch Rejecting attachment 306884 [details] from commit-queue. Failed to run "['/Volumes/Data/EWS/WebKit/Tools/Scripts/webkit-patch', '--status-host=webkit-queues.webkit.org', '--bot-id=webkit-cq-03', 'land-attachment', '--force-clean', '--non-interactive', '--parent-command=commit-queue', 306884, '--port=mac']" exit_code: 2 cwd: /Volumes/Data/EWS/WebKit Last 500 characters of output: -> origin/master Partial-rebuilding .git/svn/refs/remotes/origin/master/.rev_map.268f45cc-cd09-0410-ab3c-d52691b4dbfc ... Currently at 215323 = b1e02dbc03afc79fa6594cd2761a7eafee9f7c7a r215324 = 64df7a4298e2b28020dad16783319373057cd46d r215325 = 04c71ab1eee5352b02f54676fe40e28c88526a5b Done rebuilding .git/svn/refs/remotes/origin/master/.rev_map.268f45cc-cd09-0410-ab3c-d52691b4dbfc First, rewinding head to replay your work on top of it... Fast-forwarded master to refs/remotes/origin/master. Full output: http://webkit-queues.webkit.org/results/3529496
Sam Weinig
Comment 4 2017-04-13 10:56:09 PDT
(In reply to WebKit Commit Bot from comment #3) > Comment on attachment 306884 [details] > Patch > > Rejecting attachment 306884 [details] from commit-queue. > > Failed to run "['/Volumes/Data/EWS/WebKit/Tools/Scripts/webkit-patch', > '--status-host=webkit-queues.webkit.org', '--bot-id=webkit-cq-03', > 'land-attachment', '--force-clean', '--non-interactive', > '--parent-command=commit-queue', 306884, '--port=mac']" exit_code: 2 cwd: > /Volumes/Data/EWS/WebKit > > Last 500 characters of output: > -> origin/master > Partial-rebuilding > .git/svn/refs/remotes/origin/master/.rev_map.268f45cc-cd09-0410-ab3c- > d52691b4dbfc ... > Currently at 215323 = b1e02dbc03afc79fa6594cd2761a7eafee9f7c7a > r215324 = 64df7a4298e2b28020dad16783319373057cd46d > r215325 = 04c71ab1eee5352b02f54676fe40e28c88526a5b > Done rebuilding > .git/svn/refs/remotes/origin/master/.rev_map.268f45cc-cd09-0410-ab3c- > d52691b4dbfc > First, rewinding head to replay your work on top of it... > Fast-forwarded master to refs/remotes/origin/master. > > Full output: http://webkit-queues.webkit.org/results/3529496 Not going to lie, that output is a tad confusing. But I'll assume it means it didn't merge cleanly.
Chris Dumez
Comment 5 2017-05-04 09:00:44 PDT
Comment on attachment 306884 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=306884&action=review > Source/WebCore/css/MediaList.idl:32 > + [SetterMayThrowException] attribute [TreatNullAs=EmptyString] DOMString mediaText; Why? This no longer matches WebIDL syntax or the spec: https://drafts.csswg.org/cssom/#the-medialist-interface This should be: [SetterMayThrowException, TreatNullAs=EmptyString] attribute DOMString mediaText; I do not like this change at all unless this is somehow a newer WebIDL syntax I do not know about.
Chris Dumez
Comment 6 2017-05-04 09:01:55 PDT
(In reply to Chris Dumez from comment #5) > Comment on attachment 306884 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=306884&action=review > > > Source/WebCore/css/MediaList.idl:32 > > + [SetterMayThrowException] attribute [TreatNullAs=EmptyString] DOMString mediaText; > > Why? This no longer matches WebIDL syntax or the spec: > https://drafts.csswg.org/cssom/#the-medialist-interface > > This should be: > [SetterMayThrowException, TreatNullAs=EmptyString] attribute DOMString > mediaText; > > I do not like this change at all unless this is somehow a newer WebIDL > syntax I do not know about. I noticed this when trying to align MediaList.idl with the spec. I can no longer copy/paste from the spec which is a huge downside for me. Our WebIDL should be as close to specs as possible.
Chris Dumez
Comment 7 2017-05-04 09:04:50 PDT
(In reply to Chris Dumez from comment #6) > (In reply to Chris Dumez from comment #5) > > Comment on attachment 306884 [details] > > Patch > > > > View in context: > > https://bugs.webkit.org/attachment.cgi?id=306884&action=review > > > > > Source/WebCore/css/MediaList.idl:32 > > > + [SetterMayThrowException] attribute [TreatNullAs=EmptyString] DOMString mediaText; > > > > Why? This no longer matches WebIDL syntax or the spec: > > https://drafts.csswg.org/cssom/#the-medialist-interface > > > > This should be: > > [SetterMayThrowException, TreatNullAs=EmptyString] attribute DOMString > > mediaText; > > > > I do not like this change at all unless this is somehow a newer WebIDL > > syntax I do not know about. > > I noticed this when trying to align MediaList.idl with the spec. I can no > longer copy/paste from the spec which is a huge downside for me. Our WebIDL > should be as close to specs as possible. I have just confirmed this is not proper WebIDL syntax. The latest spec is at: https://heycam.github.io/webidl/#TreatNullAs Note the syntax in the spec is: [TreatNullAs=EmptyString] attribute DOMString owner; NOT attribute [TreatNullAs=EmptyString] DOMString owner; Can we please roll back this part of the change?
Chris Dumez
Comment 8 2017-05-04 09:11:44 PDT
(In reply to Chris Dumez from comment #7) > (In reply to Chris Dumez from comment #6) > > (In reply to Chris Dumez from comment #5) > > > Comment on attachment 306884 [details] > > > Patch > > > > > > View in context: > > > https://bugs.webkit.org/attachment.cgi?id=306884&action=review > > > > > > > Source/WebCore/css/MediaList.idl:32 > > > > + [SetterMayThrowException] attribute [TreatNullAs=EmptyString] DOMString mediaText; > > > > > > Why? This no longer matches WebIDL syntax or the spec: > > > https://drafts.csswg.org/cssom/#the-medialist-interface > > > > > > This should be: > > > [SetterMayThrowException, TreatNullAs=EmptyString] attribute DOMString > > > mediaText; > > > > > > I do not like this change at all unless this is somehow a newer WebIDL > > > syntax I do not know about. > > > > I noticed this when trying to align MediaList.idl with the spec. I can no > > longer copy/paste from the spec which is a huge downside for me. Our WebIDL > > should be as close to specs as possible. > > I have just confirmed this is not proper WebIDL syntax. The latest spec is > at: > https://heycam.github.io/webidl/#TreatNullAs > > Note the syntax in the spec is: > [TreatNullAs=EmptyString] attribute DOMString owner; > > NOT > attribute [TreatNullAs=EmptyString] DOMString owner; > > Can we please roll back this part of the change? Ok, I have found https://github.com/heycam/webidl/pull/286 which seems to indicate this is a new Web IDL syntax. Therefore, the example I pointed to must be out of date. I have pointed this out upstream. Such a big change is unfortunate as most specs are out of date now, but anyway. If this is where Web IDL is going, I no longer oppose to this.
Chris Dumez
Comment 9 2017-05-04 09:18:13 PDT
(In reply to Chris Dumez from comment #8) > (In reply to Chris Dumez from comment #7) > > (In reply to Chris Dumez from comment #6) > > > (In reply to Chris Dumez from comment #5) > > > > Comment on attachment 306884 [details] > > > > Patch > > > > > > > > View in context: > > > > https://bugs.webkit.org/attachment.cgi?id=306884&action=review > > > > > > > > > Source/WebCore/css/MediaList.idl:32 > > > > > + [SetterMayThrowException] attribute [TreatNullAs=EmptyString] DOMString mediaText; > > > > > > > > Why? This no longer matches WebIDL syntax or the spec: > > > > https://drafts.csswg.org/cssom/#the-medialist-interface > > > > > > > > This should be: > > > > [SetterMayThrowException, TreatNullAs=EmptyString] attribute DOMString > > > > mediaText; > > > > > > > > I do not like this change at all unless this is somehow a newer WebIDL > > > > syntax I do not know about. > > > > > > I noticed this when trying to align MediaList.idl with the spec. I can no > > > longer copy/paste from the spec which is a huge downside for me. Our WebIDL > > > should be as close to specs as possible. > > > > I have just confirmed this is not proper WebIDL syntax. The latest spec is > > at: > > https://heycam.github.io/webidl/#TreatNullAs > > > > Note the syntax in the spec is: > > [TreatNullAs=EmptyString] attribute DOMString owner; > > > > NOT > > attribute [TreatNullAs=EmptyString] DOMString owner; > > > > Can we please roll back this part of the change? > > Ok, I have found https://github.com/heycam/webidl/pull/286 which seems to > indicate this is a new Web IDL syntax. Therefore, the example I pointed to > must be out of date. I have pointed this out upstream. > > Such a big change is unfortunate as most specs are out of date now, but > anyway. If this is where Web IDL is going, I no longer oppose to this. I filed https://www.w3.org/Bugs/Public/show_bug.cgi?id=30107 to try and get the CSSOM spec updated. Domenic also agreed the example in the WebIDL spec is outdated and will fix it. Sorry about the noise.
Note You need to log in before you can comment on or make changes to this bug.