Changeset 207486 in webkit


Ignore:
Timestamp:
Oct 18, 2016 1:40:03 PM (8 years ago)
Author:
rniwa@webkit.org
Message:

REGRESSION (r201471): Keyboard remains visible when swiping back on twitter.com
https://bugs.webkit.org/show_bug.cgi?id=163581
<rdar://problem/27739558>

Reviewed by Simon Fraser.

Source/WebCore:

The bug was caused by Chrome::elementDidBlur not getting called, which resulted in
StopAssistingNode not getting sent to the UI process.

Test: fast/forms/ios/hide-keyboard-on-node-removal.html

  • dom/Document.cpp:

(WebCore::Document::setFocusedElement): Restore the behavior prior to r201471 by calling
Chrome::elementDidBlur explicitly.

  • html/HTMLTextFormControlElement.cpp:

(WebCore::HTMLTextFormControlElement::dispatchBlurEvent): Added a comment about ordering.

LayoutTests:

Added a regression test for hiding a keyboard when the focused element is removed from the DOM.

  • fast/forms/ios/hide-keyboard-on-node-removal-expected.txt: Added.
  • fast/forms/ios/hide-keyboard-on-node-removal.html: Added.
Location:
trunk
Files:
2 added
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r207485 r207486  
     12016-10-18  Ryosuke Niwa  <rniwa@webkit.org>
     2
     3        REGRESSION (r201471): Keyboard remains visible when swiping back on twitter.com
     4        https://bugs.webkit.org/show_bug.cgi?id=163581
     5        <rdar://problem/27739558>
     6
     7        Reviewed by Simon Fraser.
     8
     9        Added a regression test for hiding a keyboard when the focused element is removed from the DOM.
     10
     11        * fast/forms/ios/hide-keyboard-on-node-removal-expected.txt: Added.
     12        * fast/forms/ios/hide-keyboard-on-node-removal.html: Added.
     13
    1142016-10-18  Ryan Haddad  <ryanhaddad@apple.com>
    215
  • trunk/Source/WebCore/ChangeLog

    r207482 r207486  
     12016-10-18  Ryosuke Niwa  <rniwa@webkit.org>
     2
     3        REGRESSION (r201471): Keyboard remains visible when swiping back on twitter.com
     4        https://bugs.webkit.org/show_bug.cgi?id=163581
     5        <rdar://problem/27739558>
     6
     7        Reviewed by Simon Fraser.
     8
     9        The bug was caused by Chrome::elementDidBlur not getting called, which resulted in
     10        StopAssistingNode not getting sent to the UI process.
     11
     12        Test: fast/forms/ios/hide-keyboard-on-node-removal.html
     13
     14        * dom/Document.cpp:
     15        (WebCore::Document::setFocusedElement): Restore the behavior prior to r201471 by calling
     16        Chrome::elementDidBlur explicitly.
     17        * html/HTMLTextFormControlElement.cpp:
     18        (WebCore::HTMLTextFormControlElement::dispatchBlurEvent): Added a comment about ordering.
     19
    1202016-10-17  Anders Carlsson  <andersca@apple.com>
    221
  • trunk/Source/WebCore/dom/Document.cpp

    r207477 r207486  
    36753675            }
    36763676        } else {
     3677            // Match the order in HTMLTextFormControlElement::dispatchBlurEvent.
    36773678            if (is<HTMLInputElement>(*oldFocusedElement))
    36783679                downcast<HTMLInputElement>(*oldFocusedElement).endEditing();
     3680            if (page())
     3681                page()->chrome().client().elementDidBlur(oldFocusedElement.get());
    36793682            ASSERT(!m_focusedElement);
    36803683        }
  • trunk/Source/WebCore/html/HTMLTextFormControlElement.cpp

    r207458 r207486  
    102102    if (supportsPlaceholder())
    103103        updatePlaceholderVisibility();
     104    // Match the order in Document::setFocusedElement.
    104105    handleBlurEvent();
    105106    HTMLFormControlElementWithState::dispatchBlurEvent(WTFMove(newFocusedElement));
Note: See TracChangeset for help on using the changeset viewer.