Title: [247618] branches/safari-608-branch/Source/WebKit
Revision
247618
Author
kocsen_ch...@apple.com
Date
2019-07-18 13:26:16 -0700 (Thu, 18 Jul 2019)

Log Message

Cherry-pick r247557. rdar://problem/53254407

    [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.

    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@247557 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Modified Paths

Diff

Modified: branches/safari-608-branch/Source/WebKit/ChangeLog (247617 => 247618)


--- branches/safari-608-branch/Source/WebKit/ChangeLog	2019-07-18 20:26:03 UTC (rev 247617)
+++ branches/safari-608-branch/Source/WebKit/ChangeLog	2019-07-18 20:26:16 UTC (rev 247618)
@@ -1,5 +1,40 @@
 2019-07-18  Kocsen Chung  <kocsen_ch...@apple.com>
 
+        Cherry-pick r247557. rdar://problem/53254407
+
+    [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.
+    
+    
+    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@247557 268f45cc-cd09-0410-ab3c-d52691b4dbfc
+
+    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-18  Kocsen Chung  <kocsen_ch...@apple.com>
+
         Cherry-pick r247555. rdar://problem/53254411
 
     Prewarm local storage in the NetworkProcess to reduce WebContent process hangs

Modified: branches/safari-608-branch/Source/WebKit/Platform/spi/ios/UIKitSPI.h (247617 => 247618)


--- branches/safari-608-branch/Source/WebKit/Platform/spi/ios/UIKitSPI.h	2019-07-18 20:26:03 UTC (rev 247617)
+++ branches/safari-608-branch/Source/WebKit/Platform/spi/ios/UIKitSPI.h	2019-07-18 20:26:16 UTC (rev 247618)
@@ -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: branches/safari-608-branch/Source/WebKit/UIProcess/RemoteLayerTree/ios/RemoteLayerTreeViews.mm (247617 => 247618)


--- branches/safari-608-branch/Source/WebKit/UIProcess/RemoteLayerTree/ios/RemoteLayerTreeViews.mm	2019-07-18 20:26:03 UTC (rev 247617)
+++ branches/safari-608-branch/Source/WebKit/UIProcess/RemoteLayerTree/ios/RemoteLayerTreeViews.mm	2019-07-18 20:26:16 UTC (rev 247618)
@@ -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