RESOLVED FIXED 187851
Add CEReactions=NotNeeded for reactions only needed for customized builtins
https://bugs.webkit.org/show_bug.cgi?id=187851
Summary Add CEReactions=NotNeeded for reactions only needed for customized builtins
Frédéric Wang (:fredw)
Reported 2018-07-20 02:39:32 PDT
partial interface HTMLInputElement { [CEReactions] attribute DOMString capture; }; This is tested by https://w3c-test.org/custom-elements/reactions/HTMLInputElement.html (imported in bug 187806) but we lack support for customized built-in elements (bug 187849) so the test fails.
Attachments
Patch (9.48 KB, patch)
2018-07-21 11:21 PDT, Frédéric Wang (:fredw)
no flags
Archive of layout-test-results from ews206 for win-future (12.99 MB, application/zip)
2018-07-21 19:36 PDT, EWS Watchlist
no flags
Patch (84.77 KB, patch)
2018-07-22 09:27 PDT, Frédéric Wang (:fredw)
no flags
Patch (85.29 KB, patch)
2018-07-23 01:22 PDT, Frédéric Wang (:fredw)
no flags
Archive of layout-test-results from ews201 for win-future (12.76 MB, application/zip)
2018-07-24 04:10 PDT, EWS Watchlist
no flags
Patch (85.71 KB, patch)
2018-07-26 05:13 PDT, Frédéric Wang (:fredw)
no flags
Adds CEReactions=NotNeeded (19.98 KB, patch)
2018-08-04 02:07 PDT, Ryosuke Niwa
no flags
Adds the basic support (38.15 KB, patch)
2018-08-04 02:17 PDT, Ryosuke Niwa
no flags
Fixed release builds (38.16 KB, patch)
2018-08-06 13:43 PDT, Ryosuke Niwa
cdumez: review+
cdumez: commit-queue-
Ryosuke Niwa
Comment 1 2018-07-20 10:44:50 PDT
This should be easy to fix!
Frédéric Wang (:fredw)
Comment 2 2018-07-20 11:48:55 PDT
(In reply to Ryosuke Niwa from comment #1) > This should be easy to fix! Yes, just a change in the IDL file but I was not sure how to test it. Maybe https://w3c-test.org/custom-elements/reactions/HTMLInputElement.html can be modified to not rely on customized built-in elements?
Ryosuke Niwa
Comment 3 2018-07-20 12:18:30 PDT
Oh, actually, this is one of those [CEReactions] that are only needed for customized builtins. We should simply either new IDL attribute e.g. [CEReactionsNotNeeded] or make CEReactions take a value as in [CEReactions=NotNeeded] and simply assert that there is no new custom element reaction being enqueued.
Frédéric Wang (:fredw)
Comment 4 2018-07-20 12:38:35 PDT
(In reply to Ryosuke Niwa from comment #3) > Oh, actually, this is one of those [CEReactions] that are only needed for > customized builtins. We should simply either new IDL attribute e.g. > [CEReactionsNotNeeded] or make CEReactions take a value as in > [CEReactions=NotNeeded] and simply assert that there is no new custom > element reaction being enqueued. I see. Yes, probably we should do something like that for all the similar cases, so that one is not surprised when comparing the IDL against the spec.
Frédéric Wang (:fredw)
Comment 5 2018-07-21 11:21:34 PDT
Frédéric Wang (:fredw)
Comment 6 2018-07-21 11:22:56 PDT
(In reply to Ryosuke Niwa from comment #3) > Oh, actually, this is one of those [CEReactions] that are only needed for > customized builtins. We should simply either new IDL attribute e.g. > [CEReactionsNotNeeded] or make CEReactions take a value as in > [CEReactions=NotNeeded] and simply assert that there is no new custom > element reaction being enqueued. @Ryosuke: I just uploaded a patch that tries to do that. Is it what we you had in mind? Note: I still need to add tests and do all the CEReaction=NotNeeded.
EWS Watchlist
Comment 7 2018-07-21 11:23:37 PDT
Attachment 345514 [details] did not pass style-queue: ERROR: Source/WebCore/ChangeLog:8: You should remove the 'No new tests' and either add and list tests, or explain why no new tests were possible. [changelog/nonewtests] [5] Total errors found: 1 in 4 files If any of these errors are false positives, please file a bug against check-webkit-style.
EWS Watchlist
Comment 8 2018-07-21 11:25:24 PDT
Comment on attachment 345514 [details] Patch Attachment 345514 [details] did not pass bindings-ews (mac): Output: https://webkit-queues.webkit.org/results/8610226 New failing tests: (JS) JSTestCEReactions.cpp (JS) JSTestCEReactionsStringifier.cpp
EWS Watchlist
Comment 9 2018-07-21 19:36:11 PDT
Comment on attachment 345514 [details] Patch Attachment 345514 [details] did not pass win-ews (win): Output: https://webkit-queues.webkit.org/results/8612417 New failing tests: http/tests/security/canvas-remote-read-remote-video-blocked-no-crossorigin.html
EWS Watchlist
Comment 10 2018-07-21 19:36:22 PDT
Created attachment 345531 [details] Archive of layout-test-results from ews206 for win-future The attached test failures were seen while running run-webkit-tests on the win-ews. Bot: ews206 Port: win-future Platform: CYGWIN_NT-6.1-2.9.0-0.318-5-3-x86_64-64bit
Frédéric Wang (:fredw)
Comment 11 2018-07-22 09:27:58 PDT
Frédéric Wang (:fredw)
Comment 12 2018-07-23 01:22:13 PDT
EWS Watchlist
Comment 13 2018-07-24 04:09:57 PDT
Comment on attachment 345564 [details] Patch Attachment 345564 [details] did not pass win-ews (win): Output: https://webkit-queues.webkit.org/results/8636398 New failing tests: http/tests/security/local-video-source-from-remote.html http/tests/security/canvas-remote-read-remote-video-localhost.html
EWS Watchlist
Comment 14 2018-07-24 04:10:09 PDT
Created attachment 345656 [details] Archive of layout-test-results from ews201 for win-future The attached test failures were seen while running run-webkit-tests on the win-ews. Bot: ews201 Port: win-future Platform: CYGWIN_NT-6.1-2.9.0-0.318-5-3-x86_64-64bit
Sam Weinig
Comment 15 2018-07-24 21:20:10 PDT
Comment on attachment 345564 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=345564&action=review > Source/WebCore/bindings/scripts/CodeGeneratorJS.pm:7220 > + foreach my $interface (@_) { > + if ($interface && $interface->extendedAttributes->{CEReactions}) { > + InsertCustomElementReactionStack($outputArray, $conditional, $indent, $interface); > + return; > + } > + } The thing that worries me here is the case where this function is passed multiple interfaces and on has normal CEReactions and one has CEReactions=NotNeeded. In that case, depending on the order you passed the interfaces either CustomElementReactionStack or CustomElementReactionStackWithReactionsForbidden will be used. It might be worth asserting that all the passed in interfaces with CEReactions have the same value for those CEReactions.
Frédéric Wang (:fredw)
Comment 16 2018-07-26 05:13:49 PDT
Ryosuke Niwa
Comment 17 2018-07-31 17:45:24 PDT
Comment on attachment 345839 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=345839&action=review > Source/WebCore/dom/CustomElementReactionQueue.h:109 > +class CustomElementReactionStackWithReactionsForbidden : public CustomElementReactionStack { I don't think we can afford to instantiate CustomElementReactionStack everywhere like this. We need to create a completely new class (i.e. doesn't inherit from CustomElementReactionStack) which clang can optimize way. r- because of this. Also, this class name is rather verbose. How about UnneededCustomElementReactionStack? > Source/WebCore/html/HTMLAnchorElement.idl:22 > + [CEReactions=NotNeeded, Reflect] attribute DOMString charset; Let's split the patch to make the binding code & actual IDL changes.
Radar WebKit Bug Importer
Comment 18 2018-08-01 22:41:33 PDT
Ryosuke Niwa
Comment 19 2018-08-04 02:07:54 PDT
Created attachment 346584 [details] Adds CEReactions=NotNeeded
Ryosuke Niwa
Comment 20 2018-08-04 02:17:29 PDT
Created attachment 346585 [details] Adds the basic support
Ryosuke Niwa
Comment 21 2018-08-06 13:43:13 PDT
Created attachment 346652 [details] Fixed release builds
Chris Dumez
Comment 22 2018-08-06 16:43:21 PDT
Comment on attachment 346652 [details] Fixed release builds View in context: https://bugs.webkit.org/attachment.cgi?id=346652&action=review r=me > Source/WebCore/bindings/scripts/CodeGeneratorJS.pm:7416 > +sub GenerateCustomElementReactionsStackIfNeeed Typo: GenerateCustomElementReactionsStackIfNeeed -> GenerateCustomElementReactionsStackIfNeeded
Ryosuke Niwa
Comment 23 2018-08-06 17:13:18 PDT
Note You need to log in before you can comment on or make changes to this bug.