Bug 134270 - [Fullscreen][Mac] WKView is not firstResponder after entering fullscreen mode
Summary: [Fullscreen][Mac] WKView is not firstResponder after entering fullscreen mode
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Jer Noble
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-06-24 14:56 PDT by Jer Noble
Modified: 2014-06-24 15:39 PDT (History)
5 users (show)

See Also:


Attachments
Patch (1.92 KB, patch)
2014-06-24 14:58 PDT, Jer Noble
jhoneycutt: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jer Noble 2014-06-24 14:56:10 PDT
[Fullscreen][Mac] WKView is not firstResponder after entering fullscreen mode
Comment 1 Jer Noble 2014-06-24 14:58:05 PDT
Created attachment 233745 [details]
Patch
Comment 2 Jon Honeycutt 2014-06-24 15:01:50 PDT
Comment on attachment 233745 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=233745&action=review

r=me

> Source/WebCore/ChangeLog:10
> +        the window's view heirarchy after the style changes, reset it to the firstResponder.

hierarchy

> Source/WebCore/platform/mac/WebCoreFullScreenWindow.mm:81
> +- (void)setStyleMask:(NSUInteger)styleMask
> +{
> +    NSResponder* savedFirstResponder = [self firstResponder];
> +
> +    [super setStyleMask:styleMask];
> +
> +    if ([self firstResponder] != savedFirstResponder
> +        && [savedFirstResponder isKindOfClass:[NSView class]]
> +        && [(NSView*)savedFirstResponder isDescendantOf:[self contentView]])
> +        [self makeFirstResponder:savedFirstResponder];
> +}

This would benefit from an inline comment explaining why it's done.
Comment 3 Jer Noble 2014-06-24 15:32:28 PDT
<rdar://problem/17043094>
Comment 4 Jer Noble 2014-06-24 15:39:07 PDT
Committed r170397: <http://trac.webkit.org/changeset/170397>