Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: c45540108d1deae5e94310fa66f8ea7b0287cfe2
      
https://github.com/WebKit/WebKit/commit/c45540108d1deae5e94310fa66f8ea7b0287cfe2
  Author: Ryan Reno <[email protected]>
  Date:   2026-02-12 (Thu, 12 Feb 2026)

  Changed paths:
    M Source/WebKit/UIProcess/API/Cocoa/WKWebViewInternal.h
    M Source/WebKit/UIProcess/API/ios/WKWebViewIOS.mm
    M Source/WebKit/UIProcess/API/ios/WKWebViewPrivateForTestingIOS.h
    M Source/WebKit/UIProcess/API/ios/WKWebViewTestingIOS.mm
    M Tools/TestWebKitAPI/Tests/ios/WKScrollViewTests.mm

  Log Message:
  -----------
  Throttle visible content rect updates when changing obscured insets 
interactively.
https://bugs.webkit.org/show_bug.cgi?id=307463
rdar://156417823

Reviewed by Simon Fraser.

When changing obscured insets interactively we will get visible content rect 
updates every frame.
We update bookkeeping, scrolling tree state, trigger rendering update and tile 
painting,
as well as firing resize and viewport events. These things all add up to be 
expensive in terms
of power use. By throttling these updates we can save significant power, up to 
2% as measured by
an iOS browsing power benchmark on iPhones.

* Source/WebKit/UIProcess/API/Cocoa/WKWebViewInternal.h:
* Source/WebKit/UIProcess/API/ios/WKWebViewIOS.mm:
(-[WKWebView _scheduleForcedVisibleContentRectUpdate]):
(-[WKWebView _cancelPendingVisibleContentRectUpdateTimer]):
(-[WKWebView _scheduleVisibleContentRectUpdateWithDelay:]):
(-[WKWebView _updateVisibleContentRects]):
(-[WKWebView _endInteractiveObscuredInsetsChange]):
* Source/WebKit/UIProcess/API/ios/WKWebViewPrivateForTestingIOS.h:
* Source/WebKit/UIProcess/API/ios/WKWebViewTestingIOS.mm:
(-[WKWebView _hasPendingVisibleContentRectUpdateTimerForTesting]):
* Tools/TestWebKitAPI/Tests/ios/WKScrollViewTests.mm:
(TestWebKitAPI::TEST(WKScrollViewTests, 
VisibleContentRectUpdatesDuringInteractiveObscuredInsetsChangeAreThrottled)):
(TestWebKitAPI::TEST(WKScrollViewTests, 
ThrottledVisibleContentRectUpdateTimerCancelledWhenEndingInteractiveUpdates)):
(TestWebKitAPI::TEST(WKScrollViewTests, 
ForcedVisibleContentRectUpdateCancelsPendingThrottleTimer)):

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



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

Reply via email to