Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: bf24e9a12c1769d4eaaec4c8277addfc0f02d180
      
https://github.com/WebKit/WebKit/commit/bf24e9a12c1769d4eaaec4c8277addfc0f02d180
  Author: Jessica Lee <[email protected]>
  Date:   2025-12-16 (Tue, 16 Dec 2025)

  Changed paths:
    M Source/WebCore/loader/FrameLoader.cpp
    M Source/WebCore/loader/LocalFrameLoaderClient.h
    M Source/WebKitLegacy/mac/WebCoreSupport/WebFrameLoaderClient.h
    M Source/WebKitLegacy/mac/WebCoreSupport/WebFrameLoaderClient.mm
    M Tools/TestWebKitAPI/Tests/WebKitCocoa/AutoLayoutIntegration.mm

  Log Message:
  -----------
  Layout milestone notifications should be dispatched asynchronously
https://bugs.webkit.org/show_bug.cgi?id=303958
rdar://153254633

Reviewed by Ryosuke Niwa.

When a layout milestone notification fires, the layout may not be completed but 
client
callbacks to layout milestone notifications can trigger Javascript execution. 
This results
in javascript execution failing (and consequently crashing) to run during the
layout process because it is correctly not permitted to do so. We delay firing 
layout
milestone notifications by dispatching them asychronously in order to prevent 
this.

Test: Tools/TestWebKitAPI/Tests/WebKitCocoa/AutoLayoutIntegration.mm

* Source/WebCore/loader/FrameLoader.cpp:
(WebCore::FrameLoader::didReachLayoutMilestone):
* Source/WebCore/loader/LocalFrameLoaderClient.h:
* Source/WebKitLegacy/mac/WebCoreSupport/WebFrameLoaderClient.h:
* Source/WebKitLegacy/mac/WebCoreSupport/WebFrameLoaderClient.mm:
(WebFrameLoaderClient::willDispatchDidReachLayoutMilestone):
(WebFrameLoaderClient::dispatchDidReachLayoutMilestone):
* Tools/TestWebKitAPI/Tests/WebKitCocoa/AutoLayoutIntegration.mm:
(TEST(WebKit, AutoLayoutBatchesUpdatesWhenInvalidatingIntrinsicContentSize)):

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



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

Reply via email to