[webkit-changes] [WebKit/WebKit] 43ec0e: Web Inspector: Can't scroll `overflow: scroll` con...

Qianlang Chen noreply at github.com
Fri May 10 10:09:08 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 43ec0e8d0cc6ba4ee3336418a3cc906f62e42e8d
      https://github.com/WebKit/WebKit/commit/43ec0e8d0cc6ba4ee3336418a3cc906f62e42e8d
  Author: Qianlang Chen <qianlangchen at apple.com>
  Date:   2024-05-10 (Fri, 10 May 2024)

  Changed paths:
    M Source/WebCore/page/LocalFrameView.cpp
    M Source/WebKit/UIProcess/Inspector/ios/WKInspectorHighlightView.mm

  Log Message:
  -----------
  Web Inspector: Can't scroll `overflow: scroll` containers if a remote inspector highlight is visible
rdar://124554999
https://bugs.webkit.org/show_bug.cgi?id=273599

Reviewed by Patrick Angle.

The method InspectorOverlay::update should be called to update the
overlay's position e.g. when a scroll event happens and elements move.
That function is exposed to the public by the
InspectorInstrumentation::didScroll static method, where objects
without direct access to the inspector overlay use it.

The static method is called in Chrome::scroll, but that path is only
visited when scrolling happens in the root <html> element. If the root
can't scroll but instead it's some deeper element being scrolled, we
should also find a way to call the static method to position the
overlay.

This commit gives that duty to LocalFrameView::didChangeScrollOffset
because that method is called when any element scrolls inside the frame.

* Source/WebCore/page/LocalFrameView.cpp:
(WebCore::LocalFrameView::didChangeScrollOffset):
   - When any element is scrolled, update the inspector overlay's
     position.

* Source/WebKit/UIProcess/Inspector/ios/WKInspectorHighlightView.mm:
(-[WKInspectorHighlightView initWithFrame:]):
   - Prevent the inspector overlay from blocking tap events into
     deeper scrollable elements.

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



To unsubscribe from these emails, change your notification settings at https://github.com/WebKit/WebKit/settings/notifications


More information about the webkit-changes mailing list