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

Changeset 243647 in webkit


Ignore:
Timestamp:
Mar 29, 2019, 9:11:02 AM (7 years ago)
Author:
Michael Catanzaro
Message:

HTMLInputElement::setEditingValue should not fail if renderer doesn't exist
https://bugs.webkit.org/show_bug.cgi?id=195708

Reviewed by Wenson Hsieh.

Source/WebCore:

HTMLInputElement::setEditingValue currently returns early if the element's renderer() is
null. This is causing the Epiphany password manager to fail to remember passwords on
https://www.geico.com/ except for navigations through page cache.

This check was originally added to avoid some assertion, but I don't know which one, and
there's definitely not any assertion hit nowadays in this case. Probably there are more
guards checking if renderer() is null elsewhere in the code nowadays, closer to where it's
really needed.

Test: fast/forms/editing-value-null-renderer.html

  • html/HTMLInputElement.cpp:

(WebCore::HTMLInputElement::setEditingValue):

LayoutTests:

This is a copy of fast/forms/editing-value.html, except the form is not displayed. The input
value should still change.

  • fast/forms/editing-value-null-renderer-expected.txt: Added.
  • fast/forms/editing-value-null-renderer.html: Added.
Location:
trunk
Files:
2 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r243645 r243647  
     12019-03-29  Michael Catanzaro  <mcatanzaro@igalia.com>
     2
     3        HTMLInputElement::setEditingValue should not fail if renderer doesn't exist
     4        https://bugs.webkit.org/show_bug.cgi?id=195708
     5
     6        Reviewed by Wenson Hsieh.
     7
     8        This is a copy of fast/forms/editing-value.html, except the form is not displayed. The input
     9        value should still change.
     10
     11        * fast/forms/editing-value-null-renderer-expected.txt: Added.
     12        * fast/forms/editing-value-null-renderer.html: Added.
     13
    1142019-03-28  Antoine Quint  <graouts@apple.com>
    215
  • trunk/Source/WebCore/ChangeLog

    r243646 r243647  
     12019-03-29  Michael Catanzaro  <mcatanzaro@igalia.com>
     2
     3        HTMLInputElement::setEditingValue should not fail if renderer doesn't exist
     4        https://bugs.webkit.org/show_bug.cgi?id=195708
     5
     6        Reviewed by Wenson Hsieh.
     7
     8        HTMLInputElement::setEditingValue currently returns early if the element's renderer() is
     9        null. This is causing the Epiphany password manager to fail to remember passwords on
     10        https://www.geico.com/ except for navigations through page cache.
     11
     12        This check was originally added to avoid some assertion, but I don't know which one, and
     13        there's definitely not any assertion hit nowadays in this case. Probably there are more
     14        guards checking if renderer() is null elsewhere in the code nowadays, closer to where it's
     15        really needed.
     16
     17        Test: fast/forms/editing-value-null-renderer.html
     18
     19        * html/HTMLInputElement.cpp:
     20        (WebCore::HTMLInputElement::setEditingValue):
     21
    1222019-03-29  Chris Dumez  <cdumez@apple.com>
    223
  • trunk/Source/WebCore/html/HTMLInputElement.cpp

    r242518 r243647  
    10371037void HTMLInputElement::setEditingValue(const String& value)
    10381038{
    1039     if (!renderer() || !isTextField())
     1039    if (!isTextField())
    10401040        return;
     1041
    10411042    setInnerTextValue(value);
    10421043    subtreeHasChanged();
Note: See TracChangeset for help on using the changeset viewer.