Title: [167770] trunk/Source/WebKit/mac
- Revision
- 167770
- Author
- [email protected]
- Date
- 2014-04-24 13:24:13 -0700 (Thu, 24 Apr 2014)
Log 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.
Modified Paths
Diff
Modified: trunk/Source/WebKit/mac/ChangeLog (167769 => 167770)
--- trunk/Source/WebKit/mac/ChangeLog 2014-04-24 19:49:23 UTC (rev 167769)
+++ trunk/Source/WebKit/mac/ChangeLog 2014-04-24 20:24:13 UTC (rev 167770)
@@ -1,3 +1,21 @@
+2014-04-24 Ryosuke Niwa <[email protected]>
+
+ 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.
+
2014-04-24 Myles C. Maxfield <[email protected]>
FontCache::fontCache() never returns nullptr so it can be made to return a reference instead
Modified: trunk/Source/WebKit/mac/WebView/WebView.mm (167769 => 167770)
--- trunk/Source/WebKit/mac/WebView/WebView.mm 2014-04-24 19:49:23 UTC (rev 167769)
+++ trunk/Source/WebKit/mac/WebView/WebView.mm 2014-04-24 20:24:13 UTC (rev 167770)
@@ -291,7 +291,6 @@
- (NSView *)_hitTest:(NSPoint *)aPoint dragTypes:(NSSet *)types;
- (void)_autoscrollForDraggingInfo:(id)dragInfo timeDelta:(NSTimeInterval)repeatDelta;
- (BOOL)_shouldAutoscrollForDraggingInfo:(id)dragInfo;
-- (void)_windowChangedKeyState;
@end
@interface NSWindow (WebNSWindowDetails)
@@ -5227,6 +5226,10 @@
- (void)addWindowObserversForWindow:(NSWindow *)window
{
if (window) {
+ [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(windowKeyStateChanged:)
+ name:NSWindowDidBecomeKeyNotification object:window];
+ [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(windowKeyStateChanged:)
+ name:NSWindowDidResignKeyNotification object:window];
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(_windowWillOrderOnScreen:)
name:WKWindowWillOrderOnScreenNotification() object:window];
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(_windowWillOrderOffScreen:)
@@ -5251,6 +5254,10 @@
NSWindow *window = [self window];
if (window) {
[[NSNotificationCenter defaultCenter] removeObserver:self
+ name:NSWindowDidBecomeKeyNotification object:window];
+ [[NSNotificationCenter defaultCenter] removeObserver:self
+ name:NSWindowDidResignKeyNotification object:window];
+ [[NSNotificationCenter defaultCenter] removeObserver:self
name:WKWindowWillOrderOnScreenNotification() object:window];
[[NSNotificationCenter defaultCenter] removeObserver:self
name:WKWindowWillOrderOffScreenNotification() object:window];
@@ -5337,11 +5344,9 @@
_private->page->chrome().windowScreenDidChange((PlatformDisplayID)[[[[[self window] screen] deviceDescription] objectForKey:@"NSScreenNumber"] intValue]);
}
-- (void)_windowChangedKeyState
+- (void)windowKeyStateChanged:(NSNotification *)notification
{
[self _updateActiveState];
-
- [super _windowChangedKeyState];
}
- (void)_windowWillOrderOnScreen:(NSNotification *)notification
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes