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)
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: http://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

index 90aee9b..b6e6f00 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,14 @@
+2017-08-03  Brady Eidson  <beidson@apple.com>
+
+        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:
+
 2017-08-01  Brady Eidson  <beidson@apple.com>
 
         Part 1 of: Rename DatabaseProcess to StorageProcess.
index c5ddfb2..fce0b7e 100644 (file)
@@ -1,3 +1,14 @@
+2017-08-03  Brady Eidson  <beidson@apple.com>
+
+        Add SW IDLs and stub out basic functionality.
+        https://bugs.webkit.org/show_bug.cgi?id=175115
+
+        Reviewed by Chris Dumez.
+
+        * Configurations/FeatureDefines.xcconfig:
+
+        * runtime/CommonIdentifiers.h:
+
 2017-08-03  Mark Lam  <mark.lam@apple.com>
 
         Rename ScratchBuffer::activeLengthPtr to addressOfActiveLength.
index 67cf537..80e86e7 100644 (file)
@@ -157,6 +157,7 @@ ENABLE_POINTER_LOCK[sdk=macosx*] = ENABLE_POINTER_LOCK;
 ENABLE_PROXIMITY_EVENTS = ;
 ENABLE_PUBLIC_SUFFIX_LIST = ENABLE_PUBLIC_SUFFIX_LIST;
 ENABLE_QUOTA = ;
+ENABLE_SERVICE_WORKER = ENABLE_SERVICE_WORKER;
 ENABLE_STREAMS_API = ENABLE_STREAMS_API;
 ENABLE_REQUEST_AUTOCOMPLETE = ;
 ENABLE_REMOTE_INSPECTOR = ENABLE_REMOTE_INSPECTOR;
@@ -243,4 +244,4 @@ ENABLE_DRAG_SUPPORT[sdk=iphonesimulator11*] = ENABLE_DRAG_SUPPORT;
 ENABLE_DATA_INTERACTION[sdk=iphoneos11*] = ENABLE_DATA_INTERACTION;
 ENABLE_DATA_INTERACTION[sdk=iphonesimulator11*] = ENABLE_DATA_INTERACTION;
 
-FEATURE_DEFINES = $(ENABLE_3D_TRANSFORMS) $(ENABLE_ACCELERATED_2D_CANVAS) $(ENABLE_ACCELERATED_OVERFLOW_SCROLLING) $(ENABLE_APPLE_PAY) $(ENABLE_APPLE_PAY_SESSION_V3) $(ENABLE_ATTACHMENT_ELEMENT) $(ENABLE_AVF_CAPTIONS) $(ENABLE_CACHE_PARTITIONING) $(ENABLE_CANVAS_PATH) $(ENABLE_CANVAS_PROXY) $(ENABLE_CHANNEL_MESSAGING) $(ENABLE_CONTENT_FILTERING) $(ENABLE_CSS_ANIMATIONS_LEVEL_2) $(ENABLE_CSS_BOX_DECORATION_BREAK) $(ENABLE_CSS_COMPOSITING) $(ENABLE_CSS_DEVICE_ADAPTATION) $(ENABLE_CSS_IMAGE_ORIENTATION) $(ENABLE_CSS_IMAGE_RESOLUTION) $(ENABLE_CSS_REGIONS) $(ENABLE_CSS_SCROLL_SNAP) $(ENABLE_CSS_SELECTORS_LEVEL4) $(ENABLE_CSS_TRAILING_WORD) $(ENABLE_CSS3_TEXT) $(ENABLE_CURSOR_VISIBILITY) $(ENABLE_CUSTOM_SCHEME_HANDLER) $(ENABLE_DASHBOARD_SUPPORT) $(ENABLE_DATA_INTERACTION) $(ENABLE_DATA_TRANSFER_ITEMS) $(ENABLE_DATACUE_VALUE) $(ENABLE_DATALIST_ELEMENT) $(ENABLE_DEVICE_ORIENTATION) $(ENABLE_DRAG_SUPPORT) $(ENABLE_ENCRYPTED_MEDIA) $(ENABLE_FAST_JIT_PERMISSIONS) $(ENABLE_FETCH_API) $(ENABLE_FILTERS_LEVEL_2) $(ENABLE_FTL_JIT) $(ENABLE_FULLSCREEN_API) $(ENABLE_GAMEPAD_DEPRECATED) $(ENABLE_GAMEPAD) $(ENABLE_GEOLOCATION) $(ENABLE_ICONDATABASE) $(ENABLE_INDEXED_DATABASE_IN_WORKERS) $(ENABLE_INDEXED_DATABASE) $(ENABLE_INPUT_TYPE_COLOR_POPOVER) $(ENABLE_INPUT_TYPE_COLOR) $(ENABLE_INPUT_TYPE_DATE) $(ENABLE_INPUT_TYPE_DATETIME_INCOMPLETE) $(ENABLE_INPUT_TYPE_DATETIMELOCAL) $(ENABLE_INPUT_TYPE_MONTH) $(ENABLE_INPUT_TYPE_TIME) $(ENABLE_INPUT_TYPE_WEEK) $(ENABLE_INTERSECTION_OBSERVER) $(ENABLE_INTL) $(ENABLE_IOS_GESTURE_EVENTS) $(ENABLE_IOS_TOUCH_EVENTS) $(ENABLE_JIT) $(ENABLE_KEYBOARD_KEY_ATTRIBUTE) $(ENABLE_KEYBOARD_CODE_ATTRIBUTE) $(ENABLE_LEGACY_CSS_VENDOR_PREFIXES) $(ENABLE_LEGACY_ENCRYPTED_MEDIA) $(ENABLE_LEGACY_VENDOR_PREFIXES) $(ENABLE_LETTERPRESS) $(ENABLE_LINK_PREFETCH) $(ENABLE_MAC_GESTURE_EVENTS) $(ENABLE_MATHML) $(ENABLE_MEDIA_CAPTURE) $(ENABLE_MEDIA_CONTROLS_SCRIPT) $(ENABLE_MEDIA_SESSION) $(ENABLE_MEDIA_SOURCE) $(ENABLE_MEDIA_STATISTICS) $(ENABLE_MEDIA_STREAM) $(ENABLE_METER_ELEMENT) $(ENABLE_MHTML) $(ENABLE_MOUSE_CURSOR_SCALE) $(ENABLE_NAVIGATOR_CONTENT_UTILS) $(ENABLE_NAVIGATOR_STANDALONE) $(ENABLE_NOTIFICATIONS) $(ENABLE_PDFKIT_PLUGIN) $(ENABLE_POINTER_LOCK) $(ENABLE_PROXIMITY_EVENTS) $(ENABLE_PUBLIC_SUFFIX_LIST) $(ENABLE_QUOTA) $(ENABLE_REMOTE_INSPECTOR) $(ENABLE_REQUEST_AUTOCOMPLETE) $(ENABLE_RESOLUTION_MEDIA_QUERY) $(ENABLE_RESOURCE_USAGE) $(ENABLE_RUBBER_BANDING) $(ENABLE_SERVICE_CONTROLS) $(ENABLE_SPEECH_SYNTHESIS) $(ENABLE_STREAMS_API) $(ENABLE_SUBTLE_CRYPTO) $(ENABLE_SVG_FONTS) $(ENABLE_TELEPHONE_NUMBER_DETECTION) $(ENABLE_TEXT_AUTOSIZING) $(ENABLE_TOUCH_EVENTS) $(ENABLE_TOUCH_ICON_LOADING) $(ENABLE_USERSELECT_ALL) $(ENABLE_VARIATION_FONTS) $(ENABLE_VIDEO_PRESENTATION_MODE) $(ENABLE_MAC_VIDEO_TOOLBOX) $(ENABLE_VIDEO_TRACK) $(ENABLE_VIDEO) $(ENABLE_VIEW_MODE_CSS_MEDIA) $(ENABLE_WEB_ANIMATIONS) $(ENABLE_WEB_AUDIO) $(ENABLE_WEB_RTC) $(ENABLE_WEB_SOCKETS) $(ENABLE_WEBASSEMBLY) $(ENABLE_WEBGL) $(ENABLE_WEBGL2) $(ENABLE_WEBGPU) $(ENABLE_WIRELESS_PLAYBACK_TARGET) $(ENABLE_XSLT);
+FEATURE_DEFINES = $(ENABLE_3D_TRANSFORMS) $(ENABLE_ACCELERATED_2D_CANVAS) $(ENABLE_ACCELERATED_OVERFLOW_SCROLLING) $(ENABLE_APPLE_PAY) $(ENABLE_APPLE_PAY_SESSION_V3) $(ENABLE_ATTACHMENT_ELEMENT) $(ENABLE_AVF_CAPTIONS) $(ENABLE_CACHE_PARTITIONING) $(ENABLE_CANVAS_PATH) $(ENABLE_CANVAS_PROXY) $(ENABLE_CHANNEL_MESSAGING) $(ENABLE_CONTENT_FILTERING) $(ENABLE_CSS_ANIMATIONS_LEVEL_2) $(ENABLE_CSS_BOX_DECORATION_BREAK) $(ENABLE_CSS_COMPOSITING) $(ENABLE_CSS_DEVICE_ADAPTATION) $(ENABLE_CSS_IMAGE_ORIENTATION) $(ENABLE_CSS_IMAGE_RESOLUTION) $(ENABLE_CSS_REGIONS) $(ENABLE_CSS_SCROLL_SNAP) $(ENABLE_CSS_SELECTORS_LEVEL4) $(ENABLE_CSS_TRAILING_WORD) $(ENABLE_CSS3_TEXT) $(ENABLE_CURSOR_VISIBILITY) $(ENABLE_CUSTOM_SCHEME_HANDLER) $(ENABLE_DASHBOARD_SUPPORT) $(ENABLE_DATA_INTERACTION) $(ENABLE_DATA_TRANSFER_ITEMS) $(ENABLE_DATACUE_VALUE) $(ENABLE_DATALIST_ELEMENT) $(ENABLE_DEVICE_ORIENTATION) $(ENABLE_DRAG_SUPPORT) $(ENABLE_ENCRYPTED_MEDIA) $(ENABLE_FAST_JIT_PERMISSIONS) $(ENABLE_FETCH_API) $(ENABLE_FILTERS_LEVEL_2) $(ENABLE_FTL_JIT) $(ENABLE_FULLSCREEN_API) $(ENABLE_GAMEPAD_DEPRECATED) $(ENABLE_GAMEPAD) $(ENABLE_GEOLOCATION) $(ENABLE_ICONDATABASE) $(ENABLE_INDEXED_DATABASE_IN_WORKERS) $(ENABLE_INDEXED_DATABASE) $(ENABLE_INPUT_TYPE_COLOR_POPOVER) $(ENABLE_INPUT_TYPE_COLOR) $(ENABLE_INPUT_TYPE_DATE) $(ENABLE_INPUT_TYPE_DATETIME_INCOMPLETE) $(ENABLE_INPUT_TYPE_DATETIMELOCAL) $(ENABLE_INPUT_TYPE_MONTH) $(ENABLE_INPUT_TYPE_TIME) $(ENABLE_INPUT_TYPE_WEEK) $(ENABLE_INTERSECTION_OBSERVER) $(ENABLE_INTL) $(ENABLE_IOS_GESTURE_EVENTS) $(ENABLE_IOS_TOUCH_EVENTS) $(ENABLE_JIT) $(ENABLE_KEYBOARD_KEY_ATTRIBUTE) $(ENABLE_KEYBOARD_CODE_ATTRIBUTE) $(ENABLE_LEGACY_CSS_VENDOR_PREFIXES) $(ENABLE_LEGACY_ENCRYPTED_MEDIA) $(ENABLE_LEGACY_VENDOR_PREFIXES) $(ENABLE_LETTERPRESS) $(ENABLE_LINK_PREFETCH) $(ENABLE_MAC_GESTURE_EVENTS) $(ENABLE_MATHML) $(ENABLE_MEDIA_CAPTURE) $(ENABLE_MEDIA_CONTROLS_SCRIPT) $(ENABLE_MEDIA_SESSION) $(ENABLE_MEDIA_SOURCE) $(ENABLE_MEDIA_STATISTICS) $(ENABLE_MEDIA_STREAM) $(ENABLE_METER_ELEMENT) $(ENABLE_MHTML) $(ENABLE_MOUSE_CURSOR_SCALE) $(ENABLE_NAVIGATOR_CONTENT_UTILS) $(ENABLE_NAVIGATOR_STANDALONE) $(ENABLE_NOTIFICATIONS) $(ENABLE_PDFKIT_PLUGIN) $(ENABLE_POINTER_LOCK) $(ENABLE_PROXIMITY_EVENTS) $(ENABLE_PUBLIC_SUFFIX_LIST) $(ENABLE_QUOTA) $(ENABLE_REMOTE_INSPECTOR) $(ENABLE_REQUEST_AUTOCOMPLETE) $(ENABLE_RESOLUTION_MEDIA_QUERY) $(ENABLE_RESOURCE_USAGE) $(ENABLE_RUBBER_BANDING) $(ENABLE_SERVICE_CONTROLS) $(ENABLE_SERVICE_WORKER) $(ENABLE_SPEECH_SYNTHESIS) $(ENABLE_STREAMS_API) $(ENABLE_SUBTLE_CRYPTO) $(ENABLE_SVG_FONTS) $(ENABLE_TELEPHONE_NUMBER_DETECTION) $(ENABLE_TEXT_AUTOSIZING) $(ENABLE_TOUCH_EVENTS) $(ENABLE_TOUCH_ICON_LOADING) $(ENABLE_USERSELECT_ALL) $(ENABLE_VARIATION_FONTS) $(ENABLE_VIDEO_PRESENTATION_MODE) $(ENABLE_MAC_VIDEO_TOOLBOX) $(ENABLE_VIDEO_TRACK) $(ENABLE_VIDEO) $(ENABLE_VIEW_MODE_CSS_MEDIA) $(ENABLE_WEB_ANIMATIONS) $(ENABLE_WEB_AUDIO) $(ENABLE_WEB_RTC) $(ENABLE_WEB_SOCKETS) $(ENABLE_WEBASSEMBLY) $(ENABLE_WEBGL) $(ENABLE_WEBGL2) $(ENABLE_WEBGPU) $(ENABLE_WIRELESS_PLAYBACK_TARGET) $(ENABLE_XSLT);
index 2765b87..0c03453 100644 (file)
     macro(RTCSessionDescription) \
     macro(RTCStatsReport) \
     macro(RTCTrackEvent) \
+    macro(ServiceWorker)\
+    macro(ServiceWorkerContainer)\
+    macro(ServiceWorkerGlobalScope)\
+    macro(ServiceWorkerRegistration)\
     macro(Set)\
     macro(SetIterator)\
     macro(ShadowRoot) \
index 96b2e3f..49f4bc3 100644 (file)
@@ -1,3 +1,12 @@
+2017-08-03  Brady Eidson  <beidson@apple.com>
+
+        Add SW IDLs and stub out basic functionality.
+        https://bugs.webkit.org/show_bug.cgi?id=175115
+
+        Reviewed by Chris Dumez.
+
+        * wtf/FeatureDefines.h:
+
 2017-08-03  Yusuke Suzuki  <utatane.tea@gmail.com>
 
         Unreviewed, build fix for Windows port
index d389a1f..9537efb 100644 (file)
@@ -732,6 +732,10 @@ the public iOS SDK. We will also need to update the FeatureDefines.xcconfig file
 #define ENABLE_DATA_INTERACTION 0
 #endif
 
+#if !defined(ENABLE_SERVICE_WORKER)
+#define ENABLE_SERVICE_WORKER 1
+#endif
+
 /* Asserts, invariants for macro definitions */
 
 #if ENABLE(VIDEO_TRACK) && !ENABLE(VIDEO)
