[webkit-changes] [WebKit/WebKit] 19739c: Move [WKWebViewConfiguration _respectsImageOrienta...

Gerald Squelart noreply at github.com
Mon Mar 11 14:47:20 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 19739c622738273c29292e7a1a65f18435981a97
      https://github.com/WebKit/WebKit/commit/19739c622738273c29292e7a1a65f18435981a97
  Author: Gerald Squelart <g_squelart at apple.com>
  Date:   2024-03-11 (Mon, 11 Mar 2024)

  Changed paths:
    M Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm
    M Source/WebKit/UIProcess/API/Cocoa/WKWebViewConfiguration.mm
    M Tools/TestWebKitAPI/SourcesCocoa.txt
    M Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj
    A Tools/TestWebKitAPI/cocoa/TestWKWebViewConfiguration.mm

  Log Message:
  -----------
  Move [WKWebViewConfiguration _respectsImageOrientation] to API::PageConfiguration
https://bugs.webkit.org/show_bug.cgi?id=270557
rdar://124115170

Reviewed by Alex Christensen.

This flag already exists in WebPreferences, named "shouldRespectImageOrientation",
so it's just a matter of using it directly through
`API::PageConfiguration::preferences()`.

* Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _setupPageConfiguration:]):
The flag is already set when copying the WebPreferences pointer above.

* Source/WebKit/UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
(-[WKWebViewConfiguration init]):
The flag is already initialized to the same platform-dependent value based on
Source/WTF/Scripts/Preferences/UnifiedWebPreferences.yaml

(-[WKWebViewConfiguration copyWithZone:]):
The flag is already copied as part of _pageConfiguration's preferences above.

(-[WKWebViewConfiguration _respectsImageOrientation]):
(-[WKWebViewConfiguration _setRespectsImageOrientation:]):
Directly access the flag in _pageConfiguration's preferences through
self.preferences, which ensures it's lazily created if needed.

* Tools/TestWebKitAPI/SourcesCocoa.txt:
* Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* Tools/TestWebKitAPI/cocoa/TestWKWebViewConfiguration.mm: Added.
(TEST):

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