Skip to content

Commit e995e9d

Browse files
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 <[email protected]> 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. git-svn-id: http://svn.webkit.org/repository/webkit/trunk@208983 268f45cc-cd09-0410-ab3c-d52691b4dbfc
1 parent cbeb30c commit e995e9d

29 files changed

+293
-15
lines changed

LayoutTests/ChangeLog

+13
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,16 @@
1+
2016-11-26 Sam Weinig <[email protected]>
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+
114
2016-11-26 Simon Fraser <[email protected]>
215

316
Composited negative z-index elements are hidden behind the body sometimes

LayoutTests/intersection-observer/intersection-observer-entry-interface.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<!DOCTYPE html>
1+
<!DOCTYPE html><!-- webkit-test-runner [ enableIntersectionObserver=true ] -->
22
<head>
33
<title>IntersectionObserverEntry interface tests.</title>
44
<link rel="author" title="Simon Fraser" href="mailto:[email protected]" />

LayoutTests/intersection-observer/intersection-observer-interface.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<!DOCTYPE html>
1+
<!DOCTYPE html><!-- webkit-test-runner [ enableIntersectionObserver=true ] -->
22
<head>
33
<title>IntersectionObserver interface tests.</title>
44
<link rel="author" title="Simon Fraser" href="mailto:[email protected]" />

LayoutTests/resources/testharnessreport.js

-1
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,5 @@ if (self.testRunner) {
9090

9191
if (window.internals) {
9292
internals.setResourceTimingSupport(true);
93-
internals.settings.setIntersectionObserverEnabled(true);
9493
}
9594
}

Source/JavaScriptCore/ChangeLog

+10
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,13 @@
1+
2016-11-26 Sam Weinig <[email protected]>
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+
111
2016-11-23 Zan Dobersek <[email protected]>
212

313
Remove ENABLE_ASSEMBLER_WX_EXCLUSIVE code

Source/JavaScriptCore/runtime/CommonIdentifiers.h

+2
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,8 @@
6464
macro(IDBVersionChangeEvent) \
6565
macro(Infinity) \
6666
macro(InputEvent) \
67+
macro(IntersectionObserver) \
68+
macro(IntersectionObserverEntry) \
6769
macro(Intl) \
6870
macro(JSON) \
6971
macro(Loader) \

Source/WebCore/ChangeLog

+21
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,24 @@
1+
2016-11-26 Sam Weinig <[email protected]>
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+
122
2016-11-26 Simon Fraser <[email protected]>
223

324
Migrate some layout timer-related code from std::chrono to Seconds and MonotonicTime

Source/WebCore/bindings/generic/RuntimeEnabledFeatures.cpp

+3-1
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,9 @@ void RuntimeEnabledFeatures::reset()
109109
#if ENABLE(CSS_GRID_LAYOUT)
110110
m_cssGridLayoutEnabled = true;
111111
#endif
112-
112+
#if ENABLE(INTERSECTION_OBSERVER)
113+
m_intersectionObserverEnabled = false;
114+
#endif
113115
}
114116

115117
RuntimeEnabledFeatures& RuntimeEnabledFeatures::sharedFeatures()

Source/WebCore/bindings/generic/RuntimeEnabledFeatures.h

+9
Original file line numberDiff line numberDiff line change
@@ -227,6 +227,11 @@ class RuntimeEnabledFeatures {
227227
bool isCSSGridLayoutEnabled() const { return m_cssGridLayoutEnabled; }
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; }
232237

@@ -353,6 +358,10 @@ class RuntimeEnabledFeatures {
353358
bool m_encryptedMediaAPIEnabled { false };
354359
#endif
355360

361+
#if ENABLE(INTERSECTION_OBSERVER)
362+
bool m_intersectionObserverEnabled { false };
363+
#endif
364+
356365
friend class WTF::NeverDestroyed<RuntimeEnabledFeatures>;
357366
};
358367

