RESOLVED FIXED 171984
Add a RuntimeEnabledFeature for display: contents
https://bugs.webkit.org/show_bug.cgi?id=171984
Summary Add a RuntimeEnabledFeature for display: contents
Emilio Cobos Álvarez
Reported 2017-05-11 12:23:10 PDT
I plan to work on this over the next few weeks. I've gone through the tests, and the state of display: contents is not great when enabling it to all elements, so I think we should keep it turned off by default (except for <slot>). I'd want to add a flag for this that is on during testing, but off everywhere else.
Attachments
Patch (9.67 KB, patch)
2017-05-11 12:26 PDT, Emilio Cobos Álvarez
no flags
Archive of layout-test-results from ews104 for mac-elcapitan-wk2 (1.32 MB, application/zip)
2017-05-11 14:00 PDT, Build Bot
no flags
Archive of layout-test-results from ews125 for ios-simulator-wk2 (11.78 MB, application/zip)
2017-05-11 14:02 PDT, Build Bot
no flags
Patch (11.28 KB, patch)
2017-05-11 14:18 PDT, Emilio Cobos Álvarez
no flags
Patch (11.50 KB, patch)
2017-05-11 15:25 PDT, Emilio Cobos Álvarez
no flags
Patch (11.28 KB, patch)
2017-05-11 15:28 PDT, Emilio Cobos Álvarez
no flags
Archive of layout-test-results from ews101 for mac-elcapitan (1003.52 KB, application/zip)
2017-05-11 16:52 PDT, Build Bot
no flags
Archive of layout-test-results from ews114 for mac-elcapitan (1.81 MB, application/zip)
2017-05-11 16:57 PDT, Build Bot
no flags
Patch (11.23 KB, patch)
2017-05-14 03:51 PDT, Emilio Cobos Álvarez
no flags
Archive of layout-test-results from ews101 for mac-elcapitan (766.58 KB, application/zip)
2017-05-14 05:02 PDT, Build Bot
no flags
Archive of layout-test-results from ews112 for mac-elcapitan (1.54 MB, application/zip)
2017-05-14 05:15 PDT, Build Bot
no flags
WIP (15.10 KB, patch)
2017-05-14 07:16 PDT, Emilio Cobos Álvarez
no flags
WIP (14.15 KB, patch)
2017-05-14 07:23 PDT, Emilio Cobos Álvarez
no flags
WIP (14.93 KB, patch)
2017-05-14 08:03 PDT, Emilio Cobos Álvarez
no flags
Patch (16.63 KB, patch)
2017-05-14 09:33 PDT, Emilio Cobos Álvarez
no flags
Patch (2.39 KB, patch)
2017-05-22 07:35 PDT, Emilio Cobos Álvarez
no flags
Archive of layout-test-results from ews104 for mac-elcapitan-wk2 (374.61 KB, application/zip)
2017-05-22 07:58 PDT, Build Bot
no flags
Archive of layout-test-results from ews100 for mac-elcapitan (280.32 KB, application/zip)
2017-05-22 08:21 PDT, Build Bot
no flags
Archive of layout-test-results from ews115 for mac-elcapitan (274.52 KB, application/zip)
2017-05-22 08:27 PDT, Build Bot
no flags
Archive of layout-test-results from ews125 for ios-simulator-wk2 (986.51 KB, application/zip)
2017-05-22 08:45 PDT, Build Bot
no flags
Patch (16.60 KB, patch)
2017-05-22 13:44 PDT, Emilio Cobos Álvarez
no flags
Archive of layout-test-results from ews106 for mac-elcapitan-wk2 (1.78 MB, application/zip)
2017-05-22 14:32 PDT, Build Bot
no flags
Archive of layout-test-results from ews102 for mac-elcapitan (1.53 MB, application/zip)
2017-05-22 14:47 PDT, Build Bot
no flags
Archive of layout-test-results from ews116 for mac-elcapitan (2.39 MB, application/zip)
2017-05-22 15:00 PDT, Build Bot
no flags
Archive of layout-test-results from ews126 for ios-simulator-wk2 (997.02 KB, application/zip)
2017-05-22 15:15 PDT, Build Bot
no flags
Patch (17.41 KB, patch)
2017-05-22 16:36 PDT, Emilio Cobos Álvarez
no flags
Emilio Cobos Álvarez
Comment 1 2017-05-11 12:26:04 PDT
Build Bot
Comment 2 2017-05-11 14:00:15 PDT
Comment on attachment 309749 [details] Patch Attachment 309749 [details] did not pass mac-wk2-ews (mac-wk2): Output: http://webkit-queues.webkit.org/results/3720160 New failing tests: imported/w3c/web-platform-tests/innerText/getter.html
Build Bot
Comment 3 2017-05-11 14:00:16 PDT
Created attachment 309778 [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 4 2017-05-11 14:02:32 PDT
Comment on attachment 309749 [details] Patch Attachment 309749 [details] did not pass ios-sim-ews (ios-simulator-wk2): Output: http://webkit-queues.webkit.org/results/3720040 New failing tests: imported/w3c/web-platform-tests/innerText/getter.html
Build Bot
Comment 5 2017-05-11 14:02:33 PDT
Created attachment 309779 [details] Archive of layout-test-results from ews125 for ios-simulator-wk2 The attached test failures were seen while running run-webkit-tests on the ios-sim-ews. Bot: ews125 Port: ios-simulator-wk2 Platform: Mac OS X 10.11.6
Ryosuke Niwa
Comment 6 2017-05-11 14:06:14 PDT
Antti implemented this feature so he should be reviewing your patches related to display: contents.
Emilio Cobos Álvarez
Comment 7 2017-05-11 14:18:53 PDT
Emilio Cobos Álvarez
Comment 8 2017-05-11 14:20:24 PDT
(In reply to Ryosuke Niwa from comment #6) > Antti implemented this feature so he should be reviewing your patches > related to display: contents. Sounds good, thanks!
Antti Koivisto
Comment 9 2017-05-11 14:25:55 PDT
One of the first steps should be to import the tests from https://github.com/w3c/web-platform-tests/tree/master/css/css-display-3
Emilio Cobos Álvarez
Comment 10 2017-05-11 15:25:17 PDT
Emilio Cobos Álvarez
Comment 11 2017-05-11 15:28:22 PDT
Emilio Cobos Álvarez
Comment 12 2017-05-11 15:30:17 PDT
Err, sorry for the noise, I can't land the patch myself yet. Last version has the "Reviewed by..." line, if somebody could land it for me that'd be awesome. (In reply to Antti Koivisto from comment #9) > One of the first steps should be to import the tests from > > https://github.com/w3c/web-platform-tests/tree/master/css/css-display-3 Yeah, I have patches locally for this, which I'll submit for review tomorrow, probably. Thanks for the review Antti!
Ryosuke Niwa
Comment 13 2017-05-11 16:29:01 PDT
Comment on attachment 309797 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=309797&action=review > Source/WebCore/ChangeLog:11 > + Add a RuntimeEnabledFeature for display: contents, defaulted to false. > + > + The "defaulted to false" is not only because there are spec issues, but because > + I ran the WPT suite, and there was a fair amount of crashes and messed render > + trees. > + > + https://bugs.webkit.org/show_bug.cgi?id=171984 > + > + Reviewed by Antti Koivisto. Change log here is really messed up. The bug title should be followed by a bug URL, followed by a blank line, then a long description.
Build Bot
Comment 14 2017-05-11 16:52:43 PDT
Comment on attachment 309797 [details] Patch Attachment 309797 [details] did not pass mac-ews (mac): Output: http://webkit-queues.webkit.org/results/3721629 New failing tests: imported/w3c/web-platform-tests/innerText/getter.html
Build Bot
Comment 15 2017-05-11 16:52:45 PDT
Created attachment 309824 [details] Archive of layout-test-results from ews101 for mac-elcapitan The attached test failures were seen while running run-webkit-tests on the mac-ews. Bot: ews101 Port: mac-elcapitan Platform: Mac OS X 10.11.6
Build Bot
Comment 16 2017-05-11 16:57:05 PDT
Comment on attachment 309797 [details] Patch Attachment 309797 [details] did not pass mac-debug-ews (mac): Output: http://webkit-queues.webkit.org/results/3721583 New failing tests: imported/w3c/web-platform-tests/innerText/getter.html
Build Bot
Comment 17 2017-05-11 16:57:06 PDT
Created attachment 309825 [details] Archive of layout-test-results from ews114 for mac-elcapitan The attached test failures were seen while running run-webkit-tests on the mac-debug-ews. Bot: ews114 Port: mac-elcapitan Platform: Mac OS X 10.11.6
Sam Weinig
Comment 18 2017-05-12 12:39:31 PDT
Is there any reason this need to be a RuntimeEnabledFeature rather than a Setting?
Emilio Cobos Álvarez
Comment 19 2017-05-14 03:51:07 PDT
Emilio Cobos Álvarez
Comment 20 2017-05-14 03:54:08 PDT
(In reply to Ryosuke Niwa from comment #13) > Comment on attachment 309797 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=309797&action=review > > > Source/WebCore/ChangeLog:11 > > + Add a RuntimeEnabledFeature for display: contents, defaulted to false. > > + > > + The "defaulted to false" is not only because there are spec issues, but because > > + I ran the WPT suite, and there was a fair amount of crashes and messed render > > + trees. > > + > > + https://bugs.webkit.org/show_bug.cgi?id=171984 > > + > > + Reviewed by Antti Koivisto. > > Change log here is really messed up. > > The bug title should be followed by a bug URL, followed by a blank line, > then a long description. Thanks for the heads-up, prepare-ChangeLog posted the whole git commit description before the url field, and no script complained about it, so I just assumed it was fine. I updated and amended it. (In reply to Sam Weinig from comment #18) > Is there any reason this need to be a RuntimeEnabledFeature rather than a > Setting? From a quick look RuntimeEnabledFeatures it what's usually used for web features, but happy to change it if there's a good reason to.
Build Bot
Comment 21 2017-05-14 05:02:41 PDT
Comment on attachment 310084 [details] Patch Attachment 310084 [details] did not pass mac-ews (mac): Output: http://webkit-queues.webkit.org/results/3738112 New failing tests: imported/w3c/web-platform-tests/innerText/getter.html
Build Bot
Comment 22 2017-05-14 05:02:43 PDT
Created attachment 310085 [details] Archive of layout-test-results from ews101 for mac-elcapitan The attached test failures were seen while running run-webkit-tests on the mac-ews. Bot: ews101 Port: mac-elcapitan Platform: Mac OS X 10.11.6
Build Bot
Comment 23 2017-05-14 05:15:01 PDT
Comment on attachment 310084 [details] Patch Attachment 310084 [details] did not pass mac-debug-ews (mac): Output: http://webkit-queues.webkit.org/results/3738128 New failing tests: imported/w3c/web-platform-tests/innerText/getter.html
Build Bot
Comment 24 2017-05-14 05:15:02 PDT
Created attachment 310086 [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
Emilio Cobos Álvarez
Comment 25 2017-05-14 07:13:14 PDT
So I have no clue why the test is failing in OSX. I guess the test runner is not picking up the flag? Presumably I'm missing some WebView.mm bits or something? Not sure how should I proceed given I don't own a Mac. I guess I'll try some more monkey-see-monkey-do based on other preferences, probably I need to add it to the EXPERIMENTAL_FEATURES? I'll flag for review again once I get it working.
Emilio Cobos Álvarez
Comment 26 2017-05-14 07:15:05 PDT
Oh, and regarding Settings vs. RuntimeEnabledFeatures, it looks to me per [1] that RuntimeEnabledFeatures should be the right place for it, but maybe I'm missing something. [1]: https://lists.webkit.org/pipermail/webkit-dev/2017-January/028678.html
Emilio Cobos Álvarez
Comment 27 2017-05-14 07:16:32 PDT
Emilio Cobos Álvarez
Comment 28 2017-05-14 07:23:39 PDT
Emilio Cobos Álvarez
Comment 29 2017-05-14 08:03:51 PDT
Emilio Cobos Álvarez
Comment 30 2017-05-14 09:33:57 PDT
Emilio Cobos Álvarez
Comment 31 2017-05-14 09:34:42 PDT
Ok, that seemed to help, could I get the patch re-reviewed please? Thanks a lot in advance!
WebKit Commit Bot
Comment 32 2017-05-17 08:51:45 PDT
Comment on attachment 310092 [details] Patch Clearing flags on attachment: 310092 Committed r216974: <http://trac.webkit.org/changeset/216974>
WebKit Commit Bot
Comment 33 2017-05-17 08:51:48 PDT
All reviewed patches have been landed. Closing bug.
Matt Lewis
Comment 34 2017-05-17 10:53:04 PDT
Reverted r216974 for reason: Revision caused consistent timeouts on all platforms. Committed r216981: <http://trac.webkit.org/changeset/216981>
Emilio Cobos Álvarez
Comment 36 2017-05-17 13:44:33 PDT
Thanks for reopening Matt. I can repro after rebasing my checkout. I've bisected and it's caused by https://trac.webkit.org/changeset/216972/webkit. I still don't know enough about that code to know whether that's correct or the bug lies somewhere else, but I guess I'll need to come up with a fix...
Emilio Cobos Álvarez
Comment 37 2017-05-17 13:45:27 PDT
Emilio Cobos Álvarez
Comment 38 2017-05-18 08:11:24 PDT
I'm still debugging it, and it's fascinating. The change mentioned in the previous comment looks correct to me, and indeed the test passes in isolation. It seems all related to the following <svg> container in the getter.html. If I remove the SVG container (and the svg tests), it just works. If I remove only the svg tests, but I leave the svg container, the second display: contents test times out.
Emilio Cobos Álvarez
Comment 39 2017-05-22 07:35:22 PDT
Emilio Cobos Álvarez
Comment 40 2017-05-22 07:40:22 PDT
(In reply to Emilio Cobos Álvarez from comment #39) > Created attachment 310869 [details] > Patch I shouldn't have really uploaded this yet, sorry about that. It's just the same patch rebased, but apparently webkit-patch upload -g HEAD~ (where HEAD~ was the patch for bug 172443) did the wrong thing here. Anyway this should be good to go if/when bug 172443 lands.
Build Bot
Comment 41 2017-05-22 07:58:38 PDT
Comment on attachment 310869 [details] Patch Attachment 310869 [details] did not pass mac-wk2-ews (mac-wk2): Output: http://webkit-queues.webkit.org/results/3794436 Number of test failures exceeded the failure limit.
Build Bot
Comment 42 2017-05-22 07:58:40 PDT
Created attachment 310874 [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 43 2017-05-22 08:21:47 PDT
Comment on attachment 310869 [details] Patch Attachment 310869 [details] did not pass mac-ews (mac): Output: http://webkit-queues.webkit.org/results/3794511 Number of test failures exceeded the failure limit.
Build Bot
Comment 44 2017-05-22 08:21:48 PDT
Created attachment 310878 [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 45 2017-05-22 08:27:00 PDT
Comment on attachment 310869 [details] Patch Attachment 310869 [details] did not pass mac-debug-ews (mac): Output: http://webkit-queues.webkit.org/results/3794504 Number of test failures exceeded the failure limit.
Build Bot
Comment 46 2017-05-22 08:27:02 PDT
Created attachment 310880 [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 47 2017-05-22 08:45:00 PDT
Comment on attachment 310869 [details] Patch Attachment 310869 [details] did not pass ios-sim-ews (ios-simulator-wk2): Output: http://webkit-queues.webkit.org/results/3794488 New failing tests: fast/forms/input-text-paste-maxlength.html fast/forms/input-text-maxlength.html accessibility/ios-simulator/speak-selection-content.html fast/forms/textarea-maxlength.html editing/text-iterator/count-matches-in-form.html editing/text-iterator/find-string-on-flat-tree.html fast/forms/number/number-validity-badinput.html fast/forms/input-value-sanitization.html
Build Bot
Comment 48 2017-05-22 08:45:02 PDT
Created attachment 310881 [details] Archive of layout-test-results from ews125 for ios-simulator-wk2 The attached test failures were seen while running run-webkit-tests on the ios-sim-ews. Bot: ews125 Port: ios-simulator-wk2 Platform: Mac OS X 10.11.6
Emilio Cobos Álvarez
Comment 49 2017-05-22 13:44:29 PDT
Build Bot
Comment 50 2017-05-22 14:32:54 PDT
Comment on attachment 310911 [details] Patch Attachment 310911 [details] did not pass mac-wk2-ews (mac-wk2): Output: http://webkit-queues.webkit.org/results/3796056 New failing tests: imported/w3c/web-platform-tests/cssom/getComputedStyle-pseudo.html
Build Bot
Comment 51 2017-05-22 14:32:55 PDT
Created attachment 310921 [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
Build Bot
Comment 52 2017-05-22 14:47:41 PDT
Comment on attachment 310911 [details] Patch Attachment 310911 [details] did not pass mac-ews (mac): Output: http://webkit-queues.webkit.org/results/3796144 New failing tests: imported/w3c/web-platform-tests/cssom/getComputedStyle-pseudo.html
Build Bot
Comment 53 2017-05-22 14:47:43 PDT
Created attachment 310925 [details] Archive of layout-test-results from ews102 for mac-elcapitan The attached test failures were seen while running run-webkit-tests on the mac-ews. Bot: ews102 Port: mac-elcapitan Platform: Mac OS X 10.11.6
Build Bot
Comment 54 2017-05-22 15:00:22 PDT
Comment on attachment 310911 [details] Patch Attachment 310911 [details] did not pass mac-debug-ews (mac): Output: http://webkit-queues.webkit.org/results/3796129 New failing tests: imported/w3c/web-platform-tests/cssom/getComputedStyle-pseudo.html
Build Bot
Comment 55 2017-05-22 15:00:24 PDT
Created attachment 310928 [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 56 2017-05-22 15:15:26 PDT
Comment on attachment 310911 [details] Patch Attachment 310911 [details] did not pass ios-sim-ews (ios-simulator-wk2): Output: http://webkit-queues.webkit.org/results/3796169 New failing tests: imported/w3c/web-platform-tests/cssom/getComputedStyle-pseudo.html
Build Bot
Comment 57 2017-05-22 15:15:27 PDT
Created attachment 310933 [details] Archive of layout-test-results from ews126 for ios-simulator-wk2 The attached test failures were seen while running run-webkit-tests on the ios-sim-ews. Bot: ews126 Port: ios-simulator-wk2 Platform: Mac OS X 10.11.6
Emilio Cobos Álvarez
Comment 58 2017-05-22 16:35:25 PDT
(In reply to Build Bot from comment #57) > Created attachment 310933 [details] > Archive of layout-test-results from ews126 for ios-simulator-wk2 > > The attached test failures were seen while running run-webkit-tests on the > ios-sim-ews. > Bot: ews126 Port: ios-simulator-wk2 Platform: Mac OS X 10.11.6 Nothing like making your own patch turn red because of a test written by you :-) (https://github.com/w3c/web-platform-tests/pull/5830)
Emilio Cobos Álvarez
Comment 59 2017-05-22 16:36:37 PDT
Emilio Cobos Álvarez
Comment 60 2017-05-23 03:17:10 PDT
Comment on attachment 310953 [details] Patch Hi Antti, could I get this re-reviewed/relanded? This is the same patch as before, just rebased, and with some expectations updated for a newly imported test too.
WebKit Commit Bot
Comment 61 2017-05-23 06:34:49 PDT
Comment on attachment 310953 [details] Patch Clearing flags on attachment: 310953 Committed r217273: <http://trac.webkit.org/changeset/217273>
WebKit Commit Bot
Comment 62 2017-05-23 06:34:52 PDT
All reviewed patches have been landed. Closing bug.
Ryan Haddad
Comment 63 2017-05-23 10:32:18 PDT
(In reply to WebKit Commit Bot from comment #61) > Comment on attachment 310953 [details] > Patch > > Clearing flags on attachment: 310953 > > Committed r217273: <http://trac.webkit.org/changeset/217273> It seems that imported/w3c/web-platform-tests/innerText/getter.html is hitting a flaky assertion failure on macOS and iOS after this change: https://build.webkit.org/results/Apple%20El%20Capitan%20Debug%20WK2%20(Tests)/r217275%20(1295)/results.html
Emilio Cobos Álvarez
Comment 64 2017-05-23 10:45:19 PDT
(In reply to Ryan Haddad from comment #63) > (In reply to WebKit Commit Bot from comment #61) > > Comment on attachment 310953 [details] > > Patch > > > > Clearing flags on attachment: 310953 > > > > Committed r217273: <http://trac.webkit.org/changeset/217273> > > It seems that imported/w3c/web-platform-tests/innerText/getter.html is > hitting a flaky assertion failure on macOS and iOS after this change: > > https://build.webkit.org/results/ > Apple%20El%20Capitan%20Debug%20WK2%20(Tests)/r217275%20(1295)/results.html Ugh, so that's a |Text| instance being removed, and it seems to be failing the !renderer() assertion, which looks plausible. I'll try to look into it during the next few days, but I'd prefer not to revert this patch if it's not too much of a priority, because the patch just enables testing support for a feature that is conditionally enabled right now, and all these issues indicate that there are potentially a lot of other related bugs lying around I think.
Note You need to log in before you can comment on or make changes to this bug.