index c381b68..3371feb 100644 (file)
@@ -672,6 +672,7 @@ set(WebCore_NON_SVG_IDL_FILES
     page/NavigatorID.idl
     page/NavigatorLanguage.idl
     page/NavigatorOnLine.idl
+    page/NavigatorServiceWorker.idl
     page/Performance.idl
     page/PerformanceEntry.idl
     page/PerformanceMark.idl
@@ -699,6 +700,10 @@ set(WebCore_NON_SVG_IDL_FILES
 
     workers/AbstractWorker.idl
     workers/DedicatedWorkerGlobalScope.idl
+    workers/ServiceWorker.idl
+    workers/ServiceWorkerContainer.idl
+    workers/ServiceWorkerGlobalScope.idl
+    workers/ServiceWorkerRegistration.idl
     workers/Worker.idl
     workers/WorkerGlobalScope.idl
     workers/WorkerLocation.idl
@@ -1227,6 +1232,7 @@ set(WebCore_SOURCES
     bindings/js/JSReadableStreamPrivateConstructors.cpp
     bindings/js/JSReadableStreamSourceCustom.cpp
     bindings/js/JSSVGPathSegCustom.cpp
+    bindings/js/JSServiceWorkerContainerCustom.cpp
     bindings/js/JSStyleSheetCustom.cpp
     bindings/js/JSSubtleCryptoCustom.cpp
     bindings/js/JSTextCustom.cpp
@@ -2961,6 +2967,10 @@ set(WebCore_SOURCES
     workers/AbstractWorker.cpp
     workers/DedicatedWorkerGlobalScope.cpp
     workers/DedicatedWorkerThread.cpp
+    workers/ServiceWorker.cpp
+    workers/ServiceWorkerContainer.cpp
+    workers/ServiceWorkerGlobalScope.cpp
+    workers/ServiceWorkerRegistration.cpp
     workers/Worker.cpp
     workers/WorkerConsoleClient.cpp
     workers/WorkerEventQueue.cpp
@@ -3616,6 +3626,7 @@ set(SUPPLEMENTAL_DEPENDENCY_FILE ${DERIVED_SOURCES_WEBCORE_DIR}/supplemental_dep
 set(WINDOW_CONSTRUCTORS_FILE ${DERIVED_SOURCES_WEBCORE_DIR}/DOMWindowConstructors.idl)
 set(WORKERGLOBALSCOPE_CONSTRUCTORS_FILE ${DERIVED_SOURCES_WEBCORE_DIR}/WorkerGlobalScopeConstructors.idl)
 set(DEDICATEDWORKERGLOBALSCOPE_CONSTRUCTORS_FILE ${DERIVED_SOURCES_WEBCORE_DIR}/DedicatedWorkerGlobalScopeConstructors.idl)
+set(SERVICEWORKERGLOBALSCOPE_CONSTRUCTORS_FILE ${DERIVED_SOURCES_WEBCORE_DIR}/ServiceWorkerGlobalScopeConstructors.idl)
 
 WEBKIT_FRAMEWORK_DECLARE(WebCore)
 WEBKIT_INCLUDE_CONFIG_FILES_IF_EXISTS()
@@ -3810,7 +3821,8 @@ GENERATE_BINDINGS(WebCoreBindings
     PP_EXTRA_ARGS
         --windowConstructorsFile ${WINDOW_CONSTRUCTORS_FILE}
         --workerGlobalScopeConstructorsFile ${WORKERGLOBALSCOPE_CONSTRUCTORS_FILE}
-        --dedicatedWorkerGlobalScopeConstructorsFile ${DEDICATEDWORKERGLOBALSCOPE_CONSTRUCTORS_FILE})
+        --dedicatedWorkerGlobalScopeConstructorsFile ${DEDICATEDWORKERGLOBALSCOPE_CONSTRUCTORS_FILE}
+        --serviceWorkerGlobalScopeConstructorsFile ${SERVICEWORKERGLOBALSCOPE_CONSTRUCTORS_FILE})
 
 GENERATE_BINDINGS(WebCoreTestSupportBindings
     OUTPUT_SOURCE WebCoreTestSupport_SOURCES
index 213bd7e..836e803 100644 (file)
@@ -1,3 +1,88 @@
+2017-08-03  Brady Eidson  <beidson@apple.com>
+
+        Add SW IDLs and stub out basic functionality.
+        https://bugs.webkit.org/show_bug.cgi?id=175115
+
+        Reviewed by Chris Dumez.
+
+        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.
+
 2017-08-03  Yoshiaki Jitsukawa  <jitsu@rd.scei.sony.co.jp>
 
         [WebCore] Sort Xcode project files
index 67cf537..80e86e7 100644 (file)
@@ -157,6 +157,7 @@ ENABLE_POINTER_LOCK[sdk=macosx*] = ENABLE_POINTER_LOCK;
 ENABLE_PROXIMITY_EVENTS = ;
 ENABLE_PUBLIC_SUFFIX_LIST = ENABLE_PUBLIC_SUFFIX_LIST;
 ENABLE_QUOTA = ;
+ENABLE_SERVICE_WORKER = ENABLE_SERVICE_WORKER;
 ENABLE_STREAMS_API = ENABLE_STREAMS_API;
 ENABLE_REQUEST_AUTOCOMPLETE = ;
 ENABLE_REMOTE_INSPECTOR = ENABLE_REMOTE_INSPECTOR;
@@ -243,4 +244,4 @@ ENABLE_DRAG_SUPPORT[sdk=iphonesimulator11*] = ENABLE_DRAG_SUPPORT;
 ENABLE_DATA_INTERACTION[sdk=iphoneos11*] = ENABLE_DATA_INTERACTION;
 ENABLE_DATA_INTERACTION[sdk=iphonesimulator11*] = ENABLE_DATA_INTERACTION;
 
-FEATURE_DEFINES = $(ENABLE_3D_TRANSFORMS) $(ENABLE_ACCELERATED_2D_CANVAS) $(ENABLE_ACCELERATED_OVERFLOW_SCROLLING) $(ENABLE_APPLE_PAY) $(ENABLE_APPLE_PAY_SESSION_V3) $(ENABLE_ATTACHMENT_ELEMENT) $(ENABLE_AVF_CAPTIONS) $(ENABLE_CACHE_PARTITIONING) $(ENABLE_CANVAS_PATH) $(ENABLE_CANVAS_PROXY) $(ENABLE_CHANNEL_MESSAGING) $(ENABLE_CONTENT_FILTERING) $(ENABLE_CSS_ANIMATIONS_LEVEL_2) $(ENABLE_CSS_BOX_DECORATION_BREAK) $(ENABLE_CSS_COMPOSITING) $(ENABLE_CSS_DEVICE_ADAPTATION) $(ENABLE_CSS_IMAGE_ORIENTATION) $(ENABLE_CSS_IMAGE_RESOLUTION) $(ENABLE_CSS_REGIONS) $(ENABLE_CSS_SCROLL_SNAP) $(ENABLE_CSS_SELECTORS_LEVEL4) $(ENABLE_CSS_TRAILING_WORD) $(ENABLE_CSS3_TEXT) $(ENABLE_CURSOR_VISIBILITY) $(ENABLE_CUSTOM_SCHEME_HANDLER) $(ENABLE_DASHBOARD_SUPPORT) $(ENABLE_DATA_INTERACTION) $(ENABLE_DATA_TRANSFER_ITEMS) $(ENABLE_DATACUE_VALUE) $(ENABLE_DATALIST_ELEMENT) $(ENABLE_DEVICE_ORIENTATION) $(ENABLE_DRAG_SUPPORT) $(ENABLE_ENCRYPTED_MEDIA) $(ENABLE_FAST_JIT_PERMISSIONS) $(ENABLE_FETCH_API) $(ENABLE_FILTERS_LEVEL_2) $(ENABLE_FTL_JIT) $(ENABLE_FULLSCREEN_API) $(ENABLE_GAMEPAD_DEPRECATED) $(ENABLE_GAMEPAD) $(ENABLE_GEOLOCATION) $(ENABLE_ICONDATABASE) $(ENABLE_INDEXED_DATABASE_IN_WORKERS) $(ENABLE_INDEXED_DATABASE) $(ENABLE_INPUT_TYPE_COLOR_POPOVER) $(ENABLE_INPUT_TYPE_COLOR) $(ENABLE_INPUT_TYPE_DATE) $(ENABLE_INPUT_TYPE_DATETIME_INCOMPLETE) $(ENABLE_INPUT_TYPE_DATETIMELOCAL) $(ENABLE_INPUT_TYPE_MONTH) $(ENABLE_INPUT_TYPE_TIME) $(ENABLE_INPUT_TYPE_WEEK) $(ENABLE_INTERSECTION_OBSERVER) $(ENABLE_INTL) $(ENABLE_IOS_GESTURE_EVENTS) $(ENABLE_IOS_TOUCH_EVENTS) $(ENABLE_JIT) $(ENABLE_KEYBOARD_KEY_ATTRIBUTE) $(ENABLE_KEYBOARD_CODE_ATTRIBUTE) $(ENABLE_LEGACY_CSS_VENDOR_PREFIXES) $(ENABLE_LEGACY_ENCRYPTED_MEDIA) $(ENABLE_LEGACY_VENDOR_PREFIXES) $(ENABLE_LETTERPRESS) $(ENABLE_LINK_PREFETCH) $(ENABLE_MAC_GESTURE_EVENTS) $(ENABLE_MATHML) $(ENABLE_MEDIA_CAPTURE) $(ENABLE_MEDIA_CONTROLS_SCRIPT) $(ENABLE_MEDIA_SESSION) $(ENABLE_MEDIA_SOURCE) $(ENABLE_MEDIA_STATISTICS) $(ENABLE_MEDIA_STREAM) $(ENABLE_METER_ELEMENT) $(ENABLE_MHTML) $(ENABLE_MOUSE_CURSOR_SCALE) $(ENABLE_NAVIGATOR_CONTENT_UTILS) $(ENABLE_NAVIGATOR_STANDALONE) $(ENABLE_NOTIFICATIONS) $(ENABLE_PDFKIT_PLUGIN) $(ENABLE_POINTER_LOCK) $(ENABLE_PROXIMITY_EVENTS) $(ENABLE_PUBLIC_SUFFIX_LIST) $(ENABLE_QUOTA) $(ENABLE_REMOTE_INSPECTOR) $(ENABLE_REQUEST_AUTOCOMPLETE) $(ENABLE_RESOLUTION_MEDIA_QUERY) $(ENABLE_RESOURCE_USAGE) $(ENABLE_RUBBER_BANDING) $(ENABLE_SERVICE_CONTROLS) $(ENABLE_SPEECH_SYNTHESIS) $(ENABLE_STREAMS_API) $(ENABLE_SUBTLE_CRYPTO) $(ENABLE_SVG_FONTS) $(ENABLE_TELEPHONE_NUMBER_DETECTION) $(ENABLE_TEXT_AUTOSIZING) $(ENABLE_TOUCH_EVENTS) $(ENABLE_TOUCH_ICON_LOADING) $(ENABLE_USERSELECT_ALL) $(ENABLE_VARIATION_FONTS) $(ENABLE_VIDEO_PRESENTATION_MODE) $(ENABLE_MAC_VIDEO_TOOLBOX) $(ENABLE_VIDEO_TRACK) $(ENABLE_VIDEO) $(ENABLE_VIEW_MODE_CSS_MEDIA) $(ENABLE_WEB_ANIMATIONS) $(ENABLE_WEB_AUDIO) $(ENABLE_WEB_RTC) $(ENABLE_WEB_SOCKETS) $(ENABLE_WEBASSEMBLY) $(ENABLE_WEBGL) $(ENABLE_WEBGL2) $(ENABLE_WEBGPU) $(ENABLE_WIRELESS_PLAYBACK_TARGET) $(ENABLE_XSLT);
+FEATURE_DEFINES = $(ENABLE_3D_TRANSFORMS) $(ENABLE_ACCELERATED_2D_CANVAS) $(ENABLE_ACCELERATED_OVERFLOW_SCROLLING) $(ENABLE_APPLE_PAY) $(ENABLE_APPLE_PAY_SESSION_V3) $(ENABLE_ATTACHMENT_ELEMENT) $(ENABLE_AVF_CAPTIONS) $(ENABLE_CACHE_PARTITIONING) $(ENABLE_CANVAS_PATH) $(ENABLE_CANVAS_PROXY) $(ENABLE_CHANNEL_MESSAGING) $(ENABLE_CONTENT_FILTERING) $(ENABLE_CSS_ANIMATIONS_LEVEL_2) $(ENABLE_CSS_BOX_DECORATION_BREAK) $(ENABLE_CSS_COMPOSITING) $(ENABLE_CSS_DEVICE_ADAPTATION) $(ENABLE_CSS_IMAGE_ORIENTATION) $(ENABLE_CSS_IMAGE_RESOLUTION) $(ENABLE_CSS_REGIONS) $(ENABLE_CSS_SCROLL_SNAP) $(ENABLE_CSS_SELECTORS_LEVEL4) $(ENABLE_CSS_TRAILING_WORD) $(ENABLE_CSS3_TEXT) $(ENABLE_CURSOR_VISIBILITY) $(ENABLE_CUSTOM_SCHEME_HANDLER) $(ENABLE_DASHBOARD_SUPPORT) $(ENABLE_DATA_INTERACTION) $(ENABLE_DATA_TRANSFER_ITEMS) $(ENABLE_DATACUE_VALUE) $(ENABLE_DATALIST_ELEMENT) $(ENABLE_DEVICE_ORIENTATION) $(ENABLE_DRAG_SUPPORT) $(ENABLE_ENCRYPTED_MEDIA) $(ENABLE_FAST_JIT_PERMISSIONS) $(ENABLE_FETCH_API) $(ENABLE_FILTERS_LEVEL_2) $(ENABLE_FTL_JIT) $(ENABLE_FULLSCREEN_API) $(ENABLE_GAMEPAD_DEPRECATED) $(ENABLE_GAMEPAD) $(ENABLE_GEOLOCATION) $(ENABLE_ICONDATABASE) $(ENABLE_INDEXED_DATABASE_IN_WORKERS) $(ENABLE_INDEXED_DATABASE) $(ENABLE_INPUT_TYPE_COLOR_POPOVER) $(ENABLE_INPUT_TYPE_COLOR) $(ENABLE_INPUT_TYPE_DATE) $(ENABLE_INPUT_TYPE_DATETIME_INCOMPLETE) $(ENABLE_INPUT_TYPE_DATETIMELOCAL) $(ENABLE_INPUT_TYPE_MONTH) $(ENABLE_INPUT_TYPE_TIME) $(ENABLE_INPUT_TYPE_WEEK) $(ENABLE_INTERSECTION_OBSERVER) $(ENABLE_INTL) $(ENABLE_IOS_GESTURE_EVENTS) $(ENABLE_IOS_TOUCH_EVENTS) $(ENABLE_JIT) $(ENABLE_KEYBOARD_KEY_ATTRIBUTE) $(ENABLE_KEYBOARD_CODE_ATTRIBUTE) $(ENABLE_LEGACY_CSS_VENDOR_PREFIXES) $(ENABLE_LEGACY_ENCRYPTED_MEDIA) $(ENABLE_LEGACY_VENDOR_PREFIXES) $(ENABLE_LETTERPRESS) $(ENABLE_LINK_PREFETCH) $(ENABLE_MAC_GESTURE_EVENTS) $(ENABLE_MATHML) $(ENABLE_MEDIA_CAPTURE) $(ENABLE_MEDIA_CONTROLS_SCRIPT) $(ENABLE_MEDIA_SESSION) $(ENABLE_MEDIA_SOURCE) $(ENABLE_MEDIA_STATISTICS) $(ENABLE_MEDIA_STREAM) $(ENABLE_METER_ELEMENT) $(ENABLE_MHTML) $(ENABLE_MOUSE_CURSOR_SCALE) $(ENABLE_NAVIGATOR_CONTENT_UTILS) $(ENABLE_NAVIGATOR_STANDALONE) $(ENABLE_NOTIFICATIONS) $(ENABLE_PDFKIT_PLUGIN) $(ENABLE_POINTER_LOCK) $(ENABLE_PROXIMITY_EVENTS) $(ENABLE_PUBLIC_SUFFIX_LIST) $(ENABLE_QUOTA) $(ENABLE_REMOTE_INSPECTOR) $(ENABLE_REQUEST_AUTOCOMPLETE) $(ENABLE_RESOLUTION_MEDIA_QUERY) $(ENABLE_RESOURCE_USAGE) $(ENABLE_RUBBER_BANDING) $(ENABLE_SERVICE_CONTROLS) $(ENABLE_SERVICE_WORKER) $(ENABLE_SPEECH_SYNTHESIS) $(ENABLE_STREAMS_API) $(ENABLE_SUBTLE_CRYPTO) $(ENABLE_SVG_FONTS) $(ENABLE_TELEPHONE_NUMBER_DETECTION) $(ENABLE_TEXT_AUTOSIZING) $(ENABLE_TOUCH_EVENTS) $(ENABLE_TOUCH_ICON_LOADING) $(ENABLE_USERSELECT_ALL) $(ENABLE_VARIATION_FONTS) $(ENABLE_VIDEO_PRESENTATION_MODE) $(ENABLE_MAC_VIDEO_TOOLBOX) $(ENABLE_VIDEO_TRACK) $(ENABLE_VIDEO) $(ENABLE_VIEW_MODE_CSS_MEDIA) $(ENABLE_WEB_ANIMATIONS) $(ENABLE_WEB_AUDIO) $(ENABLE_WEB_RTC) $(ENABLE_WEB_SOCKETS) $(ENABLE_WEBASSEMBLY) $(ENABLE_WEBGL) $(ENABLE_WEBGL2) $(ENABLE_WEBGPU) $(ENABLE_WIRELESS_PLAYBACK_TARGET) $(ENABLE_XSLT);
index 27fd1e3..eb2aa26 100644 (file)
@@ -648,6 +648,7 @@ JS_BINDING_IDLS = \
     $(WebCore)/page/NavigatorID.idl \
     $(WebCore)/page/NavigatorLanguage.idl \
     $(WebCore)/page/NavigatorOnLine.idl \
+    $(WebCore)/page/NavigatorServiceWorker.idl \
     $(WebCore)/page/Performance.idl \
     $(WebCore)/page/PerformanceEntry.idl \
     $(WebCore)/page/PerformanceMark.idl \
@@ -828,6 +829,10 @@ JS_BINDING_IDLS = \
     $(WebCore)/testing/TypeConversions.idl \
     $(WebCore)/workers/AbstractWorker.idl \
     $(WebCore)/workers/DedicatedWorkerGlobalScope.idl \
+    $(WebCore)/workers/ServiceWorker.idl \
+    $(WebCore)/workers/ServiceWorkerContainer.idl \
+    $(WebCore)/workers/ServiceWorkerGlobalScope.idl \
+    $(WebCore)/workers/ServiceWorkerRegistration.idl \
     $(WebCore)/workers/Worker.idl \
     $(WebCore)/workers/WorkerGlobalScope.idl \
     $(WebCore)/workers/WorkerLocation.idl \
@@ -1342,6 +1347,7 @@ SUPPLEMENTAL_MAKEFILE_DEPS = ./SupplementalDependencies.dep
 WINDOW_CONSTRUCTORS_FILE = ./DOMWindowConstructors.idl
 WORKERGLOBALSCOPE_CONSTRUCTORS_FILE = ./WorkerGlobalScopeConstructors.idl
 DEDICATEDWORKERGLOBALSCOPE_CONSTRUCTORS_FILE = ./DedicatedWorkerGlobalScopeConstructors.idl
+SERVICEWORKERGLOBALSCOPE_CONSTRUCTORS_FILE = ./ServiceWorkerGlobalScopeConstructors.idl
 IDL_FILES_TMP = ./idl_files.tmp
 IDL_ATTRIBUTES_FILE = $(WebCore)/bindings/scripts/IDLAttributes.json
 
@@ -1354,7 +1360,7 @@ endef
 
 $(SUPPLEMENTAL_MAKEFILE_DEPS) : $(PREPROCESS_IDLS_SCRIPTS) $(JS_BINDING_IDLS) $(PLATFORM_FEATURE_DEFINES) DerivedSources.make
        $(foreach f,$(JS_BINDING_IDLS),@echo $(f)>>$(IDL_FILES_TMP)$(NL))
-       $(PERL) $(WebCore)/bindings/scripts/preprocess-idls.pl --defines "$(FEATURE_DEFINES) $(ADDITIONAL_IDL_DEFINES) LANGUAGE_JAVASCRIPT" --idlFilesList $(IDL_FILES_TMP) --supplementalDependencyFile $(SUPPLEMENTAL_DEPENDENCY_FILE) --windowConstructorsFile $(WINDOW_CONSTRUCTORS_FILE) --workerGlobalScopeConstructorsFile $(WORKERGLOBALSCOPE_CONSTRUCTORS_FILE) --dedicatedWorkerGlobalScopeConstructorsFile $(DEDICATEDWORKERGLOBALSCOPE_CONSTRUCTORS_FILE) --supplementalMakefileDeps $@
+       $(PERL) $(WebCore)/bindings/scripts/preprocess-idls.pl --defines "$(FEATURE_DEFINES) $(ADDITIONAL_IDL_DEFINES) LANGUAGE_JAVASCRIPT" --idlFilesList $(IDL_FILES_TMP) --supplementalDependencyFile $(SUPPLEMENTAL_DEPENDENCY_FILE) --windowConstructorsFile $(WINDOW_CONSTRUCTORS_FILE) --workerGlobalScopeConstructorsFile $(WORKERGLOBALSCOPE_CONSTRUCTORS_FILE) --dedicatedWorkerGlobalScopeConstructorsFile $(DEDICATEDWORKERGLOBALSCOPE_CONSTRUCTORS_FILE) --serviceWorkerGlobalScopeConstructorsFile $(SERVICEWORKERGLOBALSCOPE_CONSTRUCTORS_FILE) --supplementalMakefileDeps $@
        $(DELETE) $(IDL_FILES_TMP)
 
 JS%.cpp JS%.h : %.idl $(JS_BINDINGS_SCRIPTS) $(IDL_ATTRIBUTES_FILE) $(WINDOW_CONSTRUCTORS_FILE) $(WORKERGLOBALSCOPE_CONSTRUCTORS_FILE) $(PLATFORM_FEATURE_DEFINES)
index 8d306a0..0db81dc 100644 (file)
@@ -1,3 +1,12 @@
+2017-08-03  Brady Eidson  <beidson@apple.com>
+
+        Add SW IDLs and stub out basic functionality.
+        https://bugs.webkit.org/show_bug.cgi?id=175115
+
+        Reviewed by Chris Dumez.
+
+        * Configurations/FeatureDefines.xcconfig:
+
 2017-08-03  Yoshiaki Jitsukawa  <jitsu@rd.scei.sony.co.jp>
 
         [WebCore] Sort Xcode project files
index 67cf537..80e86e7 100644 (file)
@@ -157,6 +157,7 @@ ENABLE_POINTER_LOCK[sdk=macosx*] = ENABLE_POINTER_LOCK;
 ENABLE_PROXIMITY_EVENTS = ;
 ENABLE_PUBLIC_SUFFIX_LIST = ENABLE_PUBLIC_SUFFIX_LIST;
 ENABLE_QUOTA = ;
+ENABLE_SERVICE_WORKER = ENABLE_SERVICE_WORKER;
 ENABLE_STREAMS_API = ENABLE_STREAMS_API;
 ENABLE_REQUEST_AUTOCOMPLETE = ;
 ENABLE_REMOTE_INSPECTOR = ENABLE_REMOTE_INSPECTOR;
@@ -243,4 +244,4 @@ ENABLE_DRAG_SUPPORT[sdk=iphonesimulator11*] = ENABLE_DRAG_SUPPORT;
 ENABLE_DATA_INTERACTION[sdk=iphoneos11*] = ENABLE_DATA_INTERACTION;
 ENABLE_DATA_INTERACTION[sdk=iphonesimulator11*] = ENABLE_DATA_INTERACTION;
 
-FEATURE_DEFINES = $(ENABLE_3D_TRANSFORMS) $(ENABLE_ACCELERATED_2D_CANVAS) $(ENABLE_ACCELERATED_OVERFLOW_SCROLLING) $(ENABLE_APPLE_PAY) $(ENABLE_APPLE_PAY_SESSION_V3) $(ENABLE_ATTACHMENT_ELEMENT) $(ENABLE_AVF_CAPTIONS) $(ENABLE_CACHE_PARTITIONING) $(ENABLE_CANVAS_PATH) $(ENABLE_CANVAS_PROXY) $(ENABLE_CHANNEL_MESSAGING) $(ENABLE_CONTENT_FILTERING) $(ENABLE_CSS_ANIMATIONS_LEVEL_2) $(ENABLE_CSS_BOX_DECORATION_BREAK) $(ENABLE_CSS_COMPOSITING) $(ENABLE_CSS_DEVICE_ADAPTATION) $(ENABLE_CSS_IMAGE_ORIENTATION) $(ENABLE_CSS_IMAGE_RESOLUTION) $(ENABLE_CSS_REGIONS) $(ENABLE_CSS_SCROLL_SNAP) $(ENABLE_CSS_SELECTORS_LEVEL4) $(ENABLE_CSS_TRAILING_WORD) $(ENABLE_CSS3_TEXT) $(ENABLE_CURSOR_VISIBILITY) $(ENABLE_CUSTOM_SCHEME_HANDLER) $(ENABLE_DASHBOARD_SUPPORT) $(ENABLE_DATA_INTERACTION) $(ENABLE_DATA_TRANSFER_ITEMS) $(ENABLE_DATACUE_VALUE) $(ENABLE_DATALIST_ELEMENT) $(ENABLE_DEVICE_ORIENTATION) $(ENABLE_DRAG_SUPPORT) $(ENABLE_ENCRYPTED_MEDIA) $(ENABLE_FAST_JIT_PERMISSIONS) $(ENABLE_FETCH_API) $(ENABLE_FILTERS_LEVEL_2) $(ENABLE_FTL_JIT) $(ENABLE_FULLSCREEN_API) $(ENABLE_GAMEPAD_DEPRECATED) $(ENABLE_GAMEPAD) $(ENABLE_GEOLOCATION) $(ENABLE_ICONDATABASE) $(ENABLE_INDEXED_DATABASE_IN_WORKERS) $(ENABLE_INDEXED_DATABASE) $(ENABLE_INPUT_TYPE_COLOR_POPOVER) $(ENABLE_INPUT_TYPE_COLOR) $(ENABLE_INPUT_TYPE_DATE) $(ENABLE_INPUT_TYPE_DATETIME_INCOMPLETE) $(ENABLE_INPUT_TYPE_DATETIMELOCAL) $(ENABLE_INPUT_TYPE_MONTH) $(ENABLE_INPUT_TYPE_TIME) $(ENABLE_INPUT_TYPE_WEEK) $(ENABLE_INTERSECTION_OBSERVER) $(ENABLE_INTL) $(ENABLE_IOS_GESTURE_EVENTS) $(ENABLE_IOS_TOUCH_EVENTS) $(ENABLE_JIT) $(ENABLE_KEYBOARD_KEY_ATTRIBUTE) $(ENABLE_KEYBOARD_CODE_ATTRIBUTE) $(ENABLE_LEGACY_CSS_VENDOR_PREFIXES) $(ENABLE_LEGACY_ENCRYPTED_MEDIA) $(ENABLE_LEGACY_VENDOR_PREFIXES) $(ENABLE_LETTERPRESS) $(ENABLE_LINK_PREFETCH) $(ENABLE_MAC_GESTURE_EVENTS) $(ENABLE_MATHML) $(ENABLE_MEDIA_CAPTURE) $(ENABLE_MEDIA_CONTROLS_SCRIPT) $(ENABLE_MEDIA_SESSION) $(ENABLE_MEDIA_SOURCE) $(ENABLE_MEDIA_STATISTICS) $(ENABLE_MEDIA_STREAM) $(ENABLE_METER_ELEMENT) $(ENABLE_MHTML) $(ENABLE_MOUSE_CURSOR_SCALE) $(ENABLE_NAVIGATOR_CONTENT_UTILS) $(ENABLE_NAVIGATOR_STANDALONE) $(ENABLE_NOTIFICATIONS) $(ENABLE_PDFKIT_PLUGIN) $(ENABLE_POINTER_LOCK) $(ENABLE_PROXIMITY_EVENTS) $(ENABLE_PUBLIC_SUFFIX_LIST) $(ENABLE_QUOTA) $(ENABLE_REMOTE_INSPECTOR) $(ENABLE_REQUEST_AUTOCOMPLETE) $(ENABLE_RESOLUTION_MEDIA_QUERY) $(ENABLE_RESOURCE_USAGE) $(ENABLE_RUBBER_BANDING) $(ENABLE_SERVICE_CONTROLS) $(ENABLE_SPEECH_SYNTHESIS) $(ENABLE_STREAMS_API) $(ENABLE_SUBTLE_CRYPTO) $(ENABLE_SVG_FONTS) $(ENABLE_TELEPHONE_NUMBER_DETECTION) $(ENABLE_TEXT_AUTOSIZING) $(ENABLE_TOUCH_EVENTS) $(ENABLE_TOUCH_ICON_LOADING) $(ENABLE_USERSELECT_ALL) $(ENABLE_VARIATION_FONTS) $(ENABLE_VIDEO_PRESENTATION_MODE) $(ENABLE_MAC_VIDEO_TOOLBOX) $(ENABLE_VIDEO_TRACK) $(ENABLE_VIDEO) $(ENABLE_VIEW_MODE_CSS_MEDIA) $(ENABLE_WEB_ANIMATIONS) $(ENABLE_WEB_AUDIO) $(ENABLE_WEB_RTC) $(ENABLE_WEB_SOCKETS) $(ENABLE_WEBASSEMBLY) $(ENABLE_WEBGL) $(ENABLE_WEBGL2) $(ENABLE_WEBGPU) $(ENABLE_WIRELESS_PLAYBACK_TARGET) $(ENABLE_XSLT);
+FEATURE_DEFINES = $(ENABLE_3D_TRANSFORMS) $(ENABLE_ACCELERATED_2D_CANVAS) $(ENABLE_ACCELERATED_OVERFLOW_SCROLLING) $(ENABLE_APPLE_PAY) $(ENABLE_APPLE_PAY_SESSION_V3) $(ENABLE_ATTACHMENT_ELEMENT) $(ENABLE_AVF_CAPTIONS) $(ENABLE_CACHE_PARTITIONING) $(ENABLE_CANVAS_PATH) $(ENABLE_CANVAS_PROXY) $(ENABLE_CHANNEL_MESSAGING) $(ENABLE_CONTENT_FILTERING) $(ENABLE_CSS_ANIMATIONS_LEVEL_2) $(ENABLE_CSS_BOX_DECORATION_BREAK) $(ENABLE_CSS_COMPOSITING) $(ENABLE_CSS_DEVICE_ADAPTATION) $(ENABLE_CSS_IMAGE_ORIENTATION) $(ENABLE_CSS_IMAGE_RESOLUTION) $(ENABLE_CSS_REGIONS) $(ENABLE_CSS_SCROLL_SNAP) $(ENABLE_CSS_SELECTORS_LEVEL4) $(ENABLE_CSS_TRAILING_WORD) $(ENABLE_CSS3_TEXT) $(ENABLE_CURSOR_VISIBILITY) $(ENABLE_CUSTOM_SCHEME_HANDLER) $(ENABLE_DASHBOARD_SUPPORT) $(ENABLE_DATA_INTERACTION) $(ENABLE_DATA_TRANSFER_ITEMS) $(ENABLE_DATACUE_VALUE) $(ENABLE_DATALIST_ELEMENT) $(ENABLE_DEVICE_ORIENTATION) $(ENABLE_DRAG_SUPPORT) $(ENABLE_ENCRYPTED_MEDIA) $(ENABLE_FAST_JIT_PERMISSIONS) $(ENABLE_FETCH_API) $(ENABLE_FILTERS_LEVEL_2) $(ENABLE_FTL_JIT) $(ENABLE_FULLSCREEN_API) $(ENABLE_GAMEPAD_DEPRECATED) $(ENABLE_GAMEPAD) $(ENABLE_GEOLOCATION) $(ENABLE_ICONDATABASE) $(ENABLE_INDEXED_DATABASE_IN_WORKERS) $(ENABLE_INDEXED_DATABASE) $(ENABLE_INPUT_TYPE_COLOR_POPOVER) $(ENABLE_INPUT_TYPE_COLOR) $(ENABLE_INPUT_TYPE_DATE) $(ENABLE_INPUT_TYPE_DATETIME_INCOMPLETE) $(ENABLE_INPUT_TYPE_DATETIMELOCAL) $(ENABLE_INPUT_TYPE_MONTH) $(ENABLE_INPUT_TYPE_TIME) $(ENABLE_INPUT_TYPE_WEEK) $(ENABLE_INTERSECTION_OBSERVER) $(ENABLE_INTL) $(ENABLE_IOS_GESTURE_EVENTS) $(ENABLE_IOS_TOUCH_EVENTS) $(ENABLE_JIT) $(ENABLE_KEYBOARD_KEY_ATTRIBUTE) $(ENABLE_KEYBOARD_CODE_ATTRIBUTE) $(ENABLE_LEGACY_CSS_VENDOR_PREFIXES) $(ENABLE_LEGACY_ENCRYPTED_MEDIA) $(ENABLE_LEGACY_VENDOR_PREFIXES) $(ENABLE_LETTERPRESS) $(ENABLE_LINK_PREFETCH) $(ENABLE_MAC_GESTURE_EVENTS) $(ENABLE_MATHML) $(ENABLE_MEDIA_CAPTURE) $(ENABLE_MEDIA_CONTROLS_SCRIPT) $(ENABLE_MEDIA_SESSION) $(ENABLE_MEDIA_SOURCE) $(ENABLE_MEDIA_STATISTICS) $(ENABLE_MEDIA_STREAM) $(ENABLE_METER_ELEMENT) $(ENABLE_MHTML) $(ENABLE_MOUSE_CURSOR_SCALE) $(ENABLE_NAVIGATOR_CONTENT_UTILS) $(ENABLE_NAVIGATOR_STANDALONE) $(ENABLE_NOTIFICATIONS) $(ENABLE_PDFKIT_PLUGIN) $(ENABLE_POINTER_LOCK) $(ENABLE_PROXIMITY_EVENTS) $(ENABLE_PUBLIC_SUFFIX_LIST) $(ENABLE_QUOTA) $(ENABLE_REMOTE_INSPECTOR) $(ENABLE_REQUEST_AUTOCOMPLETE) $(ENABLE_RESOLUTION_MEDIA_QUERY) $(ENABLE_RESOURCE_USAGE) $(ENABLE_RUBBER_BANDING) $(ENABLE_SERVICE_CONTROLS) $(ENABLE_SERVICE_WORKER) $(ENABLE_SPEECH_SYNTHESIS) $(ENABLE_STREAMS_API) $(ENABLE_SUBTLE_CRYPTO) $(ENABLE_SVG_FONTS) $(ENABLE_TELEPHONE_NUMBER_DETECTION) $(ENABLE_TEXT_AUTOSIZING) $(ENABLE_TOUCH_EVENTS) $(ENABLE_TOUCH_ICON_LOADING) $(ENABLE_USERSELECT_ALL) $(ENABLE_VARIATION_FONTS) $(ENABLE_VIDEO_PRESENTATION_MODE) $(ENABLE_MAC_VIDEO_TOOLBOX) $(ENABLE_VIDEO_TRACK) $(ENABLE_VIDEO) $(ENABLE_VIEW_MODE_CSS_MEDIA) $(ENABLE_WEB_ANIMATIONS) $(ENABLE_WEB_AUDIO) $(ENABLE_WEB_RTC) $(ENABLE_WEB_SOCKETS) $(ENABLE_WEBASSEMBLY) $(ENABLE_WEBGL) $(ENABLE_WEBGL2) $(ENABLE_WEBGPU) $(ENABLE_WIRELESS_PLAYBACK_TARGET) $(ENABLE_XSLT);
index 5fe6b94..8992360 100644 (file)
                517DEEE51DE94ADC00B91644 /* ScrollingMomentumCalculatorMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = 517DEEE31DE94ADC00B91644 /* ScrollingMomentumCalculatorMac.mm */; };
                517DEEE81DE94B0800B91644 /* ScrollingMomentumCalculatorMac.h in Headers */ = {isa = PBXBuildFile; fileRef = 517DEEE71DE94B0800B91644 /* ScrollingMomentumCalculatorMac.h */; settings = {ATTRIBUTES = (Private, ); }; };
                517FBA1E151AB17C00B57959 /* DOMWindowExtension.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 517FBA17151AA71B00B57959 /* DOMWindowExtension.cpp */; };
+               5182C23E1F313A090059BA7C /* ServiceWorker.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5182C23C1F3139FC0059BA7C /* ServiceWorker.cpp */; };
+               5182C23F1F313A090059BA7C /* ServiceWorker.h in Headers */ = {isa = PBXBuildFile; fileRef = 5182C23B1F3139FC0059BA7C /* ServiceWorker.h */; settings = {ATTRIBUTES = (Private, ); }; };
+               5182C2401F313A090059BA7C /* ServiceWorkerContainer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5182C2381F3139FC0059BA7C /* ServiceWorkerContainer.cpp */; };
+               5182C2411F313A090059BA7C /* ServiceWorkerContainer.h in Headers */ = {isa = PBXBuildFile; fileRef = 5182C2331F3139FC0059BA7C /* ServiceWorkerContainer.h */; settings = {ATTRIBUTES = (Private, ); }; };
+               5182C2421F313A090059BA7C /* ServiceWorkerGlobalScope.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5182C2361F3139FC0059BA7C /* ServiceWorkerGlobalScope.cpp */; };
+               5182C2431F313A090059BA7C /* ServiceWorkerGlobalScope.h in Headers */ = {isa = PBXBuildFile; fileRef = 5182C23A1F3139FC0059BA7C /* ServiceWorkerGlobalScope.h */; settings = {ATTRIBUTES = (Private, ); }; };
+               5182C2441F313A090059BA7C /* ServiceWorkerRegistration.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5182C2341F3139FC0059BA7C /* ServiceWorkerRegistration.cpp */; };
+               5182C2451F313A090059BA7C /* ServiceWorkerRegistration.h in Headers */ = {isa = PBXBuildFile; fileRef = 5182C2371F3139FC0059BA7C /* ServiceWorkerRegistration.h */; settings = {ATTRIBUTES = (Private, ); }; };
+               5182C2551F3143CD0059BA7C /* JSServiceWorker.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5182C2531F3142500059BA7C /* JSServiceWorker.cpp */; };
+               5182C2561F3143CD0059BA7C /* JSServiceWorker.h in Headers */ = {isa = PBXBuildFile; fileRef = 5182C2521F3142500059BA7C /* JSServiceWorker.h */; };
+               5182C2571F3143CD0059BA7C /* JSServiceWorkerContainer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5182C2511F3142500059BA7C /* JSServiceWorkerContainer.cpp */; };
+               5182C2581F3143CD0059BA7C /* JSServiceWorkerContainer.h in Headers */ = {isa = PBXBuildFile; fileRef = 5182C2541F3142500059BA7C /* JSServiceWorkerContainer.h */; };
+               5182C2591F3143CD0059BA7C /* JSServiceWorkerGlobalScope.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5182C24E1F3142500059BA7C /* JSServiceWorkerGlobalScope.cpp */; };
+               5182C25A1F3143CD0059BA7C /* JSServiceWorkerGlobalScope.h in Headers */ = {isa = PBXBuildFile; fileRef = 5182C24D1F3142500059BA7C /* JSServiceWorkerGlobalScope.h */; };
+               5182C25B1F3143CD0059BA7C /* JSServiceWorkerRegistration.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5182C24F1F3142500059BA7C /* JSServiceWorkerRegistration.cpp */; };
+               5182C25C1F3143CD0059BA7C /* JSServiceWorkerRegistration.h in Headers */ = {isa = PBXBuildFile; fileRef = 5182C2501F3142500059BA7C /* JSServiceWorkerRegistration.h */; };
                5185FC741BB4C4E80012898F /* DOMWindowIndexedDatabase.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 51D7196C181106DF0016DC51 /* DOMWindowIndexedDatabase.cpp */; };
                5185FC751BB4C4E80012898F /* DOMWindowIndexedDatabase.h in Headers */ = {isa = PBXBuildFile; fileRef = 51D7196D181106DF0016DC51 /* DOMWindowIndexedDatabase.h */; };
                5185FC7A1BB4C4E80012898F /* IDBCursor.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 51645B541B9F88E800F789CE /* IDBCursor.cpp */; };
                51EEAA741BEFFAB100218008 /* IndexValueEntry.h in Headers */ = {isa = PBXBuildFile; fileRef = 51EEAA721BEFFA7900218008 /* IndexValueEntry.h */; };
                51F798EF1BE880E7008AE491 /* IDBIndexInfo.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 51F798EB1BE880D3008AE491 /* IDBIndexInfo.cpp */; };
                51F798F01BE880E7008AE491 /* IDBIndexInfo.h in Headers */ = {isa = PBXBuildFile; fileRef = 51F798EC1BE880D3008AE491 /* IDBIndexInfo.h */; settings = {ATTRIBUTES = (Private, ); }; };
