Changeset 167770 in webkit


Ignore:
Timestamp:
Apr 24, 2014 1:24:13 PM (10 years ago)
Author:
rniwa@webkit.org
Message:

Text caret disappears in Mail after returning from another application
https://bugs.webkit.org/show_bug.cgi?id=132111

Reviewed by Darin Adler.

The bug was caused by our SPI _windowChangedKeyState not getting called upon deminiaturization.

Fixed the bug by using the standard NSWindowDidBecomeKeyNotification and NSWindowDidResignKeyNotification
notifications as done in WebKit2 since they DO get called upon deminiaturization.

  • WebView/WebView.mm:

(-[WebView addWindowObserversForWindow:]):
(-[WebView removeWindowObservers]):
(-[WebView _windowKeyStateChanged:]):
(-[WebView _windowChangedKeyState]): Deleted.

Location:
trunk/Source/WebKit/mac
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit/mac/ChangeLog

    r167768 r167770  
     12014-04-24  Ryosuke Niwa  <rniwa@webkit.org>
     2
     3        Text caret disappears in Mail after returning from another application
     4        https://bugs.webkit.org/show_bug.cgi?id=132111
     5
     6        Reviewed by Darin Adler.
     7
     8        The bug was caused by our SPI _windowChangedKeyState not getting called upon deminiaturization.
     9
     10        Fixed the bug by using the standard NSWindowDidBecomeKeyNotification and NSWindowDidResignKeyNotification
     11        notifications as done in WebKit2 since they DO get called upon deminiaturization.
     12
     13        * WebView/WebView.mm:
     14        (-[WebView addWindowObserversForWindow:]):
     15        (-[WebView removeWindowObservers]):
     16        (-[WebView _windowKeyStateChanged:]):
     17        (-[WebView _windowChangedKeyState]): Deleted.
     18
    1192014-04-24  Myles C. Maxfield  <mmaxfield@apple.com>
    220
  • trunk/Source/WebKit/mac/WebView/WebView.mm

    r167768 r167770  
    292292- (void)_autoscrollForDraggingInfo:(id)dragInfo timeDelta:(NSTimeInterval)repeatDelta;
    293293- (BOOL)_shouldAutoscrollForDraggingInfo:(id)dragInfo;
    294 - (void)_windowChangedKeyState;
    295294@end
    296295
     
    52285227{
    52295228    if (window) {
     5229        [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(windowKeyStateChanged:)
     5230            name:NSWindowDidBecomeKeyNotification object:window];
     5231        [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(windowKeyStateChanged:)
     5232            name:NSWindowDidResignKeyNotification object:window];
    52305233        [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(_windowWillOrderOnScreen:)
    52315234            name:WKWindowWillOrderOnScreenNotification() object:window];
     
    52525255    if (window) {
    52535256        [[NSNotificationCenter defaultCenter] removeObserver:self
     5257            name:NSWindowDidBecomeKeyNotification object:window];
     5258        [[NSNotificationCenter defaultCenter] removeObserver:self
     5259            name:NSWindowDidResignKeyNotification object:window];
     5260        [[NSNotificationCenter defaultCenter] removeObserver:self
    52545261            name:WKWindowWillOrderOnScreenNotification() object:window];
    52555262        [[NSNotificationCenter defaultCenter] removeObserver:self
     
    53385345}
    53395346
    5340 - (void)_windowChangedKeyState
     5347- (void)windowKeyStateChanged:(NSNotification *)notification
    53415348{
    53425349    [self _updateActiveState];
    5343 
    5344     [super _windowChangedKeyState];
    53455350}
    53465351
Note: See TracChangeset for help on using the changeset viewer.