Changeset 208983 in webkit


Ignore:
Timestamp:
Nov 26, 2016 8:21:49 PM (7 years ago)
Author:
commit-queue@webkit.org
Message:

Convert IntersectionObserver over to using RuntimeEnabledFeatures so it can be properly excluded from script
https://bugs.webkit.org/show_bug.cgi?id=164965

Patch by Sam Weinig <sam@webkit.org> on 2016-11-26
Reviewed by Simon Fraser.

Source/JavaScriptCore:

  • runtime/CommonIdentifiers.h:

Add identifiers needed for RuntimeEnabledFeatures.

Source/WebCore:

  • bindings/generic/RuntimeEnabledFeatures.cpp:

(WebCore::RuntimeEnabledFeatures::reset):

  • bindings/generic/RuntimeEnabledFeatures.h:

(WebCore::RuntimeEnabledFeatures::setIntersectionObserverEnabled):
(WebCore::RuntimeEnabledFeatures::intersectionObserverEnabled):
Add intersection observer setting.

  • page/IntersectionObserver.idl:
  • page/IntersectionObserverEntry.idl:

Convert to use EnabledAtRuntime extended attribute.

  • page/Settings.in:

Remove the old intersection observer setting.

Source/WebKit/mac:

  • WebView/WebPreferenceKeysPrivate.h:
  • WebView/WebPreferences.mm:

(-[WebPreferences intersectionObserverEnabled]):
(-[WebPreferences setIntersectionObserverEnabled:]):

  • WebView/WebPreferencesPrivate.h:
  • WebView/WebView.mm:

(-[WebView _preferencesChanged:]):
Add a preference, defaulting to off, for enabling IntersectionObserver.

Source/WebKit2:

  • Shared/WebPreferencesDefinitions.h:
  • UIProcess/API/C/WKPreferences.cpp:

(WKPreferencesSetIntersectionObserverEnabled):
(WKPreferencesGetIntersectionObserverEnabled):

  • UIProcess/API/C/WKPreferencesRefPrivate.h:
  • WebProcess/WebPage/WebPage.cpp:

(WebKit::WebPage::updatePreferences):
Add a preference, defaulting to off, for enabling IntersectionObserver.

Tools:

  • DumpRenderTree/DumpRenderTree.xcodeproj/project.pbxproj:

Add new files.

  • DumpRenderTree/TestOptions.h: Added.
  • DumpRenderTree/TestOptions.mm: Added.

(parseBooleanTestHeaderValue):
(TestOptions::TestOptions):
Port TestOption parsing from WKTR to DRT.

  • DumpRenderTree/mac/DumpRenderTree.mm:

(resetWebPreferencesToConsistentValues):
(resetWebViewToConsistentStateBeforeTesting):
(runTest):

  • WebKitTestRunner/TestController.cpp:

Pass TestOptions down to resetWebPreferencesToConsistentValues to allow setting
preferences conditionally.

(WTR::TestController::resetPreferencesToConsistentValues):
(WTR::updateTestOptionsFromTestHeader):

  • WebKitTestRunner/TestOptions.h:

Add a new test option header, enableIntersectionObserver, to enable IntersectionObserver.

LayoutTests:

  • intersection-observer/intersection-observer-entry-interface.html:
  • intersection-observer/intersection-observer-interface.html:
  • resources/testharnessreport.js:

Switch from enabling IntersectionObserver via internals.settings to using
comment header switches.

