Bug 196402 - Get rid of HTMLInputElement::setEditingValue
Summary: Get rid of HTMLInputElement::setEditingValue
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Forms (show other bugs)
Version: WebKit Nightly Build
Hardware: PC Linux
: P2 Normal
Assignee: Michael Catanzaro
URL:
Keywords: InRadar
: 196417 (view as bug list)
Depends on:
Blocks:
 
Reported: 2019-03-29 11:54 PDT by Michael Catanzaro
Modified: 2019-04-03 09:47 PDT (History)
8 users (show)

See Also:


Attachments
Patch (17.74 KB, patch)
2019-03-29 12:03 PDT, Michael Catanzaro
no flags Details | Formatted Diff | Diff
Patch (19.10 KB, patch)
2019-03-29 17:40 PDT, Michael Catanzaro
darin: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Catanzaro 2019-03-29 11:54:26 PDT
HTMLInputElement::setEditingValue is only used for Epiphany password autofill. We did it this way because that's what Chrome uses for autofill, but Apple uses HTMLInputElement::setValueForUser. Let's switch to that instead, then we can get rid of setEditingValue.

This fixes logging into ting.com after username and password are autofilled by Epiphany. Before this change, the login would fail unless you first manually edit either the username or the password field.
Comment 1 Michael Catanzaro 2019-03-29 12:03:44 PDT
Created attachment 366291 [details]
Patch
Comment 2 Michael Catanzaro 2019-03-29 17:40:22 PDT
Created attachment 366334 [details]
Patch
Comment 3 Michael Catanzaro 2019-04-01 10:06:23 PDT
Thanks for the review.

I'll wait for Carlos to approve the GLib API changes before committing.
Comment 4 Carlos Garcia Campos 2019-04-01 22:39:06 PDT
Comment on attachment 366334 [details]
Patch

I don't understand why we have to add new function and deprecate the old one, we could simply change the existing function to use setValueForUser and applications won't have to do anything.
Comment 5 Michael Catanzaro 2019-04-02 06:01:40 PDT
(In reply to Carlos Garcia Campos from comment #4)
> I don't understand why we have to add new function and deprecate the old
> one, we could simply change the existing function to use setValueForUser and
> applications won't have to do anything.

Of course we don't have to. It's totally optional. Exposing set_value_for_user() is really just a nicer name. If you don't want it, I'll remove it and not deprecate anything.

Applications don't have to do anything either way, because I did change the existing function to use setValueForUser. (But to avoid the deprecation warning they would need to change to the new name, of course.)
Comment 6 Carlos Garcia Campos 2019-04-03 00:57:11 PDT
(In reply to Michael Catanzaro from comment #5)
> (In reply to Carlos Garcia Campos from comment #4)
> > I don't understand why we have to add new function and deprecate the old
> > one, we could simply change the existing function to use setValueForUser and
> > applications won't have to do anything.
> 
> Of course we don't have to. It's totally optional. Exposing
> set_value_for_user() is really just a nicer name. If you don't want it, I'll
> remove it and not deprecate anything.
> 
> Applications don't have to do anything either way, because I did change the
> existing function to use setValueForUser. (But to avoid the deprecation
> warning they would need to change to the new name, of course.)

I think it's easier to avoid the new method.
Comment 7 Michael Catanzaro 2019-04-03 08:01:40 PDT
*** Bug 196417 has been marked as a duplicate of this bug. ***
Comment 8 Michael Catanzaro 2019-04-03 09:42:51 PDT
Landed https://trac.webkit.org/changeset/243804/webkit
Comment 9 Radar WebKit Bug Importer 2019-04-03 09:47:58 PDT
<rdar://problem/49561363>