Reviewed by Richard
[WebKit-https.git] / WebKit / Misc.subproj / WebNSViewExtras.m
index 47430a1df91abff01020acd7db38298299666ca1..c40ced6cc93571504ee9e46b1df0aa9331c96982 100644 (file)
     [self dragImage:dragImage at:origin offset:NSZeroSize event:event pasteboard:pasteboard source:source slideBack:YES];
 }
 
+- (BOOL)firstResponderIsSelfOrDescendantView
+{
+    NSResponder *responder = [[self window] firstResponder];
+    return (responder && 
+           (responder == self || 
+           ([responder isKindOfClass:[NSView class]] && [(NSView *)responder isDescendantOf:self])));
+}
+
 @end