Changeset 227710 in webkit


Ignore:
Timestamp:
Jan 26, 2018 6:13:48 PM (6 years ago)
Author:
Megan Gardner
Message:

Don't retain focus for input peripheral views
https://bugs.webkit.org/show_bug.cgi?id=182204

Reviewed by Tim Horton.

Source/WebKit:

Retaining focus on input peripheral views makes it so they cannot dismiss themselves with
the current architecture. This should probably be fixed in UIKit, as there is no reason for
focus to be retained on these views anyways, as they don't have keyboard input, but this
guards against over-aggressive retain requests.

  • UIProcess/ios/WKContentViewInteraction.mm:

(-[WKContentView _restoreFocusWithToken:]):
(-[WKContentView _preserveFocusWithToken:destructively:]):

LayoutTests:

Fixed a spelling error while fixing a bug this test caught.

  • fast/forms/ios/ipad/unfocus-inside-fixed-hittest.html:
  • fast/forms/ios/ipad/unfocus-inside-fixed-hittest-expected.txt:
Location:
trunk
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r227708 r227710  
     12018-01-26  Megan Gardner  <megan_gardner@apple.com>
     2
     3        Don't retain focus for input peripheral views
     4        https://bugs.webkit.org/show_bug.cgi?id=182204
     5
     6        Reviewed by Tim Horton.
     7
     8        Fixed a spelling error while fixing a bug this test caught.
     9
     10        * fast/forms/ios/ipad/unfocus-inside-fixed-hittest.html:
     11        * fast/forms/ios/ipad/unfocus-inside-fixed-hittest-expected.txt:
     12
    1132018-01-26  Youenn Fablet  <youenn@apple.com>
    214
  • trunk/LayoutTests/fast/forms/ios/ipad/unfocus-inside-fixed-hittest-expected.txt

    r204728 r227710  
    33Click Me
    44June
    5 PASS: hit testing found #target after select interation
     5PASS: hit testing found #target after select interaction
  • trunk/LayoutTests/fast/forms/ios/ipad/unfocus-inside-fixed-hittest.html

    r204728 r227710  
    7777        function buttonClicked()
    7878        {
    79             document.getElementById('result').textContent = 'PASS: hit testing found #target after select interation';
     79            document.getElementById('result').textContent = 'PASS: hit testing found #target after select interaction';
    8080            if (window.testRunner)
    8181                testRunner.notifyDone();
  • trunk/Source/WebKit/ChangeLog

    r227709 r227710  
     12018-01-26  Megan Gardner  <megan_gardner@apple.com>
     2
     3        Don't retain focus for input peripheral views
     4        https://bugs.webkit.org/show_bug.cgi?id=182204
     5
     6        Reviewed by Tim Horton.
     7
     8        Retaining focus on input peripheral views makes it so they cannot dismiss themselves with
     9        the current architecture. This should probably be fixed in UIKit, as there is no reason for
     10        focus to be retained on these views anyways, as they don't have keyboard input, but this
     11        guards against over-aggressive retain requests.
     12
     13        * UIProcess/ios/WKContentViewInteraction.mm:
     14        (-[WKContentView _restoreFocusWithToken:]):
     15        (-[WKContentView _preserveFocusWithToken:destructively:]):
     16
    1172018-01-26  Chris Dumez  <cdumez@apple.com>
    218
  • trunk/Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm

    r227377 r227710  
    41704170- (void)_restoreFocusWithToken:(id <NSCopying, NSSecureCoding>)token
    41714171{
    4172     --_webView->_activeFocusedStateRetainCount;
     4172    if (!_inputPeripheral)
     4173        --_webView->_activeFocusedStateRetainCount;
    41734174}
    41744175
    41754176- (void)_preserveFocusWithToken:(id <NSCopying, NSSecureCoding>)token destructively:(BOOL)destructively
    41764177{
    4177     ++_webView->_activeFocusedStateRetainCount;
     4178    if (!_inputPeripheral)
     4179        ++_webView->_activeFocusedStateRetainCount;
    41784180}
    41794181
Note: See TracChangeset for help on using the changeset viewer.