[webkit-changes] [WebKit/WebKit] 7ef05e: System fonts are not displayed in the correct styl...

megangardner noreply at github.com
Tue Aug 8 19:42:54 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 7ef05e80175b3e2596090dedec3c93e5ea306796
      https://github.com/WebKit/WebKit/commit/7ef05e80175b3e2596090dedec3c93e5ea306796
  Author: Megan Gardner <megan_gardner at apple.com>
  Date:   2023-08-08 (Tue, 08 Aug 2023)

  Changed paths:
    M Source/WebCore/PAL/PAL.xcodeproj/project.pbxproj
    M Source/WebCore/PAL/pal/spi/ios/UIKitSPI.h
    A Source/WebCore/PAL/pal/system/ios/Device.cpp
    A Source/WebCore/PAL/pal/system/ios/Device.h
    A Source/WebCore/PAL/pal/system/ios/UserInterfaceIdiom.h
    A Source/WebCore/PAL/pal/system/ios/UserInterfaceIdiom.mm
    M Source/WebCore/SourcesCocoa.txt
    M Source/WebCore/WebCore.xcodeproj/project.pbxproj
    M Source/WebCore/loader/cache/CachedResourceLoader.cpp
    M Source/WebCore/page/NavigatorBase.cpp
    M Source/WebCore/page/ScreenOrientationType.h
    M Source/WebCore/page/cocoa/SettingsBaseCocoa.mm
    M Source/WebCore/platform/graphics/cocoa/SystemFontDatabaseCoreText.cpp
    R Source/WebCore/platform/ios/Device.cpp
    R Source/WebCore/platform/ios/Device.h
    M Source/WebCore/platform/ios/PlatformScreenIOS.mm
    M Source/WebCore/platform/ios/UserAgentIOS.mm
    M Source/WebCore/platform/network/BlobRegistry.h
    M Source/WebKit/Platform/spi/ios/UIKitSPI.h
    M Source/WebKit/Scripts/webkit/messages.py
    R Source/WebKit/Shared/UserInterfaceIdiom.h
    R Source/WebKit/Shared/UserInterfaceIdiom.mm
    M Source/WebKit/Shared/UserInterfaceIdiom.serialization.in
    M Source/WebKit/Shared/WebPreferencesDefaultValues.cpp
    M Source/WebKit/Shared/WebProcessCreationParameters.h
    M Source/WebKit/Shared/WebProcessCreationParameters.serialization.in
    M Source/WebKit/Shared/ios/WebPreferencesDefaultValuesIOS.mm
    M Source/WebKit/UIProcess/API/Cocoa/WKWebViewConfiguration.mm
    M Source/WebKit/UIProcess/Cocoa/WebProcessPoolCocoa.mm
    M Source/WebKit/UIProcess/ios/SmartMagnificationController.mm
    M Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm
    M Source/WebKit/UIProcess/ios/WebDataListSuggestionsDropdownIOS.mm
    M Source/WebKit/UIProcess/ios/WebPageProxyIOS.mm
    M Source/WebKit/UIProcess/ios/forms/WKDateTimeInputControl.mm
    M Source/WebKit/UIProcess/ios/forms/WKFileUploadPanel.mm
    M Source/WebKit/UIProcess/ios/forms/WKFormColorControl.mm
    M Source/WebKit/UIProcess/ios/forms/WKFormSelectControl.mm
    M Source/WebKit/UIProcess/ios/forms/WKFormSelectPicker.mm
    M Source/WebKit/WebKit.xcodeproj/project.pbxproj
    M Source/WebKit/WebProcess/WebPage/ios/WebPageIOS.mm
    M Source/WebKit/WebProcess/WebProcess.h
    M Source/WebKit/WebProcess/WebProcess.messages.in
    M Source/WebKit/WebProcess/cocoa/WebProcessCocoa.mm
    M Source/WebKitLegacy/mac/WebView/WebPreferencesDefaultValues.mm

  Log Message:
  -----------
  System fonts are not displayed in the correct style for their idiom in compatibility mode on visionOS.
https://bugs.webkit.org/show_bug.cgi?id=259844
rdar://107389870

Reviewed by Tim Horton.

When requesting information about system fonts, we were always going with the current idiom, which for
the web-process will always match the device. If the UIProcess is in compatibility mode, we need
to make sure that we are using the idiom that it is in, or we will get system fonts on the wrong size.

We move the required classes into PAL so they can be used from WebCore while maintaining platform agnosticism
in WebCore itself, and then read the appropriate flag in the font code. Since the font database is
multithreaded, we also need to ensure that the flag is thread-safe.

* Source/WebCore/PAL/pal/system/ios/Device.cpp: Renamed from Source/WebCore/platform/ios/Device.cpp.
(PAL::deviceClassIsSmallScreen):
(PAL::deviceClassIsReality):
(PAL::deviceName):
(PAL::deviceHasIPadCapability):
* Source/WebCore/PAL/pal/system/ios/Device.h: Renamed from Source/WebCore/platform/ios/Device.h.
* Source/WebCore/PAL/pal/system/ios/UserInterfaceIdiom.h: Renamed from Source/WebKit/Shared/UserInterfaceIdiom.h.
* Source/WebCore/PAL/pal/system/ios/UserInterfaceIdiom.mm: Renamed from Source/WebKit/Shared/UserInterfaceIdiom.mm.
(PAL::currentUserInterfaceIdiomIsSmallScreen):
(PAL::currentUserInterfaceIdiomIsReality):
(PAL::currentUserInterfaceIdiom):
(PAL::setCurrentUserInterfaceIdiom):
(PAL::updateCurrentUserInterfaceIdiom):

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




More information about the webkit-changes mailing list