Changeset 238545 in webkit


Ignore:
Timestamp:
Nov 26, 2018 8:17:11 PM (5 years ago)
Author:
dbates@webkit.org
Message:

REGRESSION (r238078): Do not draw caps lock indicator when Strong Password button is shown
https://bugs.webkit.org/show_bug.cgi?id=191969
<rdar://problem/46247569>

Reviewed by Dean Jackson.

Source/WebCore:

Following r238078 we now support drawing the caps lock indicator in password fields on iOS.
However it is not meaningful to show the caps lock indicator when the Strong Password button
is visible because the password field is not editable. We should not paint the caps lock
indicator when the Strong Password button is visible.

Tests: fast/forms/auto-fill-button/caps-lock-indicator-should-be-visible-after-hiding-auto-fill-strong-password-button.html

fast/forms/auto-fill-button/caps-lock-indicator-should-not-be-visible-when-auto-fill-strong-password-button-is-visible.html

  • html/TextFieldInputType.cpp:

(WebCore::TextFieldInputType::shouldDrawCapsLockIndicator const): Do not draw the caps
lock indicator when the password field has the Strong Password button.
(WebCore::TextFieldInputType::updateAutoFillButton): Call capsLockStateMayHaveChanged() to
update the visibility of the caps lock indicator when the auto fill button has changed.

LayoutTests:

Add tests to ensure that we show or hide the caps lock indicator depending on whether the
Strong Password button is visible.

  • TestExpectations: Skip the tests below on all platforms. We will selectively enable them on Mac.
  • fast/forms/auto-fill-button/caps-lock-indicator-should-be-visible-after-hiding-auto-fill-strong-password-button-expected.html: Added.
  • fast/forms/auto-fill-button/caps-lock-indicator-should-be-visible-after-hiding-auto-fill-strong-password-button.html: Added.
  • fast/forms/auto-fill-button/caps-lock-indicator-should-not-be-visible-when-auto-fill-strong-password-button-is-visible-expected.html: Added.
  • fast/forms/auto-fill-button/caps-lock-indicator-should-not-be-visible-when-auto-fill-strong-password-button-is-visible.html: Added.
  • platform/mac-wk2/TestExpectations: Mark the tests above as PASS so that we run them.
Location:
trunk
Files:
4 added
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r238540 r238545  
     12018-11-26  Daniel Bates  <dabates@apple.com>
     2
     3        REGRESSION (r238078): Do not draw caps lock indicator when Strong Password button is shown
     4        https://bugs.webkit.org/show_bug.cgi?id=191969
     5        <rdar://problem/46247569>
     6
     7        Reviewed by Dean Jackson.
     8
     9        Add tests to ensure that we show or hide the caps lock indicator depending on whether the
     10        Strong Password button is visible.
     11
     12        * TestExpectations: Skip the tests below on all platforms. We will selectively enable them on Mac.
     13        * fast/forms/auto-fill-button/caps-lock-indicator-should-be-visible-after-hiding-auto-fill-strong-password-button-expected.html: Added.
     14        * fast/forms/auto-fill-button/caps-lock-indicator-should-be-visible-after-hiding-auto-fill-strong-password-button.html: Added.
     15        * fast/forms/auto-fill-button/caps-lock-indicator-should-not-be-visible-when-auto-fill-strong-password-button-is-visible-expected.html: Added.
     16        * fast/forms/auto-fill-button/caps-lock-indicator-should-not-be-visible-when-auto-fill-strong-password-button-is-visible.html: Added.
     17        * platform/mac-wk2/TestExpectations: Mark the tests above as PASS so that we run them.
     18
    1192018-11-26  Ryan Haddad  <ryanhaddad@apple.com>
    220
  • trunk/LayoutTests/TestExpectations

    r238540 r238545  
    400400
    401401fast/events/detect-caps-lock.html [ Skip ]
     402fast/forms/auto-fill-button/caps-lock-indicator-should-be-visible-after-hiding-auto-fill-strong-password-button.html [ Skip ]
     403fast/forms/auto-fill-button/caps-lock-indicator-should-not-be-visible-when-auto-fill-strong-password-button-is-visible.html [ Skip ]
     404fast/forms/password-scrolled-after-caps-lock-toggled.html [ Skip ]
    402405fast/repaint/placeholder-after-caps-lock-hidden.html [ Skip ]
    403 fast/forms/password-scrolled-after-caps-lock-toggled.html [ Skip ]
    404406
    405407# This test currently only works for mac-wk2
  • trunk/LayoutTests/platform/mac-wk2/TestExpectations

    r238540 r238545  
    6969
    7070[ Mojave+ ] fast/events/detect-caps-lock.html [ Pass ]
     71[ Mojave+ ] fast/forms/auto-fill-button/caps-lock-indicator-should-be-visible-after-hiding-auto-fill-strong-password-button.html [ Pass ]
     72[ Mojave+ ] fast/forms/auto-fill-button/caps-lock-indicator-should-not-be-visible-when-auto-fill-strong-password-button-is-visible.html [ Pass ]
     73[ Mojave+ ] fast/forms/password-scrolled-after-caps-lock-toggled.html [ Pass ]
    7174[ Mojave+ ] fast/repaint/placeholder-after-caps-lock-hidden.html [ Pass ]
    72 [ Mojave+ ] fast/forms/password-scrolled-after-caps-lock-toggled.html [ Pass ]
    7375
    7476fast/events/inactive-window-no-mouse-event.html [ Pass ]
  • trunk/Source/WebCore/ChangeLog

    r238540 r238545  
     12018-11-26  Daniel Bates  <dabates@apple.com>
     2
     3        REGRESSION (r238078): Do not draw caps lock indicator when Strong Password button is shown
     4        https://bugs.webkit.org/show_bug.cgi?id=191969
     5        <rdar://problem/46247569>
     6
     7        Reviewed by Dean Jackson.
     8
     9        Following r238078 we now support drawing the caps lock indicator in password fields on iOS.
     10        However it is not meaningful to show the caps lock indicator when the Strong Password button
     11        is visible because the password field is not editable. We should not paint the caps lock
     12        indicator when the Strong Password button is visible.
     13
     14        Tests: fast/forms/auto-fill-button/caps-lock-indicator-should-be-visible-after-hiding-auto-fill-strong-password-button.html
     15               fast/forms/auto-fill-button/caps-lock-indicator-should-not-be-visible-when-auto-fill-strong-password-button-is-visible.html
     16
     17        * html/TextFieldInputType.cpp:
     18        (WebCore::TextFieldInputType::shouldDrawCapsLockIndicator const): Do not draw the caps
     19        lock indicator when the password field has the Strong Password button.
     20        (WebCore::TextFieldInputType::updateAutoFillButton): Call capsLockStateMayHaveChanged() to
     21        update the visibility of the caps lock indicator when the auto fill button has changed.
     22
    1232018-11-26  Ryan Haddad  <ryanhaddad@apple.com>
    224
  • trunk/Source/WebCore/html/TextFieldInputType.cpp

    r238540 r238545  
    725725        return false;
    726726
     727    if (element()->hasAutoFillStrongPasswordButton())
     728        return false;
     729
    727730    RefPtr<Frame> frame = element()->document().frame();
    728731    if (!frame)
     
    793796void TextFieldInputType::updateAutoFillButton()
    794797{
     798    capsLockStateMayHaveChanged();
     799
    795800    if (shouldDrawAutoFillButton()) {
    796801        if (!m_container)
Note: See TracChangeset for help on using the changeset viewer.