Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 8ea991203620d2c839702adc6aea4254c2adb498
      
https://github.com/WebKit/WebKit/commit/8ea991203620d2c839702adc6aea4254c2adb498
  Author: Tim Horton <[email protected]>
  Date:   2026-05-26 (Tue, 26 May 2026)

  Changed paths:
    M Source/WebKit/UIProcess/API/ios/WKWebViewIOS.mm
    M Tools/TestWebKitAPI/SourcesCocoa.txt
    A Tools/TestWebKitAPI/Tests/WebKit/WKWebView/WKWebViewSubclassedSetFrame.mm
    M Tools/TestWebKitAPI/Tests/WebKit/WKWebView/WKWebsiteDatastore.mm

  Log Message:
  -----------
  Crash under WKWebView _dispatchSetViewLayoutSize: when client overrides 
-setFrame:
https://bugs.webkit.org/show_bug.cgi?id=315626
rdar://177788035

Reviewed by Abrar Rahman Protyasha and Pascoe.

A client who overrides - [WKWebView setFrame:] can enter various frame
adjustment codepaths during WKWebView initialization, before WebPageProxy
has been created, resulting in a crash. Add a null check to avoid this.

Test: WKWebView.SubclassedSetFrameDuringInitDoesNotCrash

* Source/WebKit/UIProcess/API/ios/WKWebViewIOS.mm:
(-[WKWebView _dispatchSetViewLayoutSize:]):
(-[WKWebView _frameOrBoundsWillChange]):
(-[WKWebView _frameOrBoundsMayHaveChanged]):
Bail if _page is not initialized yet.

* Tools/TestWebKitAPI/Tests/WebKit/WKWebView/WKWebViewSubclassedSetFrame.mm:
Add a test.

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



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

Reply via email to