WebKit Bugzilla
Attachment 343676 Details for
Bug 187073
: [iPad apps on macOS] Unable to interact with video elements that have started playing
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-187073-20180626191519.patch (text/plain), 4.35 KB, created by
Wenson Hsieh
on 2018-06-26 19:15:19 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Wenson Hsieh
Created:
2018-06-26 19:15:19 PDT
Size:
4.35 KB
patch
obsolete
>Subversion Revision: 233184 >diff --git a/Source/WebCore/PAL/ChangeLog b/Source/WebCore/PAL/ChangeLog >index cfbc554c7eef2c8e94af9ef167651a03678bdb6c..b6f86a23810e9f385f933888af4293c339bd3509 100644 >--- a/Source/WebCore/PAL/ChangeLog >+++ b/Source/WebCore/PAL/ChangeLog >@@ -1,3 +1,15 @@ >+2018-06-26 Wenson Hsieh <wenson_hsieh@apple.com> >+ >+ [iPad apps on macOS] Unable to interact with video elements that have started playing >+ https://bugs.webkit.org/show_bug.cgi?id=187073 >+ <rdar://problem/40591107> >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Define an SPI method on CALayer. See WebKit ChangeLog for more detail. >+ >+ * pal/spi/cocoa/QuartzCoreSPI.h: >+ > 2018-06-23 Yusuke Suzuki <utatane.tea@gmail.com> > > [WTF] Add user-defined literal for ASCIILiteral >diff --git a/Source/WebKit/ChangeLog b/Source/WebKit/ChangeLog >index 3c07cd5583b58fa2e25f96de25845356a3333513..3c8cfc207dfd2bc4ba96fda2a1e0dcbb29372d2c 100644 >--- a/Source/WebKit/ChangeLog >+++ b/Source/WebKit/ChangeLog >@@ -1,3 +1,28 @@ >+2018-06-26 Wenson Hsieh <wenson_hsieh@apple.com> >+ >+ [iPad apps on macOS] Unable to interact with video elements that have started playing >+ https://bugs.webkit.org/show_bug.cgi?id=187073 >+ <rdar://problem/40591107> >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ On iOS, we currently force remote hosting contexts to be non-interactive by passing in `kCAContextIgnoresHitTest` >+ when creating the CAContext. However, this flag is not respected by CoreAnimation when running iOS apps on macOS. >+ This means all HID events dispatched over a video that has been played (which causes WebKit to insert a >+ CALayerHost-backed WKRemoteView in the view hierarchy) will be routed to the context ID of the video's CAContext >+ rather than the context ID of the key window containing the WKWebView. >+ >+ This subsequently causes all gesture recognizers (hover, touch, tap, long press) to fail recognition when >+ running iOS apps on macOS. To address this, we set a flag on WKRemoteView's CALayerHost to prevent hit-testing >+ to the remote layer. This allows us to avoid routing HID events to the wrong context, and instead target the >+ main UIWindow. >+ >+ Manually verified that click, touch, and mouseenter/mouseleave events are dispatched when interacting over a >+ video element. >+ >+ * UIProcess/RemoteLayerTree/ios/RemoteLayerTreeHostIOS.mm: >+ (-[WKRemoteView initWithFrame:contextID:]): >+ > 2018-06-25 Tim Horton <timothy_horton@apple.com> > > WKThumbnailView fallback background is blindingly bright in Dark Mode >diff --git a/Source/WebCore/PAL/pal/spi/cocoa/QuartzCoreSPI.h b/Source/WebCore/PAL/pal/spi/cocoa/QuartzCoreSPI.h >index f4e21223fd0119d559ef3f2950bf4e22fd0a2d10..67e08d5182ba4074db06e8674b3bc99112afdb89 100644 >--- a/Source/WebCore/PAL/pal/spi/cocoa/QuartzCoreSPI.h >+++ b/Source/WebCore/PAL/pal/spi/cocoa/QuartzCoreSPI.h >@@ -94,6 +94,7 @@ typedef struct _CARenderContext CARenderContext; > - (void *)regionBeingDrawn; > - (void)reloadValueForKeyPath:(NSString *)keyPath; > @property BOOL allowsGroupBlending; >+@property BOOL allowsHitTesting; > @property BOOL canDrawConcurrently; > @property BOOL contentsOpaque; > @property BOOL hitTestsAsOpaque; >diff --git a/Source/WebKit/UIProcess/RemoteLayerTree/ios/RemoteLayerTreeHostIOS.mm b/Source/WebKit/UIProcess/RemoteLayerTree/ios/RemoteLayerTreeHostIOS.mm >index f35122cba0e65b6a41ebcee36b93f69f800a4691..a84045d62583be83407bab3f08ecd2b463b22e4b 100644 >--- a/Source/WebKit/UIProcess/RemoteLayerTree/ios/RemoteLayerTreeHostIOS.mm >+++ b/Source/WebKit/UIProcess/RemoteLayerTree/ios/RemoteLayerTreeHostIOS.mm >@@ -134,8 +134,16 @@ using namespace WebCore; > > - (instancetype)initWithFrame:(CGRect)frame contextID:(uint32_t)contextID > { >- if ((self = [super initWithFrame:frame])) >- [(CALayerHost *)[self layer] setContextId:contextID]; >+ if ((self = [super initWithFrame:frame])) { >+ CALayerHost *layer = (CALayerHost *)self.layer; >+ layer.contextId = contextID; >+#if ENABLE(MINIMAL_SIMULATOR) >+ // When running iOS apps on macOS, kCAContextIgnoresHitTest isn't respected; instead, we avoid >+ // hit-testing to the remote context by disabling hit-testing on its host layer. See >+ // <rdar://problem/40591107> for more details. >+ layer.allowsHitTesting = NO; >+#endif >+ } > > return self; > }
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 187073
: 343676