Bug 218004 - [iOS] Prevent presentation of input peripherals when focusing form controls with a validation message
Summary: [iOS] Prevent presentation of input peripherals when focusing form controls w...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Forms (show other bugs)
Version: Other
Hardware: iPhone / iPad Unspecified
: P2 Normal
Assignee: Aditya Keerthi
URL:
Keywords: InRadar
: 220593 (view as bug list)
Depends on:
Blocks:
 
Reported: 2020-10-20 16:48 PDT by Aditya Keerthi
Modified: 2021-01-20 11:39 PST (History)
10 users (show)

See Also:


Attachments
Patch (15.68 KB, patch)
2020-10-20 16:52 PDT, Aditya Keerthi
wenson_hsieh: review+
Details | Formatted Diff | Diff
Patch for landing (15.70 KB, patch)
2020-10-21 19:59 PDT, Aditya Keerthi
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Aditya Keerthi 2020-10-20 16:48:28 PDT
...
Comment 1 Aditya Keerthi 2020-10-20 16:48:50 PDT
<rdar://problem/70507678>
Comment 2 Aditya Keerthi 2020-10-20 16:52:01 PDT
Created attachment 411939 [details]
Patch
Comment 3 Wenson Hsieh 2020-10-21 15:02:33 PDT
Comment on attachment 411939 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=411939&action=review

> Source/WebCore/html/HTMLFormControlElement.cpp:537
> +    m_willShowValidationMessage = true;

Is it possible for this to be called twice in the same runloop? If so, we should consider making this a counter and incrementing/decrementing it instead (and then `HTMLFormControlElement::willShowValidationMessage` would return true if the count is nonzero).
Comment 4 Aditya Keerthi 2020-10-21 19:59:21 PDT
Created attachment 412063 [details]
Patch for landing
Comment 5 Aditya Keerthi 2020-10-21 20:02:46 PDT
(In reply to Wenson Hsieh from comment #3)
> Comment on attachment 411939 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=411939&action=review
> 
> > Source/WebCore/html/HTMLFormControlElement.cpp:537
> > +    m_willShowValidationMessage = true;
> 
> Is it possible for this to be called twice in the same runloop? If so, we
> should consider making this a counter and incrementing/decrementing it
> instead (and then `HTMLFormControlElement::willShowValidationMessage` would
> return true if the count is nonzero).

Discussed this offline. Since the flag only needs to be true around the call to focus(), I moved the reset outside of the asynchronous call to `updateVisibleValidationMessage`, and renamed the flag to m_isFocusingWithValidationMessage.
Comment 6 EWS 2020-10-22 08:55:59 PDT
Committed r268866: <https://trac.webkit.org/changeset/268866>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 412063 [details].
Comment 7 Simon Fraser (smfr) 2021-01-20 11:39:01 PST
*** Bug 220593 has been marked as a duplicate of this bug. ***