⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 243992 in webkit


Ignore:
Timestamp:
Apr 8, 2019, 3:23:39 AM (7 years ago)
Author:
Carlos Garcia Campos
Message:

Merge r243804 - Get rid of HTMLInputElement::setEditingValue
https://bugs.webkit.org/show_bug.cgi?id=196402

Reviewed by Darin Adler.

Source/WebCore:

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.

  • html/HTMLInputElement.cpp:

(WebCore::HTMLInputElement::setEditingValue): Deleted.

  • html/HTMLInputElement.h:
  • testing/Internals.cpp:

(WebCore::Internals::setEditingValue): Deleted.

  • testing/Internals.h:
  • testing/Internals.idl:

Source/WebKit:

  • WebProcess/InjectedBundle/API/glib/DOM/WebKitDOMElement.cpp:

(webkit_dom_element_html_input_element_set_editing_value):

  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLInputElement.cpp:

(webkit_dom_html_input_element_set_editing_value):

LayoutTests:

  • fast/forms/editing-value-expected.txt: Removed.
  • fast/forms/editing-value-null-renderer-expected.txt: Removed.
  • fast/forms/editing-value-null-renderer.html: Removed.
  • fast/forms/editing-value.html: Removed.
Location:
releases/WebKitGTK/webkit-2.24
Files:
2 deleted
10 edited

Legend:

