Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 02a9e6a19034803b8389621e995adcf9ec0817e8
      
https://github.com/WebKit/WebKit/commit/02a9e6a19034803b8389621e995adcf9ec0817e8
  Author: Wenson Hsieh <[email protected]>
  Date:   2025-05-08 (Thu, 08 May 2025)

  Changed paths:
    M Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm
    M Source/WebKit/UIProcess/API/mac/WKWebViewPrivateForTestingMac.h
    M Source/WebKit/UIProcess/API/mac/WKWebViewTestingMac.mm
    M Source/WebKit/UIProcess/mac/WebViewImpl.h
    M Tools/TestWebKitAPI/Tests/WebKitCocoa/ObscuredContentInsets.mm

  Log Message:
  -----------
  REGRESSION (294575@main): [macOS] Content inset fill view no longer updates 
when resizing web view
https://bugs.webkit.org/show_bug.cgi?id=292750
rdar://150971512

Reviewed by Richard Robinson.

The changes to `-_updateFixedColorExtensionViews` in 294575@main made it so 
that we no longer update
the content inset fill view on macOS as a result of updating the fixed color 
extension views. This
is because the color extension views are animated, which means we need to defer 
updating the content
inset fill view until after the color extension view is done with its animated 
transition.

However, this codepath was also generally responsible for keeping the content 
inset fill view's
frame up to date when the web view is resized, since 
`_recalculateViewportSizes…:` also calls into
`-_updateFixedColorExtensionViews`. As a result, nothing updates the content 
inset fill view on
macOS when resizing the view.

Fix this by restoring the call to `_impl->updateContentInsetFillViews();` when 
viewport geometry
changes.

* Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView 
_recalculateViewportSizesWithMinimumViewportInset:maximumViewportInset:throwOnInvalidInput:]):

See above.

* Source/WebKit/UIProcess/API/mac/WKWebViewPrivateForTestingMac.h:
* Source/WebKit/UIProcess/API/mac/WKWebViewTestingMac.mm:
(-[WKWebView _contentInsetFillViewForTesting]):
* Source/WebKit/UIProcess/mac/WebViewImpl.h:
* Tools/TestWebKitAPI/Tests/WebKitCocoa/ObscuredContentInsets.mm:
(TestWebKitAPI::TEST(ObscuredContentInsets, ResizeContentInsetFillView)):

Add a test to verify that changing the web view's size updates the content 
inset fill view's frame
accordingly.

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



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to