Source/WebCore/page/IntersectionObserver.idl

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
Conditional=INTERSECTION_OBSERVER,
3030
Constructor(IntersectionObserverCallback callback, optional IntersectionObserverInit options),
3131
ImplementationLacksVTable,
32-
EnabledBySetting=IntersectionObserver
32+
EnabledAtRuntime=IntersectionObserver
3333
] interface IntersectionObserver {
3434
readonly attribute Element? root;
3535
readonly attribute DOMString rootMargin;

Source/WebCore/page/IntersectionObserverEntry.idl

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ typedef double DOMHighResTimeStamp;
3131
Conditional=INTERSECTION_OBSERVER,
3232
Constructor(IntersectionObserverEntryInit intersectionObserverEntryInit),
3333
ImplementationLacksVTable,
34-
EnabledBySetting=IntersectionObserver
34+
EnabledAtRuntime=IntersectionObserver
3535
] interface IntersectionObserverEntry {
3636
readonly attribute DOMHighResTimeStamp time;
3737
readonly attribute DOMRectReadOnly rootBounds;

Source/WebCore/page/Settings.in

-1
Original file line numberDiff line numberDiff line change
@@ -279,7 +279,6 @@ variationFontsEnabled initial=true, setNeedsStyleRecalcInAllFrames=1, conditiona
279279

280280
# Runtime-enabled features
281281
visualViewportEnabled initial=false, setNeedsStyleRecalcInAllFrames=1
282-
intersectionObserverEnabled initial=false
283282

284283
inputEventsEnabled initial=true
285284

Source/WebKit/mac/ChangeLog

+16
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,19 @@
1+
2016-11-26 Sam Weinig <[email protected]>
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+
117
2016-11-22 Dan Bernstein <[email protected]>
218

319
[Mac] In Legacy WebKit, pressing an arrow key in editable content doesn’t hide the mouse cursor

Source/WebKit/mac/WebView/WebPreferenceKeysPrivate.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -216,6 +216,6 @@
216216
#define WebKitMediaDataLoadsAutomaticallyPreferenceKey @"WebKitMediaDataLoadsAutomatically"
217217
#define WebKitMockCaptureDevicesEnabledPreferenceKey @"WebKitMockCaptureDevicesEnabled"
218218
#define WebKitMediaCaptureRequiresSecureConnectionPreferenceKey @"WebKitMediaCaptureRequiresSecureConnection"
219-
220219
#define WebKitAttachmentElementEnabledPreferenceKey @"WebKitAttachmentElementEnabled"
220+
#define WebKitIntersectionObserverEnabledPreferenceKey @"WebKitIntersectionObserverEnabled"
221221

Source/WebKit/mac/WebView/WebPreferences.mm

+10
Original file line numberDiff line numberDiff line change
@@ -2849,6 +2849,16 @@ - (void)setModernMediaControlsEnabled:(BOOL)flag
28492849
[self _setBoolValue:flag forKey:WebKitModernMediaControlsEnabledPreferenceKey];
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

28542864
@implementation WebPreferences (WebInternal)

Source/WebKit/mac/WebView/WebPreferencesPrivate.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -518,6 +518,6 @@ extern NSString *WebPreferencesCacheModelChangedInternalNotification;
518518
@property (nonatomic) BOOL mediaDataLoadsAutomatically;
519519
@property (nonatomic) BOOL attachmentElementEnabled;
520520
@property (nonatomic) BOOL allowsInlineMediaPlaybackAfterFullscreen;
521-
521+
@property (nonatomic) BOOL intersectionObserverEnabled;
522522

523523
@end

Source/WebKit/mac/WebView/WebView.mm

+4
Original file line numberDiff line numberDiff line change
@@ -2862,6 +2862,10 @@ - (void)_preferencesChanged:(WebPreferences *)preferences
28622862
RuntimeEnabledFeatures::sharedFeatures().setWebAnimationsEnabled([preferences webAnimationsEnabled]);
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)
28672871
settings.setIncrementalRenderingSuppressionTimeoutInSeconds(timeout);

Source/WebKit2/ChangeLog

+16
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,19 @@
1+
2016-11-26 Sam Weinig <[email protected]>
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+
117
2016-11-26 Simon Fraser <[email protected]>
218

319
Migrate some layout timer-related code from std::chrono to Seconds and MonotonicTime

Source/WebKit2/Shared/WebPreferencesDefinitions.h

+1
Original file line numberDiff line numberDiff line change
@@ -237,6 +237,7 @@
237237
macro(AsyncImageDecodingEnabled, asyncImageDecodingEnabled, Bool, bool, true, "", "") \
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

242243
#define FOR_EACH_WEBKIT_DOUBLE_PREFERENCE(macro) \

Source/WebKit2/UIProcess/API/C/WKPreferences.cpp

+10
Original file line numberDiff line numberDiff line change
@@ -1551,6 +1551,16 @@ bool WKPreferencesGetES6ModulesEnabled(WKPreferencesRef preferencesRef)
15511551
return toImpl(preferencesRef)->es6ModulesEnabled();
15521552
}
15531553

