⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 287653 in webkit


Ignore:
Timestamp:
Jan 5, 2022, 3:02:02 PM (5 years ago)
Author:
timothy_horton@apple.com
Message:

Move more SDK checks to linkedOnOrAfter()
​https://bugs.webkit.org/show_bug.cgi?id=234875

Reviewed by Sam Weinig.

Source/WebCore:

  • html/MediaElementSession.cpp:

(WebCore::MediaElementSession::requiresFullscreenForVideoPlayback const):

  • loader/DocumentThreadableLoader.cpp:

(WebCore::DocumentThreadableLoader::makeCrossOriginAccessRequest):

  • platform/Timer.cpp:

(WebCore::shouldSuppressThreadSafetyCheck):

  • platform/cocoa/VersionChecks.h:

Source/WebKit:

  • Shared/WebPreferencesDefaultValues.cpp:

(WebKit::defaultCSSOMViewScrollingAPIEnabled):

Source/WebKitLegacy/mac:

  • WebView/WebPreferencesDefaultValues.mm:

(WebKit::defaultJavaScriptCanOpenWindowsAutomatically):

  • WebView/WebView.mm:

(needsLaBanquePostaleQuirks):

Location:
trunk/Source
Files:
10 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r287613 r287653  
     12022-01-05  Tim Horton  <timothy_horton@apple.com>
     2
     3        Move more SDK checks to linkedOnOrAfter()
     4        https://bugs.webkit.org/show_bug.cgi?id=234875
     5
     6        Reviewed by Sam Weinig.
     7
     8        * html/MediaElementSession.cpp:
     9        (WebCore::MediaElementSession::requiresFullscreenForVideoPlayback const):
     10        * loader/DocumentThreadableLoader.cpp:
     11        (WebCore::DocumentThreadableLoader::makeCrossOriginAccessRequest):
     12        * platform/Timer.cpp:
     13        (WebCore::shouldSuppressThreadSafetyCheck):
     14        * platform/cocoa/VersionChecks.h:
     15
    1162022-01-05  Youenn Fablet  <youenn@apple.com>
    217
  • trunk/Source/WebCore/html/MediaElementSession.cpp

    r284093 r287653  
    6767#include "AudioSession.h"
    6868#include "RuntimeApplicationChecks.h"
     69#include "VersionChecks.h"
    6970#include <wtf/cocoa/RuntimeApplicationChecksCocoa.h>
    7071#endif
    … …  
    858859    if (CocoaApplication::isIBooks())
    859860        return !m_element.hasAttributeWithoutSynchronization(HTMLNames::webkit_playsinlineAttr) && !m_element.hasAttributeWithoutSynchronization(HTMLNames::playsinlineAttr);
    860     if (applicationSDKVersion() < DYLD_IOS_VERSION_10_0)
     861    if (!linkedOnOrAfter(WebCore::SDKVersion::FirstWithUnprefixedPlaysInlineAttribute))
    861862        return !m_element.hasAttributeWithoutSynchronization(HTMLNames::webkit_playsinlineAttr);
    862863#endif
  • trunk/Source/WebCore/loader/DocumentThreadableLoader.cpp

    r287021 r287653  
    6666
    6767#if PLATFORM(IOS_FAMILY)
     68#include "VersionChecks.h"
    6869#include <wtf/cocoa/RuntimeApplicationChecksCocoa.h>
    6970#endif
    … …  
    202203
    203204#if PLATFORM(IOS_FAMILY)
    204     bool needsPreflightQuirk = IOSApplication::isMoviStarPlus() && applicationSDKVersion() < DYLD_IOS_VERSION_12_0 && (m_options.preflightPolicy == PreflightPolicy::Consider || m_options.preflightPolicy == PreflightPolicy::Force);
     205    bool needsPreflightQuirk = IOSApplication::isMoviStarPlus() && !linkedOnOrAfter(WebCore::SDKVersion::FirstWithoutMoviStarPlusCORSPreflightQuirk) && (m_options.preflightPolicy == PreflightPolicy::Consider || m_options.preflightPolicy == PreflightPolicy::Force);
    205206#else
    206207    bool needsPreflightQuirk = false;
  • trunk/Source/WebCore/platform/Timer.cpp

    r284167 r287653  
    3838
    3939#if PLATFORM(COCOA)
     40#include "VersionChecks.h"
    4041#include <wtf/cocoa/RuntimeApplicationChecksCocoa.h>
    4142#endif
    … …  
    251252{
    252253#if PLATFORM(IOS_FAMILY)
    253     return WebThreadIsEnabled() || applicationSDKVersion() < DYLD_IOS_VERSION_12_0;
     254    return WebThreadIsEnabled() || !linkedOnOrAfter(WebCore::SDKVersion::FirstWithTimerThreadSafetyChecks);
    254255#elif PLATFORM(MAC)
    255     return !isInWebProcess() && applicationSDKVersion() < DYLD_MACOSX_VERSION_10_14;
     256    return !isInWebProcess() && !linkedOnOrAfter(WebCore::SDKVersion::FirstWithTimerThreadSafetyChecks);
    256257#else
    257258    return false;
  • trunk/Source/WebCore/platform/cocoa/VersionChecks.h

    r286971 r287653  
    3737    FirstWithLinkPreviewEnabledByDefault = DYLD_IOS_VERSION_10_0,
    3838    FirstThatConvertsInvalidURLsToBlank = DYLD_IOS_VERSION_10_0,
     39    FirstWithoutTheSecretSocietyHiddenMysteryWindowOpenQuirk = DYLD_IOS_VERSION_10_0,
     40    FirstWithUnprefixedPlaysInlineAttribute = DYLD_IOS_VERSION_10_0,
    3941    FirstWithExceptionsForDuplicateCompletionHandlerCalls = DYLD_IOS_VERSION_11_0,
    4042    FirstWithExpiredOnlyReloadBehavior = DYLD_IOS_VERSION_11_0,
    … …  
    4446    FirstWhereUIScrollViewDoesNotApplyKeyboardInsetsUnconditionally = DYLD_IOS_VERSION_12_0,
    4547    FirstWithMainThreadReleaseAssertionInWebPageProxy = DYLD_IOS_VERSION_12_0,
     48    FirstWithoutMoviStarPlusCORSPreflightQuirk = DYLD_IOS_VERSION_12_0,
     49    FirstWithTimerThreadSafetyChecks = DYLD_IOS_VERSION_12_0,
    4650    FirstWithLazyGestureRecognizerInstallation = DYLD_IOS_VERSION_12_2,
    4751    FirstWithProcessSwapOnCrossSiteNavigation = DYLD_IOS_VERSION_12_2,
    … …  
    5559    FirstWhereWKContentViewDoesNotOverrideKeyCommands = DYLD_IOS_VERSION_13_0,
    5660    FirstThatSupportsOverflowHiddenOnMainFrame = DYLD_IOS_VERSION_13_0,
     61    FirstWithoutIMDbCSSOMViewScrollingQuirk = DYLD_IOS_VERSION_13_0,
    5762    FirstWhereSiteSpecificQuirksAreEnabledByDefault = DYLD_IOS_VERSION_13_2,
    5863    FirstThatRestrictsBaseURLSchemes = DYLD_IOS_VERSION_13_4,
    … …  
    6267    FirstWithWKWebsiteDataStoreInitReturningNil = DYLD_IOS_VERSION_14_0,
    6368    FirstWithWebSQLDisabledByDefaultInLegacyWebKit = DYLD_IOS_VERSION_14_0,
     69    FirstWithoutLaBanquePostaleQuirks = DYLD_IOS_VERSION_14_0,
    6470    FirstVersionWithiOSAppsOnMacOS = DYLD_IOS_VERSION_14_2,
    6571    FirstWithDataURLFragmentRemoval = DYLD_IOS_VERSION_14_5,
    … …  
    8288    FirstWithWebIconDatabaseWarning = DYLD_MACOSX_VERSION_10_13,
    8389    FirstWithMainThreadReleaseAssertionInWebPageProxy = DYLD_MACOSX_VERSION_10_14,
     90    FirstWithTimerThreadSafetyChecks = DYLD_MACOSX_VERSION_10_14,
    8491    FirstWithoutUnconditionalUniversalSandboxExtension = DYLD_MACOSX_VERSION_10_15,
    8592    FirstWithSnapshotAfterScreenUpdates = DYLD_MACOSX_VERSION_10_15,
  • trunk/Source/WebKit/ChangeLog

    r287651 r287653  
     12022-01-05  Tim Horton  <timothy_horton@apple.com>
     2
     3        Move more SDK checks to linkedOnOrAfter()
     4        https://bugs.webkit.org/show_bug.cgi?id=234875
     5
     6        Reviewed by Sam Weinig.
     7
     8        * Shared/WebPreferencesDefaultValues.cpp:
     9        (WebKit::defaultCSSOMViewScrollingAPIEnabled):
     10
    1112022-01-05  Tim Horton  <timothy_horton@apple.com>
    212
  • trunk/Source/WebKit/Shared/WebPreferencesDefaultValues.cpp

    r287093 r287653  
    6060bool defaultCSSOMViewScrollingAPIEnabled()
    6161{
    62     static bool result = WebCore::IOSApplication::isIMDb() && applicationSDKVersion() < DYLD_IOS_VERSION_13_0;
     62    static bool result = WebCore::IOSApplication::isIMDb() && !linkedOnOrAfter(WebCore::SDKVersion::FirstWithoutIMDbCSSOMViewScrollingQuirk);
    6363    return !result;
    6464}
  • trunk/Source/WebKitLegacy/mac/ChangeLog

    r287522 r287653  
     12022-01-05  Tim Horton  <timothy_horton@apple.com>
     2
     3        Move more SDK checks to linkedOnOrAfter()
     4        https://bugs.webkit.org/show_bug.cgi?id=234875
     5
     6        Reviewed by Sam Weinig.
     7
     8        * WebView/WebPreferencesDefaultValues.mm:
     9        (WebKit::defaultJavaScriptCanOpenWindowsAutomatically):
     10        * WebView/WebView.mm:
     11        (needsLaBanquePostaleQuirks):
     12
    1132022-01-02  Wenson Hsieh  <wenson_hsieh@apple.com>
    214
  • trunk/Source/WebKitLegacy/mac/WebView/WebPreferencesDefaultValues.mm

    r287228 r287653  
    110110bool defaultJavaScriptCanOpenWindowsAutomatically()
    111111{
    112     static bool shouldAllowWindowOpenWithoutUserGesture = WebCore::IOSApplication::isTheSecretSocietyHiddenMystery() && dyld_get_program_sdk_version() < DYLD_IOS_VERSION_10_0;
     112    static bool shouldAllowWindowOpenWithoutUserGesture = WebCore::IOSApplication::isTheSecretSocietyHiddenMystery() && !linkedOnOrAfter(WebCore::SDKVersion::FirstWithoutTheSecretSocietyHiddenMysteryWindowOpenQuirk);
    113113    return shouldAllowWindowOpenWithoutUserGesture;
    114114}
  • trunk/Source/WebKitLegacy/mac/WebView/WebView.mm

    r287164 r287653  
    229229#import <WebCore/UserStyleSheet.h>
    230230#import <WebCore/ValidationBubble.h>
     231#import <WebCore/VersionChecks.h>
    231232#import <WebCore/WebCoreJITOperations.h>
    232233#import <WebCore/WebCoreObjCExtras.h>
    … …  
    13911392static bool needsLaBanquePostaleQuirks()
    13921393{
    1393     static bool needsQuirks = WebCore::IOSApplication::isLaBanquePostale() && dyld_get_program_sdk_version() < DYLD_IOS_VERSION_14_0;
     1394    static bool needsQuirks = WebCore::IOSApplication::isLaBanquePostale() && !linkedOnOrAfter(WebCore::SDKVersion::FirstWithoutLaBanquePostaleQuirks);
    13941395    return needsQuirks;
    13951396}
Note: See TracChangeset for help on using the changeset viewer.