RESOLVED FIXED230784
Promote WKPreferences._fullScreenEnabled to API
https://bugs.webkit.org/show_bug.cgi?id=230784
Summary Promote WKPreferences._fullScreenEnabled to API
Peng Liu
Reported 2021-09-24 23:09:31 PDT
Promote WKPreferences._fullScreenEnabled to API
Attachments
WIP patch (31.24 KB, patch)
2021-09-24 23:18 PDT, Peng Liu
no flags
WIP patch (30.53 KB, patch)
2021-09-27 09:40 PDT, Peng Liu
no flags
WIP patch (15.25 KB, patch)
2021-09-30 22:19 PDT, Peng Liu
no flags
[fast-cq] Patch (16.15 KB, patch)
2021-11-10 20:35 PST, Peng Liu
no flags
Peng Liu
Comment 1 2021-09-24 23:16:11 PDT
Peng Liu
Comment 2 2021-09-24 23:18:09 PDT Comment hidden (obsolete)
Peng Liu
Comment 3 2021-09-27 09:40:18 PDT Comment hidden (obsolete)
Peng Liu
Comment 4 2021-09-30 22:19:53 PDT
Created attachment 439820 [details] WIP patch
Peng Liu
Comment 5 2021-11-10 20:35:12 PST
Created attachment 443901 [details] [fast-cq] Patch
Jer Noble
Comment 6 2021-11-11 10:57:58 PST
Comment on attachment 443901 [details] [fast-cq] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=443901&action=review R=me with a nit: > Source/WebKit/UIProcess/Cocoa/FullscreenClient.h:-40 > -#if PLATFORM(MAC) > -@class NSView; > -using WKFullscreenClientView = NSView; > -#else > @class WKWebView; > using WKFullscreenClientView = WKWebView; > -#endif Nit: it seems like we could just get rid of WKFullscreenClientView entirely and just use WKWebView everywhere, no? > Source/WebKit/UIProcess/Cocoa/FullscreenClient.mm:66 > - [m_delegate.get() _webViewWillEnterFullscreen:m_webView]; > + [m_delegate.get() _webViewWillEnterFullscreen:static_cast<NSView *>(m_webView)]; Nit: not sure why this was is necessary; can't we just #include "WKWebView.h" here and get the cast for free? > Source/WebKit/UIProcess/WebFullScreenManagerProxy.h:77 > + enum class FullscreenState : uint8_t { > + NotInFullscreen, > + EnteringFullscreen, > + InFullscreen, > + ExitingFullscreen, > + }; > + FullscreenState fullscreenState() const { return m_fullscreenState; } > + Oooh, I just added something very similar to this inside WebKitTestRunner, with almost exactly the same values. Once this lands, I could get rid of that enum and adopt this one.
Darin Adler
Comment 7 2021-11-11 11:53:27 PST
Comment on attachment 443901 [details] [fast-cq] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=443901&action=review > Source/WebKit/UIProcess/WebFullScreenManagerProxy.h:75 > + enum class FullscreenState : uint8_t { > + NotInFullscreen, > + EnteringFullscreen, > + InFullscreen, > + ExitingFullscreen, > + }; Is there some way to keep this clear, but avoid saying Fullscreen twice every time we use any of these values?
Darin Adler
Comment 8 2021-11-11 11:53:59 PST
Comment on attachment 443901 [details] [fast-cq] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=443901&action=review >> Source/WebKit/UIProcess/WebFullScreenManagerProxy.h:75 >> + }; > > Is there some way to keep this clear, but avoid saying Fullscreen twice every time we use any of these values? Like maybe we can use "NotIn", "Entering", "In", and "Exiting".
Peng Liu
Comment 9 2021-11-11 12:22:05 PST
Comment on attachment 443901 [details] [fast-cq] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=443901&action=review >>> Source/WebKit/UIProcess/WebFullScreenManagerProxy.h:75 >>> + }; >> >> Is there some way to keep this clear, but avoid saying Fullscreen twice every time we use any of these values? > > Like maybe we can use "NotIn", "Entering", "In", and "Exiting". Maybe "NotActive", "Entering", "Active", and "Exiting"?
Peng Liu
Comment 10 2021-11-12 14:13:14 PST
(In reply to Darin Adler from comment #8) > Comment on attachment 443901 [details] > [fast-cq] Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=443901&action=review > > >> Source/WebKit/UIProcess/WebFullScreenManagerProxy.h:75 > >> + }; > > > > Is there some way to keep this clear, but avoid saying Fullscreen twice every time we use any of these values? > > Like maybe we can use "NotIn", "Entering", "In", and "Exiting". I will make this change in a follow-up patch.
EWS
Comment 11 2021-11-12 14:14:35 PST
Committed r285741 (244200@main): <https://commits.webkit.org/244200@main> All reviewed patches have been landed. Closing bug and clearing flags on attachment 443901 [details].
Note You need to log in before you can comment on or make changes to this bug.