Changeset 256054 in webkit


Ignore:
Timestamp:
Feb 7, 2020 1:16:57 PM (4 years ago)
Author:
dbates@webkit.org
Message:

Legacy WebKit: Have linkedOnOrAfter() respect the NSDefault WebKitLinkedOnOrAfterEverything and opt DumpRenderTree in
https://bugs.webkit.org/show_bug.cgi?id=207366

Reviewed by Brent Fulgham.

Source/WebKitLegacy/mac:

If the user default WebKitLinkedOnOrAfterEverything is enabled then have linkedOnOrAfter()
always return true.

  • Misc/WebKitVersionChecks.mm:

(linkedOnOrAfter): Read the user default WebKitLinkedOnOrAfterEverything once and cache it.
If the default is enabled then early return true. Outside of tooling this default is unlikely
to be set.

Tools:

Enable default WebKitLinkedOnOrAfterEverything in DumpRenderTree just as we do in WebKitTestRunner.
This lets me put test results for Mac and iOS Legacy WebKit in the same cross-platform directory
as the actual test instead of under a platform-specific directory even when the tests' behavior
depends on the link-time version of WebKit.

Note that testing of pre-linked behavior can still be accomplished by test writers by exposing settings
and toggling them in a test.

  • DumpRenderTree/mac/DumpRenderTree.mm:

(setDefaultsToConsistentValuesForTesting):

Location:
trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKitLegacy/mac/ChangeLog

    r256051 r256054  
     12020-02-07  Daniel Bates  <dabates@apple.com>
     2
     3        Legacy WebKit: Have linkedOnOrAfter() respect the NSDefault WebKitLinkedOnOrAfterEverything and opt DumpRenderTree in
     4        https://bugs.webkit.org/show_bug.cgi?id=207366
     5
     6        Reviewed by Brent Fulgham.
     7
     8        If the user default WebKitLinkedOnOrAfterEverything is enabled then have linkedOnOrAfter()
     9        always return true.
     10
     11        * Misc/WebKitVersionChecks.mm:
     12        (linkedOnOrAfter): Read the user default WebKitLinkedOnOrAfterEverything once and cache it.
     13        If the default is enabled then early return true. Outside of tooling this default is unlikely
     14        to be set.
     15
    1162020-02-07  Sam Weinig  <weinig@apple.com>
    217
  • trunk/Source/WebKitLegacy/mac/Misc/WebKitVersionChecks.mm

    r237266 r256054  
    3030
    3131#import <mach-o/dyld.h>
     32#import <mutex>
    3233
    3334static int WebKitLinkTimeVersion(void);
     
    7172bool linkedOnOrAfter(SDKVersion sdkVersion)
    7273{
     74    static bool linkedOnOrAfterEverything;
     75    static std::once_flag once;
     76    std::call_once(once, [] {
     77        if ([[NSUserDefaults standardUserDefaults] boolForKey:@"WebKitLinkedOnOrAfterEverything"])
     78            linkedOnOrAfterEverything = true;
     79    });
     80    if (UNLIKELY(linkedOnOrAfterEverything))
     81        return true;
    7382    return dyld_get_program_sdk_version() >= static_cast<uint32_t>(sdkVersion);
    7483}
  • trunk/Tools/ChangeLog

    r256051 r256054  
     12020-02-07  Daniel Bates  <dabates@apple.com>
     2
     3        Legacy WebKit: Have linkedOnOrAfter() respect the NSDefault WebKitLinkedOnOrAfterEverything and opt DumpRenderTree in
     4        https://bugs.webkit.org/show_bug.cgi?id=207366
     5
     6        Reviewed by Brent Fulgham.
     7
     8        Enable default WebKitLinkedOnOrAfterEverything in DumpRenderTree just as we do in WebKitTestRunner.
     9        This lets me put test results for Mac and iOS Legacy WebKit in the same cross-platform directory
     10        as the actual test instead of under a platform-specific directory even when the tests' behavior
     11        depends on the link-time version of WebKit.
     12
     13        Note that testing of pre-linked behavior can still be accomplished by test writers by exposing settings
     14        and toggling them in a test.
     15
     16        * DumpRenderTree/mac/DumpRenderTree.mm:
     17        (setDefaultsToConsistentValuesForTesting):
     18
    1192020-02-03  Sam Weinig  <weinig@apple.com>
    220
  • trunk/Tools/DumpRenderTree/mac/DumpRenderTree.mm

    r255961 r256054  
    10721072        WebKitAllowsInlineMediaPlaybackPreferenceKey: @YES,
    10731073        WebKitInlineMediaPlaybackRequiresPlaysInlineAttributeKey: @NO,
     1074        @"WebKitLinkedOnOrAfterEverything": @YES,
    10741075        @"UseWebKitWebInspector": @YES,
    10751076#if !PLATFORM(IOS_FAMILY)
Note: See TracChangeset for help on using the changeset viewer.