[webkit-changes] [WebKit/WebKit] d00395: REGRESSION (290068 at main): Top of web view in Safar...

Wenson Hsieh noreply at github.com
Thu Feb 13 14:24:58 PST 2025


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: d00395b73a5aa09bfc6ed1255dc05091b30d0b9e
      https://github.com/WebKit/WebKit/commit/d00395b73a5aa09bfc6ed1255dc05091b30d0b9e
  Author: Wenson Hsieh <wenson_hsieh at apple.com>
  Date:   2025-02-13 (Thu, 13 Feb 2025)

  Changed paths:
    M Source/WebCore/page/scrolling/ScrollingStateNode.h
    M Source/WebKit/UIProcess/mac/WebViewImpl.mm
    M Tools/TestWebKitAPI/SourcesCocoa.txt
    M Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj
    A Tools/TestWebKitAPI/Tests/WebKitCocoa/ObscuredContentInsets.mm
    R Tools/TestWebKitAPI/Tests/WebKitCocoa/TopContentInset.mm

  Log Message:
  -----------
  REGRESSION (290068 at main): Top of web view in Safari is hidden when opening a new tab via link
https://bugs.webkit.org/show_bug.cgi?id=287635
rdar://144742838

Reviewed by Simon Fraser and Abrar Rahman Protyasha.

In 290068 at main, I'd unintentionally changed the behavior of `WebViewImpl::obscuredContentInsets()`,
such that it no longer returns the pending obscured content insets (formerly, only the top content
inset) in the case where the client is setting the top content inset asynchronously. Fix this by
restoring the old behavior, by replacing: the return value `m_page->obscuredContentInsets()` with
`m_page->pendingOrActualObscuredContentInsets();`.

* Source/WebCore/page/scrolling/ScrollingStateNode.h:

Drive-by fix: realign the leading whitespace before this enum value.

* Source/WebKit/UIProcess/mac/WebViewImpl.mm:
(WebKit::WebViewImpl::obscuredContentInsets const):

See above.

* Tools/TestWebKitAPI/SourcesCocoa.txt:
* Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* Tools/TestWebKitAPI/Tests/WebKitCocoa/ObscuredContentInsets.mm: Renamed from Tools/TestWebKitAPI/Tests/WebKitCocoa/TopContentInset.mm.
(-[FullscreenChangeMessageHandler userContentController:didReceiveScriptMessage:]):
(TestWebKitAPI::TEST(TopContentInset, Fullscreen)):
(TestWebKitAPI::TEST(TopContentInset, AutomaticAdjustment)):
(TestWebKitAPI::TEST(TopContentInset, AutomaticAdjustmentDisabled)):
(TestWebKitAPI::TEST(TopContentInset, AutomaticAdjustmentDoesNotAffectInsetViews)):
(TestWebKitAPI::TEST(ObscuredContentInsets, SetAndGetObscuredContentInsets)):

Rename `TopContentInset.mm` to `ObscuredContentInsets.mm`, and add a new API test.

Canonical link: https://commits.webkit.org/290366@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