Unmodified
Added
Removed
  • releases/WebKitGTK/webkit-2.24/LayoutTests/ChangeLog

    r243990 r243992  
     12019-04-03  Michael Catanzaro  <mcatanzaro@igalia.com>
     2
     3        Get rid of HTMLInputElement::setEditingValue
     4        https://bugs.webkit.org/show_bug.cgi?id=196402
     5
     6        Reviewed by Darin Adler.
     7
     8        * fast/forms/editing-value-expected.txt: Removed.
     9        * fast/forms/editing-value-null-renderer-expected.txt: Removed.
     10        * fast/forms/editing-value-null-renderer.html: Removed.
     11        * fast/forms/editing-value.html: Removed.
     12
    1132019-03-28  Carlos Garcia Campos  <cgarcia@igalia.com>
    214
  • releases/WebKitGTK/webkit-2.24/Source/WebCore/ChangeLog

    r243990 r243992  
     12019-04-03  Michael Catanzaro  <mcatanzaro@igalia.com>
     2
     3        Get rid of HTMLInputElement::setEditingValue
     4        https://bugs.webkit.org/show_bug.cgi?id=196402
     5
     6        Reviewed by Darin Adler.
     7
     8        HTMLInputElement::setEditingValue is only used for Epiphany password autofill. We did it
     9        this way because that's what Chrome uses for autofill, but Apple uses
     10        HTMLInputElement::setValueForUser. Let's switch to that instead, then we can get rid of
     11        setEditingValue.
     12
     13        This fixes logging into ting.com after username and password are autofilled by Epiphany.
     14        Before this change, the login would fail unless you first manually edit either the username
     15        or the password field.
     16
     17        * html/HTMLInputElement.cpp:
     18        (WebCore::HTMLInputElement::setEditingValue): Deleted.
     19        * html/HTMLInputElement.h:
     20        * testing/Internals.cpp:
     21        (WebCore::Internals::setEditingValue): Deleted.
     22        * testing/Internals.h:
     23        * testing/Internals.idl:
     24
    1252019-03-28  Carlos Garcia Campos  <cgarcia@igalia.com>
    226
  • releases/WebKitGTK/webkit-2.24/Source/WebCore/html/HTMLInputElement.cpp

    r240926 r243992  
    10311031}
    10321032
    1033 void HTMLInputElement::setEditingValue(const String& value)
    1034 {
    1035     if (!renderer() || !isTextField())
    1036         return;
    1037     setInnerTextValue(value);
    1038     subtreeHasChanged();
    1039 
    1040     unsigned max = value.length();
    1041     if (focused())
    1042         setSelectionRange(max, max);
    1043     else
    1044         cacheSelectionInResponseToSetValue(max);
    1045 
    1046     dispatchInputEvent();
    1047 }
    1048 
    10491033ExceptionOr<void> HTMLInputElement::setValue(const String& value, TextFieldEventBehavior eventBehavior)
    10501034{
  • releases/WebKitGTK/webkit-2.24/Source/WebCore/html/HTMLInputElement.h

    r240452 r243992  
    186186    String visibleValue() const;
    187187
    188     WEBCORE_EXPORT void setEditingValue(const String&);
    189 
    190188    WEBCORE_EXPORT double valueAsDate() const;
    191189    WEBCORE_EXPORT ExceptionOr<void> setValueAsDate(double);
  • releases/WebKitGTK/webkit-2.24/Source/WebCore/testing/Internals.cpp

    r242461 r243992  
    18241824}
    18251825
    1826 void Internals::setEditingValue(HTMLInputElement& element, const String& value)
    1827 {
    1828     element.setEditingValue(value);
    1829 }
    1830 
    18311826void Internals::setAutofilled(HTMLInputElement& element, bool enabled)
    18321827{
  • releases/WebKitGTK/webkit-2.24/Source/WebCore/testing/Internals.h

    r242454 r243992  
    257257    ExceptionOr<bool> wasLastChangeUserEdit(Element& textField);
    258258    bool elementShouldAutoComplete(HTMLInputElement&);
    259     void setEditingValue(HTMLInputElement&, const String&);
    260259    void setAutofilled(HTMLInputElement&, bool enabled);
    261260    enum class AutoFillButtonType { None, Contacts, Credentials, StrongPassword, CreditCard };
  • releases/WebKitGTK/webkit-2.24/Source/WebCore/testing/Internals.idl

    r242454 r243992  
    276276    [MayThrowException] boolean wasLastChangeUserEdit(Element textField);
    277277    boolean elementShouldAutoComplete(HTMLInputElement inputElement);
    278     void setEditingValue(HTMLInputElement inputElement, DOMString value);
    279278    void setAutofilled(HTMLInputElement inputElement, boolean enabled);
    280279    void setShowAutoFillButton(HTMLInputElement inputElement, AutoFillButtonType autoFillButtonType);
  • releases/WebKitGTK/webkit-2.24/Source/WebKit/ChangeLog

    r243991 r243992  
     12019-04-03  Michael Catanzaro  <mcatanzaro@igalia.com>
     2
     3        Get rid of HTMLInputElement::setEditingValue
     4        https://bugs.webkit.org/show_bug.cgi?id=196402
     5
     6        Reviewed by Darin Adler.
     7
     8        * WebProcess/InjectedBundle/API/glib/DOM/WebKitDOMElement.cpp:
     9        (webkit_dom_element_html_input_element_set_editing_value):
     10        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLInputElement.cpp:
     11        (webkit_dom_html_input_element_set_editing_value):
     12
    1132019-04-03  Carlos Garcia Campos  <cgarcia@igalia.com>
    214
  • releases/WebKitGTK/webkit-2.24/Source/WebKit/WebProcess/InjectedBundle/API/glib/DOM/WebKitDOMElement.cpp

    r229973 r243992  
    149149 * @value: the text to set
    150150 *
    151  * Set editing value of an HTML input element. If @element is not an HTML input element this function does nothing.
     151 * Set the value of an HTML input element as if it had been edited by
     152 * the user, triggering a change event. If @element is not an HTML input
     153 * element this function does nothing.
    152154 *
    153155 * Since: 2.22
     
    161163        return;
    162164
    163     downcast<WebCore::HTMLInputElement>(*node).setEditingValue(String::fromUTF8(value));
     165    downcast<WebCore::HTMLInputElement>(*node).setValueForUser(String::fromUTF8(value));
    164166}
  • releases/WebKitGTK/webkit-2.24/Source/WebKit/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLInputElement.cpp

    r234586 r243992  
    10081008  g_return_if_fail(value);
    10091009
    1010   WebKit::core(self)->setEditingValue(WTF::String::fromUTF8(value));
     1010  WebKit::core(self)->setValueForUser(WTF::String::fromUTF8(value));
    10111011}
    10121012G_GNUC_END_IGNORE_DEPRECATIONS;
Note: See TracChangeset for help on using the changeset viewer.