1554+
void WKPreferencesSetIntersectionObserverEnabled(WKPreferencesRef preferencesRef, bool flag)
1555+
{
1556+
toImpl(preferencesRef)->setIntersectionObserverEnabled(flag);
1557+
}
1558+
1559+
bool WKPreferencesGetIntersectionObserverEnabled(WKPreferencesRef preferencesRef)
1560+
{
1561+
return toImpl(preferencesRef)->intersectionObserverEnabled();
1562+
}
1563+
15541564
void WKPreferencesSetSelectionPaintingWithoutSelectionGapsEnabled(WKPreferencesRef preferencesRef, bool flag)
15551565
{
15561566
toImpl(preferencesRef)->setSelectionPaintingWithoutSelectionGapsEnabled(flag);

Source/WebKit2/UIProcess/API/C/WKPreferencesRefPrivate.h

+4
Original file line numberDiff line numberDiff line change
@@ -442,6 +442,10 @@ WK_EXPORT bool WKPreferencesGetAllowsPictureInPictureMediaPlayback(WKPreferences
442442
WK_EXPORT void WKPreferencesSetES6ModulesEnabled(WKPreferencesRef, bool flag);
443443
WK_EXPORT bool WKPreferencesGetES6ModulesEnabled(WKPreferencesRef);
444444

445+
// Defaults to false
446+
WK_EXPORT void WKPreferencesSetIntersectionObserverEnabled(WKPreferencesRef, bool flag);
447+
WK_EXPORT bool WKPreferencesGetIntersectionObserverEnabled(WKPreferencesRef);
448+
445449
#ifdef __cplusplus
446450
}
447451
#endif

Source/WebKit2/WebProcess/WebPage/WebPage.cpp

+4
Original file line numberDiff line numberDiff line change
@@ -3191,6 +3191,10 @@ void WebPage::updatePreferences(const WebPreferencesStore& store)
31913191
RuntimeEnabledFeatures::sharedFeatures().setEncryptedMediaAPIEnabled(store.getBoolValueForKey(WebPreferencesKey::encryptedMediaAPIEnabledKey()));
31923192
#endif
31933193

3194+
#if ENABLE(INTERSECTION_OBSERVER)
3195+
RuntimeEnabledFeatures::sharedFeatures().setIntersectionObserverEnabled(store.getBoolValueForKey(WebPreferencesKey::intersectionObserverEnabledKey()));
3196+
#endif
3197+
31943198
platformPreferencesDidChange(store);
31953199

31963200
if (m_drawingArea)

Tools/ChangeLog

+29
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,32 @@
1+
2016-11-26 Sam Weinig <[email protected]>
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+
130
2016-11-26 Simon Fraser <[email protected]>
231

332
Migrate some layout timer-related code from std::chrono to Seconds and MonotonicTime

Tools/DumpRenderTree/DumpRenderTree.xcodeproj/project.pbxproj

+6
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,7 @@
102102
5DB9AC9E0F722C3600684641 /* WebKitWeightWatcher700.ttf in Copy Font Files */ = {isa = PBXBuildFile; fileRef = 375F09770DAC3CB600C8B4E5 /* WebKitWeightWatcher700.ttf */; };
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 */; };
107108
9830F31F15C81181005AB206 /* DumpRenderTreeCommon.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9830F31E15C81181005AB206 /* DumpRenderTreeCommon.cpp */; };
@@ -321,6 +322,8 @@
321322
53CBB830134E42F3001CE6A4 /* CyclicRedundancyCheck.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CyclicRedundancyCheck.cpp; sourceTree = "<group>"; };
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>"; };
326329
8465E2C60FFA8DF2003B8342 /* PixelDumpSupport.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = PixelDumpSupport.cpp; sourceTree = "<group>"; };
@@ -489,6 +492,8 @@
489492
A134E52F188FC27000901D06 /* DumpRenderTreeMain.mm */,
490493
A8B91BF70CF522B4008F91FF /* CheckedMalloc.cpp */,
491494
A8B91BF90CF522B4008F91FF /* CheckedMalloc.h */,
495+
7CBBC3211DDFCF9A00786B9D /* TestOptions.mm */,
496+
7CBBC3221DDFCF9A00786B9D /* TestOptions.h */,
492497
BC4741290D038A4C0072B006 /* JavaScriptThreading.h */,
493498
BCA18C0A0C9B59EF00114369 /* DumpRenderTreeMac.h */,
494499
BCA18B730C9B08F100114369 /* DumpRenderTreeDraggingInfo.h */,
@@ -1145,6 +1150,7 @@
11451150
0F18E6EC1D6B9C070027E547 /* UIScriptContext.cpp in Sources */,
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 */,
11501156
440590711268453800CFD48D /* WebArchiveDumpSupportMac.mm in Sources */,

Tools/DumpRenderTree/TestOptions.h

+32
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
/*
2+
* Copyright (C) 2016 Apple Inc. All rights reserved.
3+
*
4+
* Redistribution and use in source and binary forms, with or without
5+
* modification, are permitted provided that the following conditions
6+
* are met:
7+
* 1. Redistributions of source code must retain the above copyright
8+
* notice, this list of conditions and the following disclaimer.
9+
* 2. Redistributions in binary form must reproduce the above copyright
10+
* notice, this list of conditions and the following disclaimer in the
11+
* documentation and/or other materials provided with the distribution.
12+
*
13+
* THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
14+
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
15+
* THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
16+
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
17+
* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
18+
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
19+
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
20+
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
21+
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
22+
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
23+
* THE POSSIBILITY OF SUCH DAMAGE.
24+
*/
25+
26+
#pragma once
27+
28+
struct TestOptions {
29+
bool enableIntersectionObserver { false };
30+
31+
TestOptions(NSURL *testURL);
32+
};

0 commit comments

Comments
 (0)