Changeset 269528 in webkit


Ignore:
Timestamp:
Nov 6, 2020 12:17:03 PM (21 months ago)
Author:
commit-queue@webkit.org
Message:

Text gets clobbered when assigning to input.defaultValue
https://bugs.webkit.org/show_bug.cgi?id=217156

Patch by Joey Arhar <jarhar@chromium.org> on 2020-11-06
Reviewed by Darin Adler.

This fixes a bug where script assigning to the defaultValue property
of a number or email input causes the text the user entered into the
input to be clobbered when it doesn't perfectly match the sanitized
string returned by the .value property.

Test: LayoutTests/fast/forms/defaultValue-clobbering.html

  • html/HTMLInputElement.cpp:

(WebCore::HTMLInputElement::parseAttribute):

Location:
trunk
Files:
2 added
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r269527 r269528  
     12020-11-06  Joey Arhar  <jarhar@chromium.org>
     2
     3        Text gets clobbered when assigning to input.defaultValue
     4        https://bugs.webkit.org/show_bug.cgi?id=217156
     5
     6        Reviewed by Darin Adler.
     7
     8        This fixes a bug where script assigning to the defaultValue property
     9        of a number or email input causes the text the user entered into the
     10        input to be clobbered when it doesn't perfectly match the sanitized
     11        string returned by the .value property.
     12
     13        Test: LayoutTests/fast/forms/defaultValue-clobbering.html
     14
     15        * html/HTMLInputElement.cpp:
     16        (WebCore::HTMLInputElement::parseAttribute):
     17
    1182020-11-06  Antoine Quint  <graouts@webkit.org>
    219
  • trunk/Source/WebCore/html/HTMLInputElement.cpp

    r267131 r269528  
    765765            updatePlaceholderVisibility();
    766766            invalidateStyleForSubtree();
     767            setFormControlValueMatchesRenderer(false);
    767768        }
    768         setFormControlValueMatchesRenderer(false);
    769769        updateValidity();
    770770        m_valueAttributeWasUpdatedAfterParsing = !m_parsingInProgress;
Note: See TracChangeset for help on using the changeset viewer.