+               51F886BD1F326A9800C193EF /* JSServiceWorkerContainerCustom.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 51F886BB1F326A9200C193EF /* JSServiceWorkerContainerCustom.cpp */; };
+               51F886C01F32923100C193EF /* JSNavigatorServiceWorker.h in Headers */ = {isa = PBXBuildFile; fileRef = 51F886BF1F32920700C193EF /* JSNavigatorServiceWorker.h */; };
+               51F886C11F32923400C193EF /* JSNavigatorServiceWorker.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 51F886BE1F32920700C193EF /* JSNavigatorServiceWorker.cpp */; };
                51FA2D78152132B300C1BA0B /* DOMWindowExtension.h in Headers */ = {isa = PBXBuildFile; fileRef = 517FBA18151AA71B00B57959 /* DOMWindowExtension.h */; settings = {ATTRIBUTES = (Private, ); }; };
                51FB5504113E3E9100821176 /* JSCloseEvent.h in Headers */ = {isa = PBXBuildFile; fileRef = 51FB5502113E3E9100821176 /* JSCloseEvent.h */; };
                51FB5505113E3E9100821176 /* JSCloseEvent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 51FB5503113E3E9100821176 /* JSCloseEvent.cpp */; };
                517DEEE71DE94B0800B91644 /* ScrollingMomentumCalculatorMac.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ScrollingMomentumCalculatorMac.h; sourceTree = "<group>"; };
                517FBA17151AA71B00B57959 /* DOMWindowExtension.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DOMWindowExtension.cpp; sourceTree = "<group>"; };
                517FBA18151AA71B00B57959 /* DOMWindowExtension.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DOMWindowExtension.h; sourceTree = "<group>"; };
+               5182C2311F3139FC0059BA7C /* ServiceWorker.idl */ = {isa = PBXFileReference; lastKnownFileType = text; path = ServiceWorker.idl; sourceTree = "<group>"; };
+               5182C2321F3139FC0059BA7C /* ServiceWorkerRegistration.idl */ = {isa = PBXFileReference; lastKnownFileType = text; path = ServiceWorkerRegistration.idl; sourceTree = "<group>"; };
+               5182C2331F3139FC0059BA7C /* ServiceWorkerContainer.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ServiceWorkerContainer.h; sourceTree = "<group>"; };
+               5182C2341F3139FC0059BA7C /* ServiceWorkerRegistration.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = ServiceWorkerRegistration.cpp; sourceTree = "<group>"; };
+               5182C2351F3139FC0059BA7C /* ServiceWorkerContainer.idl */ = {isa = PBXFileReference; lastKnownFileType = text; path = ServiceWorkerContainer.idl; sourceTree = "<group>"; };
+               5182C2361F3139FC0059BA7C /* ServiceWorkerGlobalScope.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = ServiceWorkerGlobalScope.cpp; sourceTree = "<group>"; };
+               5182C2371F3139FC0059BA7C /* ServiceWorkerRegistration.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ServiceWorkerRegistration.h; sourceTree = "<group>"; };
+               5182C2381F3139FC0059BA7C /* ServiceWorkerContainer.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = ServiceWorkerContainer.cpp; sourceTree = "<group>"; };
+               5182C2391F3139FC0059BA7C /* ServiceWorkerGlobalScope.idl */ = {isa = PBXFileReference; lastKnownFileType = text; path = ServiceWorkerGlobalScope.idl; sourceTree = "<group>"; };
+               5182C23A1F3139FC0059BA7C /* ServiceWorkerGlobalScope.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ServiceWorkerGlobalScope.h; sourceTree = "<group>"; };
+               5182C23B1F3139FC0059BA7C /* ServiceWorker.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ServiceWorker.h; sourceTree = "<group>"; };
+               5182C23C1F3139FC0059BA7C /* ServiceWorker.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = ServiceWorker.cpp; sourceTree = "<group>"; };
+               5182C24B1F313AE00059BA7C /* NavigatorServiceWorker.idl */ = {isa = PBXFileReference; lastKnownFileType = text; path = NavigatorServiceWorker.idl; sourceTree = "<group>"; };
+               5182C24D1F3142500059BA7C /* JSServiceWorkerGlobalScope.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = JSServiceWorkerGlobalScope.h; path = WebCore/JSServiceWorkerGlobalScope.h; sourceTree = "<group>"; };
+               5182C24E1F3142500059BA7C /* JSServiceWorkerGlobalScope.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = JSServiceWorkerGlobalScope.cpp; path = WebCore/JSServiceWorkerGlobalScope.cpp; sourceTree = "<group>"; };
+               5182C24F1F3142500059BA7C /* JSServiceWorkerRegistration.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = JSServiceWorkerRegistration.cpp; path = WebCore/JSServiceWorkerRegistration.cpp; sourceTree = "<group>"; };
+               5182C2501F3142500059BA7C /* JSServiceWorkerRegistration.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = JSServiceWorkerRegistration.h; path = WebCore/JSServiceWorkerRegistration.h; sourceTree = "<group>"; };
+               5182C2511F3142500059BA7C /* JSServiceWorkerContainer.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = JSServiceWorkerContainer.cpp; path = WebCore/JSServiceWorkerContainer.cpp; sourceTree = "<group>"; };
+               5182C2521F3142500059BA7C /* JSServiceWorker.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = JSServiceWorker.h; path = WebCore/JSServiceWorker.h; sourceTree = "<group>"; };
+               5182C2531F3142500059BA7C /* JSServiceWorker.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = JSServiceWorker.cpp; path = WebCore/JSServiceWorker.cpp; sourceTree = "<group>"; };
+               5182C2541F3142500059BA7C /* JSServiceWorkerContainer.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = JSServiceWorkerContainer.h; path = WebCore/JSServiceWorkerContainer.h; sourceTree = "<group>"; };
                5185FCBC1BB5CB770012898F /* IDBConnectionToServer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = IDBConnectionToServer.cpp; sourceTree = "<group>"; };
                5185FCBD1BB5CB770012898F /* IDBConnectionToServerDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IDBConnectionToServerDelegate.h; sourceTree = "<group>"; };
                518864DE1BBAF30F00E540C9 /* UniqueIDBDatabase.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = UniqueIDBDatabase.cpp; sourceTree = "<group>"; };
                51F6A3D60663BF04004D2919 /* HTMLCanvasElement.h */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 4; lastKnownFileType = sourcecode.c.h; path = HTMLCanvasElement.h; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
                51F798EB1BE880D3008AE491 /* IDBIndexInfo.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = IDBIndexInfo.cpp; sourceTree = "<group>"; };
                51F798EC1BE880D3008AE491 /* IDBIndexInfo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IDBIndexInfo.h; sourceTree = "<group>"; };
+               51F886BB1F326A9200C193EF /* JSServiceWorkerContainerCustom.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSServiceWorkerContainerCustom.cpp; sourceTree = "<group>"; };
+               51F886BE1F32920700C193EF /* JSNavigatorServiceWorker.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = JSNavigatorServiceWorker.cpp; path = WebCore/JSNavigatorServiceWorker.cpp; sourceTree = "<group>"; };
+               51F886BF1F32920700C193EF /* JSNavigatorServiceWorker.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = JSNavigatorServiceWorker.h; path = WebCore/JSNavigatorServiceWorker.h; sourceTree = "<group>"; };
                51FB5502113E3E9100821176 /* JSCloseEvent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSCloseEvent.h; sourceTree = "<group>"; };
                51FB5503113E3E9100821176 /* JSCloseEvent.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSCloseEvent.cpp; sourceTree = "<group>"; };
                51FB67D91AE6B5E400D06C5A /* ContentExtensionStyleSheet.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ContentExtensionStyleSheet.cpp; sourceTree = "<group>"; };
                                A9D247F90D757E4100FDF959 /* Plugins */,
                                89F60B17157F6A020075E157 /* Quota */,
                                BC9854460CD3DA5F00069BC1 /* Ranges */,
