[webkit-changes] [WebKit/WebKit] 7fa44a: [iOS] Cannot scroll page by dragging on a bare <vi...

Jer Noble noreply at github.com
Thu Sep 28 00:06:05 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 7fa44a650d9a3604421d1c3807e48a0feaa85706
      https://github.com/WebKit/WebKit/commit/7fa44a650d9a3604421d1c3807e48a0feaa85706
  Author: Jer Noble <jer.noble at apple.com>
  Date:   2023-09-28 (Thu, 28 Sep 2023)

  Changed paths:
    A LayoutTests/fast/scrolling/ios/video-scrolling-with-overflow-expected.txt
    A LayoutTests/fast/scrolling/ios/video-scrolling-with-overflow.html
    M Source/WebKit/UIProcess/Cocoa/VideoFullscreenManagerProxy.mm
    M Source/WebKit/UIProcess/RemoteLayerTree/ios/RemoteLayerTreeViews.mm

  Log Message:
  -----------
  [iOS] Cannot scroll page by dragging on a bare <video> element
https://bugs.webkit.org/show_bug.cgi?id=261563
rdar://114720841

Reviewed by Eric Carlson.

Hit testing in the WebKit utility method isScrolledBy() works by walking up the view heirarchy looking for a view which return a valid node from RemoteLayerTreeNode::forCALayer(). However, while WKLayerHostView is a subview of WebAVPlayerLayerView, it's superview property is nil. This occurs because while the WKLayerHostView.layer is made a sublayer of the WebAVPlayerLayerView.playerLayer, the WKLayerHostView itself is not made a subview of the WebAVPlayerLayerView.

Drive-by fix: in testing this patch, a crash will occasionally occur where a null pointer is dereferenced in collectDescendantViewsAtPoint(). Add a null check and return false if that check fails.

* LayoutTests/fast/scrolling/ios/video-scrolling-with-overflow-expected.txt: Added.
* LayoutTests/fast/scrolling/ios/video-scrolling-with-overflow.html: Added.
* Source/WebKit/UIProcess/Cocoa/VideoFullscreenManagerProxy.mm:
(WebKit::VideoFullscreenManagerProxy::createViewWithID):
* Source/WebKit/UIProcess/RemoteLayerTree/ios/RemoteLayerTreeViews.mm:
(WebKit::collectDescendantViewsAtPoint):

Canonical link: https://commits.webkit.org/268566@main




More information about the webkit-changes mailing list