Add SW IDLs and stub out basic functionality.
authorbeidson@apple.com <beidson@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 3 Aug 2017 19:21:43 +0000 (19:21 +0000)
committerbeidson@apple.com <beidson@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 3 Aug 2017 19:21:43 +0000 (19:21 +0000)
commit8dca2d55280c3c6f83a6876bffe6d76fd93d6e89
tree062eb56c87a7375ea7dac6265d1d02aaaa564438
parent3d678be957b46f8a00a5c5433f22bf6140067bd3
Add SW IDLs and stub out basic functionality.
https://bugs.webkit.org/show_bug.cgi?id=175115

Reviewed by Chris Dumez.

.:

* Source/cmake/WebKitFeatures.cmake:
* Source/cmake/tools/vsprops/FeatureDefines.props:
* Source/cmake/tools/vsprops/FeatureDefinesCairo.props:

Source/JavaScriptCore:

* Configurations/FeatureDefines.xcconfig:

* runtime/CommonIdentifiers.h:

Source/WebCore:

No new tests (Currently no behavior change).

Overall note: This feature is EnabledAtRuntime as opposed to EnabledBySetting because
the Settings-based code generation is completely broken for non-Document contexts,
whereas the RuntimeEnabledFeatures-based generation is not.

* CMakeLists.txt:
* Configurations/FeatureDefines.xcconfig:
* DerivedSources.make:
* WebCore.xcodeproj/project.pbxproj:

* bindings/scripts/preprocess-idls.pl: Handle the new global scope c'tor file.

* bindings/js/JSServiceWorkerContainerCustom.cpp: Added.
(WebCore::JSServiceWorkerContainer::ready const):

* bindings/js/JSWorkerGlobalScopeBase.cpp:
(WebCore::toJSWorkerGlobalScope): Refactor to handle both types of derived workers.
(WebCore::toJSServiceWorkerGlobalScope):
* bindings/js/JSWorkerGlobalScopeBase.h:

* dom/EventNames.h:
* dom/EventTargetFactory.in:

* features.json: Change status of feature.

* page/Navigator.idl:
* page/NavigatorBase.cpp:
(WebCore::NavigatorBase::serviceWorker):
* page/NavigatorBase.h:
* page/NavigatorServiceWorker.idl: Added.

* page/RuntimeEnabledFeatures.h:
(WebCore::RuntimeEnabledFeatures::serviceWorkerEnabled const):
(WebCore::RuntimeEnabledFeatures::setServiceWorkerEnabled):

* workers/ServiceWorker.cpp: Added.
(WebCore::ServiceWorker::postMessage):
(WebCore::ServiceWorker::~ServiceWorker):
(WebCore::ServiceWorker::scriptURL const):
(WebCore::ServiceWorker::state const):
(WebCore::ServiceWorker::eventTargetInterface const):
(WebCore::ServiceWorker::scriptExecutionContext const):
* workers/ServiceWorker.h: Added.
* workers/ServiceWorker.idl: Added.

* workers/ServiceWorkerContainer.cpp: Added.
(WebCore::ServiceWorkerContainer::~ServiceWorkerContainer):
(WebCore::ServiceWorkerContainer::controller const):
(WebCore::ServiceWorkerContainer::ready):
(WebCore::ServiceWorkerContainer::addRegistration):
(WebCore::ServiceWorkerContainer::getRegistration):
(WebCore::ServiceWorkerContainer::getRegistrations):
(WebCore::ServiceWorkerContainer::startMessages):
(WebCore::ServiceWorkerContainer::eventTargetInterface const):
(WebCore::ServiceWorkerContainer::scriptExecutionContext const):
* workers/ServiceWorkerContainer.h: Added.
* workers/ServiceWorkerContainer.idl: Added.

* workers/ServiceWorkerGlobalScope.cpp: Added.
(WebCore::ServiceWorkerGlobalScope::registration):
(WebCore::ServiceWorkerGlobalScope::skipWaiting):
* workers/ServiceWorkerGlobalScope.h: Added.
* workers/ServiceWorkerGlobalScope.idl: Added.

* workers/ServiceWorkerRegistration.cpp: Added.
(WebCore::ServiceWorkerRegistration::~ServiceWorkerRegistration):
(WebCore::ServiceWorkerRegistration::installing):
(WebCore::ServiceWorkerRegistration::waiting):
(WebCore::ServiceWorkerRegistration::active):
(WebCore::ServiceWorkerRegistration::scope const):
(WebCore::ServiceWorkerRegistration::update):
(WebCore::ServiceWorkerRegistration::unregister):
(WebCore::ServiceWorkerRegistration::eventTargetInterface const):
(WebCore::ServiceWorkerRegistration::scriptExecutionContext const):
* workers/ServiceWorkerRegistration.h: Added.
* workers/ServiceWorkerRegistration.idl: Added.

