Convert IntersectionObserver over to using RuntimeEnabledFeatures so it can be proper...
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 27 Nov 2016 04:21:49 +0000 (04:21 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 27 Nov 2016 04:21:49 +0000 (04:21 +0000)
commitaa3789626abc71a82c5a1f7d73a3c1e072ccd73d
treedc0908c9ff2b5aae0d29b5a992fb24eec9bb2bf8
parentc730db92ac424fcf4c4413348648148c8077cf53
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.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@208983 268f45cc-cd09-0410-ab3c-d52691b4dbfc
29 files changed:
LayoutTests/ChangeLog
LayoutTests/intersection-observer/intersection-observer-entry-interface.html
LayoutTests/intersection-observer/intersection-observer-interface.html
LayoutTests/resources/testharnessreport.js
Source/JavaScriptCore/ChangeLog
Source/JavaScriptCore/runtime/CommonIdentifiers.h
Source/WebCore/ChangeLog
Source/WebCore/bindings/generic/RuntimeEnabledFeatures.cpp
Source/WebCore/bindings/generic/RuntimeEnabledFeatures.h
Source/WebCore/page/IntersectionObserver.idl
Source/WebCore/page/IntersectionObserverEntry.idl
Source/WebCore/page/Settings.in
Source/WebKit/mac/ChangeLog
Source/WebKit/mac/WebView/WebPreferenceKeysPrivate.h
Source/WebKit/mac/WebView/WebPreferences.mm
Source/WebKit/mac/WebView/WebPreferencesPrivate.h
Source/WebKit/mac/WebView/WebView.mm
Source/WebKit2/ChangeLog
Source/WebKit2/Shared/WebPreferencesDefinitions.h
Source/WebKit2/UIProcess/API/C/WKPreferences.cpp
Source/WebKit2/UIProcess/API/C/WKPreferencesRefPrivate.h
Source/WebKit2/WebProcess/WebPage/WebPage.cpp
Tools/ChangeLog
Tools/DumpRenderTree/DumpRenderTree.xcodeproj/project.pbxproj
Tools/DumpRenderTree/TestOptions.h [new file with mode: 0644]
Tools/DumpRenderTree/TestOptions.mm [new file with mode: 0644]
Tools/DumpRenderTree/mac/DumpRenderTree.mm
Tools/WebKitTestRunner/TestController.cpp
Tools/WebKitTestRunner/TestOptions.h