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

Changeset 285982 in webkit


Ignore:
Timestamp:
Nov 17, 2021, 10:26:50 PM (5 years ago)
Author:
commit-queue@webkit.org
Message:

When an "autofilled and viewable" field becomes empty, turn "autofilled and viewable" off
https://bugs.webkit.org/show_bug.cgi?id=233239

Patch by Ricky Mondello <Ricky Mondello> on 2021-11-17
Reviewed by Darin Adler.

Source/WebCore:

Test: fast/forms/input-autofilled-and-viewable.html

  • html/HTMLInputElement.cpp:

(WebCore::HTMLInputElement::setValueFromRenderer): Implement the fix.

  • testing/Internals.cpp:

(WebCore::Internals::setValueFromRenderer): Added.

  • testing/Internals.h: Declare a member function.

LayoutTests:

  • fast/forms/input-autofilled-and-viewable-expected.txt: Added.
  • fast/forms/input-autofilled-and-viewable.html: Added.
Location:
trunk
Files:
2 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r285967 r285982  
     12021-11-17  Ricky Mondello  <rmondello@apple.com>
     2
     3        When an "autofilled and viewable" field becomes empty, turn "autofilled and viewable" off
     4        https://bugs.webkit.org/show_bug.cgi?id=233239
     5
     6        Reviewed by Darin Adler.
     7
     8        * fast/forms/input-autofilled-and-viewable-expected.txt: Added.
     9        * fast/forms/input-autofilled-and-viewable.html: Added.
     10
    1112021-11-17  John Wilander  <wilander@apple.com>
    212
  • trunk/Source/WebCore/ChangeLog

    r285980 r285982  
     12021-11-17  Ricky Mondello  <rmondello@apple.com>
     2
     3        When an "autofilled and viewable" field becomes empty, turn "autofilled and viewable" off
     4        https://bugs.webkit.org/show_bug.cgi?id=233239
     5
     6        Reviewed by Darin Adler.
     7
     8        Test: fast/forms/input-autofilled-and-viewable.html
     9
     10        * html/HTMLInputElement.cpp:
     11        (WebCore::HTMLInputElement::setValueFromRenderer): Implement the fix.
     12        * testing/Internals.cpp:
     13        (WebCore::Internals::setValueFromRenderer): Added.
     14        * testing/Internals.h: Declare a member function.
     15
    1162021-11-17  Alex Christensen  <achristensen@webkit.org>
    217
  • trunk/Source/WebCore/html/HTMLInputElement.cpp

    r285654 r285982  
    11601160    updateValidity();
    11611161
    1162     // Clear auto fill flag (and yellow background) on user edit.
     1162    // We clear certain AutoFill flags here because this catches user edits.
    11631163    setAutoFilled(false);
     1164    if (m_isAutoFilledAndViewable && value.isEmpty())
     1165        setAutoFilledAndViewable(false);
    11641166}
    11651167
Note: See TracChangeset for help on using the changeset viewer.