+                               5182C24C1F3142090059BA7C /* ServiceWorkers */,
                                AA7FEE9B16A491A1004C0C33 /* Speech */,
                                A83B79150CCB0078000B0825 /* Storage */,
                                41A023FA1A39F13A00F722CF /* Streams */,
                                4162A44F101145AE00DFF3ED /* DedicatedWorkerGlobalScope.idl */,
                                41A3D58C101C152D00316D07 /* DedicatedWorkerThread.cpp */,
                                41A3D58D101C152D00316D07 /* DedicatedWorkerThread.h */,
+                               5182C23C1F3139FC0059BA7C /* ServiceWorker.cpp */,
+                               5182C23B1F3139FC0059BA7C /* ServiceWorker.h */,
+                               5182C2311F3139FC0059BA7C /* ServiceWorker.idl */,
+                               5182C2381F3139FC0059BA7C /* ServiceWorkerContainer.cpp */,
+                               5182C2331F3139FC0059BA7C /* ServiceWorkerContainer.h */,
+                               5182C2351F3139FC0059BA7C /* ServiceWorkerContainer.idl */,
+                               5182C2361F3139FC0059BA7C /* ServiceWorkerGlobalScope.cpp */,
+                               5182C23A1F3139FC0059BA7C /* ServiceWorkerGlobalScope.h */,
+                               5182C2391F3139FC0059BA7C /* ServiceWorkerGlobalScope.idl */,
+                               5182C2341F3139FC0059BA7C /* ServiceWorkerRegistration.cpp */,
+                               5182C2371F3139FC0059BA7C /* ServiceWorkerRegistration.h */,
+                               5182C2321F3139FC0059BA7C /* ServiceWorkerRegistration.idl */,
                                2E4346330F546A8200B0F1BA /* Worker.cpp */,
                                2E4346340F546A8200B0F1BA /* Worker.h */,
                                2E4346350F546A8200B0F1BA /* Worker.idl */,
                        tabWidth = 4;
                        usesTabs = 0;
                };
