RESOLVED FIXED 193565
iOS: Updating input mode should update the software keyboard
https://bugs.webkit.org/show_bug.cgi?id=193565
Summary iOS: Updating input mode should update the software keyboard
Ryosuke Niwa
Reported 2019-01-17 22:40:43 PST
When inputmode content attribute is set on a focused assisted element, we should update the software keyboard's type.
Attachments
WIP (13.11 KB, patch)
2019-01-17 22:43 PST, Ryosuke Niwa
no flags
Fixes the bug (21.05 KB, patch)
2019-01-18 20:26 PST, Ryosuke Niwa
no flags
Patch for landing (21.04 KB, patch)
2019-01-18 20:40 PST, Ryosuke Niwa
no flags
Radar WebKit Bug Importer
Comment 1 2019-01-17 22:41:28 PST
Ryosuke Niwa
Comment 2 2019-01-17 22:43:25 PST
EWS Watchlist
Comment 3 2019-01-17 22:45:33 PST
Attachment 359452 [details] did not pass style-queue: ERROR: Source/WebCore/page/ChromeClient.h:297: Inline functions should not be in classes annotated with WEBCORE_EXPORT. Remove the macro from the class and apply it to each appropriate method, or move the inline function definition out-of-line. [build/webcore_export] [4] Total errors found: 1 in 16 files If any of these errors are false positives, please file a bug against check-webkit-style.
Megan Gardner
Comment 4 2019-01-18 07:14:09 PST
Comment on attachment 359452 [details] WIP Log files? Not sure what you should do about ChromeClient.h now being compliant. Everything else looks good.
Wenson Hsieh
Comment 5 2019-01-18 08:07:20 PST
Comment on attachment 359452 [details] WIP View in context: https://bugs.webkit.org/attachment.cgi?id=359452&action=review This patch is only a WIP, as it wasn't marked for review and it's also still missing ChangeLog entries and tests. That being said, the codechange itself also looks good to me. > Source/WebCore/html/HTMLElement.cpp:457 > + document.page()->chrome().client().focusedElementDidChangeInputMode(*this, canonicalInputMode()); Does something guarantee that page is non-null here? > Source/WebKit/Scripts/webkit/messages.py:410 > + 'WebCore::InputMode': ['<WebCore/InputMode.h>'], A little surprising that this is needed! I thought the code generator would (by default) try to include <WebCore/InputMode.h> based on the type of the IPC argument, but maybe this isn't the case for enum class types.
Ryosuke Niwa
Comment 6 2019-01-18 20:26:44 PST
Created attachment 359582 [details] Fixes the bug
EWS Watchlist
Comment 7 2019-01-18 20:29:39 PST
Attachment 359582 [details] did not pass style-queue: ERROR: Source/WebCore/page/ChromeClient.h:297: Inline functions should not be in classes annotated with WEBCORE_EXPORT. Remove the macro from the class and apply it to each appropriate method, or move the inline function definition out-of-line. [build/webcore_export] [4] Total errors found: 1 in 21 files If any of these errors are false positives, please file a bug against check-webkit-style.
Wenson Hsieh
Comment 8 2019-01-18 20:39:10 PST
Comment on attachment 359582 [details] Fixes the bug View in context: https://bugs.webkit.org/attachment.cgi?id=359582&action=review > Source/WebKit/WebProcess/WebPage/WebPage.cpp:5382 > + UNUSED_PARAM(element); Extra UNUSED_PARAM(element); here.
Ryosuke Niwa
Comment 9 2019-01-18 20:40:17 PST
Created attachment 359583 [details] Patch for landing
Ryosuke Niwa
Comment 10 2019-01-18 20:40:32 PST
Comment on attachment 359583 [details] Patch for landing Wait for EWS.
EWS Watchlist
Comment 11 2019-01-18 20:43:01 PST
Attachment 359583 [details] did not pass style-queue: ERROR: Source/WebCore/page/ChromeClient.h:297: Inline functions should not be in classes annotated with WEBCORE_EXPORT. Remove the macro from the class and apply it to each appropriate method, or move the inline function definition out-of-line. [build/webcore_export] [4] Total errors found: 1 in 21 files If any of these errors are false positives, please file a bug against check-webkit-style.
Ryosuke Niwa
Comment 12 2019-01-18 23:53:15 PST
Comment on attachment 359583 [details] Patch for landing Clearing flags on attachment: 359583 Committed r240199: <https://trac.webkit.org/changeset/240199>
Ryosuke Niwa
Comment 13 2019-01-18 23:53:17 PST
All reviewed patches have been landed. Closing bug.
David Kilzer (:ddkilzer)
Comment 14 2019-01-19 09:20:55 PST
(In reply to Ryosuke Niwa from comment #12) > Comment on attachment 359583 [details] > Patch for landing > > Clearing flags on attachment: 359583 > > Committed r240199: <https://trac.webkit.org/changeset/240199> This broken all iOS Debug builds: /Volumes/Data/slave/ios-simulator-12-debug/build/Source/WebKit/WebProcess/WebPage/WebPage.cpp:5368:20: error: no member named 'canonicalInputMode' in 'WebCore::Element' ASSERT(element.canonicalInputMode() == mode); ~~~~~~~ ^ The `element` variable needs to be `downcast<HTMLElement>(element)` here, and should probably add an `is<HTMLElement>(element)` check as well. Testing a fix now.
David Kilzer (:ddkilzer)
Comment 15 2019-01-19 09:39:35 PST
(In reply to David Kilzer (:ddkilzer) from comment #14) > (In reply to Ryosuke Niwa from comment #12) > > Comment on attachment 359583 [details] > > Patch for landing > > > > Clearing flags on attachment: 359583 > > > > Committed r240199: <https://trac.webkit.org/changeset/240199> > > This broken all iOS Debug builds: > > /Volumes/Data/slave/ios-simulator-12-debug/build/Source/WebKit/WebProcess/ > WebPage/WebPage.cpp:5368:20: error: no member named 'canonicalInputMode' in > 'WebCore::Element' > ASSERT(element.canonicalInputMode() == mode); > ~~~~~~~ ^ > > The `element` variable needs to be `downcast<HTMLElement>(element)` here, > and should probably add an `is<HTMLElement>(element)` check as well. > > Testing a fix now. Should be fixed by: Committed r240203: <https://trac.webkit.org/changeset/240203>
Wenson Hsieh
Comment 16 2019-01-19 13:42:23 PST
Thanks, Dave!
Note You need to log in before you can comment on or make changes to this bug.