RESOLVED FIXED 190594
Enable the datalist element by default on iOS and macOS
https://bugs.webkit.org/show_bug.cgi?id=190594
Summary Enable the datalist element by default on iOS and macOS
Wenson Hsieh
Reported 2018-10-15 12:55:42 PDT
Attachments
Patch (41.12 KB, patch)
2018-10-16 13:01 PDT, Wenson Hsieh
no flags
Fix non-internal builds (44.16 KB, patch)
2018-10-16 14:10 PDT, Wenson Hsieh
no flags
Archive of layout-test-results from ews102 for mac-sierra (2.58 MB, application/zip)
2018-10-16 15:23 PDT, EWS Watchlist
no flags
Archive of layout-test-results from ews104 for mac-sierra-wk2 (2.87 MB, application/zip)
2018-10-16 16:24 PDT, EWS Watchlist
no flags
Archive of layout-test-results from ews204 for win-future (12.70 MB, application/zip)
2018-10-16 16:28 PDT, EWS Watchlist
no flags
Archive of layout-test-results from ews116 for mac-sierra (3.51 MB, application/zip)
2018-10-16 17:14 PDT, EWS Watchlist
no flags
Fix non-internal iOS build (85.84 KB, patch)
2018-10-16 17:20 PDT, Wenson Hsieh
no flags
Archive of layout-test-results from ews102 for mac-sierra (2.76 MB, application/zip)
2018-10-16 18:35 PDT, EWS Watchlist
no flags
Archive of layout-test-results from ews112 for mac-sierra (3.24 MB, application/zip)
2018-10-16 19:27 PDT, EWS Watchlist
no flags
Archive of layout-test-results from ews121 for ios-simulator-wk2 (2.48 MB, application/zip)
2018-10-16 19:29 PDT, EWS Watchlist
no flags
Archive of layout-test-results from ews206 for win-future (12.69 MB, application/zip)
2018-10-16 19:37 PDT, EWS Watchlist
no flags
Archive of layout-test-results from ews113 for mac-sierra (3.37 MB, application/zip)
2018-10-16 21:27 PDT, EWS Watchlist
no flags
Archive of layout-test-results from ews205 for win-future (12.71 MB, application/zip)
2018-10-16 21:38 PDT, EWS Watchlist
no flags
Archive of layout-test-results from ews124 for ios-simulator-wk2 (2.35 MB, application/zip)
2018-10-16 21:39 PDT, EWS Watchlist
no flags
Patch (744.20 KB, patch)
2018-10-17 08:24 PDT, Wenson Hsieh
no flags
Patch (772.61 KB, patch)
2018-10-17 12:54 PDT, Wenson Hsieh
no flags
Archive of layout-test-results from ews102 for mac-sierra (2.59 MB, application/zip)
2018-10-17 14:14 PDT, EWS Watchlist
no flags
Fix macOS WK1 tests (1.10 MB, patch)
2018-10-17 14:28 PDT, Wenson Hsieh
no flags
Fix double ChangeLog (1.10 MB, patch)
2018-10-17 14:32 PDT, Wenson Hsieh
rniwa: review+
Patch for EWS (1.10 MB, patch)
2018-10-17 19:14 PDT, Wenson Hsieh
no flags
Wenson Hsieh
Comment 1 2018-10-16 13:01:17 PDT
Wenson Hsieh
Comment 2 2018-10-16 14:10:10 PDT
Created attachment 352502 [details] Fix non-internal builds
EWS Watchlist
Comment 3 2018-10-16 15:23:57 PDT Comment hidden (obsolete)
EWS Watchlist
Comment 4 2018-10-16 15:23:59 PDT Comment hidden (obsolete)
EWS Watchlist
Comment 5 2018-10-16 16:24:32 PDT Comment hidden (obsolete)
EWS Watchlist
Comment 6 2018-10-16 16:24:34 PDT Comment hidden (obsolete)
EWS Watchlist
Comment 7 2018-10-16 16:28:07 PDT Comment hidden (obsolete)
EWS Watchlist
Comment 8 2018-10-16 16:28:18 PDT Comment hidden (obsolete)
EWS Watchlist
Comment 9 2018-10-16 17:14:56 PDT Comment hidden (obsolete)
EWS Watchlist
Comment 10 2018-10-16 17:14:58 PDT Comment hidden (obsolete)
Wenson Hsieh
Comment 11 2018-10-16 17:20:32 PDT
Created attachment 352523 [details] Fix non-internal iOS build
EWS Watchlist
Comment 12 2018-10-16 18:35:35 PDT Comment hidden (obsolete)
EWS Watchlist
Comment 13 2018-10-16 18:35:37 PDT Comment hidden (obsolete)
Wenson Hsieh
Comment 14 2018-10-16 19:04:08 PDT
(In reply to Build Bot from comment #12) > Comment on attachment 352523 [details] > Fix non-internal iOS build > > Attachment 352523 [details] did not pass mac-ews (mac): > Output: https://webkit-queues.webkit.org/results/9629442 > > New failing tests: > imported/w3c/web-platform-tests/html/semantics/forms/textfieldselection/ > selection-not-application.html > fast/dom/Window/window-lookup-precedence.html > imported/w3c/web-platform-tests/html/semantics/forms/the-input-element/ > valueMode.html > imported/w3c/web-platform-tests/dom/nodes/Node-cloneNode.html > imported/w3c/web-platform-tests/html/semantics/selectors/pseudo-classes/ > readwrite-readonly.html > imported/w3c/web-platform-tests/shadow-dom/input-element-list.html > imported/w3c/web-platform-tests/html/semantics/forms/constraints/form- > validation-willValidate.html > accessibility/roles-exposed.html > imported/w3c/web-platform-tests/html/semantics/forms/the-input-element/type- > change-state.html > fast/selectors/read-only-read-write-input-basics.html > imported/w3c/web-platform-tests/html/semantics/forms/the-input-element/ > selection.html > imported/w3c/web-platform-tests/custom-elements/builtin-coverage.html > imported/w3c/web-platform-tests/html/semantics/forms/constraints/form- > validation-validity-badInput.html > imported/w3c/web-platform-tests/html/dom/reflection-forms.html We're going to need to rebaseline tests for input type color as well, since input type color is currently enabled in WebKitLegacy (where it shouldn't be).
EWS Watchlist
Comment 15 2018-10-16 19:27:11 PDT Comment hidden (obsolete)
EWS Watchlist
Comment 16 2018-10-16 19:27:13 PDT Comment hidden (obsolete)
EWS Watchlist
Comment 17 2018-10-16 19:29:42 PDT Comment hidden (obsolete)
EWS Watchlist
Comment 18 2018-10-16 19:29:43 PDT Comment hidden (obsolete)
EWS Watchlist
Comment 19 2018-10-16 19:37:21 PDT Comment hidden (obsolete)
EWS Watchlist
Comment 20 2018-10-16 19:37:32 PDT Comment hidden (obsolete)
EWS Watchlist
Comment 21 2018-10-16 21:27:42 PDT Comment hidden (obsolete)
EWS Watchlist
Comment 22 2018-10-16 21:27:44 PDT Comment hidden (obsolete)
EWS Watchlist
Comment 23 2018-10-16 21:38:14 PDT Comment hidden (obsolete)
EWS Watchlist
Comment 24 2018-10-16 21:38:26 PDT Comment hidden (obsolete)
EWS Watchlist
Comment 25 2018-10-16 21:39:44 PDT Comment hidden (obsolete)
EWS Watchlist
Comment 26 2018-10-16 21:39:46 PDT Comment hidden (obsolete)
Wenson Hsieh
Comment 27 2018-10-17 08:24:22 PDT
Wenson Hsieh
Comment 28 2018-10-17 10:43:19 PDT
Comment on attachment 352567 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=352567&action=review > LayoutTests/fast/borders/empty-outline-border-assert-expected.txt:1 > +PASS if no ASSERT in debug. This is actually a bad rebaseline! What's happening here is that since ENABLE(DATALIST_ELEMENT) is now on by default, the UA stylesheet now contains `datalist { display: none; }`. However, this rule doesn't respect the runtime-enabled feature flag, so everything under a datalist element is hidden, regardless of whether there is support for HTMLDataListElement. This completely breaks fallback content inside datalists, in the case where the build flag is on but the runtime-enabled feature is off (i.e. legacy WebKit on macOS and iOS). The "aaaa…aaa" in this test should still be present in legacy WebKit. > LayoutTests/imported/w3c/web-platform-tests/html/dom/documents/dom-tree-accessors/document.getElementsByName/document.getElementsByName-newelements-expected.txt:30 > + This is also an incorrect result in legacy WebKit, for the same reason (see empty-outline-border-assert-expected.txt). > LayoutTests/imported/w3c/web-platform-tests/html/dom/documents/dom-tree-accessors/document.getElementsByName/document.getElementsByName-newelements-xhtml-expected.txt:-4 > - Ditto.
Wenson Hsieh
Comment 29 2018-10-17 12:54:47 PDT
EWS Watchlist
Comment 30 2018-10-17 14:14:57 PDT Comment hidden (obsolete)
EWS Watchlist
Comment 31 2018-10-17 14:14:59 PDT Comment hidden (obsolete)
Wenson Hsieh
Comment 32 2018-10-17 14:28:33 PDT
Created attachment 352641 [details] Fix macOS WK1 tests
Wenson Hsieh
Comment 33 2018-10-17 14:32:38 PDT
Created attachment 352643 [details] Fix double ChangeLog
Ryosuke Niwa
Comment 34 2018-10-17 14:39:22 PDT
Comment on attachment 352643 [details] Fix double ChangeLog View in context: https://bugs.webkit.org/attachment.cgi?id=352643&action=review > Source/WebCore/rendering/RenderTheme.h:104 > +#if ENABLE(DATALIST_ELEMENT) > + virtual String dataListStyleSheet() const { return { }; } > +#endif > +#if ENABLE(INPUT_TYPE_COLOR) > + virtual String colorInputStyleSheet() const { return { }; } > +#endif This would break non-Apple ports. I don't think we should do that. Either make Mac one the default style, or do a pre-processor in html.css which special-cases iOS code. > Source/WebCore/rendering/RenderThemeIOS.mm:1356 > + ASSERT(RuntimeEnabledFeatures::sharedFeatures().inputTypeColorEnabled()); > + return "input[type=\"color\"] { width: 44px; height: 23px; outline: none; }"_s; Do we really need to do this in .mm files? Can't we just use the pre-processor in html.css?
Wenson Hsieh
Comment 35 2018-10-17 14:48:03 PDT
(In reply to Ryosuke Niwa from comment #34) > Comment on attachment 352643 [details] > Fix double ChangeLog > > View in context: > https://bugs.webkit.org/attachment.cgi?id=352643&action=review > > > Source/WebCore/rendering/RenderTheme.h:104 > > +#if ENABLE(DATALIST_ELEMENT) > > + virtual String dataListStyleSheet() const { return { }; } > > +#endif > > +#if ENABLE(INPUT_TYPE_COLOR) > > + virtual String colorInputStyleSheet() const { return { }; } > > +#endif > > This would break non-Apple ports. I don't think we should do that. > Either make Mac one the default style, or do a pre-processor in html.css > which special-cases iOS code. Sounds good — we can put this in a platform-agnostic file (RenderTheme.cpp). I'm not so sure we can put this in html.css with preprocessor checks though (refer to my other comment below). > > > Source/WebCore/rendering/RenderThemeIOS.mm:1356 > > + ASSERT(RuntimeEnabledFeatures::sharedFeatures().inputTypeColorEnabled()); > > + return "input[type=\"color\"] { width: 44px; height: 23px; outline: none; }"_s; > > Do we really need to do this in .mm files? > Can't we just use the pre-processor in html.css? I'm not sure how this would work, since whether we should include these UA styles depends on runtime-enabled features (rather than just a build-time flag).
Wenson Hsieh
Comment 36 2018-10-17 19:14:32 PDT
Created attachment 352674 [details] Patch for EWS
WebKit Commit Bot
Comment 37 2018-10-17 20:48:24 PDT
Comment on attachment 352674 [details] Patch for EWS Clearing flags on attachment: 352674 Committed r237245: <https://trac.webkit.org/changeset/237245>
Note You need to log in before you can comment on or make changes to this bug.