+               5182C24C1F3142090059BA7C /* ServiceWorkers */ = {
+                       isa = PBXGroup;
+                       children = (
+                               51F886BE1F32920700C193EF /* JSNavigatorServiceWorker.cpp */,
+                               51F886BF1F32920700C193EF /* JSNavigatorServiceWorker.h */,
+                               5182C2531F3142500059BA7C /* JSServiceWorker.cpp */,
+                               5182C2521F3142500059BA7C /* JSServiceWorker.h */,
+                               5182C2511F3142500059BA7C /* JSServiceWorkerContainer.cpp */,
+                               5182C2541F3142500059BA7C /* JSServiceWorkerContainer.h */,
+                               5182C24E1F3142500059BA7C /* JSServiceWorkerGlobalScope.cpp */,
+                               5182C24D1F3142500059BA7C /* JSServiceWorkerGlobalScope.h */,
+                               5182C24F1F3142500059BA7C /* JSServiceWorkerRegistration.cpp */,
+                               5182C2501F3142500059BA7C /* JSServiceWorkerRegistration.h */,
+                       );
+                       name = ServiceWorkers;
+                       path = DerivedSources;
+                       sourceTree = BUILT_PRODUCTS_DIR;
+               };
                518F4FE9194CA4B60081BAAE /* gamepad */ = {
                        isa = PBXGroup;
                        children = (
                                7C5BEA3A1E9EE77100CC517B /* NavigatorID.idl */,
                                7C5BEA3B1E9EE77100CC517B /* NavigatorLanguage.idl */,
                                7C5BEA3C1E9EE77100CC517B /* NavigatorOnLine.idl */,
+                               5182C24B1F313AE00059BA7C /* NavigatorServiceWorker.idl */,
                                00146288103CD1DE000B20DB /* OriginAccessEntry.cpp */,
                                00146289103CD1DE000B20DB /* OriginAccessEntry.h */,
                                65FEA86809833ADE00BED4AB /* Page.cpp */,
                                93B70D5009EB0C7C009D8468 /* JSPluginElementFunctions.h */,
                                4129DF831BB5B7F700322A16 /* JSReadableStreamPrivateConstructors.cpp */,
                                4129DF841BB5B7F700322A16 /* JSReadableStreamPrivateConstructors.h */,
+                               51F886BB1F326A9200C193EF /* JSServiceWorkerContainerCustom.cpp */,
                                E1C36D320EB0A094007410BC /* JSWorkerGlobalScopeBase.cpp */,
                                E1C36D330EB0A094007410BC /* JSWorkerGlobalScopeBase.h */,
                                709A01FD1E3D0BCC006B0D4C /* ModuleFetchFailureKind.h */,
                                FD31601D12B0267600C1A359 /* AudioParam.h in Headers */,
                                FD359190138DB22000E1EBEC /* AudioParamTimeline.h in Headers */,
                                FD31602012B0267600C1A359 /* AudioProcessingEvent.h in Headers */,
+                               5182C2581F3143CD0059BA7C /* JSServiceWorkerContainer.h in Headers */,
                                FD31608412B026F700C1A359 /* AudioProcessor.h in Headers */,
                                FD31608612B026F700C1A359 /* AudioResampler.h in Headers */,
                                FD31608812B026F700C1A359 /* AudioResamplerKernel.h in Headers */,
                                81AC5999131636E60009A7E0 /* DataTransferItem.h in Headers */,
                                81AC599A131636E60009A7E0 /* DataTransferItemList.h in Headers */,
                                E4A007831B820EC8002C5A6E /* DataURLDecoder.h in Headers */,
+                               5182C23F1F313A090059BA7C /* ServiceWorker.h in Headers */,
                                E4A007831B820EC8002C5A6E /* DataURLDecoder.h in Headers */,
                                A5732B0B136A161D005C8D7C /* DateComponents.h in Headers */,
                                F55B3DB61251F12D003EF269 /* DateInputType.h in Headers */,
                                65BF022F0974816300C43196 /* Frame.h in Headers */,
                                974A862314B7ADBB003FDC76 /* FrameDestructionObserver.h in Headers */,
                                656D373C0ADBA5DE00A4554D /* FrameLoader.h in Headers */,
+                               5182C25C1F3143CD0059BA7C /* JSServiceWorkerRegistration.h in Headers */,
                                656D373E0ADBA5DE00A4554D /* FrameLoaderClient.h in Headers */,
                                D000EBA311BDAFD400C47726 /* FrameLoaderStateMachine.h in Headers */,
                                93B77A380ADD792500EA4B81 /* FrameLoaderTypes.h in Headers */,
                                510192D218B6B9AB007FC7A1 /* ImageControlsRootElementMac.h in Headers */,
                                A779791A0D6B9D0C003851B9 /* ImageData.h in Headers */,
                                555B87ED1CAAF0AB00349425 /* ImageDecoderCG.h in Headers */,
+                               5182C2451F313A090059BA7C /* ServiceWorkerRegistration.h in Headers */,
                                97205AB61239291000B17380 /* ImageDocument.h in Headers */,
                                5576A5651D88A70800CCC04C /* ImageFrame.h in Headers */,
                                5597F8271D91C3130066BC21 /* ImageFrameCache.h in Headers */,
                                975CA2A21303679D00E99AD9 /* JSCrypto.h in Headers */,
                                E157A8F118185425009F821D /* JSCryptoAlgorithmBuilder.h in Headers */,
                                E1C657131815F9DD00256CDD /* JSCryptoAlgorithmDictionary.h in Headers */,
+                               5182C2561F3143CD0059BA7C /* JSServiceWorker.h in Headers */,
                                5739E12F1DAC7F7800E14383 /* JSCryptoAlgorithmParameters.h in Headers */,
                                E157A8E11817331C009F821D /* JSCryptoKey.h in Headers */,
                                E1F80B8E183172B5007885C3 /* JSCryptoKeyPair.h in Headers */,
                                E3B2F0ED1D7F4CA300B0C9D1 /* LoadableScript.h in Headers */,
                                E3B2F0EE1D7F4CA900B0C9D1 /* LoadableScriptClient.h in Headers */,
                                9759E94914EF1D490026A2DD /* LoadableTextTrack.h in Headers */,
+                               5182C2431F313A090059BA7C /* ServiceWorkerGlobalScope.h in Headers */,
                                656D37320ADBA5DE00A4554D /* LoaderNSURLExtras.h in Headers */,
                                7EE6846912D26E3800E79415 /* LoaderRunLoopCF.h in Headers */,
                                51E6821016387302003BBF3C /* LoaderStrategy.h in Headers */,
                                1A2A68240B5BEDE70002A480 /* ProgressTracker.h in Headers */,
                                1ACADD791880D91C00D8B71D /* ProgressTrackerClient.h in Headers */,
                                A578F4351DE00EEB003DFC6A /* PromiseRejectionEvent.h in Headers */,
+                               51F886C01F32923100C193EF /* JSNavigatorServiceWorker.h in Headers */,
                                E4BBED0F14F4025D003F0B98 /* PropertySetCSSStyleDeclaration.h in Headers */,
                                37BAAE581980D1DD005DFE71 /* ProtectionSpace.h in Headers */,
                                514C76750CE923A1007EF3CD /* ProtectionSpaceBase.h in Headers */,
                                436708CF12D9CA4B00044234 /* RenderSVGResourceClipper.h in Headers */,
                                436708D112D9CA4B00044234 /* RenderSVGResourceContainer.h in Headers */,
                                436708D312D9CA4B00044234 /* RenderSVGResourceFilter.h in Headers */,
+                               5182C2411F313A090059BA7C /* ServiceWorkerContainer.h in Headers */,
                                436708D512D9CA4B00044234 /* RenderSVGResourceFilterPrimitive.h in Headers */,
                                436708D712D9CA4B00044234 /* RenderSVGResourceGradient.h in Headers */,
                                436708D912D9CA4B00044234 /* RenderSVGResourceLinearGradient.h in Headers */,
                                BEF29EEC1715DD0900C4B4C9 /* VideoTrackPrivate.h in Headers */,
                                CD336F6417FA0A4D00DDDCD0 /* VideoTrackPrivateAVF.h in Headers */,
                                CD336F6817FA0AC600DDDCD0 /* VideoTrackPrivateAVFObjC.h in Headers */,
+                               5182C25A1F3143CD0059BA7C /* JSServiceWorkerGlobalScope.h in Headers */,
                                CD8B5A43180D149A008B8E65 /* VideoTrackPrivateMediaSourceAVFObjC.h in Headers */,
                                070E81D11BF27656001FDA48 /* VideoTrackPrivateMediaStream.h in Headers */,
                                CEF418CF1179678C009D112C /* ViewportArguments.h in Headers */,
                                FD315FF812B0267600C1A359 /* AudioBuffer.cpp in Sources */,
                                FD315FFB12B0267600C1A359 /* AudioBufferSourceNode.cpp in Sources */,
                                FD31607B12B026F700C1A359 /* AudioBus.cpp in Sources */,
+                               5182C2421F313A090059BA7C /* ServiceWorkerGlobalScope.cpp in Sources */,
                                FD3160BB12B0272A00C1A359 /* AudioBusMac.mm in Sources */,
                                FD31607D12B026F700C1A359 /* AudioChannel.cpp in Sources */,
                                FD31600412B0267600C1A359 /* AudioContext.cpp in Sources */,
                                76FC2B0B12370DA0006A991A /* DOMTokenList.cpp in Sources */,
                                2E37DFDA12DBAFB800A6B233 /* DOMURL.cpp in Sources */,
                                CD9DE18117AAD6A400EA386D /* DOMURLMediaSource.cpp in Sources */,
+                               5182C2441F313A090059BA7C /* ServiceWorkerRegistration.cpp in Sources */,
                                1403B99809EB13AF00797C7F /* DOMWindow.cpp in Sources */,
                                517FBA1E151AB17C00B57959 /* DOMWindowExtension.cpp in Sources */,
                                418C39561C8DAC7F0051C8A3 /* DOMWindowFetch.cpp in Sources */,
                                830030F51B7D33B500ED3AAC /* GenericCachedHTMLCollection.cpp in Sources */,
                                0720B0A014D3323500642955 /* GenericEventQueue.cpp in Sources */,
                                CD4BE52A1CE136EF009D87DA /* GenericTaskQueue.cpp in Sources */,
+                               51F886C11F32923400C193EF /* JSNavigatorServiceWorker.cpp in Sources */,
                                9746AF2314F4DDE6003E7A70 /* Geolocation.cpp in Sources */,
                                9746AF2614F4DDE6003E7A70 /* GeolocationController.cpp in Sources */,
                                0FB6252E18DE1B1500A07C05 /* GeometryUtilities.cpp in Sources */,
                                0F4710BF1DB56BE8002DCEC3 /* JSDOMRectReadOnly.cpp in Sources */,
                                BC5A86B50C3367E800EEA649 /* JSDOMSelection.cpp in Sources */,
                                C5137CF211A58378004ADB99 /* JSDOMStringList.cpp in Sources */,
+                               5182C23E1F313A090059BA7C /* ServiceWorker.cpp in Sources */,
                                BC64649711D82349006455B0 /* JSDOMStringMap.cpp in Sources */,
                                7694563C1214D97C0007CBAE /* JSDOMTokenList.cpp in Sources */,
                                2E37E00512DBC5A400A6B233 /* JSDOMURL.cpp in Sources */,
                                1A85B1E80A1B240500D8C87C /* JSHTMLDListElement.cpp in Sources */,
                                1A494E340A12358B00FDAFC1 /* JSHTMLDocument.cpp in Sources */,
                                BC51580B0C03D404008BB0EE /* JSHTMLDocumentCustom.cpp in Sources */,
+                               51F886BD1F326A9800C193EF /* JSServiceWorkerContainerCustom.cpp in Sources */,
                                1A494BFA0A122F4400FDAFC1 /* JSHTMLElement.cpp in Sources */,
                                BC5823F50C0A98DF0053F1B5 /* JSHTMLElementCustom.cpp in Sources */,
                                938E65F709F0985D008A48EC /* JSHTMLElementWrapperFactory.cpp in Sources */,
                                6C4C96DE1AD4483500365672 /* JSReadableStreamBYOBRequest.cpp in Sources */,
                                6C4C96DE1AD4483500365A50 /* JSReadableStreamDefaultController.cpp in Sources */,
                                7C4C96DE1AD4483500365A50 /* JSReadableStreamDefaultReader.cpp in Sources */,
+                               5182C2401F313A090059BA7C /* ServiceWorkerContainer.cpp in Sources */,
                                4129DF851BB5B80700322A16 /* JSReadableStreamPrivateConstructors.cpp in Sources */,
                                7E4C96DC1AD4483500365A51 /* JSReadableStreamSource.cpp in Sources */,
                                418C39601C8F0AAE0051C8A3 /* JSReadableStreamSourceCustom.cpp in Sources */,
                                CD61FE671794AADB004101EB /* MediaSourceRegistry.cpp in Sources */,
                                078E08FF17D14CEE00420AA1 /* MediaStream.cpp in Sources */,
                                078E094B17D1709600420AA1 /* MediaStreamAudioDestinationNode.cpp in Sources */,
+                               5182C2571F3143CD0059BA7C /* JSServiceWorkerContainer.cpp in Sources */,
                                0783228418013ED800999E0C /* MediaStreamAudioSource.cpp in Sources */,
                                FD671A77159BB07000197559 /* MediaStreamAudioSourceNode.cpp in Sources */,
                                078E090017D14CEE00420AA1 /* MediaStreamEvent.cpp in Sources */,
                                078E090217D14CEE00420AA1 /* MediaStreamTrack.cpp in Sources */,
                                078E090317D14CEE00420AA1 /* MediaStreamTrackEvent.cpp in Sources */,
                                07FFDE68181AED420072D409 /* MediaStreamTrackPrivate.cpp in Sources */,
+                               5182C2551F3143CD0059BA7C /* JSServiceWorker.cpp in Sources */,
                                CD641EBF1819B36000EE4C41 /* MediaTimeAVFoundation.cpp in Sources */,
                                CD60C0C6193E87C7003C656B /* MediaTimeQTKit.mm in Sources */,
                                932CC0F71DFFDA1F004C0F9F /* MediaTrackConstraints.cpp in Sources */,
                                B658FFA51522EFAA00DD5595 /* RadioNodeList.cpp in Sources */,
                                93F19AB908245E59001E9ABC /* Range.cpp in Sources */,
                                F55B3DCD1251F12D003EF269 /* RangeInputType.cpp in Sources */,
+                               5182C25B1F3143CD0059BA7C /* JSServiceWorkerRegistration.cpp in Sources */,
                                6E84E9E017668BEE00815B68 /* RasterShape.cpp in Sources */,
                                418C39611C8F0AB10051C8A3 /* ReadableStreamDefaultController.cpp in Sources */,
                                FD31603B12B0267600C1A359 /* RealtimeAnalyser.cpp in Sources */,
                                7C52229D1E1DAE47002CB8F7 /* RuntimeEnabledFeatures.cpp in Sources */,
                                CDD7089618359F6F002B3DC6 /* SampleMap.cpp in Sources */,
                                49E911CA0EF86D47009D0CAF /* ScaleTransformOperation.cpp in Sources */,
+                               5182C2591F3143CD0059BA7C /* JSServiceWorkerGlobalScope.cpp in Sources */,
                                5DFE8F560D16477B0076E937 /* ScheduledAction.cpp in Sources */,
                                5162C7F411F77EFB00612EFE /* SchemeRegistry.cpp in Sources */,
                                9BD0BF9412A42BF50072FD43 /* ScopedEventQueue.cpp in Sources */,
diff --git a/Source/WebCore/bindings/js/JSServiceWorkerContainerCustom.cpp b/Source/WebCore/bindings/js/JSServiceWorkerContainerCustom.cpp
new file mode 100644 (file)
index 0000000..7e404c7
--- /dev/null
@@ -0,0 +1,44 @@
+/*
+ * Copyright (C) 2017 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "config.h"
+#include "JSServiceWorkerContainer.h"
+
+#if ENABLE(SERVICE_WORKER)
+
+#include <runtime/JSCJSValue.h>
+
+using namespace JSC;
+
+namespace WebCore {
+
+JSValue JSServiceWorkerContainer::ready(ExecState&) const
+{
+    return jsNull();
+}
+
+}
+
+#endif // ENABLE(SERVICE_WORKER)
index 875424a..9e854a3 100644 (file)
 #include <runtime/JSCJSValueInlines.h>
 #include <runtime/Microtask.h>
 
+#if ENABLE(SERVICE_WORKER)
+#include "JSServiceWorkerGlobalScope.h"
+#endif
+
 using namespace JSC;
 
 namespace WebCore {
@@ -138,19 +142,46 @@ JSValue toJS(ExecState*, WorkerGlobalScope& workerGlobalScope)
 JSDedicatedWorkerGlobalScope* toJSDedicatedWorkerGlobalScope(VM& vm, JSValue value)
 {
     if (!value.isObject())
-        return 0;
+        return nullptr;
     const ClassInfo* classInfo = asObject(value)->classInfo(vm);
     if (classInfo == JSDedicatedWorkerGlobalScope::info())
         return jsCast<JSDedicatedWorkerGlobalScope*>(asObject(value));
     if (classInfo == JSProxy::info())
         return jsDynamicDowncast<JSDedicatedWorkerGlobalScope*>(vm, jsCast<JSProxy*>(asObject(value))->target());
-    return 0;
+    return nullptr;
 }
 
-
 JSWorkerGlobalScope* toJSWorkerGlobalScope(VM& vm, JSValue value)
 {
-    return toJSDedicatedWorkerGlobalScope(vm, value);
+    if (!value.isObject())
+        return nullptr;
+    const ClassInfo* classInfo = asObject(value)->classInfo(vm);
+    if (classInfo == JSDedicatedWorkerGlobalScope::info())
+        return jsCast<JSDedicatedWorkerGlobalScope*>(asObject(value));
+
+#if ENABLE(SERVICE_WORKER)
+    if (classInfo == JSServiceWorkerGlobalScope::info())
+        return jsCast<JSServiceWorkerGlobalScope*>(asObject(value));
+#endif
+
+    if (classInfo == JSProxy::info())
+        return jsDynamicDowncast<JSWorkerGlobalScope*>(vm, jsCast<JSProxy*>(asObject(value))->target());
+
+    return nullptr;
+}
+
+#if ENABLE(SERVICE_WORKER)
+JSServiceWorkerGlobalScope* toJSServiceWorkerGlobalScope(VM& vm, JSValue value)
+{
+    if (!value.isObject())
+        return nullptr;
+    const ClassInfo* classInfo = asObject(value)->classInfo(vm);
+    if (classInfo == JSServiceWorkerGlobalScope::info())
+        return jsCast<JSServiceWorkerGlobalScope*>(asObject(value));
+    if (classInfo == JSProxy::info())
+        return jsDynamicDowncast<JSServiceWorkerGlobalScope*>(vm, jsCast<JSProxy*>(asObject(value))->target());
+    return nullptr;
 }
+#endif
 
 } // namespace WebCore
index e63b174..a9e56ee 100644 (file)
 #include "JSDOMGlobalObject.h"
 #include "JSDOMWrapper.h"
 
+#if ENABLE(SERVICE_WORKER)
+#include "ServiceWorkerGlobalScope.h"
+#endif
+
 namespace WebCore {
 
-    class JSDedicatedWorkerGlobalScope;
-    class JSWorkerGlobalScope;
-    class WorkerGlobalScope;
+class JSDedicatedWorkerGlobalScope;
+class JSWorkerGlobalScope;
+class WorkerGlobalScope;
+
+#if ENABLE(SERVICE_WORKER)
+class JSServiceWorkerGlobalScope;
+#endif
 
-    class JSWorkerGlobalScopeBase : public JSDOMGlobalObject {
-        typedef JSDOMGlobalObject Base;
-    public:
-        static void destroy(JSC::JSCell*);
+class JSWorkerGlobalScopeBase : public JSDOMGlobalObject {
+    typedef JSDOMGlobalObject Base;
+public:
+    static void destroy(JSC::JSCell*);
 
-        DECLARE_INFO;
+    DECLARE_INFO;
 
-        WorkerGlobalScope& wrapped() const { return *m_wrapped; }
-        JSC::JSProxy* proxy() const { ASSERT(m_proxy); return m_proxy.get(); }
-        ScriptExecutionContext* scriptExecutionContext() const;
+    WorkerGlobalScope& wrapped() const { return *m_wrapped; }
+    JSC::JSProxy* proxy() const { ASSERT(m_proxy); return m_proxy.get(); }
+    ScriptExecutionContext* scriptExecutionContext() const;
 
-        static JSC::Structure* createStructure(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::JSValue prototype)
-        {
-            return JSC::Structure::create(vm, globalObject, prototype, JSC::TypeInfo(JSC::GlobalObjectType, StructureFlags), info());
-        }
+    static JSC::Structure* createStructure(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::JSValue prototype)
+    {
+        return JSC::Structure::create(vm, globalObject, prototype, JSC::TypeInfo(JSC::GlobalObjectType, StructureFlags), info());
+    }
 
-        static const JSC::GlobalObjectMethodTable s_globalObjectMethodTable;
+    static const JSC::GlobalObjectMethodTable s_globalObjectMethodTable;
 
-        static bool supportsRichSourceInfo(const JSC::JSGlobalObject*);
-        static bool shouldInterruptScript(const JSC::JSGlobalObject*);
-        static bool shouldInterruptScriptBeforeTimeout(const JSC::JSGlobalObject*);
-        static JSC::RuntimeFlags javaScriptRuntimeFlags(const JSC::JSGlobalObject*);
-        static void queueTaskToEventLoop(JSC::JSGlobalObject&, Ref<JSC::Microtask>&&);
+    static bool supportsRichSourceInfo(const JSC::JSGlobalObject*);
+    static bool shouldInterruptScript(const JSC::JSGlobalObject*);
+    static bool shouldInterruptScriptBeforeTimeout(const JSC::JSGlobalObject*);
+    static JSC::RuntimeFlags javaScriptRuntimeFlags(const JSC::JSGlobalObject*);
+    static void queueTaskToEventLoop(JSC::JSGlobalObject&, Ref<JSC::Microtask>&&);
 
-    protected:
-        JSWorkerGlobalScopeBase(JSC::VM&, JSC::Structure*, RefPtr<WorkerGlobalScope>&&);
-        void finishCreation(JSC::VM&, JSC::JSProxy*);
+protected:
+    JSWorkerGlobalScopeBase(JSC::VM&, JSC::Structure*, RefPtr<WorkerGlobalScope>&&);
+    void finishCreation(JSC::VM&, JSC::JSProxy*);
 
-        static void visitChildren(JSC::JSCell*, JSC::SlotVisitor&);
+    static void visitChildren(JSC::JSCell*, JSC::SlotVisitor&);
 
-    private:
-        RefPtr<WorkerGlobalScope> m_wrapped;
-        JSC::WriteBarrier<JSC::JSProxy> m_proxy;
-    };
+private:
+    RefPtr<WorkerGlobalScope> m_wrapped;
+    JSC::WriteBarrier<JSC::JSProxy> m_proxy;
+};
 
-    // Returns a JSWorkerGlobalScope or jsNull()
-    // Always ignores the execState and passed globalObject, WorkerGlobalScope is itself a globalObject and will always use its own prototype chain.
-    JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject*, WorkerGlobalScope&);
-    inline JSC::JSValue toJS(JSC::ExecState* exec, JSDOMGlobalObject* globalObject, WorkerGlobalScope* scope) { return scope ? toJS(exec, globalObject, *scope) : JSC::jsNull(); }
-    JSC::JSValue toJS(JSC::ExecState*, WorkerGlobalScope&);
-    inline JSC::JSValue toJS(JSC::ExecState* exec, WorkerGlobalScope* scope) { return scope ? toJS(exec, *scope) : JSC::jsNull(); }
+// Returns a JSWorkerGlobalScope or jsNull()
+// Always ignores the execState and passed globalObject, WorkerGlobalScope is itself a globalObject and will always use its own prototype chain.
+JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject*, WorkerGlobalScope&);
+inline JSC::JSValue toJS(JSC::ExecState* exec, JSDOMGlobalObject* globalObject, WorkerGlobalScope* scope) { return scope ? toJS(exec, globalObject, *scope) : JSC::jsNull(); }
+JSC::JSValue toJS(JSC::ExecState*, WorkerGlobalScope&);
+inline JSC::JSValue toJS(JSC::ExecState* exec, WorkerGlobalScope* scope) { return scope ? toJS(exec, *scope) : JSC::jsNull(); }
 
-    JSDedicatedWorkerGlobalScope* toJSDedicatedWorkerGlobalScope(JSC::VM&, JSC::JSValue);
-    JSWorkerGlobalScope* toJSWorkerGlobalScope(JSC::VM&, JSC::JSValue);
+JSDedicatedWorkerGlobalScope* toJSDedicatedWorkerGlobalScope(JSC::VM&, JSC::JSValue);
+JSWorkerGlobalScope* toJSWorkerGlobalScope(JSC::VM&, JSC::JSValue);
 
+#if ENABLE(SERVICE_WORKER)
+JSServiceWorkerGlobalScope* toJSServiceWorkerGlobalScope(JSC::VM&, JSC::JSValue);
+#endif
 } // namespace WebCore
index f5eb4cb..1bca5d2 100644 (file)
@@ -34,6 +34,7 @@ my $supplementalDependencyFile;
 my $windowConstructorsFile;
 my $workerGlobalScopeConstructorsFile;
 my $dedicatedWorkerGlobalScopeConstructorsFile;
+my $serviceWorkerGlobalScopeConstructorsFile;
 my $supplementalMakefileDeps;
 
 GetOptions('defines=s' => \$defines,
@@ -43,6 +44,7 @@ GetOptions('defines=s' => \$defines,
            'windowConstructorsFile=s' => \$windowConstructorsFile,
            'workerGlobalScopeConstructorsFile=s' => \$workerGlobalScopeConstructorsFile,
            'dedicatedWorkerGlobalScopeConstructorsFile=s' => \$dedicatedWorkerGlobalScopeConstructorsFile,
+           'serviceWorkerGlobalScopeConstructorsFile=s' => \$serviceWorkerGlobalScopeConstructorsFile,
            'supplementalMakefileDeps=s' => \$supplementalMakefileDeps);
 
 die('Must specify #define macros using --defines.') unless defined($defines);
@@ -50,12 +52,14 @@ die('Must specify an output file using --supplementalDependencyFile.') unless de
 die('Must specify an output file using --windowConstructorsFile.') unless defined($windowConstructorsFile);
 die('Must specify an output file using --workerGlobalScopeConstructorsFile.') unless defined($workerGlobalScopeConstructorsFile);
 die('Must specify an output file using --dedicatedWorkerGlobalScopeConstructorsFile.') unless defined($dedicatedWorkerGlobalScopeConstructorsFile);
+die('Must specify an output file using --serviceWorkerGlobalScopeConstructorsFile.') unless defined($serviceWorkerGlobalScopeConstructorsFile);
 die('Must specify the file listing all IDLs using --idlFilesList.') unless defined($idlFilesList);
 
 $supplementalDependencyFile = CygwinPathIfNeeded($supplementalDependencyFile);
 $windowConstructorsFile = CygwinPathIfNeeded($windowConstructorsFile);
 $workerGlobalScopeConstructorsFile = CygwinPathIfNeeded($workerGlobalScopeConstructorsFile);
 $dedicatedWorkerGlobalScopeConstructorsFile = CygwinPathIfNeeded($dedicatedWorkerGlobalScopeConstructorsFile);
+$serviceWorkerGlobalScopeConstructorsFile = CygwinPathIfNeeded($serviceWorkerGlobalScopeConstructorsFile);
 $supplementalMakefileDeps = CygwinPathIfNeeded($supplementalMakefileDeps);
 
 open FH, "< $idlFilesList" or die "Cannot open $idlFilesList\n";
@@ -74,6 +78,7 @@ my %supplementals;
 my $windowConstructorsCode = "";
 my $workerGlobalScopeConstructorsCode = "";
 my $dedicatedWorkerGlobalScopeConstructorsCode = "";
+my $serviceWorkerGlobalScopeConstructorsCode = "";
 
 # Get rid of duplicates in idlFiles array.
 my %idlFileHash = map { $_, 1 } @idlFiles;
@@ -135,6 +140,8 @@ foreach my $idlFile (sort keys %idlFileHash) {
                     $workerGlobalScopeConstructorsCode .= $attributeCode;
                 } elsif ($globalContext eq "DedicatedWorker") {
                     $dedicatedWorkerGlobalScopeConstructorsCode .= $attributeCode;
+                } elsif ($globalContext eq "ServiceWorker") {
+                    $serviceWorkerGlobalScopeConstructorsCode .= $attributeCode;
                 } else {
                     die "Unsupported global context '$globalContext' used in [Exposed] at $idlFile";
                 }
@@ -148,6 +155,7 @@ foreach my $idlFile (sort keys %idlFileHash) {
 GeneratePartialInterface("DOMWindow", $windowConstructorsCode, $windowConstructorsFile);
 GeneratePartialInterface("WorkerGlobalScope", $workerGlobalScopeConstructorsCode, $workerGlobalScopeConstructorsFile);
 GeneratePartialInterface("DedicatedWorkerGlobalScope", $dedicatedWorkerGlobalScopeConstructorsCode, $dedicatedWorkerGlobalScopeConstructorsFile);
+GeneratePartialInterface("ServiceWorker", $serviceWorkerGlobalScopeConstructorsCode, $serviceWorkerGlobalScopeConstructorsFile);
 
 # Resolves partial interfaces and implements dependencies.
 foreach my $idlFile (sort keys %supplementalDependencies) {
index 280bb0a..01d8ee7 100644 (file)
@@ -45,6 +45,7 @@ namespace WebCore {
     macro(DOMNodeRemovedFromDocument) \
     macro(DOMSubtreeModified) \
     macro(abort) \
+    macro(activate) \
     macro(active) \
     macro(addsourcebuffer) \
     macro(addstream) \
@@ -86,6 +87,7 @@ namespace WebCore {
     macro(connectionstatechange) \
     macro(connecting) \
     macro(contextmenu) \
+    macro(controllerchange) \
     macro(copy) \
     macro(cuechange) \
     macro(cut) \
@@ -112,6 +114,7 @@ namespace WebCore {
     macro(enter) \
     macro(error) \
     macro(exit) \
+    macro(fetch) \
     macro(focus) \
     macro(focusin) \
     macro(focusout) \
@@ -131,6 +134,7 @@ namespace WebCore {
     macro(icegatheringstatechange) \
     macro(inactive) \
     macro(input) \
+    macro(install) \
     macro(invalid) \
     macro(keydown) \
     macro(keypress) \
@@ -148,6 +152,7 @@ namespace WebCore {
     macro(loadstart) \
     macro(mark) \
     macro(message) \
+    macro(messageerror) \
     macro(mousedown) \
     macro(mouseenter) \
     macro(mouseleave) \
@@ -237,6 +242,7 @@ namespace WebCore {
     macro(unmute) \
     macro(update) \
     macro(updateend) \
+    macro(updatefound) \
     macro(updateready) \
     macro(updatestart) \
     macro(upgradeneeded) \
index a6e5f8f..d6f2fb1 100644 (file)
@@ -28,6 +28,9 @@ Performance
 RTCDataChannel conditional=WEB_RTC
 RTCDTMFSender conditional=WEB_RTC_DTMF
 RTCPeerConnection conditional=WEB_RTC
+ServiceWorker conditional=SERVICE_WORKER
+ServiceWorkerContainer conditional=SERVICE_WORKER
+ServiceWorkerRegistration conditional=SERVICE_WORKER
 SourceBuffer conditional=MEDIA_SOURCE
 SourceBufferList conditional=MEDIA_SOURCE
 SpeechSynthesisUtterance conditional=SPEECH_SYNTHESIS
index ef286a6..39d3be3 100644 (file)
     {
         "name": "Service Workers",
         "status": {
-            "status": "Under Consideration"
+            "status": "In Development"
         },
-        "url": "http://www.w3.org/TR/2015/WD-service-workers-20150625/",
+        "url": "https://w3c.github.io/ServiceWorker/",
+        "webkit-url": "https://webkit.org/b/174541",
         "keywords": ["service workers"],
         "category": "webapps",
         "description": "A method for browsers to run JavaScript in the background to handle network requests and manage cached responses. Service Workers offers a replacement for Application Cache.",
         "contact": {
-            "name": "Jon Davis",
-            "twitter": "@jonathandavis",
-            "email": "web-evangelist@apple.com"
+            "name": "Brady Eidson",
+            "twitter": "@bradeeoh",
+            "email": "beidson@apple.com"
         }
     },
     {
index d8a22af..30885ab 100644 (file)
@@ -33,3 +33,5 @@
 Navigator implements NavigatorID;
 Navigator implements NavigatorLanguage;
 Navigator implements NavigatorOnLine;
+Navigator implements NavigatorServiceWorker;
+
index 3e9d511..7db3376 100644 (file)
@@ -145,4 +145,11 @@ Vector<String> NavigatorBase::languages()
     return { defaultLanguage() };
 }
 
+#if ENABLE(SERVICE_WORKER)
+ServiceWorkerContainer* NavigatorBase::serviceWorker()
+{
+    return nullptr;
+}
+#endif
+
 } // namespace WebCore
index 768c341..e0df0d0 100644 (file)
 
 namespace WebCore {
 
+#if ENABLE(SERVICE_WORKER)
+class ServiceWorkerContainer;
+#endif
+
 class NavigatorBase : public RefCounted<NavigatorBase> {
 public:
     virtual ~NavigatorBase();
@@ -50,6 +54,10 @@ public:
 
     static String language();
     static Vector<String> languages();
+
+#if ENABLE(SERVICE_WORKER)
+    ServiceWorkerContainer* serviceWorker();
+#endif
 };
 
 } // namespace WebCore
diff --git a/Source/WebCore/page/NavigatorServiceWorker.idl b/Source/WebCore/page/NavigatorServiceWorker.idl
new file mode 100644 (file)
index 0000000..4acbf26
--- /dev/null
@@ -0,0 +1,32 @@
+/*
+ * Copyright (C) 2017 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+[
+    NoInterfaceObject,
+    Conditional=SERVICE_WORKER,
+    EnabledAtRuntime=ServiceWorker
+] interface NavigatorServiceWorker {
+    [SecureContext, SameObject] readonly attribute ServiceWorkerContainer serviceWorker;
+};
index e2d5fba..d899999 100644 (file)
@@ -197,6 +197,11 @@ public:
     bool legacyEncryptedMediaAPIEnabled() const { return m_legacyEncryptedMediaAPIEnabled; }
 #endif
 
+#if ENABLE(SERVICE_WORKER)
+    bool serviceWorkerEnabled() const { return m_serviceWorkerEnabled; }
+    void setServiceWorkerEnabled(bool isEnabled) { m_serviceWorkerEnabled = isEnabled; }
+#endif
+
 #if ENABLE(VIDEO)
     bool audioEnabled() const;
 #endif
@@ -314,6 +319,10 @@ private:
     bool m_intersectionObserverEnabled { false };
 #endif
 
+#if ENABLE(SERVICE_WORKER)
+    bool m_serviceWorkerEnabled { false };
+#endif
+
     friend class WTF::NeverDestroyed<RuntimeEnabledFeatures>;
 };
 
diff --git a/Source/WebCore/workers/ServiceWorker.cpp b/Source/WebCore/workers/ServiceWorker.cpp
new file mode 100644 (file)
index 0000000..66d73be
--- /dev/null
@@ -0,0 +1,60 @@
+/*
+ * Copyright (C) 2017 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "config.h"
+#include "ServiceWorker.h"
+
+#if ENABLE(SERVICE_WORKER)
+
+namespace WebCore {
+
+ExceptionOr<void> ServiceWorker::postMessage(JSC::ExecState&, JSC::JSValue, Vector<JSC::Strong<JSC::JSObject>>&&)
+{
+    return { };
+}
+
+const String& ServiceWorker::scriptURL() const
+{
+    return emptyString();
+}
+
+ServiceWorker::State ServiceWorker::state() const
+{
+    return State::Redundant;
+}
+
+EventTargetInterface ServiceWorker::eventTargetInterface() const
+{
+    return ServiceWorkerEventTargetInterfaceType;
+}
+
+ScriptExecutionContext* ServiceWorker::scriptExecutionContext() const
+{
+    return nullptr;
+}
+
+} // namespace WebCore
+
+#endif // ENABLE(SERVICE_WORKER)
diff --git a/Source/WebCore/workers/ServiceWorker.h b/Source/WebCore/workers/ServiceWorker.h
new file mode 100644 (file)
index 0000000..40e12de
--- /dev/null
@@ -0,0 +1,71 @@
+/*
+ * Copyright (C) 2017 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#pragma once
+
+#if ENABLE(SERVICE_WORKER)
+
+#include "EventTarget.h"
+#include <heap/Strong.h>
+
+namespace JSC {
+class ExecState;
+class JSValue;
+}
+
+namespace WebCore {
+
+class Frame;
+
+class ServiceWorker final : public EventTargetWithInlineData {
+public:
+    static Ref<ServiceWorker> create(Frame& frame) { return adoptRef(*new ServiceWorker(frame)); }
+    virtual ~ServiceWorker() = default;
+
+    enum class State {
+        Installing,
+        Installed,
+        Activating,
+        Activated,
+        Redundant,
+    };
+
+    const String& scriptURL() const;
+    State state() const;
+
+    ExceptionOr<void> postMessage(JSC::ExecState&, JSC::JSValue message, Vector<JSC::Strong<JSC::JSObject>>&&);
+
+private:
+    explicit ServiceWorker(Frame&);
+
+    virtual EventTargetInterface eventTargetInterface() const;
+    virtual ScriptExecutionContext* scriptExecutionContext() const;
+    void refEventTarget() final { ref(); }
+    void derefEventTarget() final { deref(); }
+};
+
+} // namespace WebCore
+
+#endif // ENABLE(SERVICE_WORKER)
diff --git a/Source/WebCore/workers/ServiceWorker.idl b/Source/WebCore/workers/ServiceWorker.idl
new file mode 100644 (file)
index 0000000..fde8e9d
--- /dev/null
@@ -0,0 +1,50 @@
+/*
+ * Copyright (C) 2017 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+// FIXME: The spec IDL exposes this on Worker in addition to Window.
+// We don't currently support nested workers.
+
+[
+    SecureContext,
+    Exposed=(Window),
+    Conditional=SERVICE_WORKER,
+    EnabledAtRuntime=ServiceWorker
+] interface ServiceWorker : EventTarget {
+    readonly attribute USVString scriptURL;
+    readonly attribute ServiceWorkerState state;
+    [CallWith=ScriptState, MayThrowException] void postMessage(any message, optional sequence<object> transfer = []);
+
+    // event
+    attribute EventHandler onstatechange;
+};
+ServiceWorker implements AbstractWorker;
+
+enum ServiceWorkerState {
+    "installing",
+    "installed",
+    "activating",
+    "activated",
+    "redundant"
+};
diff --git a/Source/WebCore/workers/ServiceWorkerContainer.cpp b/Source/WebCore/workers/ServiceWorkerContainer.cpp
new file mode 100644 (file)
index 0000000..7cc8410
--- /dev/null
@@ -0,0 +1,71 @@
+/*
+ * Copyright (C) 2017 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "config.h"
+#include "ServiceWorkerContainer.h"
+
+#if ENABLE(SERVICE_WORKER)
+
+namespace WebCore {
+
+
+ServiceWorker* ServiceWorkerContainer::controller() const
+{
+    return nullptr;
+}
+
+void ServiceWorkerContainer::ready(Ref<DeferredPromise>&&)
+{
+}
+
+void ServiceWorkerContainer::addRegistration(const String&, const RegistrationOptions&, Ref<DeferredPromise>&&)
+{
+}
+
+void ServiceWorkerContainer::getRegistration(const String&, Ref<DeferredPromise>&&)
+{
+}
+
+void ServiceWorkerContainer::getRegistrations(Ref<DeferredPromise>&&)
+{
+}
+
+void ServiceWorkerContainer::startMessages()
+{
+}
+
+EventTargetInterface ServiceWorkerContainer::eventTargetInterface() const
+{
+    return ServiceWorkerContainerEventTargetInterfaceType;
+}
+
+ScriptExecutionContext* ServiceWorkerContainer::scriptExecutionContext() const
+{
+    return nullptr;
+}
+
+} // namespace WebCore
+
+#endif // ENABLE(SERVICE_WORKER)
diff --git a/Source/WebCore/workers/ServiceWorkerContainer.h b/Source/WebCore/workers/ServiceWorkerContainer.h
new file mode 100644 (file)
index 0000000..98cb443
--- /dev/null
@@ -0,0 +1,67 @@
+/*
+ * Copyright (C) 2017 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#pragma once
+
+#if ENABLE(SERVICE_WORKER)
+
+#include "EventTarget.h"
+
+namespace WebCore {
+
+class DeferredPromise;
+class Frame;
+class ServiceWorker;
+
+class ServiceWorkerContainer final : public EventTargetWithInlineData {
+public:
+    static Ref<ServiceWorkerContainer> create(Frame& frame) { return adoptRef(*new ServiceWorkerContainer(frame)); }
+    virtual ~ServiceWorkerContainer() = default;
+
+    struct RegistrationOptions {
+        String scope;
+    };
+
+    ServiceWorker* controller() const;
+
+    void ready(Ref<DeferredPromise>&&);
+    void addRegistration(const String& scriptURL, const RegistrationOptions&, Ref<DeferredPromise>&&);
+    void getRegistration(const String& url, Ref<DeferredPromise>&&);
+    void getRegistrations(Ref<DeferredPromise>&&);
+
+    void startMessages();
+
+private:
+    explicit ServiceWorkerContainer(Frame&);
+
+    virtual EventTargetInterface eventTargetInterface() const;
+    virtual ScriptExecutionContext* scriptExecutionContext() const;
+    void refEventTarget() final { ref(); }
+    void derefEventTarget() final { deref(); }
+};
+
+} // namespace WebCore
+
+#endif // ENABLE(SERVICE_WORKER)
diff --git a/Source/WebCore/workers/ServiceWorkerContainer.idl b/Source/WebCore/workers/ServiceWorkerContainer.idl
new file mode 100644 (file)
index 0000000..5463e42
--- /dev/null
@@ -0,0 +1,56 @@
+/*
+ * Copyright (C) 2017 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+// FIXME: The spec IDL exposes this on Worker in addition to Window.
+// We don't currently support nested workers.
+
+[
+    SecureContext,
+    Exposed=(Window),
+    Conditional=SERVICE_WORKER,
+    EnabledAtRuntime=ServiceWorker
+] interface ServiceWorkerContainer : EventTarget {
+    readonly attribute ServiceWorker? controller;
+    [Custom] readonly attribute Promise<ServiceWorkerRegistration> ready;
+
+    [NewObject, ImplementedAs=addRegistration] Promise<ServiceWorkerRegistration> register(USVString scriptURL, optional RegistrationOptions options);
+    [NewObject] Promise<any> getRegistration(optional USVString clientURL = "");
+    [NewObject] Promise<sequence<ServiceWorkerRegistration>> getRegistrations();
+
+    void startMessages();
+
+    // events
+    attribute EventHandler oncontrollerchange;
+    attribute EventHandler onmessage;
+    attribute EventHandler onmessageerror;
+};
+
+dictionary RegistrationOptions {
+    USVString scope;
+
+    // FIXME: Add these back after first round of IDL stubbing.
+    // WorkerType type = "classic";
+    // ServiceWorkerUpdateViaCache updateViaCache = "imports";
+};
diff --git a/Source/WebCore/workers/ServiceWorkerGlobalScope.cpp b/Source/WebCore/workers/ServiceWorkerGlobalScope.cpp
new file mode 100644 (file)
index 0000000..fd48ae2
--- /dev/null
@@ -0,0 +1,44 @@
+/*
+ * Copyright (C) 2017 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "config.h"
+#include "ServiceWorkerGlobalScope.h"
+
+#if ENABLE(SERVICE_WORKER)
+
+namespace WebCore {
+
+ServiceWorkerRegistration& ServiceWorkerGlobalScope::registration()
+{
+    return m_registration;
+}
+
+void ServiceWorkerGlobalScope::skipWaiting(Ref<DeferredPromise>&&)
+{
+}
+
+} // namespace WebCore
+
+#endif // ENABLE(SERVICE_WORKER)
diff --git a/Source/WebCore/workers/ServiceWorkerGlobalScope.h b/Source/WebCore/workers/ServiceWorkerGlobalScope.h
new file mode 100644 (file)
index 0000000..c52e241
--- /dev/null
@@ -0,0 +1,50 @@
+/*
+ * Copyright (C) 2017 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#pragma once
+
+#if ENABLE(SERVICE_WORKER)
+
+#include "ServiceWorkerRegistration.h"
+#include "WorkerGlobalScope.h"
+
+namespace WebCore {
+
+class DeferredPromise;
+class ServiceWorkerRegistration;
+
+class ServiceWorkerGlobalScope : public WorkerGlobalScope {
+public:
+    ServiceWorkerRegistration& registration();
+
+    void skipWaiting(Ref<DeferredPromise>&&);
+
+private:
+    ServiceWorkerRegistration m_registration;
+};
+
+} // namespace WebCore
+
+#endif // ENABLE(SERVICE_WORKER)
diff --git a/Source/WebCore/workers/ServiceWorkerGlobalScope.idl b/Source/WebCore/workers/ServiceWorkerGlobalScope.idl
new file mode 100644 (file)
index 0000000..fb102cb
--- /dev/null
@@ -0,0 +1,46 @@
+/*
+ * Copyright (C) 2017 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+[
+    CustomProxyToJSObject,
+    Global=(Worker,ServiceWorker),
+    Exposed=ServiceWorker,
+    Conditional=SERVICE_WORKER,
+    EnabledAtRuntime=ServiceWorker,
+] interface ServiceWorkerGlobalScope : WorkerGlobalScope {
+    // Add clients after first round of IDL stubbing.
+    // [SameObject] readonly attribute Clients clients;
+    [SameObject] readonly attribute ServiceWorkerRegistration registration;
+
+    [NewObject] Promise<void> skipWaiting();
+
+    attribute EventHandler oninstall;
+    attribute EventHandler onactivate;
+    attribute EventHandler onfetch;
+
+    // event
+    attribute EventHandler onmessage;
+    attribute EventHandler onmessageerror;
+};
diff --git a/Source/WebCore/workers/ServiceWorkerRegistration.cpp b/Source/WebCore/workers/ServiceWorkerRegistration.cpp
new file mode 100644 (file)
index 0000000..5b581eb
--- /dev/null
@@ -0,0 +1,73 @@
+/*
+ * Copyright (C) 2017 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "config.h"
+#include "ServiceWorkerRegistration.h"
+
+#if ENABLE(SERVICE_WORKER)
+
+namespace WebCore {
+
+ServiceWorker* ServiceWorkerRegistration::installing()
+{
+    return nullptr;
+}
+
+ServiceWorker* ServiceWorkerRegistration::waiting()
+{
+    return nullptr;
+}
+
+ServiceWorker* ServiceWorkerRegistration::active()
+{
+    return nullptr;
+}
+
+const String& ServiceWorkerRegistration::scope() const
+{
+    return emptyString();
+}
+
+void ServiceWorkerRegistration::update(Ref<DeferredPromise>&&)
+{
+}
+
+void ServiceWorkerRegistration::unregister(Ref<DeferredPromise>&&)
+{
+}
+
+EventTargetInterface ServiceWorkerRegistration::eventTargetInterface() const
+{
+    return ServiceWorkerRegistrationEventTargetInterfaceType;
+}
+
+ScriptExecutionContext* ServiceWorkerRegistration::scriptExecutionContext() const
+{
+    return nullptr;
+}
+
+} // namespace WebCore
+
+#endif // ENABLE(SERVICE_WORKER)
diff --git a/Source/WebCore/workers/ServiceWorkerRegistration.h b/Source/WebCore/workers/ServiceWorkerRegistration.h
new file mode 100644 (file)
index 0000000..3661e60
--- /dev/null
@@ -0,0 +1,63 @@
+/*
+ * Copyright (C) 2017 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#pragma once
+
+#if ENABLE(SERVICE_WORKER)
+
+#include "EventTarget.h"
+#include "JSDOMPromiseDeferred.h"
+
+namespace WebCore {
+
+class Frame;
+class ServiceWorker;
+
+class ServiceWorkerRegistration final : public EventTargetWithInlineData {
+public:
+    static Ref<ServiceWorkerRegistration> create(Frame& frame) { return adoptRef(*new ServiceWorkerRegistration(frame)); }
+    virtual ~ServiceWorkerRegistration() = default;
+
+    ServiceWorker* installing();
+    ServiceWorker* waiting();
+    ServiceWorker* active();
+
+    const String& scope() const;
+
+    void update(Ref<DeferredPromise>&&);
+    void unregister(Ref<DeferredPromise>&&);
+
+private:
+    explicit ServiceWorkerRegistration(Frame&);
+
+    virtual EventTargetInterface eventTargetInterface() const;
+    virtual ScriptExecutionContext* scriptExecutionContext() const;
+    void refEventTarget() final { ref(); }
+    void derefEventTarget() final { deref(); }
+};
+
+} // namespace WebCore
+
+#endif // ENABLE(SERVICE_WORKER)
diff --git a/Source/WebCore/workers/ServiceWorkerRegistration.idl b/Source/WebCore/workers/ServiceWorkerRegistration.idl
new file mode 100644 (file)
index 0000000..2a62300
--- /dev/null
@@ -0,0 +1,49 @@
+/*
+ * Copyright (C) 2017 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+// FIXME: The spec IDL exposes this on Worker in addition to Window.
+// We don't currently support nested workers.
+
+[
+    SecureContext,
+    Exposed=(Window),
+    Conditional=SERVICE_WORKER,
+    EnabledAtRuntime=ServiceWorker
+] interface ServiceWorkerRegistration : EventTarget {
+    readonly attribute ServiceWorker? installing;
+    readonly attribute ServiceWorker? waiting;
+    readonly attribute ServiceWorker? active;
+
+    readonly attribute USVString scope;
+
+    // FIXME: Implement when ready.
+    // readonly attribute ServiceWorkerUpdateViaCache updateViaCache;
+
+    [NewObject] Promise<void> update();
+    [NewObject] Promise<boolean> unregister();
+
+    // event
+    attribute EventHandler onupdatefound;
+};
index c8f08d8..abefbf8 100644 (file)
@@ -1,3 +1,22 @@
+2017-08-03  Brady Eidson  <beidson@apple.com>
+
+        Add SW IDLs and stub out basic functionality.
+        https://bugs.webkit.org/show_bug.cgi?id=175115
+
+        Reviewed by Chris Dumez.
+
+        * 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):
+
 2017-08-03  Yoshiaki Jitsukawa  <jitsu@rd.scei.sony.co.jp>
 
         [WebKit] Sort Xcode project file
index 67cf537..80e86e7 100644 (file)
@@ -157,6 +157,7 @@ ENABLE_POINTER_LOCK[sdk=macosx*] = ENABLE_POINTER_LOCK;
 ENABLE_PROXIMITY_EVENTS = ;
 ENABLE_PUBLIC_SUFFIX_LIST = ENABLE_PUBLIC_SUFFIX_LIST;
 ENABLE_QUOTA = ;
+ENABLE_SERVICE_WORKER = ENABLE_SERVICE_WORKER;
 ENABLE_STREAMS_API = ENABLE_STREAMS_API;
 ENABLE_REQUEST_AUTOCOMPLETE = ;
 ENABLE_REMOTE_INSPECTOR = ENABLE_REMOTE_INSPECTOR;
@@ -243,4 +244,4 @@ ENABLE_DRAG_SUPPORT[sdk=iphonesimulator11*] = ENABLE_DRAG_SUPPORT;
 ENABLE_DATA_INTERACTION[sdk=iphoneos11*] = ENABLE_DATA_INTERACTION;
 ENABLE_DATA_INTERACTION[sdk=iphonesimulator11*] = ENABLE_DATA_INTERACTION;
 
-FEATURE_DEFINES = $(ENABLE_3D_TRANSFORMS) $(ENABLE_ACCELERATED_2D_CANVAS) $(ENABLE_ACCELERATED_OVERFLOW_SCROLLING) $(ENABLE_APPLE_PAY) $(ENABLE_APPLE_PAY_SESSION_V3) $(ENABLE_ATTACHMENT_ELEMENT) $(ENABLE_AVF_CAPTIONS) $(ENABLE_CACHE_PARTITIONING) $(ENABLE_CANVAS_PATH) $(ENABLE_CANVAS_PROXY) $(ENABLE_CHANNEL_MESSAGING) $(ENABLE_CONTENT_FILTERING) $(ENABLE_CSS_ANIMATIONS_LEVEL_2) $(ENABLE_CSS_BOX_DECORATION_BREAK) $(ENABLE_CSS_COMPOSITING) $(ENABLE_CSS_DEVICE_ADAPTATION) $(ENABLE_CSS_IMAGE_ORIENTATION) $(ENABLE_CSS_IMAGE_RESOLUTION) $(ENABLE_CSS_REGIONS) $(ENABLE_CSS_SCROLL_SNAP) $(ENABLE_CSS_SELECTORS_LEVEL4) $(ENABLE_CSS_TRAILING_WORD) $(ENABLE_CSS3_TEXT) $(ENABLE_CURSOR_VISIBILITY) $(ENABLE_CUSTOM_SCHEME_HANDLER) $(ENABLE_DASHBOARD_SUPPORT) $(ENABLE_DATA_INTERACTION) $(ENABLE_DATA_TRANSFER_ITEMS) $(ENABLE_DATACUE_VALUE) $(ENABLE_DATALIST_ELEMENT) $(ENABLE_DEVICE_ORIENTATION) $(ENABLE_DRAG_SUPPORT) $(ENABLE_ENCRYPTED_MEDIA) $(ENABLE_FAST_JIT_PERMISSIONS) $(ENABLE_FETCH_API) $(ENABLE_FILTERS_LEVEL_2) $(ENABLE_FTL_JIT) $(ENABLE_FULLSCREEN_API) $(ENABLE_GAMEPAD_DEPRECATED) $(ENABLE_GAMEPAD) $(ENABLE_GEOLOCATION) $(ENABLE_ICONDATABASE) $(ENABLE_INDEXED_DATABASE_IN_WORKERS) $(ENABLE_INDEXED_DATABASE) $(ENABLE_INPUT_TYPE_COLOR_POPOVER) $(ENABLE_INPUT_TYPE_COLOR) $(ENABLE_INPUT_TYPE_DATE) $(ENABLE_INPUT_TYPE_DATETIME_INCOMPLETE) $(ENABLE_INPUT_TYPE_DATETIMELOCAL) $(ENABLE_INPUT_TYPE_MONTH) $(ENABLE_INPUT_TYPE_TIME) $(ENABLE_INPUT_TYPE_WEEK) $(ENABLE_INTERSECTION_OBSERVER) $(ENABLE_INTL) $(ENABLE_IOS_GESTURE_EVENTS) $(ENABLE_IOS_TOUCH_EVENTS) $(ENABLE_JIT) $(ENABLE_KEYBOARD_KEY_ATTRIBUTE) $(ENABLE_KEYBOARD_CODE_ATTRIBUTE) $(ENABLE_LEGACY_CSS_VENDOR_PREFIXES) $(ENABLE_LEGACY_ENCRYPTED_MEDIA) $(ENABLE_LEGACY_VENDOR_PREFIXES) $(ENABLE_LETTERPRESS) $(ENABLE_LINK_PREFETCH) $(ENABLE_MAC_GESTURE_EVENTS) $(ENABLE_MATHML) $(ENABLE_MEDIA_CAPTURE) $(ENABLE_MEDIA_CONTROLS_SCRIPT) $(ENABLE_MEDIA_SESSION) $(ENABLE_MEDIA_SOURCE) $(ENABLE_MEDIA_STATISTICS) $(ENABLE_MEDIA_STREAM) $(ENABLE_METER_ELEMENT) $(ENABLE_MHTML) $(ENABLE_MOUSE_CURSOR_SCALE) $(ENABLE_NAVIGATOR_CONTENT_UTILS) $(ENABLE_NAVIGATOR_STANDALONE) $(ENABLE_NOTIFICATIONS) $(ENABLE_PDFKIT_PLUGIN) $(ENABLE_POINTER_LOCK) $(ENABLE_PROXIMITY_EVENTS) $(ENABLE_PUBLIC_SUFFIX_LIST) $(ENABLE_QUOTA) $(ENABLE_REMOTE_INSPECTOR) $(ENABLE_REQUEST_AUTOCOMPLETE) $(ENABLE_RESOLUTION_MEDIA_QUERY) $(ENABLE_RESOURCE_USAGE) $(ENABLE_RUBBER_BANDING) $(ENABLE_SERVICE_CONTROLS) $(ENABLE_SPEECH_SYNTHESIS) $(ENABLE_STREAMS_API) $(ENABLE_SUBTLE_CRYPTO) $(ENABLE_SVG_FONTS) $(ENABLE_TELEPHONE_NUMBER_DETECTION) $(ENABLE_TEXT_AUTOSIZING) $(ENABLE_TOUCH_EVENTS) $(ENABLE_TOUCH_ICON_LOADING) $(ENABLE_USERSELECT_ALL) $(ENABLE_VARIATION_FONTS) $(ENABLE_VIDEO_PRESENTATION_MODE) $(ENABLE_MAC_VIDEO_TOOLBOX) $(ENABLE_VIDEO_TRACK) $(ENABLE_VIDEO) $(ENABLE_VIEW_MODE_CSS_MEDIA) $(ENABLE_WEB_ANIMATIONS) $(ENABLE_WEB_AUDIO) $(ENABLE_WEB_RTC) $(ENABLE_WEB_SOCKETS) $(ENABLE_WEBASSEMBLY) $(ENABLE_WEBGL) $(ENABLE_WEBGL2) $(ENABLE_WEBGPU) $(ENABLE_WIRELESS_PLAYBACK_TARGET) $(ENABLE_XSLT);
+FEATURE_DEFINES = $(ENABLE_3D_TRANSFORMS) $(ENABLE_ACCELERATED_2D_CANVAS) $(ENABLE_ACCELERATED_OVERFLOW_SCROLLING) $(ENABLE_APPLE_PAY) $(ENABLE_APPLE_PAY_SESSION_V3) $(ENABLE_ATTACHMENT_ELEMENT) $(ENABLE_AVF_CAPTIONS) $(ENABLE_CACHE_PARTITIONING) $(ENABLE_CANVAS_PATH) $(ENABLE_CANVAS_PROXY) $(ENABLE_CHANNEL_MESSAGING) $(ENABLE_CONTENT_FILTERING) $(ENABLE_CSS_ANIMATIONS_LEVEL_2) $(ENABLE_CSS_BOX_DECORATION_BREAK) $(ENABLE_CSS_COMPOSITING) $(ENABLE_CSS_DEVICE_ADAPTATION) $(ENABLE_CSS_IMAGE_ORIENTATION) $(ENABLE_CSS_IMAGE_RESOLUTION) $(ENABLE_CSS_REGIONS) $(ENABLE_CSS_SCROLL_SNAP) $(ENABLE_CSS_SELECTORS_LEVEL4) $(ENABLE_CSS_TRAILING_WORD) $(ENABLE_CSS3_TEXT) $(ENABLE_CURSOR_VISIBILITY) $(ENABLE_CUSTOM_SCHEME_HANDLER) $(ENABLE_DASHBOARD_SUPPORT) $(ENABLE_DATA_INTERACTION) $(ENABLE_DATA_TRANSFER_ITEMS) $(ENABLE_DATACUE_VALUE) $(ENABLE_DATALIST_ELEMENT) $(ENABLE_DEVICE_ORIENTATION) $(ENABLE_DRAG_SUPPORT) $(ENABLE_ENCRYPTED_MEDIA) $(ENABLE_FAST_JIT_PERMISSIONS) $(ENABLE_FETCH_API) $(ENABLE_FILTERS_LEVEL_2) $(ENABLE_FTL_JIT) $(ENABLE_FULLSCREEN_API) $(ENABLE_GAMEPAD_DEPRECATED) $(ENABLE_GAMEPAD) $(ENABLE_GEOLOCATION) $(ENABLE_ICONDATABASE) $(ENABLE_INDEXED_DATABASE_IN_WORKERS) $(ENABLE_INDEXED_DATABASE) $(ENABLE_INPUT_TYPE_COLOR_POPOVER) $(ENABLE_INPUT_TYPE_COLOR) $(ENABLE_INPUT_TYPE_DATE) $(ENABLE_INPUT_TYPE_DATETIME_INCOMPLETE) $(ENABLE_INPUT_TYPE_DATETIMELOCAL) $(ENABLE_INPUT_TYPE_MONTH) $(ENABLE_INPUT_TYPE_TIME) $(ENABLE_INPUT_TYPE_WEEK) $(ENABLE_INTERSECTION_OBSERVER) $(ENABLE_INTL) $(ENABLE_IOS_GESTURE_EVENTS) $(ENABLE_IOS_TOUCH_EVENTS) $(ENABLE_JIT) $(ENABLE_KEYBOARD_KEY_ATTRIBUTE) $(ENABLE_KEYBOARD_CODE_ATTRIBUTE) $(ENABLE_LEGACY_CSS_VENDOR_PREFIXES) $(ENABLE_LEGACY_ENCRYPTED_MEDIA) $(ENABLE_LEGACY_VENDOR_PREFIXES) $(ENABLE_LETTERPRESS) $(ENABLE_LINK_PREFETCH) $(ENABLE_MAC_GESTURE_EVENTS) $(ENABLE_MATHML) $(ENABLE_MEDIA_CAPTURE) $(ENABLE_MEDIA_CONTROLS_SCRIPT) $(ENABLE_MEDIA_SESSION) $(ENABLE_MEDIA_SOURCE) $(ENABLE_MEDIA_STATISTICS) $(ENABLE_MEDIA_STREAM) $(ENABLE_METER_ELEMENT) $(ENABLE_MHTML) $(ENABLE_MOUSE_CURSOR_SCALE) $(ENABLE_NAVIGATOR_CONTENT_UTILS) $(ENABLE_NAVIGATOR_STANDALONE) $(ENABLE_NOTIFICATIONS) $(ENABLE_PDFKIT_PLUGIN) $(ENABLE_POINTER_LOCK) $(ENABLE_PROXIMITY_EVENTS) $(ENABLE_PUBLIC_SUFFIX_LIST) $(ENABLE_QUOTA) $(ENABLE_REMOTE_INSPECTOR) $(ENABLE_REQUEST_AUTOCOMPLETE) $(ENABLE_RESOLUTION_MEDIA_QUERY) $(ENABLE_RESOURCE_USAGE) $(ENABLE_RUBBER_BANDING) $(ENABLE_SERVICE_CONTROLS) $(ENABLE_SERVICE_WORKER) $(ENABLE_SPEECH_SYNTHESIS) $(ENABLE_STREAMS_API) $(ENABLE_SUBTLE_CRYPTO) $(ENABLE_SVG_FONTS) $(ENABLE_TELEPHONE_NUMBER_DETECTION) $(ENABLE_TEXT_AUTOSIZING) $(ENABLE_TOUCH_EVENTS) $(ENABLE_TOUCH_ICON_LOADING) $(ENABLE_USERSELECT_ALL) $(ENABLE_VARIATION_FONTS) $(ENABLE_VIDEO_PRESENTATION_MODE) $(ENABLE_MAC_VIDEO_TOOLBOX) $(ENABLE_VIDEO_TRACK) $(ENABLE_VIDEO) $(ENABLE_VIEW_MODE_CSS_MEDIA) $(ENABLE_WEB_ANIMATIONS) $(ENABLE_WEB_AUDIO) $(ENABLE_WEB_RTC) $(ENABLE_WEB_SOCKETS) $(ENABLE_WEBASSEMBLY) $(ENABLE_WEBGL) $(ENABLE_WEBGL2) $(ENABLE_WEBGPU) $(ENABLE_WIRELESS_PLAYBACK_TARGET) $(ENABLE_XSLT);
index 804b483..a0dd52e 100644 (file)
     macro(LinkPreloadEnabled, linkPreloadEnabled, Bool, bool, DEFAULT_EXPERIMENTAL_FEATURES_ENABLED, "Link Preload", "Link preload support") \
     macro(WebRTCLegacyAPIDisabled, webRTCLegacyAPIDisabled, Bool, bool, DEFAULT_EXPERIMENTAL_FEATURES_ENABLED, "Remove Legacy WebRTC API", "Remove Legacy WebRTC API") \
     macro(IsSecureContextAttributeEnabled, isSecureContextAttributeEnabled, Bool, bool, DEFAULT_EXPERIMENTAL_FEATURES_ENABLED, "Secure Contexts API", "Enable Secure Contexts API") \
+    macro(ServiceWorkersEnabled, serviceWorkersEnabled, Bool, bool, DEFAULT_EXPERIMENTAL_FEATURES_ENABLED, "ServiceWorkers", "Enable ServiceWorkers") \
     macro(SubresourceIntegrityEnabled, subresourceIntegrityEnabled, Bool, bool, DEFAULT_EXPERIMENTAL_FEATURES_ENABLED, "SubresourceIntegrity", "Enable SubresourceIntegrity") \
     macro(ViewportFitEnabled, viewportFitEnabled, Bool, bool, true, "Viewport Fit", "Enable viewport-fit viewport parameter") \
     macro(WebAnimationsEnabled, webAnimationsEnabled, Bool, bool, false, "Web Animations", "Web Animations prototype") \
index c8232ef..6fa2436 100644 (file)
@@ -294,6 +294,14 @@ void WebPreferences::enableAllExperimentalFeatures()
     FOR_EACH_WEBKIT_EXPERIMENTAL_FEATURE_PREFERENCE(SET_FEATURE_ENABLED)
 
 #undef SET_FEATURE_ENABLED
+
+#if ENABLE(SERVICE_WORKER)
+    // FIXME: The ServiceWorker interfaces are only stubbed out and entirely inert.
+    // Enabling the feature would cause significant, unecessary churn in layout test results.
+    // That'd be especially wasteful since we're going to reimport the SW tests imminently (https://bugs.webkit.org/show_bug.cgi?id=175053)
+    // Revisit this soon in a separate patch.
+    setServiceWorkersEnabled(false);
+#endif
 }
 
 bool WebPreferences::anyPagesAreUsingPrivateBrowsing()
index 4ca55e6..ccf2b4b 100644 (file)
@@ -3182,6 +3182,10 @@ void WebPage::updatePreferences(const WebPreferencesStore& store)
     settings.setImageControlsEnabled(store.getBoolValueForKey(WebPreferencesKey::imageControlsEnabledKey()));
 #endif
 
+#if ENABLE(SERVICE_WORKER)
+    RuntimeEnabledFeatures::sharedFeatures().setServiceWorkerEnabled(store.getBoolValueForKey(WebPreferencesKey::serviceWorkersEnabledKey()));
+#endif
+
 #if ENABLE(WIRELESS_PLAYBACK_TARGET)
     settings.setAllowsAirPlayForMediaPlayback(store.getBoolValueForKey(WebPreferencesKey::allowsAirPlayForMediaPlaybackKey()));
 #endif
index e54373a..9e9e5fe 100644 (file)
@@ -1,3 +1,12 @@
+2017-08-03  Brady Eidson  <beidson@apple.com>
+
+        Add SW IDLs and stub out basic functionality.
+        https://bugs.webkit.org/show_bug.cgi?id=175115
+
+        Reviewed by Chris Dumez.
+
+        * Configurations/FeatureDefines.xcconfig:
+
 2017-08-02  Sam Weinig  <sam@webkit.org>
 
         [WebIDL] Convert MutationCallback to be a normal generated callback
index 67cf537..80e86e7 100644 (file)
@@ -157,6 +157,7 @@ ENABLE_POINTER_LOCK[sdk=macosx*] = ENABLE_POINTER_LOCK;
 ENABLE_PROXIMITY_EVENTS = ;
 ENABLE_PUBLIC_SUFFIX_LIST = ENABLE_PUBLIC_SUFFIX_LIST;
 ENABLE_QUOTA = ;
+ENABLE_SERVICE_WORKER = ENABLE_SERVICE_WORKER;
 ENABLE_STREAMS_API = ENABLE_STREAMS_API;
 ENABLE_REQUEST_AUTOCOMPLETE = ;
 ENABLE_REMOTE_INSPECTOR = ENABLE_REMOTE_INSPECTOR;
@@ -243,4 +244,4 @@ ENABLE_DRAG_SUPPORT[sdk=iphonesimulator11*] = ENABLE_DRAG_SUPPORT;
 ENABLE_DATA_INTERACTION[sdk=iphoneos11*] = ENABLE_DATA_INTERACTION;
 ENABLE_DATA_INTERACTION[sdk=iphonesimulator11*] = ENABLE_DATA_INTERACTION;
 
-FEATURE_DEFINES = $(ENABLE_3D_TRANSFORMS) $(ENABLE_ACCELERATED_2D_CANVAS) $(ENABLE_ACCELERATED_OVERFLOW_SCROLLING) $(ENABLE_APPLE_PAY) $(ENABLE_APPLE_PAY_SESSION_V3) $(ENABLE_ATTACHMENT_ELEMENT) $(ENABLE_AVF_CAPTIONS) $(ENABLE_CACHE_PARTITIONING) $(ENABLE_CANVAS_PATH) $(ENABLE_CANVAS_PROXY) $(ENABLE_CHANNEL_MESSAGING) $(ENABLE_CONTENT_FILTERING) $(ENABLE_CSS_ANIMATIONS_LEVEL_2) $(ENABLE_CSS_BOX_DECORATION_BREAK) $(ENABLE_CSS_COMPOSITING) $(ENABLE_CSS_DEVICE_ADAPTATION) $(ENABLE_CSS_IMAGE_ORIENTATION) $(ENABLE_CSS_IMAGE_RESOLUTION) $(ENABLE_CSS_REGIONS) $(ENABLE_CSS_SCROLL_SNAP) $(ENABLE_CSS_SELECTORS_LEVEL4) $(ENABLE_CSS_TRAILING_WORD) $(ENABLE_CSS3_TEXT) $(ENABLE_CURSOR_VISIBILITY) $(ENABLE_CUSTOM_SCHEME_HANDLER) $(ENABLE_DASHBOARD_SUPPORT) $(ENABLE_DATA_INTERACTION) $(ENABLE_DATA_TRANSFER_ITEMS) $(ENABLE_DATACUE_VALUE) $(ENABLE_DATALIST_ELEMENT) $(ENABLE_DEVICE_ORIENTATION) $(ENABLE_DRAG_SUPPORT) $(ENABLE_ENCRYPTED_MEDIA) $(ENABLE_FAST_JIT_PERMISSIONS) $(ENABLE_FETCH_API) $(ENABLE_FILTERS_LEVEL_2) $(ENABLE_FTL_JIT) $(ENABLE_FULLSCREEN_API) $(ENABLE_GAMEPAD_DEPRECATED) $(ENABLE_GAMEPAD) $(ENABLE_GEOLOCATION) $(ENABLE_ICONDATABASE) $(ENABLE_INDEXED_DATABASE_IN_WORKERS) $(ENABLE_INDEXED_DATABASE) $(ENABLE_INPUT_TYPE_COLOR_POPOVER) $(ENABLE_INPUT_TYPE_COLOR) $(ENABLE_INPUT_TYPE_DATE) $(ENABLE_INPUT_TYPE_DATETIME_INCOMPLETE) $(ENABLE_INPUT_TYPE_DATETIMELOCAL) $(ENABLE_INPUT_TYPE_MONTH) $(ENABLE_INPUT_TYPE_TIME) $(ENABLE_INPUT_TYPE_WEEK) $(ENABLE_INTERSECTION_OBSERVER) $(ENABLE_INTL) $(ENABLE_IOS_GESTURE_EVENTS) $(ENABLE_IOS_TOUCH_EVENTS) $(ENABLE_JIT) $(ENABLE_KEYBOARD_KEY_ATTRIBUTE) $(ENABLE_KEYBOARD_CODE_ATTRIBUTE) $(ENABLE_LEGACY_CSS_VENDOR_PREFIXES) $(ENABLE_LEGACY_ENCRYPTED_MEDIA) $(ENABLE_LEGACY_VENDOR_PREFIXES) $(ENABLE_LETTERPRESS) $(ENABLE_LINK_PREFETCH) $(ENABLE_MAC_GESTURE_EVENTS) $(ENABLE_MATHML) $(ENABLE_MEDIA_CAPTURE) $(ENABLE_MEDIA_CONTROLS_SCRIPT) $(ENABLE_MEDIA_SESSION) $(ENABLE_MEDIA_SOURCE) $(ENABLE_MEDIA_STATISTICS) $(ENABLE_MEDIA_STREAM) $(ENABLE_METER_ELEMENT) $(ENABLE_MHTML) $(ENABLE_MOUSE_CURSOR_SCALE) $(ENABLE_NAVIGATOR_CONTENT_UTILS) $(ENABLE_NAVIGATOR_STANDALONE) $(ENABLE_NOTIFICATIONS) $(ENABLE_PDFKIT_PLUGIN) $(ENABLE_POINTER_LOCK) $(ENABLE_PROXIMITY_EVENTS) $(ENABLE_PUBLIC_SUFFIX_LIST) $(ENABLE_QUOTA) $(ENABLE_REMOTE_INSPECTOR) $(ENABLE_REQUEST_AUTOCOMPLETE) $(ENABLE_RESOLUTION_MEDIA_QUERY) $(ENABLE_RESOURCE_USAGE) $(ENABLE_RUBBER_BANDING) $(ENABLE_SERVICE_CONTROLS) $(ENABLE_SPEECH_SYNTHESIS) $(ENABLE_STREAMS_API) $(ENABLE_SUBTLE_CRYPTO) $(ENABLE_SVG_FONTS) $(ENABLE_TELEPHONE_NUMBER_DETECTION) $(ENABLE_TEXT_AUTOSIZING) $(ENABLE_TOUCH_EVENTS) $(ENABLE_TOUCH_ICON_LOADING) $(ENABLE_USERSELECT_ALL) $(ENABLE_VARIATION_FONTS) $(ENABLE_VIDEO_PRESENTATION_MODE) $(ENABLE_MAC_VIDEO_TOOLBOX) $(ENABLE_VIDEO_TRACK) $(ENABLE_VIDEO) $(ENABLE_VIEW_MODE_CSS_MEDIA) $(ENABLE_WEB_ANIMATIONS) $(ENABLE_WEB_AUDIO) $(ENABLE_WEB_RTC) $(ENABLE_WEB_SOCKETS) $(ENABLE_WEBASSEMBLY) $(ENABLE_WEBGL) $(ENABLE_WEBGL2) $(ENABLE_WEBGPU) $(ENABLE_WIRELESS_PLAYBACK_TARGET) $(ENABLE_XSLT);
+FEATURE_DEFINES = $(ENABLE_3D_TRANSFORMS) $(ENABLE_ACCELERATED_2D_CANVAS) $(ENABLE_ACCELERATED_OVERFLOW_SCROLLING) $(ENABLE_APPLE_PAY) $(ENABLE_APPLE_PAY_SESSION_V3) $(ENABLE_ATTACHMENT_ELEMENT) $(ENABLE_AVF_CAPTIONS) $(ENABLE_CACHE_PARTITIONING) $(ENABLE_CANVAS_PATH) $(ENABLE_CANVAS_PROXY) $(ENABLE_CHANNEL_MESSAGING) $(ENABLE_CONTENT_FILTERING) $(ENABLE_CSS_ANIMATIONS_LEVEL_2) $(ENABLE_CSS_BOX_DECORATION_BREAK) $(ENABLE_CSS_COMPOSITING) $(ENABLE_CSS_DEVICE_ADAPTATION) $(ENABLE_CSS_IMAGE_ORIENTATION) $(ENABLE_CSS_IMAGE_RESOLUTION) $(ENABLE_CSS_REGIONS) $(ENABLE_CSS_SCROLL_SNAP) $(ENABLE_CSS_SELECTORS_LEVEL4) $(ENABLE_CSS_TRAILING_WORD) $(ENABLE_CSS3_TEXT) $(ENABLE_CURSOR_VISIBILITY) $(ENABLE_CUSTOM_SCHEME_HANDLER) $(ENABLE_DASHBOARD_SUPPORT) $(ENABLE_DATA_INTERACTION) $(ENABLE_DATA_TRANSFER_ITEMS) $(ENABLE_DATACUE_VALUE) $(ENABLE_DATALIST_ELEMENT) $(ENABLE_DEVICE_ORIENTATION) $(ENABLE_DRAG_SUPPORT) $(ENABLE_ENCRYPTED_MEDIA) $(ENABLE_FAST_JIT_PERMISSIONS) $(ENABLE_FETCH_API) $(ENABLE_FILTERS_LEVEL_2) $(ENABLE_FTL_JIT) $(ENABLE_FULLSCREEN_API) $(ENABLE_GAMEPAD_DEPRECATED) $(ENABLE_GAMEPAD) $(ENABLE_GEOLOCATION) $(ENABLE_ICONDATABASE) $(ENABLE_INDEXED_DATABASE_IN_WORKERS) $(ENABLE_INDEXED_DATABASE) $(ENABLE_INPUT_TYPE_COLOR_POPOVER) $(ENABLE_INPUT_TYPE_COLOR) $(ENABLE_INPUT_TYPE_DATE) $(ENABLE_INPUT_TYPE_DATETIME_INCOMPLETE) $(ENABLE_INPUT_TYPE_DATETIMELOCAL) $(ENABLE_INPUT_TYPE_MONTH) $(ENABLE_INPUT_TYPE_TIME) $(ENABLE_INPUT_TYPE_WEEK) $(ENABLE_INTERSECTION_OBSERVER) $(ENABLE_INTL) $(ENABLE_IOS_GESTURE_EVENTS) $(ENABLE_IOS_TOUCH_EVENTS) $(ENABLE_JIT) $(ENABLE_KEYBOARD_KEY_ATTRIBUTE) $(ENABLE_KEYBOARD_CODE_ATTRIBUTE) $(ENABLE_LEGACY_CSS_VENDOR_PREFIXES) $(ENABLE_LEGACY_ENCRYPTED_MEDIA) $(ENABLE_LEGACY_VENDOR_PREFIXES) $(ENABLE_LETTERPRESS) $(ENABLE_LINK_PREFETCH) $(ENABLE_MAC_GESTURE_EVENTS) $(ENABLE_MATHML) $(ENABLE_MEDIA_CAPTURE) $(ENABLE_MEDIA_CONTROLS_SCRIPT) $(ENABLE_MEDIA_SESSION) $(ENABLE_MEDIA_SOURCE) $(ENABLE_MEDIA_STATISTICS) $(ENABLE_MEDIA_STREAM) $(ENABLE_METER_ELEMENT) $(ENABLE_MHTML) $(ENABLE_MOUSE_CURSOR_SCALE) $(ENABLE_NAVIGATOR_CONTENT_UTILS) $(ENABLE_NAVIGATOR_STANDALONE) $(ENABLE_NOTIFICATIONS) $(ENABLE_PDFKIT_PLUGIN) $(ENABLE_POINTER_LOCK) $(ENABLE_PROXIMITY_EVENTS) $(ENABLE_PUBLIC_SUFFIX_LIST) $(ENABLE_QUOTA) $(ENABLE_REMOTE_INSPECTOR) $(ENABLE_REQUEST_AUTOCOMPLETE) $(ENABLE_RESOLUTION_MEDIA_QUERY) $(ENABLE_RESOURCE_USAGE) $(ENABLE_RUBBER_BANDING) $(ENABLE_SERVICE_CONTROLS) $(ENABLE_SERVICE_WORKER) $(ENABLE_SPEECH_SYNTHESIS) $(ENABLE_STREAMS_API) $(ENABLE_SUBTLE_CRYPTO) $(ENABLE_SVG_FONTS) $(ENABLE_TELEPHONE_NUMBER_DETECTION) $(ENABLE_TEXT_AUTOSIZING) $(ENABLE_TOUCH_EVENTS) $(ENABLE_TOUCH_ICON_LOADING) $(ENABLE_USERSELECT_ALL) $(ENABLE_VARIATION_FONTS) $(ENABLE_VIDEO_PRESENTATION_MODE) $(ENABLE_MAC_VIDEO_TOOLBOX) $(ENABLE_VIDEO_TRACK) $(ENABLE_VIDEO) $(ENABLE_VIEW_MODE_CSS_MEDIA) $(ENABLE_WEB_ANIMATIONS) $(ENABLE_WEB_AUDIO) $(ENABLE_WEB_RTC) $(ENABLE_WEB_SOCKETS) $(ENABLE_WEBASSEMBLY) $(ENABLE_WEBGL) $(ENABLE_WEBGL2) $(ENABLE_WEBGPU) $(ENABLE_WIRELESS_PLAYBACK_TARGET) $(ENABLE_XSLT);
index 79d4594..b5a152a 100644 (file)
@@ -165,6 +165,7 @@ macro(WEBKIT_OPTION_BEGIN)
     WEBKIT_OPTION_DEFINE(ENABLE_RUBBER_BANDING "Toggle rubber banding support" PRIVATE OFF)
     WEBKIT_OPTION_DEFINE(ENABLE_SAMPLING_PROFILER "Toggle sampling profiler support" PRIVATE ON)
     WEBKIT_OPTION_DEFINE(ENABLE_SERVICE_CONTROLS "Toggle service controls support" PRIVATE OFF)
+    WEBKIT_OPTION_DEFINE(ENABLE_SERVICE_WORKER "Toggle ServiceWorker support" PRIVATE OFF)
     WEBKIT_OPTION_DEFINE(ENABLE_SMOOTH_SCROLLING "Toggle smooth scrolling" PRIVATE OFF)
     WEBKIT_OPTION_DEFINE(ENABLE_SPEECH_SYNTHESIS "Toggle Speech Synthesis API support)" PRIVATE OFF)
     WEBKIT_OPTION_DEFINE(ENABLE_SPELLCHECK "Toggle Spellchecking support (requires Enchant)" PRIVATE OFF)
index 180e435..6e61331 100644 (file)
@@ -60,6 +60,7 @@
     <ENABLE_NAVIGATOR_CONTENT_UTILS />
     <ENABLE_STREAMS_API />
     <ENABLE_SCRIPTED_SPEECH />
+    <ENABLE_SERVICE_WORKER />
     <ENABLE_SHARED_WORKERS>ENABLE_SHARED_WORKERS</ENABLE_SHARED_WORKERS>
     <ENABLE_SQL_DATABASE>ENABLE_SQL_DATABASE</ENABLE_SQL_DATABASE>
     <ENABLE_STYLE_SCOPED />
index 3041537..02c635b 100644 (file)
@@ -59,6 +59,7 @@
     <ENABLE_QUOTA />
     <ENABLE_NAVIGATOR_CONTENT_UTILS />
     <ENABLE_SCRIPTED_SPEECH />
+    <ENABLE_SERVICE_WORKER />
     <ENABLE_SHARED_WORKERS>ENABLE_SHARED_WORKERS</ENABLE_SHARED_WORKERS>
     <ENABLE_SQL_DATABASE>ENABLE_SQL_DATABASE</ENABLE_SQL_DATABASE>
     <ENABLE_STYLE_SCOPED />
index 3875bf8..97f3109 100644 (file)
@@ -1,3 +1,14 @@
+2017-08-03  Brady Eidson  <beidson@apple.com>
+
+        Add SW IDLs and stub out basic functionality.
+        https://bugs.webkit.org/show_bug.cgi?id=175115
+
+        Reviewed by Chris Dumez.
+
+        * TestWebKitAPI/Configurations/FeatureDefines.xcconfig:
+
+        * Scripts/webkitpy/bindings/main.py:
+
 2017-08-03  Per Arne Vollan  <pvollan@apple.com>
 
         [Win] The test http/tests/security/contentSecurityPolicy/upgrade-insecure-requests/basic-upgrade.https.html is failing.
index 05b2fca..76404e3 100644 (file)
@@ -70,7 +70,7 @@ class BindingsTests:
             exit_code = e.exit_code
         return exit_code
 
-    def generate_supplemental_dependency(self, input_directory, supplemental_dependency_file, window_constructors_file, workerglobalscope_constructors_file, dedicatedworkerglobalscope_constructors_file):
+    def generate_supplemental_dependency(self, input_directory, supplemental_dependency_file, window_constructors_file, workerglobalscope_constructors_file, dedicatedworkerglobalscope_constructors_file, serviceworkerglobalscope_constructors_file):
         idl_files_list = tempfile.mkstemp()
         for input_file in os.listdir(input_directory):
             (name, extension) = os.path.splitext(input_file)
@@ -87,7 +87,8 @@ class BindingsTests:
                '--supplementalDependencyFile', supplemental_dependency_file,
                '--windowConstructorsFile', window_constructors_file,
                '--workerGlobalScopeConstructorsFile', workerglobalscope_constructors_file,
-               '--dedicatedWorkerGlobalScopeConstructorsFile', dedicatedworkerglobalscope_constructors_file]
+               '--dedicatedWorkerGlobalScopeConstructorsFile', dedicatedworkerglobalscope_constructors_file,
+               '--serviceWorkerGlobalScopeConstructorsFile', serviceworkerglobalscope_constructors_file]
 
         exit_code = 0
         try:
@@ -179,12 +180,14 @@ class BindingsTests:
         window_constructors_file = tempfile.mkstemp()[1]
         workerglobalscope_constructors_file = tempfile.mkstemp()[1]
         dedicatedworkerglobalscope_constructors_file = tempfile.mkstemp()[1]
-        if self.generate_supplemental_dependency(input_directory, supplemental_dependency_file, window_constructors_file, workerglobalscope_constructors_file, dedicatedworkerglobalscope_constructors_file):
+        serviceworkerglobalscope_constructors_file = tempfile.mkstemp()[1]
+        if self.generate_supplemental_dependency(input_directory, supplemental_dependency_file, window_constructors_file, workerglobalscope_constructors_file, dedicatedworkerglobalscope_constructors_file, serviceworkerglobalscope_constructors_file):
             print 'Failed to generate a supplemental dependency file.'
             os.remove(supplemental_dependency_file)
             os.remove(window_constructors_file)
             os.remove(workerglobalscope_constructors_file)
             os.remove(dedicatedworkerglobalscope_constructors_file)
+            os.remove(serviceworkerglobalscope_constructors_file)
             return -1
 
         for generator in self.generators:
@@ -197,6 +200,7 @@ class BindingsTests:
         os.remove(window_constructors_file)
         os.remove(workerglobalscope_constructors_file)
         os.remove(dedicatedworkerglobalscope_constructors_file)
+        os.remove(serviceworkerglobalscope_constructors_file)
 
         if self.json_file_name:
             json_data = {
index 67cf537..80e86e7 100644 (file)
@@ -157,6 +157,7 @@ ENABLE_POINTER_LOCK[sdk=macosx*] = ENABLE_POINTER_LOCK;
 ENABLE_PROXIMITY_EVENTS = ;
 ENABLE_PUBLIC_SUFFIX_LIST = ENABLE_PUBLIC_SUFFIX_LIST;
 ENABLE_QUOTA = ;
+ENABLE_SERVICE_WORKER = ENABLE_SERVICE_WORKER;
 ENABLE_STREAMS_API = ENABLE_STREAMS_API;
 ENABLE_REQUEST_AUTOCOMPLETE = ;
 ENABLE_REMOTE_INSPECTOR = ENABLE_REMOTE_INSPECTOR;
@@ -243,4 +244,4 @@ ENABLE_DRAG_SUPPORT[sdk=iphonesimulator11*] = ENABLE_DRAG_SUPPORT;
 ENABLE_DATA_INTERACTION[sdk=iphoneos11*] = ENABLE_DATA_INTERACTION;
 ENABLE_DATA_INTERACTION[sdk=iphonesimulator11*] = ENABLE_DATA_INTERACTION;
 
-FEATURE_DEFINES = $(ENABLE_3D_TRANSFORMS) $(ENABLE_ACCELERATED_2D_CANVAS) $(ENABLE_ACCELERATED_OVERFLOW_SCROLLING) $(ENABLE_APPLE_PAY) $(ENABLE_APPLE_PAY_SESSION_V3) $(ENABLE_ATTACHMENT_ELEMENT) $(ENABLE_AVF_CAPTIONS) $(ENABLE_CACHE_PARTITIONING) $(ENABLE_CANVAS_PATH) $(ENABLE_CANVAS_PROXY) $(ENABLE_CHANNEL_MESSAGING) $(ENABLE_CONTENT_FILTERING) $(ENABLE_CSS_ANIMATIONS_LEVEL_2) $(ENABLE_CSS_BOX_DECORATION_BREAK) $(ENABLE_CSS_COMPOSITING) $(ENABLE_CSS_DEVICE_ADAPTATION) $(ENABLE_CSS_IMAGE_ORIENTATION) $(ENABLE_CSS_IMAGE_RESOLUTION) $(ENABLE_CSS_REGIONS) $(ENABLE_CSS_SCROLL_SNAP) $(ENABLE_CSS_SELECTORS_LEVEL4) $(ENABLE_CSS_TRAILING_WORD) $(ENABLE_CSS3_TEXT) $(ENABLE_CURSOR_VISIBILITY) $(ENABLE_CUSTOM_SCHEME_HANDLER) $(ENABLE_DASHBOARD_SUPPORT) $(ENABLE_DATA_INTERACTION) $(ENABLE_DATA_TRANSFER_ITEMS) $(ENABLE_DATACUE_VALUE) $(ENABLE_DATALIST_ELEMENT) $(ENABLE_DEVICE_ORIENTATION) $(ENABLE_DRAG_SUPPORT) $(ENABLE_ENCRYPTED_MEDIA) $(ENABLE_FAST_JIT_PERMISSIONS) $(ENABLE_FETCH_API) $(ENABLE_FILTERS_LEVEL_2) $(ENABLE_FTL_JIT) $(ENABLE_FULLSCREEN_API) $(ENABLE_GAMEPAD_DEPRECATED) $(ENABLE_GAMEPAD) $(ENABLE_GEOLOCATION) $(ENABLE_ICONDATABASE) $(ENABLE_INDEXED_DATABASE_IN_WORKERS) $(ENABLE_INDEXED_DATABASE) $(ENABLE_INPUT_TYPE_COLOR_POPOVER) $(ENABLE_INPUT_TYPE_COLOR) $(ENABLE_INPUT_TYPE_DATE) $(ENABLE_INPUT_TYPE_DATETIME_INCOMPLETE) $(ENABLE_INPUT_TYPE_DATETIMELOCAL) $(ENABLE_INPUT_TYPE_MONTH) $(ENABLE_INPUT_TYPE_TIME) $(ENABLE_INPUT_TYPE_WEEK) $(ENABLE_INTERSECTION_OBSERVER) $(ENABLE_INTL) $(ENABLE_IOS_GESTURE_EVENTS) $(ENABLE_IOS_TOUCH_EVENTS) $(ENABLE_JIT) $(ENABLE_KEYBOARD_KEY_ATTRIBUTE) $(ENABLE_KEYBOARD_CODE_ATTRIBUTE) $(ENABLE_LEGACY_CSS_VENDOR_PREFIXES) $(ENABLE_LEGACY_ENCRYPTED_MEDIA) $(ENABLE_LEGACY_VENDOR_PREFIXES) $(ENABLE_LETTERPRESS) $(ENABLE_LINK_PREFETCH) $(ENABLE_MAC_GESTURE_EVENTS) $(ENABLE_MATHML) $(ENABLE_MEDIA_CAPTURE) $(ENABLE_MEDIA_CONTROLS_SCRIPT) $(ENABLE_MEDIA_SESSION) $(ENABLE_MEDIA_SOURCE) $(ENABLE_MEDIA_STATISTICS) $(ENABLE_MEDIA_STREAM) $(ENABLE_METER_ELEMENT) $(ENABLE_MHTML) $(ENABLE_MOUSE_CURSOR_SCALE) $(ENABLE_NAVIGATOR_CONTENT_UTILS) $(ENABLE_NAVIGATOR_STANDALONE) $(ENABLE_NOTIFICATIONS) $(ENABLE_PDFKIT_PLUGIN) $(ENABLE_POINTER_LOCK) $(ENABLE_PROXIMITY_EVENTS) $(ENABLE_PUBLIC_SUFFIX_LIST) $(ENABLE_QUOTA) $(ENABLE_REMOTE_INSPECTOR) $(ENABLE_REQUEST_AUTOCOMPLETE) $(ENABLE_RESOLUTION_MEDIA_QUERY) $(ENABLE_RESOURCE_USAGE) $(ENABLE_RUBBER_BANDING) $(ENABLE_SERVICE_CONTROLS) $(ENABLE_SPEECH_SYNTHESIS) $(ENABLE_STREAMS_API) $(ENABLE_SUBTLE_CRYPTO) $(ENABLE_SVG_FONTS) $(ENABLE_TELEPHONE_NUMBER_DETECTION) $(ENABLE_TEXT_AUTOSIZING) $(ENABLE_TOUCH_EVENTS) $(ENABLE_TOUCH_ICON_LOADING) $(ENABLE_USERSELECT_ALL) $(ENABLE_VARIATION_FONTS) $(ENABLE_VIDEO_PRESENTATION_MODE) $(ENABLE_MAC_VIDEO_TOOLBOX) $(ENABLE_VIDEO_TRACK) $(ENABLE_VIDEO) $(ENABLE_VIEW_MODE_CSS_MEDIA) $(ENABLE_WEB_ANIMATIONS) $(ENABLE_WEB_AUDIO) $(ENABLE_WEB_RTC) $(ENABLE_WEB_SOCKETS) $(ENABLE_WEBASSEMBLY) $(ENABLE_WEBGL) $(ENABLE_WEBGL2) $(ENABLE_WEBGPU) $(ENABLE_WIRELESS_PLAYBACK_TARGET) $(ENABLE_XSLT);
+FEATURE_DEFINES = $(ENABLE_3D_TRANSFORMS) $(ENABLE_ACCELERATED_2D_CANVAS) $(ENABLE_ACCELERATED_OVERFLOW_SCROLLING) $(ENABLE_APPLE_PAY) $(ENABLE_APPLE_PAY_SESSION_V3) $(ENABLE_ATTACHMENT_ELEMENT) $(ENABLE_AVF_CAPTIONS) $(ENABLE_CACHE_PARTITIONING) $(ENABLE_CANVAS_PATH) $(ENABLE_CANVAS_PROXY) $(ENABLE_CHANNEL_MESSAGING) $(ENABLE_CONTENT_FILTERING) $(ENABLE_CSS_ANIMATIONS_LEVEL_2) $(ENABLE_CSS_BOX_DECORATION_BREAK) $(ENABLE_CSS_COMPOSITING) $(ENABLE_CSS_DEVICE_ADAPTATION) $(ENABLE_CSS_IMAGE_ORIENTATION) $(ENABLE_CSS_IMAGE_RESOLUTION) $(ENABLE_CSS_REGIONS) $(ENABLE_CSS_SCROLL_SNAP) $(ENABLE_CSS_SELECTORS_LEVEL4) $(ENABLE_CSS_TRAILING_WORD) $(ENABLE_CSS3_TEXT) $(ENABLE_CURSOR_VISIBILITY) $(ENABLE_CUSTOM_SCHEME_HANDLER) $(ENABLE_DASHBOARD_SUPPORT) $(ENABLE_DATA_INTERACTION) $(ENABLE_DATA_TRANSFER_ITEMS) $(ENABLE_DATACUE_VALUE) $(ENABLE_DATALIST_ELEMENT) $(ENABLE_DEVICE_ORIENTATION) $(ENABLE_DRAG_SUPPORT) $(ENABLE_ENCRYPTED_MEDIA) $(ENABLE_FAST_JIT_PERMISSIONS) $(ENABLE_FETCH_API) $(ENABLE_FILTERS_LEVEL_2) $(ENABLE_FTL_JIT) $(ENABLE_FULLSCREEN_API) $(ENABLE_GAMEPAD_DEPRECATED) $(ENABLE_GAMEPAD) $(ENABLE_GEOLOCATION) $(ENABLE_ICONDATABASE) $(ENABLE_INDEXED_DATABASE_IN_WORKERS) $(ENABLE_INDEXED_DATABASE) $(ENABLE_INPUT_TYPE_COLOR_POPOVER) $(ENABLE_INPUT_TYPE_COLOR) $(ENABLE_INPUT_TYPE_DATE) $(ENABLE_INPUT_TYPE_DATETIME_INCOMPLETE) $(ENABLE_INPUT_TYPE_DATETIMELOCAL) $(ENABLE_INPUT_TYPE_MONTH) $(ENABLE_INPUT_TYPE_TIME) $(ENABLE_INPUT_TYPE_WEEK) $(ENABLE_INTERSECTION_OBSERVER) $(ENABLE_INTL) $(ENABLE_IOS_GESTURE_EVENTS) $(ENABLE_IOS_TOUCH_EVENTS) $(ENABLE_JIT) $(ENABLE_KEYBOARD_KEY_ATTRIBUTE) $(ENABLE_KEYBOARD_CODE_ATTRIBUTE) $(ENABLE_LEGACY_CSS_VENDOR_PREFIXES) $(ENABLE_LEGACY_ENCRYPTED_MEDIA) $(ENABLE_LEGACY_VENDOR_PREFIXES) $(ENABLE_LETTERPRESS) $(ENABLE_LINK_PREFETCH) $(ENABLE_MAC_GESTURE_EVENTS) $(ENABLE_MATHML) $(ENABLE_MEDIA_CAPTURE) $(ENABLE_MEDIA_CONTROLS_SCRIPT) $(ENABLE_MEDIA_SESSION) $(ENABLE_MEDIA_SOURCE) $(ENABLE_MEDIA_STATISTICS) $(ENABLE_MEDIA_STREAM) $(ENABLE_METER_ELEMENT) $(ENABLE_MHTML) $(ENABLE_MOUSE_CURSOR_SCALE) $(ENABLE_NAVIGATOR_CONTENT_UTILS) $(ENABLE_NAVIGATOR_STANDALONE) $(ENABLE_NOTIFICATIONS) $(ENABLE_PDFKIT_PLUGIN) $(ENABLE_POINTER_LOCK) $(ENABLE_PROXIMITY_EVENTS) $(ENABLE_PUBLIC_SUFFIX_LIST) $(ENABLE_QUOTA) $(ENABLE_REMOTE_INSPECTOR) $(ENABLE_REQUEST_AUTOCOMPLETE) $(ENABLE_RESOLUTION_MEDIA_QUERY) $(ENABLE_RESOURCE_USAGE) $(ENABLE_RUBBER_BANDING) $(ENABLE_SERVICE_CONTROLS) $(ENABLE_SERVICE_WORKER) $(ENABLE_SPEECH_SYNTHESIS) $(ENABLE_STREAMS_API) $(ENABLE_SUBTLE_CRYPTO) $(ENABLE_SVG_FONTS) $(ENABLE_TELEPHONE_NUMBER_DETECTION) $(ENABLE_TEXT_AUTOSIZING) $(ENABLE_TOUCH_EVENTS) $(ENABLE_TOUCH_ICON_LOADING) $(ENABLE_USERSELECT_ALL) $(ENABLE_VARIATION_FONTS) $(ENABLE_VIDEO_PRESENTATION_MODE) $(ENABLE_MAC_VIDEO_TOOLBOX) $(ENABLE_VIDEO_TRACK) $(ENABLE_VIDEO) $(ENABLE_VIEW_MODE_CSS_MEDIA) $(ENABLE_WEB_ANIMATIONS) $(ENABLE_WEB_AUDIO) $(ENABLE_WEB_RTC) $(ENABLE_WEB_SOCKETS) $(ENABLE_WEBASSEMBLY) $(ENABLE_WEBGL) $(ENABLE_WEBGL2) $(ENABLE_WEBGPU) $(ENABLE_WIRELESS_PLAYBACK_TARGET) $(ENABLE_XSLT);