Bug 163674 - Add WKWebView fullscreen delegate SPI
Summary: Add WKWebView fullscreen delegate SPI
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Jer Noble
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2016-10-19 11:15 PDT by Jer Noble
Modified: 2016-10-27 19:26 PDT (History)
4 users (show)

See Also:


Attachments
Patch (39.78 KB, patch)
2016-10-19 11:18 PDT, Jer Noble
no flags Details | Formatted Diff | Diff
Patch (39.86 KB, patch)
2016-10-19 21:02 PDT, Jer Noble
no flags Details | Formatted Diff | Diff
Patch (39.87 KB, patch)
2016-10-20 10:26 PDT, Jer Noble
andersca: 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 2016-10-19 11:15:07 PDT
Add WKWebView fullscreen delegate SPI
Comment 1 Jer Noble 2016-10-19 11:17:47 PDT
rdar://problem/28722363
Comment 2 Jer Noble 2016-10-19 11:18:16 PDT
Created attachment 292085 [details]
Patch
Comment 3 Jer Noble 2016-10-19 21:02:03 PDT
Created attachment 292148 [details]
Patch
Comment 4 Jer Noble 2016-10-20 10:26:30 PDT
Created attachment 292222 [details]
Patch
Comment 5 Anders Carlsson 2016-10-24 13:12:14 PDT
Comment on attachment 292222 [details]
Patch

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

> Source/WebKit2/UIProcess/API/Cocoa/WKWebView.mm:3942
> +    return [static_cast<WebKit::FullscreenClient&>(_page->fullscreenClient()).delegate().leakRef() autorelease];

Can just use .autorelease() here instead of .leakRef() autorelease].

> Source/WebKit2/UIProcess/API/Cocoa/WKWebViewPrivate.h:249
> +@property (nonatomic, setter=_setFullscreenDelegate:) id<_WKFullscreenDelegate> _fullscreenDelegate WK_API_AVAILABLE(macos(10.13));
> +@property (nonatomic, readonly) BOOL _isInFullscreen WK_API_AVAILABLE(macos(10.13));

Should be WK_MAC_TBA.
Comment 6 Jer Noble 2016-10-25 08:55:25 PDT
Committed r207820: <http://trac.webkit.org/changeset/207820>
Comment 7 Csaba Osztrogonác 2016-10-25 09:26:37 PDT
(In reply to comment #6)
> Committed r207820: <http://trac.webkit.org/changeset/207820>

It broke the debug build, see build.webkit.org for details.
Comment 8 Csaba Osztrogonác 2016-10-25 09:29:21 PDT
/Volumes/Data/slave/elcapitan-debug/build/Source/WebKit2/UIProcess/API/Cocoa/WKWebView.mm:3942:102: error: expected ';' after return statement
    return static_cast<WebKit::FullscreenClient&>(_page->fullscreenClient()).delegate().autorelease());
                                                                                                     ^
                                                                                                     ;

Not only the debug, but all builds .... Please build locally before landing random syntax errors.
Comment 9 Csaba Osztrogonác 2016-10-25 09:30:46 PDT
fix already landed in https://trac.webkit.org/changeset/207822 , thanks Jonathan.
Comment 10 Simon Fraser (smfr) 2016-10-27 19:26:01 PDT
Comment on attachment 292222 [details]
Patch

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

>> Source/WebKit2/UIProcess/API/Cocoa/WKWebViewPrivate.h:249
>> +@property (nonatomic, setter=_setFullscreenDelegate:) id<_WKFullscreenDelegate> _fullscreenDelegate WK_API_AVAILABLE(macos(10.13));
>> +@property (nonatomic, readonly) BOOL _isInFullscreen WK_API_AVAILABLE(macos(10.13));
> 
> Should be WK_MAC_TBA.

This broke building against older SDKs that don't know about "macos".