Diff
Modified: trunk/Source/WebCore/CMakeLists.txt (286463 => 286464)
--- trunk/Source/WebCore/CMakeLists.txt 2021-12-03 00:14:48 UTC (rev 286463)
+++ trunk/Source/WebCore/CMakeLists.txt 2021-12-03 00:32:06 UTC (rev 286464)
@@ -176,6 +176,7 @@
"${WEBCORE_DIR}/workers/service"
"${WEBCORE_DIR}/workers/service/context"
"${WEBCORE_DIR}/workers/service/server"
+ "${WEBCORE_DIR}/workers/shared"
"${WEBCORE_DIR}/worklets"
"${WEBCORE_DIR}/xml"
"${WEBCORE_DIR}/xml/parser"
@@ -1212,8 +1213,6 @@
workers/AbstractWorker.idl
workers/DedicatedWorkerGlobalScope.idl
- workers/SharedWorker.idl
- workers/SharedWorkerGlobalScope.idl
workers/Worker.idl
workers/WorkerGlobalScope.idl
workers/WorkerLocation.idl
@@ -1236,6 +1235,9 @@
workers/service/ServiceWorkerUpdateViaCache.idl
workers/service/ServiceWorkerWindowClient.idl
+ workers/shared/SharedWorker.idl
+ workers/shared/SharedWorkerGlobalScope.idl
+
worklets/PaintWorkletGlobalScope.idl
worklets/Worklet.idl
worklets/WorkletGlobalScope.idl
Modified: trunk/Source/WebCore/ChangeLog (286463 => 286464)
--- trunk/Source/WebCore/ChangeLog 2021-12-03 00:14:48 UTC (rev 286463)
+++ trunk/Source/WebCore/ChangeLog 2021-12-03 00:32:06 UTC (rev 286464)
@@ -1,3 +1,23 @@
+2021-12-02 Chris Dumez <cdu...@apple.com>
+
+ Move Shared Worker classes to WebCore/workers/shared
+ https://bugs.webkit.org/show_bug.cgi?id=233769
+
+ Reviewed by Alex Christensen.
+
+ Move Shared Worker classes to WebCore/workers/shared, for better structuring and consistency
+ with WebCore/workers/service.
+
+ * CMakeLists.txt:
+ * DerivedSources.make:
+ * WebCore.xcodeproj/project.pbxproj:
+ * workers/shared/SharedWorker.cpp: Renamed from Source/WebCore/workers/SharedWorker.cpp.
+ * workers/shared/SharedWorker.h: Renamed from Source/WebCore/workers/SharedWorker.h.
+ * workers/shared/SharedWorker.idl: Renamed from Source/WebCore/workers/SharedWorker.idl.
+ * workers/shared/SharedWorkerGlobalScope.cpp: Renamed from Source/WebCore/workers/SharedWorkerGlobalScope.cpp.
+ * workers/shared/SharedWorkerGlobalScope.h: Renamed from Source/WebCore/workers/SharedWorkerGlobalScope.h.
+ * workers/shared/SharedWorkerGlobalScope.idl: Renamed from Source/WebCore/workers/SharedWorkerGlobalScope.idl.
+
2021-12-02 Megan Gardner <megan_gard...@apple.com>
Re-add support of image control menus.
Modified: trunk/Source/WebCore/DerivedSources-input.xcfilelist (286463 => 286464)
--- trunk/Source/WebCore/DerivedSources-input.xcfilelist 2021-12-03 00:14:48 UTC (rev 286463)
+++ trunk/Source/WebCore/DerivedSources-input.xcfilelist 2021-12-03 00:32:06 UTC (rev 286464)
@@ -1639,6 +1639,8 @@
$(PROJECT_DIR)/workers/service/ServiceWorkerRegistration.idl
$(PROJECT_DIR)/workers/service/ServiceWorkerUpdateViaCache.idl
$(PROJECT_DIR)/workers/service/ServiceWorkerWindowClient.idl
+$(PROJECT_DIR)/workers/shared/SharedWorker.idl
+$(PROJECT_DIR)/workers/shared/SharedWorkerGlobalScope.idl
$(PROJECT_DIR)/worklets/PaintWorkletGlobalScope.idl
$(PROJECT_DIR)/worklets/Worklet.idl
$(PROJECT_DIR)/worklets/WorkletGlobalScope.idl
Modified: trunk/Source/WebCore/DerivedSources.make (286463 => 286464)
--- trunk/Source/WebCore/DerivedSources.make 2021-12-03 00:14:48 UTC (rev 286463)
+++ trunk/Source/WebCore/DerivedSources.make 2021-12-03 00:32:06 UTC (rev 286464)
@@ -1435,12 +1435,10 @@
$(WebCore)/testing/XRSimulateUserActivationFunction.idl \
$(WebCore)/workers/AbstractWorker.idl \
$(WebCore)/workers/DedicatedWorkerGlobalScope.idl \
- $(WebCore)/workers/SharedWorker.idl \
- $(WebCore)/workers/SharedWorkerGlobalScope.idl \
$(WebCore)/workers/Worker.idl \
$(WebCore)/workers/WorkerGlobalScope.idl \
$(WebCore)/workers/WorkerLocation.idl \
- $(WebCore)/workers/WorkerOptions.idl \
+ $(WebCore)/workers/WorkerOptions.idl \
$(WebCore)/workers/WorkerType.idl \
$(WebCore)/workers/service/ExtendableEvent.idl \
$(WebCore)/workers/service/ExtendableEventInit.idl \
@@ -1457,6 +1455,8 @@
$(WebCore)/workers/service/ServiceWorkerRegistration.idl \
$(WebCore)/workers/service/ServiceWorkerUpdateViaCache.idl \
$(WebCore)/workers/service/ServiceWorkerWindowClient.idl \
+ $(WebCore)/workers/shared/SharedWorker.idl \
+ $(WebCore)/workers/shared/SharedWorkerGlobalScope.idl \
$(WebCore)/worklets/PaintWorkletGlobalScope.idl \
$(WebCore)/worklets/Worklet.idl \
$(WebCore)/worklets/WorkletGlobalScope.idl \
Modified: trunk/Source/WebCore/Sources.txt (286463 => 286464)
--- trunk/Source/WebCore/Sources.txt 2021-12-03 00:14:48 UTC (rev 286463)
+++ trunk/Source/WebCore/Sources.txt 2021-12-03 00:32:06 UTC (rev 286464)
@@ -2723,8 +2723,6 @@
workers/DedicatedWorkerGlobalScope.cpp
workers/DedicatedWorkerThread.cpp
workers/ScriptBuffer.cpp
-workers/SharedWorker.cpp
-workers/SharedWorkerGlobalScope.cpp
workers/Worker.cpp
workers/WorkerAnimationController.cpp
workers/WorkerConsoleClient.cpp
@@ -2777,6 +2775,8 @@
workers/service/server/SWServerRegistration.cpp
workers/service/server/SWServerToContextConnection.cpp
workers/service/server/SWServerWorker.cpp
+workers/shared/SharedWorker.cpp
+workers/shared/SharedWorkerGlobalScope.cpp
worklets/PaintWorkletGlobalScope.cpp
worklets/Worklet.cpp
worklets/WorkletGlobalScope.cpp
Modified: trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj (286463 => 286464)
--- trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj 2021-12-03 00:14:48 UTC (rev 286463)
+++ trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj 2021-12-03 00:32:06 UTC (rev 286464)
@@ -9128,6 +9128,12 @@
465EDD9F222F4EC300B46E16 /* DeviceOrientationOrMotionPermissionState.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DeviceOrientationOrMotionPermissionState.h; sourceTree = "<group>"; };
465EDDA0222F4EC400B46E16 /* DeviceOrientationOrMotionPermissionState.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = DeviceOrientationOrMotionPermissionState.idl; sourceTree = "<group>"; };
466536FA264C8DD100AAD1D7 /* JSAudioNodeCustom.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = JSAudioNodeCustom.cpp; sourceTree = "<group>"; };
+ 46694CE02759448C00E3150E /* SharedWorkerGlobalScope.idl */ = {isa = PBXFileReference; lastKnownFileType = text; path = SharedWorkerGlobalScope.idl; sourceTree = "<group>"; };
+ 46694CE12759448C00E3150E /* SharedWorkerGlobalScope.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SharedWorkerGlobalScope.h; sourceTree = "<group>"; };
+ 46694CE22759448D00E3150E /* SharedWorker.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SharedWorker.h; sourceTree = "<group>"; };
+ 46694CE32759448D00E3150E /* SharedWorker.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = SharedWorker.cpp; sourceTree = "<group>"; };
+ 46694CE42759448E00E3150E /* SharedWorkerGlobalScope.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = SharedWorkerGlobalScope.cpp; sourceTree = "<group>"; };
+ 46694CE52759448E00E3150E /* SharedWorker.idl */ = {isa = PBXFileReference; lastKnownFileType = text; path = SharedWorker.idl; sourceTree = "<group>"; };
466C2DAB26C73AFB00651931 /* PolicyContainer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PolicyContainer.h; sourceTree = "<group>"; };
466DC6AB1EDE021D00746224 /* JSDOMRectList.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSDOMRectList.cpp; sourceTree = "<group>"; };
466ED8D21EDE0135005E43F6 /* JSDOMRectList.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSDOMRectList.h; sourceTree = "<group>"; };
@@ -20576,6 +20582,7 @@
isa = PBXGroup;
children = (
51F175441F3EBBF200C74950 /* service */,
+ 46694CDE2759446D00E3150E /* shared */,
41E1B1CA0FF5986900576B3B /* AbstractWorker.cpp */,
41E1B1CB0FF5986900576B3B /* AbstractWorker.h */,
41E1B1CC0FF5986900576B3B /* AbstractWorker.idl */,
@@ -21333,6 +21340,19 @@
path = "web-locks";
sourceTree = "<group>";
};
+ 46694CDE2759446D00E3150E /* shared */ = {
+ isa = PBXGroup;
+ children = (
+ 46694CE32759448D00E3150E /* SharedWorker.cpp */,
+ 46694CE22759448D00E3150E /* SharedWorker.h */,
+ 46694CE52759448E00E3150E /* SharedWorker.idl */,
+ 46694CE42759448E00E3150E /* SharedWorkerGlobalScope.cpp */,
+ 46694CE12759448C00E3150E /* SharedWorkerGlobalScope.h */,
+ 46694CE02759448C00E3150E /* SharedWorkerGlobalScope.idl */,
+ );
+ path = shared;
+ sourceTree = "<group>";
+ };
49484FAE102CF01E00187DD3 /* canvas */ = {
isa = PBXGroup;
children = (
Deleted: trunk/Source/WebCore/workers/SharedWorker.cpp (286463 => 286464)
--- trunk/Source/WebCore/workers/SharedWorker.cpp 2021-12-03 00:14:48 UTC (rev 286463)
+++ trunk/Source/WebCore/workers/SharedWorker.cpp 2021-12-03 00:32:06 UTC (rev 286464)
@@ -1,56 +0,0 @@
-/*
- * Copyright (C) 2021 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 "SharedWorker.h"
-
-#include <wtf/IsoMallocInlines.h>
-
-namespace WebCore {
-
-WTF_MAKE_ISO_ALLOCATED_IMPL(SharedWorker);
-
-SharedWorker::SharedWorker(String&&, std::optional<std::variant<String, WorkerOptions>>&&)
-{
-}
-
-MessagePort* SharedWorker::port() const
-{
- // FIXME: implement.
- return nullptr;
-}
-
-ScriptExecutionContext* SharedWorker::scriptExecutionContext() const
-{
- // FIXME: implement.
- return nullptr;
-}
-
-EventTargetInterface SharedWorker::eventTargetInterface() const
-{
- return SharedWorkerEventTargetInterfaceType;
-}
-
-} // namespace WebCore
Deleted: trunk/Source/WebCore/workers/SharedWorker.h (286463 => 286464)
--- trunk/Source/WebCore/workers/SharedWorker.h 2021-12-03 00:14:48 UTC (rev 286463)
+++ trunk/Source/WebCore/workers/SharedWorker.h 2021-12-03 00:32:06 UTC (rev 286464)
@@ -1,48 +0,0 @@
-/*
- * Copyright (C) 2021 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
-
-#include "AbstractWorker.h"
-#include "WorkerOptions.h"
-
-namespace WebCore {
-
-class MessagePort;
-
-class SharedWorker final : public AbstractWorker {
- WTF_MAKE_ISO_ALLOCATED(SharedWorker);
-public:
- static Ref<SharedWorker> create(String&& scriptURL, std::optional<std::variant<String, WorkerOptions>>&& options) { return adoptRef(*new SharedWorker(WTFMove(scriptURL), WTFMove(options))); }
-
- MessagePort* port() const;
-private:
- SharedWorker(String&&, std::optional<std::variant<String, WorkerOptions>>&&);
-
- EventTargetInterface eventTargetInterface() const final;
- ScriptExecutionContext* scriptExecutionContext() const final;
-};
-
-} // namespace WebCore
Deleted: trunk/Source/WebCore/workers/SharedWorker.idl (286463 => 286464)
--- trunk/Source/WebCore/workers/SharedWorker.idl 2021-12-03 00:14:48 UTC (rev 286463)
+++ trunk/Source/WebCore/workers/SharedWorker.idl 2021-12-03 00:32:06 UTC (rev 286464)
@@ -1,34 +0,0 @@
-/*
- * Copyright (C) 2021 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.
- */
-[
- EnabledBySetting=SharedWorkerEnabled,
- Exposed=Window
-]
-interface SharedWorker : EventTarget {
- constructor(USVString scriptURL, optional (DOMString or WorkerOptions) options);
-
- readonly attribute MessagePort port;
-};
-SharedWorker includes AbstractWorker;
Deleted: trunk/Source/WebCore/workers/SharedWorkerGlobalScope.cpp (286463 => 286464)
--- trunk/Source/WebCore/workers/SharedWorkerGlobalScope.cpp 2021-12-03 00:14:48 UTC (rev 286463)
+++ trunk/Source/WebCore/workers/SharedWorkerGlobalScope.cpp 2021-12-03 00:32:06 UTC (rev 286464)
@@ -1,46 +0,0 @@
-/*
- * Copyright (C) 2021 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 "SharedWorkerGlobalScope.h"
-
-#include <wtf/IsoMallocInlines.h>
-
-namespace WebCore {
-
-WTF_MAKE_ISO_ALLOCATED_IMPL(SharedWorkerGlobalScope);
-
-const String& SharedWorkerGlobalScope::name() const
-{
- // FIXME: Implement.
- return emptyString();
-}
-
-void SharedWorkerGlobalScope::close()
-{
- // FIXME: Implement.
-}
-
-} // namespace WebCore
Deleted: trunk/Source/WebCore/workers/SharedWorkerGlobalScope.h (286463 => 286464)
--- trunk/Source/WebCore/workers/SharedWorkerGlobalScope.h 2021-12-03 00:14:48 UTC (rev 286463)
+++ trunk/Source/WebCore/workers/SharedWorkerGlobalScope.h 2021-12-03 00:32:06 UTC (rev 286464)
@@ -1,48 +0,0 @@
-/*
- * Copyright (C) 2021 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
-
-#include "WorkerGlobalScope.h"
-
-namespace WebCore {
-
-class SharedWorkerGlobalScope final : public WorkerGlobalScope {
- WTF_MAKE_ISO_ALLOCATED(SharedWorkerGlobalScope);
-public:
- bool isSharedWorkerGlobalScope() const final { return true; }
- const String& name() const;
- void close();
-private:
- EventTargetInterface eventTargetInterface() const final;
- FetchOptions::Destination destination() const final;
-};
-
-} // namespace WebCore
-
-SPECIALIZE_TYPE_TRAITS_BEGIN(WebCore::SharedWorkerGlobalScope)
- static bool isType(const WebCore::ScriptExecutionContext& context) { return is<WebCore::WorkerGlobalScope>(context) && downcast<WebCore::WorkerGlobalScope>(context).isSharedWorkerGlobalScope(); }
- static bool isType(const WebCore::WorkerGlobalScope& context) { return context.isSharedWorkerGlobalScope(); }
-SPECIALIZE_TYPE_TRAITS_END()
Deleted: trunk/Source/WebCore/workers/SharedWorkerGlobalScope.idl (286463 => 286464)
--- trunk/Source/WebCore/workers/SharedWorkerGlobalScope.idl 2021-12-03 00:14:48 UTC (rev 286463)
+++ trunk/Source/WebCore/workers/SharedWorkerGlobalScope.idl 2021-12-03 00:32:06 UTC (rev 286464)
@@ -1,38 +0,0 @@
-/*
- * Copyright (C) 2021 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.
- */
-
-[
- EnabledBySetting=SharedWorkerEnabled,
- Global=(Worker,SharedWorker),
- Exposed=SharedWorker,
- JSGenerateToNativeObject,
-]
-interface SharedWorkerGlobalScope : WorkerGlobalScope {
- [Replaceable] readonly attribute DOMString name;
-
- undefined close();
-
- attribute EventHandler onconnect;
-};
Copied: trunk/Source/WebCore/workers/shared/SharedWorker.cpp (from rev 286462, trunk/Source/WebCore/workers/SharedWorker.cpp) (0 => 286464)
--- trunk/Source/WebCore/workers/shared/SharedWorker.cpp (rev 0)
+++ trunk/Source/WebCore/workers/shared/SharedWorker.cpp 2021-12-03 00:32:06 UTC (rev 286464)
@@ -0,0 +1,56 @@
+/*
+ * Copyright (C) 2021 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 "SharedWorker.h"
+
+#include <wtf/IsoMallocInlines.h>
+
+namespace WebCore {
+
+WTF_MAKE_ISO_ALLOCATED_IMPL(SharedWorker);
+
+SharedWorker::SharedWorker(String&&, std::optional<std::variant<String, WorkerOptions>>&&)
+{
+}
+
+MessagePort* SharedWorker::port() const
+{
+ // FIXME: implement.
+ return nullptr;
+}
+
+ScriptExecutionContext* SharedWorker::scriptExecutionContext() const
+{
+ // FIXME: implement.
+ return nullptr;
+}
+
+EventTargetInterface SharedWorker::eventTargetInterface() const
+{
+ return SharedWorkerEventTargetInterfaceType;
+}
+
+} // namespace WebCore
Copied: trunk/Source/WebCore/workers/shared/SharedWorker.h (from rev 286462, trunk/Source/WebCore/workers/SharedWorker.h) (0 => 286464)
--- trunk/Source/WebCore/workers/shared/SharedWorker.h (rev 0)
+++ trunk/Source/WebCore/workers/shared/SharedWorker.h 2021-12-03 00:32:06 UTC (rev 286464)
@@ -0,0 +1,48 @@
+/*
+ * Copyright (C) 2021 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
+
+#include "AbstractWorker.h"
+#include "WorkerOptions.h"
+
+namespace WebCore {
+
+class MessagePort;
+
+class SharedWorker final : public AbstractWorker {
+ WTF_MAKE_ISO_ALLOCATED(SharedWorker);
+public:
+ static Ref<SharedWorker> create(String&& scriptURL, std::optional<std::variant<String, WorkerOptions>>&& options) { return adoptRef(*new SharedWorker(WTFMove(scriptURL), WTFMove(options))); }
+
+ MessagePort* port() const;
+private:
+ SharedWorker(String&&, std::optional<std::variant<String, WorkerOptions>>&&);
+
+ EventTargetInterface eventTargetInterface() const final;
+ ScriptExecutionContext* scriptExecutionContext() const final;
+};
+
+} // namespace WebCore
Copied: trunk/Source/WebCore/workers/shared/SharedWorker.idl (from rev 286462, trunk/Source/WebCore/workers/SharedWorker.idl) (0 => 286464)
--- trunk/Source/WebCore/workers/shared/SharedWorker.idl (rev 0)
+++ trunk/Source/WebCore/workers/shared/SharedWorker.idl 2021-12-03 00:32:06 UTC (rev 286464)
@@ -0,0 +1,34 @@
+/*
+ * Copyright (C) 2021 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.
+ */
+[
+ EnabledBySetting=SharedWorkerEnabled,
+ Exposed=Window
+]
+interface SharedWorker : EventTarget {
+ constructor(USVString scriptURL, optional (DOMString or WorkerOptions) options);
+
+ readonly attribute MessagePort port;
+};
+SharedWorker includes AbstractWorker;
Copied: trunk/Source/WebCore/workers/shared/SharedWorkerGlobalScope.cpp (from rev 286462, trunk/Source/WebCore/workers/SharedWorkerGlobalScope.cpp) (0 => 286464)
--- trunk/Source/WebCore/workers/shared/SharedWorkerGlobalScope.cpp (rev 0)
+++ trunk/Source/WebCore/workers/shared/SharedWorkerGlobalScope.cpp 2021-12-03 00:32:06 UTC (rev 286464)
@@ -0,0 +1,46 @@
+/*
+ * Copyright (C) 2021 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 "SharedWorkerGlobalScope.h"
+
+#include <wtf/IsoMallocInlines.h>
+
+namespace WebCore {
+
+WTF_MAKE_ISO_ALLOCATED_IMPL(SharedWorkerGlobalScope);
+
+const String& SharedWorkerGlobalScope::name() const
+{
+ // FIXME: Implement.
+ return emptyString();
+}
+
+void SharedWorkerGlobalScope::close()
+{
+ // FIXME: Implement.
+}
+
+} // namespace WebCore
Copied: trunk/Source/WebCore/workers/shared/SharedWorkerGlobalScope.h (from rev 286462, trunk/Source/WebCore/workers/SharedWorkerGlobalScope.h) (0 => 286464)
--- trunk/Source/WebCore/workers/shared/SharedWorkerGlobalScope.h (rev 0)
+++ trunk/Source/WebCore/workers/shared/SharedWorkerGlobalScope.h 2021-12-03 00:32:06 UTC (rev 286464)
@@ -0,0 +1,48 @@
+/*
+ * Copyright (C) 2021 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
+
+#include "WorkerGlobalScope.h"
+
+namespace WebCore {
+
+class SharedWorkerGlobalScope final : public WorkerGlobalScope {
+ WTF_MAKE_ISO_ALLOCATED(SharedWorkerGlobalScope);
+public:
+ bool isSharedWorkerGlobalScope() const final { return true; }
+ const String& name() const;
+ void close();
+private:
+ EventTargetInterface eventTargetInterface() const final;
+ FetchOptions::Destination destination() const final;
+};
+
+} // namespace WebCore
+
+SPECIALIZE_TYPE_TRAITS_BEGIN(WebCore::SharedWorkerGlobalScope)
+ static bool isType(const WebCore::ScriptExecutionContext& context) { return is<WebCore::WorkerGlobalScope>(context) && downcast<WebCore::WorkerGlobalScope>(context).isSharedWorkerGlobalScope(); }
+ static bool isType(const WebCore::WorkerGlobalScope& context) { return context.isSharedWorkerGlobalScope(); }
+SPECIALIZE_TYPE_TRAITS_END()
Copied: trunk/Source/WebCore/workers/shared/SharedWorkerGlobalScope.idl (from rev 286462, trunk/Source/WebCore/workers/SharedWorkerGlobalScope.idl) (0 => 286464)
--- trunk/Source/WebCore/workers/shared/SharedWorkerGlobalScope.idl (rev 0)
+++ trunk/Source/WebCore/workers/shared/SharedWorkerGlobalScope.idl 2021-12-03 00:32:06 UTC (rev 286464)
@@ -0,0 +1,38 @@
+/*
+ * Copyright (C) 2021 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.
+ */
+
+[
+ EnabledBySetting=SharedWorkerEnabled,
+ Global=(Worker,SharedWorker),
+ Exposed=SharedWorker,
+ JSGenerateToNativeObject,
+]
+interface SharedWorkerGlobalScope : WorkerGlobalScope {
+ [Replaceable] readonly attribute DOMString name;
+
+ undefined close();
+
+ attribute EventHandler onconnect;
+};