Source/WebCore/PAL:

* Configurations/FeatureDefines.xcconfig:

Source/WebKit:

* Configurations/FeatureDefines.xcconfig:

* Shared/WebPreferencesDefinitions.h:

* UIProcess/WebPreferences.cpp:
(WebKit::WebPreferences::enableAllExperimentalFeatures): Explicitly skip SW for now.
  The ramifications to layouttests are complicated, and we'd like to follow up in a
  separate patch.

* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::updatePreferences):

Source/WebKitLegacy/mac:

* Configurations/FeatureDefines.xcconfig:

Source/WTF:

* wtf/FeatureDefines.h:

Tools:

* TestWebKitAPI/Configurations/FeatureDefines.xcconfig:

* Scripts/webkitpy/bindings/main.py:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@220220 268f45cc-cd09-0410-ab3c-d52691b4dbfc
50 files changed:
ChangeLog
Source/JavaScriptCore/ChangeLog
Source/JavaScriptCore/Configurations/FeatureDefines.xcconfig
Source/JavaScriptCore/runtime/CommonIdentifiers.h
Source/WTF/ChangeLog
Source/WTF/wtf/FeatureDefines.h
Source/WebCore/CMakeLists.txt
Source/WebCore/ChangeLog
Source/WebCore/Configurations/FeatureDefines.xcconfig
Source/WebCore/DerivedSources.make
Source/WebCore/PAL/ChangeLog
Source/WebCore/PAL/Configurations/FeatureDefines.xcconfig
Source/WebCore/WebCore.xcodeproj/project.pbxproj
Source/WebCore/bindings/js/JSServiceWorkerContainerCustom.cpp [new file with mode: 0644]
Source/WebCore/bindings/js/JSWorkerGlobalScopeBase.cpp
Source/WebCore/bindings/js/JSWorkerGlobalScopeBase.h
Source/WebCore/bindings/scripts/preprocess-idls.pl
Source/WebCore/dom/EventNames.h
Source/WebCore/dom/EventTargetFactory.in
Source/WebCore/features.json
Source/WebCore/page/Navigator.idl
Source/WebCore/page/NavigatorBase.cpp
Source/WebCore/page/NavigatorBase.h
Source/WebCore/page/NavigatorServiceWorker.idl [new file with mode: 0644]
Source/WebCore/page/RuntimeEnabledFeatures.h
Source/WebCore/workers/ServiceWorker.cpp [new file with mode: 0644]
Source/WebCore/workers/ServiceWorker.h [new file with mode: 0644]
Source/WebCore/workers/ServiceWorker.idl [new file with mode: 0644]
Source/WebCore/workers/ServiceWorkerContainer.cpp [new file with mode: 0644]
Source/WebCore/workers/ServiceWorkerContainer.h [new file with mode: 0644]
Source/WebCore/workers/ServiceWorkerContainer.idl [new file with mode: 0644]
Source/WebCore/workers/ServiceWorkerGlobalScope.cpp [new file with mode: 0644]
Source/WebCore/workers/ServiceWorkerGlobalScope.h [new file with mode: 0644]
Source/WebCore/workers/ServiceWorkerGlobalScope.idl [new file with mode: 0644]
Source/WebCore/workers/ServiceWorkerRegistration.cpp [new file with mode: 0644]
Source/WebCore/workers/ServiceWorkerRegistration.h [new file with mode: 0644]
Source/WebCore/workers/ServiceWorkerRegistration.idl [new file with mode: 0644]
Source/WebKit/ChangeLog
Source/WebKit/Configurations/FeatureDefines.xcconfig
Source/WebKit/Shared/WebPreferencesDefinitions.h
Source/WebKit/UIProcess/WebPreferences.cpp
Source/WebKit/WebProcess/WebPage/WebPage.cpp
Source/WebKitLegacy/mac/ChangeLog
Source/WebKitLegacy/mac/Configurations/FeatureDefines.xcconfig
Source/cmake/WebKitFeatures.cmake
Source/cmake/tools/vsprops/FeatureDefines.props
Source/cmake/tools/vsprops/FeatureDefinesCairo.props
Tools/ChangeLog
Tools/Scripts/webkitpy/bindings/main.py
Tools/TestWebKitAPI/Configurations/FeatureDefines.xcconfig