Title: [247557] trunk/Source/WebKit
Revision
247557
Author
timothy_hor...@apple.com
Date
2019-07-17 20:25:20 -0700 (Wed, 17 Jul 2019)

Log Message

[macCatalyst] Unable to interact with YouTube video while it's playing
https://bugs.webkit.org/show_bug.cgi?id=199893
<rdar://problem/51871151>

Reviewed by Simon Fraser.

* Platform/spi/ios/UIKitSPI.h:
* UIProcess/RemoteLayerTree/ios/RemoteLayerTreeViews.mm:
(-[WKRemoteView initWithFrame:contextID:]):
(-[WKUIRemoteView initWithFrame:pid:contextID:]):
Disable remote context hit-testing for WKUIRemoteView just like we
already do for WKRemoteView.

Modified Paths

Diff

Modified: trunk/Source/WebKit/ChangeLog (247556 => 247557)


--- trunk/Source/WebKit/ChangeLog	2019-07-18 03:05:05 UTC (rev 247556)
+++ trunk/Source/WebKit/ChangeLog	2019-07-18 03:25:20 UTC (rev 247557)
@@ -1,3 +1,18 @@
+2019-07-17  Tim Horton  <timothy_hor...@apple.com>
+
+        [macCatalyst] Unable to interact with YouTube video while it's playing
+        https://bugs.webkit.org/show_bug.cgi?id=199893
+        <rdar://problem/51871151>
+
+        Reviewed by Simon Fraser.
+
+        * Platform/spi/ios/UIKitSPI.h:
+        * UIProcess/RemoteLayerTree/ios/RemoteLayerTreeViews.mm:
+        (-[WKRemoteView initWithFrame:contextID:]):
+        (-[WKUIRemoteView initWithFrame:pid:contextID:]):
+        Disable remote context hit-testing for WKUIRemoteView just like we
+        already do for WKRemoteView.
+
 2019-07-17  Chris Dumez  <cdu...@apple.com>
 
         Prewarm local storage in the NetworkProcess to reduce WebContent process hangs

Modified: trunk/Source/WebKit/Platform/spi/ios/UIKitSPI.h (247556 => 247557)


--- trunk/Source/WebKit/Platform/spi/ios/UIKitSPI.h	2019-07-18 03:05:05 UTC (rev 247556)
+++ trunk/Source/WebKit/Platform/spi/ios/UIKitSPI.h	2019-07-18 03:25:20 UTC (rev 247557)
@@ -1133,8 +1133,11 @@
 @property (nonatomic, readonly) UIKeyboardInputMode *currentInputModeInPreference;
 @end
 
+@class CALayerHost;
+
 @interface _UILayerHostView : UIView
 - (instancetype)initWithFrame:(CGRect)frame pid:(pid_t)pid contextID:(uint32_t)contextID;
+@property (nonatomic, readonly, retain) CALayerHost *layerHost;
 @end
 
 @interface _UIRemoteView : _UILayerHostView

Modified: trunk/Source/WebKit/UIProcess/RemoteLayerTree/ios/RemoteLayerTreeViews.mm (247556 => 247557)


--- trunk/Source/WebKit/UIProcess/RemoteLayerTree/ios/RemoteLayerTreeViews.mm	2019-07-18 03:05:05 UTC (rev 247556)
+++ trunk/Source/WebKit/UIProcess/RemoteLayerTree/ios/RemoteLayerTreeViews.mm	2019-07-18 03:25:20 UTC (rev 247557)
@@ -234,7 +234,7 @@
         layer.allowsHitTesting = NO;
 #endif
     }
-    
+
     return self;
 }
 
@@ -248,6 +248,22 @@
 #if USE(UIREMOTEVIEW_CONTEXT_HOSTING)
 @implementation WKUIRemoteView
 
+- (instancetype)initWithFrame:(CGRect)frame pid:(pid_t)pid contextID:(uint32_t)contextID
+{
+    self = [super initWithFrame:frame pid:pid contextID:contextID];
+    if (!self)
+        return nil;
+
+#if PLATFORM(MACCATALYST)
+    // 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.
+    self.layerHost.allowsHitTesting = NO;
+#endif
+
+    return self;
+}
+
 - (UIView *)hitTest:(CGPoint)point withEvent:(UIEvent *)event
 {
     return [self _web_findDescendantViewAtPoint:point withEvent:event];
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to