Changeset 254675 in webkit


Ignore:
Timestamp:
Jan 16, 2020 6:44:19 AM (4 years ago)
Author:
Carlos Garcia Campos
Message:

[GTK][WPE] Password field doesn't get input method
https://bugs.webkit.org/show_bug.cgi?id=34285

Reviewed by Žan Doberšek.

Source/WebCore:

Allow input methods in password fields for GTK and WPE ports, since the input methods are notified that the
active editable element is a password field.

  • html/PasswordInputType.cpp:

(WebCore::PasswordInputType::shouldUseInputMethod const):

Tools:

Enable the test case for password field.

  • TestWebKitAPI/Tests/WebKitGLib/TestInputMethodContext.cpp:

(testWebKitInputMethodContextContentType):

Location:
trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r254673 r254675  
     12020-01-16  Carlos Garcia Campos  <cgarcia@igalia.com>
     2
     3        [GTK][WPE] Password field doesn't get input method
     4        https://bugs.webkit.org/show_bug.cgi?id=34285
     5
     6        Reviewed by Žan Doberšek.
     7
     8        Allow input methods in password fields for GTK and WPE ports, since the input methods are notified that the
     9        active editable element is a password field.
     10
     11        * html/PasswordInputType.cpp:
     12        (WebCore::PasswordInputType::shouldUseInputMethod const):
     13
    1142020-01-16  Fujii Hironori  <Hironori.Fujii@sony.com>
    215
  • trunk/Source/WebCore/html/PasswordInputType.cpp

    r246490 r254675  
    6565bool PasswordInputType::shouldUseInputMethod() const
    6666{
     67#if PLATFORM(GTK) || PLATFORM(WPE)
     68    // Input methods are enabled for the password field in GTK and WPE ports
     69    // because the input methods are notified that the active editable element
     70    // is a password field.
     71    return true;
     72#else
    6773    // Input methods are disabled for the password field because otherwise
    6874    // anyone can access the underlying password and display it in clear text.
    6975    return false;
     76#endif
    7077}
    7178
  • trunk/Tools/ChangeLog

    r254669 r254675  
     12020-01-16  Carlos Garcia Campos  <cgarcia@igalia.com>
     2
     3        [GTK][WPE] Password field doesn't get input method
     4        https://bugs.webkit.org/show_bug.cgi?id=34285
     5
     6        Reviewed by Žan Doberšek.
     7
     8        Enable the test case for password field.
     9
     10        * TestWebKitAPI/Tests/WebKitGLib/TestInputMethodContext.cpp:
     11        (testWebKitInputMethodContextContentType):
     12
    1132020-01-16  Cathie Chen  <cathiechen@igalia.com>
    214
  • trunk/Tools/TestWebKitAPI/Tests/WebKitGLib/TestInputMethodContext.cpp

    r254122 r254675  
    899899    test->unfocusEditableAndWaitUntilInputMethodDisabled();
    900900
    901 #if 0
    902     // FIXME: We should enable input methods in password fields too.
    903     test->loadHtml("<input id='editable' type='password'>", nullptr);
     901    test->loadHtml("<input id='editable' type='password' spellcheck='false'>", nullptr);
    904902    test->waitUntilLoadFinished();
    905903    test->focusEditableAndWaitUntilInputMethodEnabled();
     
    907905    g_assert_cmpuint(test->hints(), ==, WEBKIT_INPUT_HINT_NONE);
    908906    test->unfocusEditableAndWaitUntilInputMethodDisabled();
    909 #endif
    910907
    911908    test->loadHtml("<div contenteditable id='editable' inputmode='text' spellcheck='false'></div>", nullptr);
Note: See TracChangeset for help on using the changeset viewer.