Location:
trunk
Files:
1 added
27 edited
1 copied

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r208981 r208983  
     12016-11-26  Sam Weinig  <sam@webkit.org>
     2
     3        Convert IntersectionObserver over to using RuntimeEnabledFeatures so it can be properly excluded from script
     4        https://bugs.webkit.org/show_bug.cgi?id=164965
     5
     6        Reviewed by Simon Fraser.
     7
     8        * intersection-observer/intersection-observer-entry-interface.html:
     9        * intersection-observer/intersection-observer-interface.html:
     10        * resources/testharnessreport.js:
     11        Switch from enabling IntersectionObserver via internals.settings to using
     12        comment header switches.
     13
    1142016-11-26  Simon Fraser  <simon.fraser@apple.com>
    215
  • trunk/LayoutTests/intersection-observer/intersection-observer-entry-interface.html

    r208181 r208983  
    1 <!DOCTYPE html>
     1<!DOCTYPE html><!-- webkit-test-runner [ enableIntersectionObserver=true ] -->
    22<head>
    33    <title>IntersectionObserverEntry interface tests.</title>
  • trunk/LayoutTests/intersection-observer/intersection-observer-interface.html

    r208181 r208983  
    1 <!DOCTYPE html>
     1<!DOCTYPE html><!-- webkit-test-runner [ enableIntersectionObserver=true ] -->
    22<head>
    33    <title>IntersectionObserver interface tests.</title>
  • trunk/LayoutTests/resources/testharnessreport.js

    r208980 r208983  
    9191    if (window.internals) {
    9292        internals.setResourceTimingSupport(true);
    93         internals.settings.setIntersectionObserverEnabled(true);
    9493    }
    9594}
  • trunk/Source/JavaScriptCore/ChangeLog

    r208970 r208983  
     12016-11-26  Sam Weinig  <sam@webkit.org>
     2
     3        Convert IntersectionObserver over to using RuntimeEnabledFeatures so it can be properly excluded from script
     4        https://bugs.webkit.org/show_bug.cgi?id=164965
     5
     6        Reviewed by Simon Fraser.
     7
     8        * runtime/CommonIdentifiers.h:
     9        Add identifiers needed for RuntimeEnabledFeatures.
     10
    1112016-11-23  Zan Dobersek  <zdobersek@igalia.com>
    212
  • trunk/Source/JavaScriptCore/runtime/CommonIdentifiers.h

    r208939 r208983  
    6565    macro(Infinity) \
    6666    macro(InputEvent) \
     67    macro(IntersectionObserver) \
     68    macro(IntersectionObserverEntry) \
    6769    macro(Intl) \
    6870    macro(JSON) \
  • trunk/Source/WebCore/ChangeLog

    r208982 r208983  
     12016-11-26  Sam Weinig  <sam@webkit.org>
     2
     3        Convert IntersectionObserver over to using RuntimeEnabledFeatures so it can be properly excluded from script
     4        https://bugs.webkit.org/show_bug.cgi?id=164965
     5
     6        Reviewed by Simon Fraser.
     7
     8        * bindings/generic/RuntimeEnabledFeatures.cpp:
     9        (WebCore::RuntimeEnabledFeatures::reset):
     10        * bindings/generic/RuntimeEnabledFeatures.h:
     11        (WebCore::RuntimeEnabledFeatures::setIntersectionObserverEnabled):
     12        (WebCore::RuntimeEnabledFeatures::intersectionObserverEnabled):
     13        Add intersection observer setting.
     14
     15        * page/IntersectionObserver.idl:
     16        * page/IntersectionObserverEntry.idl:
     17        Convert to use EnabledAtRuntime extended attribute.
     18
     19        * page/Settings.in:
     20        Remove the old intersection observer setting.
     21
    1222016-11-26  Simon Fraser  <simon.fraser@apple.com>
    223
  • trunk/Source/WebCore/bindings/generic/RuntimeEnabledFeatures.cpp

    r205214 r208983  
    110110    m_cssGridLayoutEnabled = true;
    111111#endif
    112 
     112#if ENABLE(INTERSECTION_OBSERVER)
     113    m_intersectionObserverEnabled = false;
     114#endif
    113115}
    114116
  • trunk/Source/WebCore/bindings/generic/RuntimeEnabledFeatures.h

    r208939 r208983  
    228228#endif
    229229
     230#if ENABLE(INTERSECTION_OBSERVER)
     231    void setIntersectionObserverEnabled(bool isEnabled) { m_intersectionObserverEnabled = isEnabled; }
     232    bool intersectionObserverEnabled() const { return m_intersectionObserverEnabled; }
     233#endif
     234
    230235    void setModernMediaControlsEnabled(bool areEnabled) { m_areModernMediaControlsEnabled = areEnabled; }
    231236    bool modernMediaControlsEnabled() const { return m_areModernMediaControlsEnabled; }
     
    354359#endif
    355360
     361#if ENABLE(INTERSECTION_OBSERVER)
     362    bool m_intersectionObserverEnabled { false };
     363#endif
     364
    356365    friend class WTF::NeverDestroyed<RuntimeEnabledFeatures>;
    357366};
  • trunk/Source/WebCore/page/IntersectionObserver.idl

    r208181 r208983  
    3030    Constructor(IntersectionObserverCallback callback, optional IntersectionObserverInit options),
    3131    ImplementationLacksVTable,
    32     EnabledBySetting=IntersectionObserver
     32    EnabledAtRuntime=IntersectionObserver
    3333] interface IntersectionObserver {
    3434    readonly attribute Element? root;
  • trunk/Source/WebCore/page/IntersectionObserverEntry.idl

    r208181 r208983  
    3232    Constructor(IntersectionObserverEntryInit intersectionObserverEntryInit),
    3333    ImplementationLacksVTable,
    34     EnabledBySetting=IntersectionObserver
     34    EnabledAtRuntime=IntersectionObserver
    3535] interface IntersectionObserverEntry {
    3636    readonly attribute DOMHighResTimeStamp time;
  • trunk/Source/WebCore/page/Settings.in

    r208903 r208983  
    280280# Runtime-enabled features
    281281visualViewportEnabled initial=false, setNeedsStyleRecalcInAllFrames=1
    282 intersectionObserverEnabled initial=false
    283282
    284283inputEventsEnabled initial=true
  • trunk/Source/WebKit/mac/ChangeLog

    r208969 r208983  
     12016-11-26  Sam Weinig  <sam@webkit.org>
     2
     3        Convert IntersectionObserver over to using RuntimeEnabledFeatures so it can be properly excluded from script
     4        https://bugs.webkit.org/show_bug.cgi?id=164965
     5
     6        Reviewed by Simon Fraser.
     7
     8        * WebView/WebPreferenceKeysPrivate.h:
     9        * WebView/WebPreferences.mm:
     10        (-[WebPreferences intersectionObserverEnabled]):
     11        (-[WebPreferences setIntersectionObserverEnabled:]):
     12        * WebView/WebPreferencesPrivate.h:
     13        * WebView/WebView.mm:
     14        (-[WebView _preferencesChanged:]):
     15        Add a preference, defaulting to off, for enabling IntersectionObserver.
     16
    1172016-11-22  Dan Bernstein  <mitz@apple.com>
    218
  • trunk/Source/WebKit/mac/WebView/WebPreferenceKeysPrivate.h

    r208903 r208983  
    217217#define WebKitMockCaptureDevicesEnabledPreferenceKey @"WebKitMockCaptureDevicesEnabled"
    218218#define WebKitMediaCaptureRequiresSecureConnectionPreferenceKey @"WebKitMediaCaptureRequiresSecureConnection"
    219 
    220219#define WebKitAttachmentElementEnabledPreferenceKey @"WebKitAttachmentElementEnabled"
    221 
     220#define WebKitIntersectionObserverEnabledPreferenceKey @"WebKitIntersectionObserverEnabled"
     221
  • trunk/Source/WebKit/mac/WebView/WebPreferences.mm

    r208903 r208983  
    28502850}
    28512851
     2852- (BOOL)intersectionObserverEnabled
     2853{
     2854    return [self _boolValueForKey:WebKitIntersectionObserverEnabledPreferenceKey];
     2855}
     2856
     2857- (void)setIntersectionObserverEnabled:(BOOL)flag
     2858{
     2859    [self _setBoolValue:flag forKey:WebKitIntersectionObserverEnabledPreferenceKey];
     2860}
     2861
    28522862@end
    28532863
  • trunk/Source/WebKit/mac/WebView/WebPreferencesPrivate.h

    r208982 r208983  
    519519@property (nonatomic) BOOL attachmentElementEnabled;
    520520@property (nonatomic) BOOL allowsInlineMediaPlaybackAfterFullscreen;
    521 
     521@property (nonatomic) BOOL intersectionObserverEnabled;
    522522
    523523@end
  • trunk/Source/WebKit/mac/WebView/WebView.mm

    r208982 r208983  
    28632863#endif
    28642864
     2865#if ENABLE(INTERSECTION_OBSERVER)
     2866    RuntimeEnabledFeatures::sharedFeatures().setIntersectionObserverEnabled(preferences.intersectionObserverEnabled);
     2867#endif
     2868
    28652869    NSTimeInterval timeout = [preferences incrementalRenderingSuppressionTimeoutInSeconds];
    28662870    if (timeout > 0)
  • trunk/Source/WebKit2/ChangeLog

    r208982 r208983  
     12016-11-26  Sam Weinig  <sam@webkit.org>
     2
     3        Convert IntersectionObserver over to using RuntimeEnabledFeatures so it can be properly excluded from script
     4        https://bugs.webkit.org/show_bug.cgi?id=164965
     5
     6        Reviewed by Simon Fraser.
     7
     8        * Shared/WebPreferencesDefinitions.h:
     9        * UIProcess/API/C/WKPreferences.cpp:
     10        (WKPreferencesSetIntersectionObserverEnabled):
     11        (WKPreferencesGetIntersectionObserverEnabled):
     12        * UIProcess/API/C/WKPreferencesRefPrivate.h:
     13        * WebProcess/WebPage/WebPage.cpp:
     14        (WebKit::WebPage::updatePreferences):
     15        Add a preference, defaulting to off, for enabling IntersectionObserver.
     16
    1172016-11-26  Simon Fraser  <simon.fraser@apple.com>
    218
  • trunk/Source/WebKit2/Shared/WebPreferencesDefinitions.h

    r208939 r208983  
    238238    macro(CustomElementsEnabled, customElementsEnabled, Bool, bool, true, "", "") \
    239239    macro(EncryptedMediaAPIEnabled, encryptedMediaAPIEnabled, Bool, bool, false, "", "") \
     240    macro(IntersectionObserverEnabled, intersectionObserverEnabled, Bool, bool, false, "Intersection Observer", "Enable Intersection Observer support") \
    240241    \
    241242
  • trunk/Source/WebKit2/UIProcess/API/C/WKPreferences.cpp

    r208903 r208983  
    15521552}
    15531553
     1554void WKPreferencesSetIntersectionObserverEnabled(WKPreferencesRef preferencesRef, bool flag)
     1555{
     1556    toImpl(preferencesRef)->setIntersectionObserverEnabled(flag);
     1557}
     1558
     1559bool WKPreferencesGetIntersectionObserverEnabled(WKPreferencesRef preferencesRef)
     1560{
     1561    return toImpl(preferencesRef)->intersectionObserverEnabled();
     1562}
     1563
    15541564void WKPreferencesSetSelectionPaintingWithoutSelectionGapsEnabled(WKPreferencesRef preferencesRef, bool flag)
    15551565{
  • trunk/Source/WebKit2/UIProcess/API/C/WKPreferencesRefPrivate.h

    r208824 r208983  
    443443WK_EXPORT bool WKPreferencesGetES6ModulesEnabled(WKPreferencesRef);
    444444
     445// Defaults to false
     446WK_EXPORT void WKPreferencesSetIntersectionObserverEnabled(WKPreferencesRef, bool flag);
     447WK_EXPORT bool WKPreferencesGetIntersectionObserverEnabled(WKPreferencesRef);
     448
    445449#ifdef __cplusplus
    446450}
  • trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp

    r208982 r208983  
    31923192#endif
    31933193
     3194#if ENABLE(INTERSECTION_OBSERVER)
     3195    RuntimeEnabledFeatures::sharedFeatures().setIntersectionObserverEnabled(store.getBoolValueForKey(WebPreferencesKey::intersectionObserverEnabledKey()));
     3196#endif
     3197
    31943198    platformPreferencesDidChange(store);
    31953199
  • trunk/Tools/ChangeLog

    r208982 r208983  
     12016-11-26  Sam Weinig  <sam@webkit.org>
     2
     3        Convert IntersectionObserver over to using RuntimeEnabledFeatures so it can be properly excluded from script
     4        https://bugs.webkit.org/show_bug.cgi?id=164965
     5
     6        Reviewed by Simon Fraser.
     7
     8        * DumpRenderTree/DumpRenderTree.xcodeproj/project.pbxproj:
     9        Add new files.
     10
     11        * DumpRenderTree/TestOptions.h: Added.
     12        * DumpRenderTree/TestOptions.mm: Added.
     13        (parseBooleanTestHeaderValue):
     14        (TestOptions::TestOptions):
     15        Port TestOption parsing from WKTR to DRT.
     16
     17        * DumpRenderTree/mac/DumpRenderTree.mm:
     18        (resetWebPreferencesToConsistentValues):
     19        (resetWebViewToConsistentStateBeforeTesting):
     20        (runTest):
     21        * WebKitTestRunner/TestController.cpp:
     22        Pass TestOptions down to resetWebPreferencesToConsistentValues to allow setting
     23        preferences conditionally.
     24
     25        (WTR::TestController::resetPreferencesToConsistentValues):
     26        (WTR::updateTestOptionsFromTestHeader):
     27        * WebKitTestRunner/TestOptions.h:
     28        Add a new test option header, enableIntersectionObserver, to enable IntersectionObserver.
     29
    1302016-11-26  Simon Fraser  <simon.fraser@apple.com>
    231
  • trunk/Tools/DumpRenderTree/DumpRenderTree.xcodeproj/project.pbxproj

    r208593 r208983  
    103103                5DB9AC9F0F722C3600684641 /* WebKitWeightWatcher800.ttf in Copy Font Files */ = {isa = PBXBuildFile; fileRef = 375F09780DAC3CB600C8B4E5 /* WebKitWeightWatcher800.ttf */; };
    104104                5DB9ACA00F722C3600684641 /* WebKitWeightWatcher900.ttf in Copy Font Files */ = {isa = PBXBuildFile; fileRef = 375F09790DAC3CB600C8B4E5 /* WebKitWeightWatcher900.ttf */; };
     105                7CBBC3231DDFCF9A00786B9D /* TestOptions.mm in Sources */ = {isa = PBXBuildFile; fileRef = 7CBBC3211DDFCF9A00786B9D /* TestOptions.mm */; };
    105106                80045AEE147718E7008290A8 /* AccessibilityNotificationHandler.mm in Sources */ = {isa = PBXBuildFile; fileRef = 80045AEC147718E7008290A8 /* AccessibilityNotificationHandler.mm */; };
    106107                8465E2C70FFA8DF2003B8342 /* PixelDumpSupport.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8465E2C60FFA8DF2003B8342 /* PixelDumpSupport.cpp */; };
     
    322323                53CBB831134E42F3001CE6A4 /* CyclicRedundancyCheck.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CyclicRedundancyCheck.h; sourceTree = "<group>"; };
    323324                5DE8AE4313A2C15800D6A37D /* libWebCoreTestSupport.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; path = libWebCoreTestSupport.dylib; sourceTree = BUILT_PRODUCTS_DIR; };
     325                7CBBC3211DDFCF9A00786B9D /* TestOptions.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = TestOptions.mm; sourceTree = "<group>"; };
     326                7CBBC3221DDFCF9A00786B9D /* TestOptions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TestOptions.h; sourceTree = "<group>"; };
    324327                80045AEB147718E7008290A8 /* AccessibilityNotificationHandler.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AccessibilityNotificationHandler.h; path = mac/AccessibilityNotificationHandler.h; sourceTree = "<group>"; };
    325328                80045AEC147718E7008290A8 /* AccessibilityNotificationHandler.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = AccessibilityNotificationHandler.mm; path = mac/AccessibilityNotificationHandler.mm; sourceTree = "<group>"; };
     
    490493                                A8B91BF70CF522B4008F91FF /* CheckedMalloc.cpp */,
    491494                                A8B91BF90CF522B4008F91FF /* CheckedMalloc.h */,
     495                                7CBBC3211DDFCF9A00786B9D /* TestOptions.mm */,
     496                                7CBBC3221DDFCF9A00786B9D /* TestOptions.h */,
    492497                                BC4741290D038A4C0072B006 /* JavaScriptThreading.h */,
    493498                                BCA18C0A0C9B59EF00114369 /* DumpRenderTreeMac.h */,
     
    11461151                                0F18E6ED1D6B9C070027E547 /* UIScriptController.cpp in Sources */,
    11471152                                0F18E70D1D6BAC8C0027E547 /* UIScriptControllerIOS.mm in Sources */,
     1153                                7CBBC3231DDFCF9A00786B9D /* TestOptions.mm in Sources */,
    11481154                                0F18E70F1D6BACB60027E547 /* UIScriptControllerMac.mm in Sources */,
    11491155                                4437730E125CBC3600AAE02C /* WebArchiveDumpSupport.cpp in Sources */,
  • trunk/Tools/DumpRenderTree/TestOptions.h

    r208982 r208983  
    11/*
    2  * Copyright (C) 2015 Apple Inc. All rights reserved.
     2 * Copyright (C) 2016 Apple Inc. All rights reserved.
    33 *
    44 * Redistribution and use in source and binary forms, with or without
     
    2424 */
    2525
    26 #ifndef TestOptions_h
    27 #define TestOptions_h
    28 
    29 #include <wtf/Vector.h>
    30 #include <wtf/text/WTFString.h>
    31 
    32 namespace WTR {
     26#pragma once
    3327
    3428struct TestOptions {
    35     bool useThreadedScrolling { false };
    36     bool useRemoteLayerTree { false };
    37     bool shouldShowWebView { false };
    38     bool useFlexibleViewport { false };
    39     bool useFixedLayout { false };
    40     bool isSVGTest { false };
    41     bool useDataDetection { false };
    42     bool useMockScrollbars { true };
    43     bool needsSiteSpecificQuirks { false };
    44     bool ignoresViewportScaleLimits { false };
    45     bool useCharacterSelectionGranularity { false };
     29    bool enableIntersectionObserver { false };
    4630
    47     float deviceScaleFactor { 1 };
    48     Vector<String> overrideLanguages;
    49    
    50     TestOptions(const std::string& pathOrURL);
     31    TestOptions(NSURL *testURL);
    5132};
    52 
    53 }
    54 
    55 #endif // TestOptions_h
  • trunk/Tools/DumpRenderTree/mac/DumpRenderTree.mm

    r208824 r208983  
    5050#import "PolicyDelegate.h"
    5151#import "ResourceLoadDelegate.h"
     52#import "TestOptions.h"
    5253#import "TestRunner.h"
    5354#import "UIDelegate.h"
     
    896897
    897898// Called before each test.
    898 static void resetWebPreferencesToConsistentValues()
     899static void resetWebPreferencesToConsistentValues(const TestOptions& options)
    899900{
    900901    WebPreferences *preferences = [WebPreferences standardPreferences];
     
    9991000    [preferences setHiddenPageDOMTimerThrottlingEnabled:NO];
    10001001    [preferences setHiddenPageCSSAnimationSuspensionEnabled:NO];
     1002
     1003    preferences.intersectionObserverEnabled = options.enableIntersectionObserver;
    10011004
    10021005    [WebPreferences _clearNetworkLoaderSession];
     
    18191822#endif
    18201823
    1821 static void resetWebViewToConsistentStateBeforeTesting()
     1824static void resetWebViewToConsistentStateBeforeTesting(const TestOptions& options)
    18221825{
    18231826    WebView *webView = [mainFrame webView];
     
    18521855    [WebCache clearCachedCredentials];
    18531856   
    1854     resetWebPreferencesToConsistentValues();
     1857    resetWebPreferencesToConsistentValues(options);
    18551858
    18561859    TestRunner::setSerializeHTTPLoads(false);
     
    19861989    WKSetCrashReportApplicationSpecificInformation((CFStringRef)informationString);
    19871990
     1991    TestOptions options(url);
     1992    resetWebViewToConsistentStateBeforeTesting(options);
     1993
    19881994    const char* testURL([[url absoluteString] UTF8String]);
    1989    
    1990     resetWebViewToConsistentStateBeforeTesting();
     1995
    19911996#if !PLATFORM(IOS)
    19921997    changeWindowScaleIfNeeded(testURL);
     
    20972102    }
    20982103
    2099     resetWebViewToConsistentStateBeforeTesting();
     2104    resetWebViewToConsistentStateBeforeTesting(options);
    21002105
    21012106    // Loading an empty request synchronously replaces the document with a blank one, which is necessary
  • trunk/Tools/WebKitTestRunner/TestController.cpp

    r208841 r208983  
    650650    WKPreferencesSetMockScrollbarsEnabled(preferences, options.useMockScrollbars);
    651651    WKPreferencesSetNeedsSiteSpecificQuirks(preferences, options.needsSiteSpecificQuirks);
     652    WKPreferencesSetIntersectionObserverEnabled(preferences, options.enableIntersectionObserver);
    652653
    653654    static WKStringRef defaultTextEncoding = WKStringCreateWithUTF8CString("ISO-8859-1");
     
    955956        if (key == "useCharacterSelectionGranularity")
    956957            testOptions.useCharacterSelectionGranularity = parseBooleanTestHeaderValue(value);
     958        if (key == "enableIntersectionObserver")
     959            testOptions.enableIntersectionObserver = parseBooleanTestHeaderValue(value);
    957960        pairStart = pairEnd + 1;
    958961    }
  • trunk/Tools/WebKitTestRunner/TestOptions.h

    r206449 r208983  
    4444    bool ignoresViewportScaleLimits { false };
    4545    bool useCharacterSelectionGranularity { false };
     46    bool enableIntersectionObserver { false };
    4647
    4748    float deviceScaleFactor { 1 };
Note: See TracChangeset for help on using the changeset viewer.