Title: [292356] trunk/Source/WebKit
- Revision
- 292356
- Author
- wenson_hs...@apple.com
- Date
- 2022-04-04 16:21:35 -0700 (Mon, 04 Apr 2022)
Log Message
[macOS] [WK2] Add plumbing to extract video frames in element fullscreen
https://bugs.webkit.org/show_bug.cgi?id=238715
rdar://91216152
Reviewed by Tim Horton.
Implement (begin|cancel)ElementFullscreenVideoExtraction on macOS, leaving empty stubs for non-internal builds.
* UIProcess/Cocoa/WebViewImpl.h:
* UIProcess/Cocoa/WebViewImpl.mm:
(WebKit::WebViewImpl::beginElementFullscreenVideoExtraction):
(WebKit::WebViewImpl::cancelElementFullscreenVideoExtraction):
* UIProcess/mac/PageClientImplMac.h:
* UIProcess/mac/PageClientImplMac.mm:
(WebKit::PageClientImpl::beginElementFullscreenVideoExtraction):
(WebKit::PageClientImpl::cancelElementFullscreenVideoExtraction):
Modified Paths
Diff
Modified: trunk/Source/WebKit/ChangeLog (292355 => 292356)
--- trunk/Source/WebKit/ChangeLog 2022-04-04 23:06:33 UTC (rev 292355)
+++ trunk/Source/WebKit/ChangeLog 2022-04-04 23:21:35 UTC (rev 292356)
@@ -1,3 +1,22 @@
+2022-04-04 Wenson Hsieh <wenson_hs...@apple.com>
+
+ [macOS] [WK2] Add plumbing to extract video frames in element fullscreen
+ https://bugs.webkit.org/show_bug.cgi?id=238715
+ rdar://91216152
+
+ Reviewed by Tim Horton.
+
+ Implement (begin|cancel)ElementFullscreenVideoExtraction on macOS, leaving empty stubs for non-internal builds.
+
+ * UIProcess/Cocoa/WebViewImpl.h:
+ * UIProcess/Cocoa/WebViewImpl.mm:
+ (WebKit::WebViewImpl::beginElementFullscreenVideoExtraction):
+ (WebKit::WebViewImpl::cancelElementFullscreenVideoExtraction):
+ * UIProcess/mac/PageClientImplMac.h:
+ * UIProcess/mac/PageClientImplMac.mm:
+ (WebKit::PageClientImpl::beginElementFullscreenVideoExtraction):
+ (WebKit::PageClientImpl::cancelElementFullscreenVideoExtraction):
+
2022-04-04 Tim Horton <timothy_hor...@apple.com>
Remove the 'general_directory_for_storage' system feature flag
Modified: trunk/Source/WebKit/UIProcess/Cocoa/WebViewImpl.h (292355 => 292356)
--- trunk/Source/WebKit/UIProcess/Cocoa/WebViewImpl.h 2022-04-04 23:06:33 UTC (rev 292355)
+++ trunk/Source/WebKit/UIProcess/Cocoa/WebViewImpl.h 2022-04-04 23:21:35 UTC (rev 292356)
@@ -679,6 +679,9 @@
void didFinishPresentation(WKRevealItemPresenter *);
#endif
+ void beginElementFullscreenVideoExtraction(const ShareableBitmap::Handle&, WebCore::FloatRect);
+ void cancelElementFullscreenVideoExtraction();
+
private:
#if HAVE(TOUCH_BAR)
void setUpTextTouchBar(NSTouchBar *);
Modified: trunk/Source/WebKit/UIProcess/Cocoa/WebViewImpl.mm (292355 => 292356)
--- trunk/Source/WebKit/UIProcess/Cocoa/WebViewImpl.mm 2022-04-04 23:06:33 UTC (rev 292355)
+++ trunk/Source/WebKit/UIProcess/Cocoa/WebViewImpl.mm 2022-04-04 23:21:35 UTC (rev 292356)
@@ -5967,6 +5967,18 @@
#endif
}
+#if USE(APPLE_INTERNAL_SDK)
+#import <WebKitAdditions/WebViewImplAdditions.mm>
+#else
+void WebViewImpl::beginElementFullscreenVideoExtraction(const ShareableBitmap::Handle&, WebCore::FloatRect)
+{
+}
+
+void WebViewImpl::cancelElementFullscreenVideoExtraction()
+{
+}
+#endif
+
} // namespace WebKit
#endif // PLATFORM(MAC)
Modified: trunk/Source/WebKit/UIProcess/mac/PageClientImplMac.h (292355 => 292356)
--- trunk/Source/WebKit/UIProcess/mac/PageClientImplMac.h 2022-04-04 23:06:33 UTC (rev 292355)
+++ trunk/Source/WebKit/UIProcess/mac/PageClientImplMac.h 2022-04-04 23:21:35 UTC (rev 292356)
@@ -256,6 +256,10 @@
bool effectiveAppearanceIsDark() const override;
bool effectiveUserInterfaceLevelIsElevated() const override;
+ bool isFullscreenVideoExtractionEnabled() const final { return true; }
+ void beginElementFullscreenVideoExtraction(const ShareableBitmap::Handle&, WebCore::FloatRect) final;
+ void cancelElementFullscreenVideoExtraction() final;
+
#if ENABLE(DRAG_SUPPORT)
void didPerformDragOperation(bool handled) final;
#endif
Modified: trunk/Source/WebKit/UIProcess/mac/PageClientImplMac.mm (292355 => 292356)
--- trunk/Source/WebKit/UIProcess/mac/PageClientImplMac.mm 2022-04-04 23:06:33 UTC (rev 292355)
+++ trunk/Source/WebKit/UIProcess/mac/PageClientImplMac.mm 2022-04-04 23:21:35 UTC (rev 292356)
@@ -1039,6 +1039,16 @@
#endif
+void PageClientImpl::beginElementFullscreenVideoExtraction(const ShareableBitmap::Handle& bitmapHandle, FloatRect bounds)
+{
+ m_impl->beginElementFullscreenVideoExtraction(bitmapHandle, bounds);
+}
+
+void PageClientImpl::cancelElementFullscreenVideoExtraction()
+{
+ m_impl->cancelElementFullscreenVideoExtraction();
+}
+
} // namespace WebKit
#endif // PLATFORM(MAC)
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes