RESOLVED FIXED 179020
[Touch Bar Web API] Add support for menuitem tag
https://bugs.webkit.org/show_bug.cgi?id=179020
Summary [Touch Bar Web API] Add support for menuitem tag
Aishwarya Nirmal
Reported 2017-10-30 10:47:38 PDT
The Touch Bar API will make use of the HTML tags for menu and menuitem. Currently WebKit does not support menuitem, so this changes adds support for that tag.
Attachments
Patch (16.84 KB, patch)
2017-10-30 11:27 PDT, Aishwarya Nirmal
no flags
Patch (13.85 KB, patch)
2017-10-30 11:44 PDT, Aishwarya Nirmal
no flags
Archive of layout-test-results from ews103 for mac-elcapitan (1.04 MB, application/zip)
2017-10-30 12:46 PDT, Build Bot
no flags
Archive of layout-test-results from ews105 for mac-elcapitan-wk2 (1.23 MB, application/zip)
2017-10-30 12:51 PDT, Build Bot
no flags
Archive of layout-test-results from ews116 for mac-elcapitan (1.78 MB, application/zip)
2017-10-30 13:04 PDT, Build Bot
no flags
Archive of layout-test-results from ews123 for ios-simulator-wk2 (7.51 MB, application/zip)
2017-10-30 13:14 PDT, Build Bot
no flags
Patch (14.37 KB, patch)
2017-10-30 17:15 PDT, Aishwarya Nirmal
no flags
Archive of layout-test-results from ews100 for mac-elcapitan (1.08 MB, application/zip)
2017-10-30 18:08 PDT, Build Bot
no flags
Archive of layout-test-results from ews104 for mac-elcapitan-wk2 (1.20 MB, application/zip)
2017-10-30 18:23 PDT, Build Bot
no flags
Archive of layout-test-results from ews115 for mac-elcapitan (1.79 MB, application/zip)
2017-10-30 18:36 PDT, Build Bot
no flags
Archive of layout-test-results from ews124 for ios-simulator-wk2 (1.02 MB, application/zip)
2017-10-30 18:44 PDT, Build Bot
no flags
Patch (17.97 KB, patch)
2017-10-31 13:38 PDT, Aishwarya Nirmal
no flags
Archive of layout-test-results from ews106 for mac-elcapitan-wk2 (1.86 MB, application/zip)
2017-10-31 14:44 PDT, Build Bot
no flags
Patch (12.42 KB, patch)
2017-11-01 14:29 PDT, Aishwarya Nirmal
no flags
Patch (20.97 KB, patch)
2017-11-01 14:40 PDT, Aishwarya Nirmal
no flags
Patch (32.45 KB, patch)
2017-11-02 14:10 PDT, Aishwarya Nirmal
no flags
Archive of layout-test-results from ews103 for mac-elcapitan (1009.56 KB, application/zip)
2017-11-02 15:13 PDT, Build Bot
no flags
Archive of layout-test-results from ews112 for mac-elcapitan (1.80 MB, application/zip)
2017-11-02 15:29 PDT, Build Bot
no flags
Patch (33.50 KB, patch)
2017-11-02 15:31 PDT, Aishwarya Nirmal
no flags
Archive of layout-test-results from ews104 for mac-elcapitan-wk2 (1.50 MB, application/zip)
2017-11-02 16:37 PDT, Build Bot
no flags
Aishwarya Nirmal
Comment 1 2017-10-30 11:27:18 PDT
Build Bot
Comment 2 2017-10-30 11:28:24 PDT
Attachment 325362 [details] did not pass style-queue: ERROR: Source/WebCore/JSHTMLMenuitemElement.h:0: No copyright message found. You should have a line: "Copyright [year] <Copyright Owner>" [legal/copyright] [5] Total errors found: 1 in 11 files If any of these errors are false positives, please file a bug against check-webkit-style.
Tim Horton
Comment 3 2017-10-30 11:34:49 PDT
Comment on attachment 325362 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=325362&action=review > Source/WebCore/ChangeLog:7 > + I think it should be possible to write a simple test for this. I'll look for one to mimic. > Source/WebCore/JSHTMLMenuitemElement.h:1 > +/* This doesn't seem right. The generated file shouldn't be in the WebKit source tree, it should get generated into the build directory (and not show up in your patch). You may need help getting Xcode to do the right thing, it's not exactly straightforward.
Tim Horton
Comment 4 2017-10-30 11:37:16 PDT
(In reply to Tim Horton from comment #3) > Comment on attachment 325362 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=325362&action=review > > > Source/WebCore/ChangeLog:7 > > + > > I think it should be possible to write a simple test for this. I'll look for > one to mimic. Maybe something in LayoutTests/fast/html? There are a bunch that end in -element that seem like sensible starting points.
Aishwarya Nirmal
Comment 5 2017-10-30 11:44:11 PDT
Aishwarya Nirmal
Comment 6 2017-10-30 11:45:58 PDT
(In reply to Tim Horton from comment #4) > (In reply to Tim Horton from comment #3) > > Comment on attachment 325362 [details] > > Patch > > > > View in context: > > https://bugs.webkit.org/attachment.cgi?id=325362&action=review > > > > > Source/WebCore/ChangeLog:7 > > > + > > > > I think it should be possible to write a simple test for this. I'll look for > > one to mimic. > > Maybe something in LayoutTests/fast/html? There are a bunch that end in > -element that seem like sensible starting points. Sounds good! I think I fixed the issue with the JSHTML file, so I'll look into creating some tests.
Build Bot
Comment 7 2017-10-30 12:46:43 PDT
Comment on attachment 325364 [details] Patch Attachment 325364 [details] did not pass mac-ews (mac): Output: http://webkit-queues.webkit.org/results/5042101 New failing tests: imported/w3c/web-platform-tests/html/semantics/interactive-elements/contextmenu-historical.html
Build Bot
Comment 8 2017-10-30 12:46:45 PDT
Created attachment 325368 [details] Archive of layout-test-results from ews103 for mac-elcapitan The attached test failures were seen while running run-webkit-tests on the mac-ews. Bot: ews103 Port: mac-elcapitan Platform: Mac OS X 10.11.6
Build Bot
Comment 9 2017-10-30 12:51:37 PDT
Comment on attachment 325364 [details] Patch Attachment 325364 [details] did not pass mac-wk2-ews (mac-wk2): Output: http://webkit-queues.webkit.org/results/5042110 New failing tests: imported/w3c/web-platform-tests/html/semantics/interactive-elements/contextmenu-historical.html
Build Bot
Comment 10 2017-10-30 12:51:39 PDT
Created attachment 325370 [details] Archive of layout-test-results from ews105 for mac-elcapitan-wk2 The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews. Bot: ews105 Port: mac-elcapitan-wk2 Platform: Mac OS X 10.11.6
Build Bot
Comment 11 2017-10-30 13:04:54 PDT
Comment on attachment 325364 [details] Patch Attachment 325364 [details] did not pass mac-debug-ews (mac): Output: http://webkit-queues.webkit.org/results/5042140 New failing tests: imported/w3c/web-platform-tests/html/semantics/interactive-elements/contextmenu-historical.html
Build Bot
Comment 12 2017-10-30 13:04:56 PDT
Created attachment 325371 [details] Archive of layout-test-results from ews116 for mac-elcapitan The attached test failures were seen while running run-webkit-tests on the mac-debug-ews. Bot: ews116 Port: mac-elcapitan Platform: Mac OS X 10.11.6
Build Bot
Comment 13 2017-10-30 13:14:17 PDT
Comment on attachment 325364 [details] Patch Attachment 325364 [details] did not pass ios-sim-ews (ios-simulator-wk2): Output: http://webkit-queues.webkit.org/results/5042152 New failing tests: imported/w3c/web-platform-tests/html/semantics/interactive-elements/contextmenu-historical.html
Build Bot
Comment 14 2017-10-30 13:14:18 PDT
Created attachment 325373 [details] Archive of layout-test-results from ews123 for ios-simulator-wk2 The attached test failures were seen while running run-webkit-tests on the ios-sim-ews. Bot: ews123 Port: ios-simulator-wk2 Platform: Mac OS X 10.12.6
Ryosuke Niwa
Comment 15 2017-10-30 13:33:31 PDT
Comment on attachment 325364 [details] Patch r- since the patch is failing to build.
Tim Horton
Comment 16 2017-10-30 13:36:29 PDT
(In reply to Ryosuke Niwa from comment #15) > Comment on attachment 325364 [details] > Patch > > r- since the patch is failing to build. It's not, the test is failing. Aishwarya, you'll want to find out why imported/w3c/web-platform-tests/html/semantics/interactive-elements/contextmenu-historical asserts that HTMLMenuItemElement *doesn't* exist :P
Ryosuke Niwa
Comment 17 2017-10-30 13:38:03 PDT
(In reply to Tim Horton from comment #16) > (In reply to Ryosuke Niwa from comment #15) > > Comment on attachment 325364 [details] > > Patch > > > > r- since the patch is failing to build. > > It's not, the test is failing. > > Aishwarya, you'll want to find out why > imported/w3c/web-platform-tests/html/semantics/interactive-elements/ > contextmenu-historical asserts that HTMLMenuItemElement *doesn't* exist :P GTK+, Windows, and WPE seem to be failing to build? Have you confirmed that they build locally somehow?
Aishwarya Nirmal
Comment 18 2017-10-30 14:06:16 PDT
It builds locally for me. Looking at that file, imported/w3c/web-platform-tests/html/semantics/interactive-elements/contextmenu-historical, it seems that there are some tests ensuring that HTMLMenuItemElement does not exist. We probably don't want to check for this anymore, so I can work on editing the test.
Tim Horton
Comment 19 2017-10-30 14:41:57 PDT
(In reply to Aishwarya Nirmal from comment #18) > It builds locally for me. rniwa is right, something is up with the CMake build. I think it doesn't use DerivedSources.make, so maybe look for other files that mention an adjacent derived source to find out what mechanism it does use.
Aishwarya Nirmal
Comment 20 2017-10-30 17:15:42 PDT
Build Bot
Comment 21 2017-10-30 18:08:26 PDT
Comment on attachment 325391 [details] Patch Attachment 325391 [details] did not pass mac-ews (mac): Output: http://webkit-queues.webkit.org/results/5044601 New failing tests: imported/w3c/web-platform-tests/html/semantics/interactive-elements/contextmenu-historical.html
Build Bot
Comment 22 2017-10-30 18:08:27 PDT
Created attachment 325398 [details] Archive of layout-test-results from ews100 for mac-elcapitan The attached test failures were seen while running run-webkit-tests on the mac-ews. Bot: ews100 Port: mac-elcapitan Platform: Mac OS X 10.11.6
Build Bot
Comment 23 2017-10-30 18:23:11 PDT
Comment on attachment 325391 [details] Patch Attachment 325391 [details] did not pass mac-wk2-ews (mac-wk2): Output: http://webkit-queues.webkit.org/results/5044716 New failing tests: imported/w3c/web-platform-tests/html/semantics/interactive-elements/contextmenu-historical.html
Build Bot
Comment 24 2017-10-30 18:23:13 PDT
Created attachment 325401 [details] Archive of layout-test-results from ews104 for mac-elcapitan-wk2 The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews. Bot: ews104 Port: mac-elcapitan-wk2 Platform: Mac OS X 10.11.6
Build Bot
Comment 25 2017-10-30 18:36:37 PDT
Comment on attachment 325391 [details] Patch Attachment 325391 [details] did not pass mac-debug-ews (mac): Output: http://webkit-queues.webkit.org/results/5044751 New failing tests: imported/w3c/web-platform-tests/html/semantics/interactive-elements/contextmenu-historical.html
Build Bot
Comment 26 2017-10-30 18:36:39 PDT
Created attachment 325404 [details] Archive of layout-test-results from ews115 for mac-elcapitan The attached test failures were seen while running run-webkit-tests on the mac-debug-ews. Bot: ews115 Port: mac-elcapitan Platform: Mac OS X 10.11.6
Build Bot
Comment 27 2017-10-30 18:44:20 PDT
Comment on attachment 325391 [details] Patch Attachment 325391 [details] did not pass ios-sim-ews (ios-simulator-wk2): Output: http://webkit-queues.webkit.org/results/5044815 New failing tests: imported/w3c/web-platform-tests/html/semantics/interactive-elements/contextmenu-historical.html
Build Bot
Comment 28 2017-10-30 18:44:22 PDT
Created attachment 325406 [details] Archive of layout-test-results from ews124 for ios-simulator-wk2 The attached test failures were seen while running run-webkit-tests on the ios-sim-ews. Bot: ews124 Port: ios-simulator-wk2 Platform: Mac OS X 10.12.6
Ryosuke Niwa
Comment 29 2017-10-30 19:00:23 PDT
The test is failing because it's expecting HTMLMenuItemElement to be not defined in the global scope. You have run "run-webkit-tests LayoutTests/imported/w3c/web-platform-tests/html/semantics/interactive-elements/contextmenu-historical.html --reset" to reset the expected results. This is because the feature had been removed from the HTML specification in https://github.com/whatwg/html/pull/2742.
Ryosuke Niwa
Comment 30 2017-10-30 19:01:20 PDT
Comment on attachment 325391 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=325391&action=review > Source/WebCore/ChangeLog:6 > + Reviewed by NOBODY (OOPS!). You need to describe what kind of API you're implementing and what code changes you're making for it. r- due to the lack of change log descriptions and the test failures. > Source/WebCore/ChangeLog:8 > + * CMakeLists.txt: Given the feature has been removed from the HTML specification, we should put this under a runtime flag.
Aishwarya Nirmal
Comment 31 2017-10-31 13:38:16 PDT
Build Bot
Comment 32 2017-10-31 14:44:31 PDT
Comment on attachment 325482 [details] Patch Attachment 325482 [details] did not pass mac-wk2-ews (mac-wk2): Output: http://webkit-queues.webkit.org/results/5054553 New failing tests: imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/sandbox_032.htm
Build Bot
Comment 33 2017-10-31 14:44:33 PDT
Created attachment 325501 [details] Archive of layout-test-results from ews106 for mac-elcapitan-wk2 The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews. Bot: ews106 Port: mac-elcapitan-wk2 Platform: Mac OS X 10.11.6
Aishwarya Nirmal
Comment 34 2017-11-01 13:10:19 PDT
The test that is failing seems to be unrelated to my changes. When I run run-webkit-tests LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/sandbox_032.htm --debug locally, the test passes.
Ryosuke Niwa
Comment 35 2017-11-01 14:12:48 PDT
Comment on attachment 325482 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=325482&action=review > Source/WebCore/ChangeLog:12 > + is set to false by default. Nits: There are two trailing spaces here. > Source/WebCore/ChangeLog:13 > + Please add some references to old HTML specifications like https://www.w3.org/TR/2013/WD-html51-20130528/interactive-elements.html. > Source/WebKit/ChangeLog:8 > + Adds in the MenuItemEnabled flag and default value. Nit: A trailing space at the end. > Source/WebCore/html/HTMLMenuItemElement.idl:27 > +] interface HTMLMenuItemElement : HTMLElement { So the idea is to implement more attributes of https://www.w3.org/TR/2013/WD-html51-20130528/interactive-elements.html in the future patches?
Aishwarya Nirmal
Comment 36 2017-11-01 14:28:07 PDT
Yes! I will add those details to the change log.
Aishwarya Nirmal
Comment 37 2017-11-01 14:29:24 PDT
Aishwarya Nirmal
Comment 38 2017-11-01 14:40:12 PDT
Ryosuke Niwa
Comment 39 2017-11-01 15:10:51 PDT
Comment on attachment 325635 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=325635&action=review > LayoutTests/fast/html/menuitem-element.html:1 > +<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN"> Please use <!DOCTYPE html> > LayoutTests/fast/html/menuitem-element.html:12 > + You either need to skip this test in TestExpectations or enable the feature using settings, etc...
Aishwarya Nirmal
Comment 40 2017-11-02 14:10:59 PDT
Build Bot
Comment 41 2017-11-02 15:13:38 PDT
Comment on attachment 325768 [details] Patch Attachment 325768 [details] did not pass mac-ews (mac): Output: http://webkit-queues.webkit.org/results/5080207 New failing tests: fast/html/menuitem-element.html
Build Bot
Comment 42 2017-11-02 15:13:39 PDT
Created attachment 325776 [details] Archive of layout-test-results from ews103 for mac-elcapitan The attached test failures were seen while running run-webkit-tests on the mac-ews. Bot: ews103 Port: mac-elcapitan Platform: Mac OS X 10.11.6
Build Bot
Comment 43 2017-11-02 15:29:54 PDT
Comment on attachment 325768 [details] Patch Attachment 325768 [details] did not pass mac-debug-ews (mac): Output: http://webkit-queues.webkit.org/results/5080229 New failing tests: fast/html/menuitem-element.html
Build Bot
Comment 44 2017-11-02 15:29:56 PDT
Created attachment 325778 [details] Archive of layout-test-results from ews112 for mac-elcapitan The attached test failures were seen while running run-webkit-tests on the mac-debug-ews. Bot: ews112 Port: mac-elcapitan Platform: Mac OS X 10.11.6
Aishwarya Nirmal
Comment 45 2017-11-02 15:31:16 PDT
Build Bot
Comment 46 2017-11-02 16:37:35 PDT
Comment on attachment 325779 [details] Patch Attachment 325779 [details] did not pass mac-wk2-ews (mac-wk2): Output: http://webkit-queues.webkit.org/results/5081414 New failing tests: imported/w3c/web-platform-tests/service-workers/service-worker/fetch-canvas-tainting.https.html
Build Bot
Comment 47 2017-11-02 16:37:37 PDT
Created attachment 325795 [details] Archive of layout-test-results from ews104 for mac-elcapitan-wk2 The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews. Bot: ews104 Port: mac-elcapitan-wk2 Platform: Mac OS X 10.11.6
Darin Adler
Comment 48 2017-11-03 08:00:18 PDT
Comment on attachment 325779 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=325779&action=review > Source/WebCore/ChangeLog:16 > + A specification for the menuitem element can be found at > + https://www.w3.org/TR/2013/WD-html51-20130528/interactive-elements.html#the-menuitem-element. > + More attributes of this element will be implemented in future patches. Should we be adding this? This is obsolete. More recent HTML specifications do not include this. See <https://html.spec.whatwg.org/#non-conforming-features>.
Aishwarya Nirmal
Comment 49 2017-11-03 11:19:00 PDT
Menuitem is noncorforming because Mozilla is the only implementor, but it does not seem to be entirely obsolete. The w3 folks seem to be willing to reconsider the removal of the menuitem if multiple browsers were to support it https://github.com/whatwg/html/issues/2929. We are aiming to use menuitem to represent the touch bar menu items for the touch bar web API. The API is experimental, so we are planning to use any information gathered to better inform a web standard for menuitem.
Darin Adler
Comment 50 2017-11-03 12:58:18 PDT
(In reply to Aishwarya Nirmal from comment #49) > Menuitem is noncorforming because Mozilla is the only implementor, but it > does not seem to be entirely obsolete. The w3 folks seem to be willing to > reconsider the removal of the menuitem if multiple browsers were to support > it https://github.com/whatwg/html/issues/2929. OK, makes sense.
Ryosuke Niwa
Comment 51 2017-11-04 00:59:22 PDT
Comment on attachment 325779 [details] Patch r=me since this patch can't possibly cause the service worker test failure. Sorry for the delay. In the future, please also set cq? flag so that the committer can set cq+ flag to land the patch via commit queue.
WebKit Commit Bot
Comment 52 2017-11-04 01:20:07 PDT
Comment on attachment 325779 [details] Patch Clearing flags on attachment: 325779 Committed r224457: <https://trac.webkit.org/changeset/224457>
WebKit Commit Bot
Comment 53 2017-11-04 01:20:10 PDT
All reviewed patches have been landed. Closing bug.
Radar WebKit Bug Importer
Comment 54 2017-11-15 12:33:03 PST
Note You need to log in before you can comment on or make changes to this bug.