Diff
Modified: trunk/Source/WebCore/ChangeLog (279760 => 279761)
--- trunk/Source/WebCore/ChangeLog 2021-07-08 22:59:59 UTC (rev 279760)
+++ trunk/Source/WebCore/ChangeLog 2021-07-08 23:08:21 UTC (rev 279761)
@@ -1,3 +1,40 @@
+2021-07-08 Ryosuke Niwa <[email protected]>
+
+ Remove more custom binding code with GenerateAddOpaqueRoot
+ https://bugs.webkit.org/show_bug.cgi?id=227789
+
+ Reviewed by Chris Dumez.
+
+ Use GenerateAddOpaqueRoot extended IDL option to remove more custom bindings code.
+
+ Also made GenerateAddOpaqueRoot default to use wrapped object's opaqueRoot function.
+
+ * Sources.txt:
+ * WebCore.xcodeproj/project.pbxproj:
+ * bindings/js/JSAbortControllerCustom.cpp: Removed.
+ * bindings/js/JSAudioTrackCustom.cpp: Removed.
+ * bindings/js/JSAudioTrackListCustom.cpp: Removed.
+ * bindings/js/JSTextTrackCustom.cpp: Removed.
+ * bindings/js/JSTextTrackListCustom.cpp: Removed.
+ * bindings/js/JSVideoTrackCustom.cpp: Removed.
+ * bindings/js/JSVideoTrackListCustom.cpp: Removed.
+ * bindings/scripts/CodeGeneratorJS.pm:
+ (GenerateImplementation):
+ * dom/AbortController.h:
+ * dom/AbortController.idl:
+ * html/track/AudioTrack.idl:
+ * html/track/AudioTrackList.idl:
+ * html/track/TextTrack.idl:
+ * html/track/TextTrackList.idl:
+ * html/track/TrackBase.cpp:
+ (WebCore::TrackBase::opaqueRoot): Added.
+ * html/track/TrackBase.h:
+ * html/track/TrackListBase.cpp:
+ (WebCore::TrackListBase::opaqueRoot const): Added.
+ * html/track/TrackListBase.h:
+ * html/track/VideoTrack.idl:
+ * html/track/VideoTrackList.idl:
+
2021-07-08 Alex Christensen <[email protected]>
Fix some whitespace handling issues in URL setters
Modified: trunk/Source/WebCore/Sources.txt (279760 => 279761)
--- trunk/Source/WebCore/Sources.txt 2021-07-08 22:59:59 UTC (rev 279760)
+++ trunk/Source/WebCore/Sources.txt 2021-07-08 23:08:21 UTC (rev 279761)
@@ -500,7 +500,6 @@
bindings/js/DOMWrapperWorld.cpp
bindings/js/GCController.cpp
bindings/js/IDBBindingUtilities.cpp
-bindings/js/JSAbortControllerCustom.cpp
bindings/js/JSAbortSignalCustom.cpp
bindings/js/JSAbstractRangeCustom.cpp
bindings/js/JSAnimationEffectCustom.cpp
@@ -508,8 +507,6 @@
bindings/js/JSAttrCustom.cpp
bindings/js/JSAudioBufferCustom.cpp
bindings/js/JSAudioNodeCustom.cpp
-bindings/js/JSAudioTrackCustom.cpp
-bindings/js/JSAudioTrackListCustom.cpp
bindings/js/JSAudioWorkletProcessorCustom.cpp
bindings/js/JSAuthenticatorResponseCustom.cpp
bindings/js/JSBaseAudioContextCustom.cpp
@@ -612,14 +609,10 @@
bindings/js/JSStyleSheetCustom.cpp
bindings/js/JSTextCustom.cpp
bindings/js/JSTextTrackCueCustom.cpp
-bindings/js/JSTextTrackCustom.cpp
-bindings/js/JSTextTrackListCustom.cpp
bindings/js/JSTrackCustom.cpp
bindings/js/JSTreeWalkerCustom.cpp
bindings/js/JSTypedOMCSSStyleValueCustom.cpp
bindings/js/JSUndoItemCustom.cpp
-bindings/js/JSVideoTrackCustom.cpp
-bindings/js/JSVideoTrackListCustom.cpp
bindings/js/JSWebAnimationCustom.cpp
bindings/js/JSWebGL2RenderingContextCustom.cpp
bindings/js/JSWebGLRenderingContextCustom.cpp
Modified: trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj (279760 => 279761)
--- trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj 2021-07-08 22:59:59 UTC (rev 279760)
+++ trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj 2021-07-08 23:08:21 UTC (rev 279761)
@@ -5992,7 +5992,6 @@
07B5A2D91464320A00A81ECE /* JSTextTrackList.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSTextTrackList.cpp; sourceTree = "<group>"; };
07B5A2DA1464320A00A81ECE /* JSTextTrackList.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSTextTrackList.h; sourceTree = "<group>"; };
07B5A3061468537100A81ECE /* TextTrackList.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = TextTrackList.idl; sourceTree = "<group>"; };
- 07B5A30C14687D7100A81ECE /* JSTextTrackListCustom.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSTextTrackListCustom.cpp; sourceTree = "<group>"; };
07B7116A1D899E63009F0FFB /* CaptureDevice.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CaptureDevice.h; sourceTree = "<group>"; };
07B7116B1D899E63009F0FFB /* CaptureDeviceManager.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CaptureDeviceManager.cpp; sourceTree = "<group>"; };
07B7116C1D899E63009F0FFB /* CaptureDeviceManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CaptureDeviceManager.h; sourceTree = "<group>"; };
@@ -6015,7 +6014,6 @@
07D6A4F11BED5F8800174146 /* MockRealtimeAudioSource.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = MockRealtimeAudioSource.cpp; sourceTree = "<group>"; };
07D6A4F21BED5F8800174146 /* MockRealtimeAudioSource.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MockRealtimeAudioSource.h; sourceTree = "<group>"; };
07D6A4F61BF2307D00174146 /* AudioTrackPrivateMediaStream.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AudioTrackPrivateMediaStream.h; path = platform/mediastream/AudioTrackPrivateMediaStream.h; sourceTree = SOURCE_ROOT; };
- 07E116B01489C9A100EC5ACE /* JSTextTrackCustom.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSTextTrackCustom.cpp; sourceTree = "<group>"; };
07E117061489EBEB00EC5ACE /* JSTextTrackCueCustom.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSTextTrackCueCustom.cpp; sourceTree = "<group>"; };
07E3DFD01A9E786500764CA8 /* MediaPlaybackTarget.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MediaPlaybackTarget.h; sourceTree = "<group>"; };
07E9E12D18F5E2760011A3A4 /* InbandMetadataTextTrackPrivateAVF.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = InbandMetadataTextTrackPrivateAVF.h; sourceTree = "<group>"; };
@@ -7744,7 +7742,6 @@
3FBC4AF2189881560046EE38 /* VideoFullscreenInterfaceAVKit.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = VideoFullscreenInterfaceAVKit.h; sourceTree = "<group>"; };
41024FC823CF254F00FDF98E /* SampleBufferDisplayLayer.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = SampleBufferDisplayLayer.cpp; sourceTree = "<group>"; };
4107908A1FC3E4F20061B27A /* ClientOrigin.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ClientOrigin.h; sourceTree = "<group>"; };
- 410938282347799A009428BA /* JSAbortControllerCustom.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSAbortControllerCustom.cpp; sourceTree = "<group>"; };
4109382C2347850E009428BA /* JSAbortSignalCustom.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = JSAbortSignalCustom.cpp; sourceTree = "<group>"; };
410A8EF424F823B9004F9070 /* TextEncoderStream.idl */ = {isa = PBXFileReference; lastKnownFileType = text; path = TextEncoderStream.idl; sourceTree = "<group>"; };
410A8EF624F823BA004F9070 /* TextEncoderStream.js */ = {isa = PBXFileReference; lastKnownFileType = sourcecode._javascript_; path = TextEncoderStream.js; sourceTree = "<group>"; };
@@ -14629,10 +14626,6 @@
BE23480B18A9870300E4B6E8 /* DataCue.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = DataCue.idl; sourceTree = "<group>"; };
BE61039B18A9D61200DD50D7 /* JSDataCue.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSDataCue.cpp; sourceTree = "<group>"; };
BE61039C18A9D61200DD50D7 /* JSDataCue.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSDataCue.h; sourceTree = "<group>"; };
- BE6DF708171CA2C500DD52B8 /* JSVideoTrackCustom.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSVideoTrackCustom.cpp; sourceTree = "<group>"; };
- BE6DF70A171CA2C500DD52B8 /* JSVideoTrackListCustom.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSVideoTrackListCustom.cpp; sourceTree = "<group>"; };
- BE6DF70E171CA2DA00DD52B8 /* JSAudioTrackCustom.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSAudioTrackCustom.cpp; sourceTree = "<group>"; };
- BE6DF710171CA2DA00DD52B8 /* JSAudioTrackListCustom.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSAudioTrackListCustom.cpp; sourceTree = "<group>"; };
BE855F7F0701E83500239769 /* WebCoreView.h */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 4; lastKnownFileType = sourcecode.c.h; path = WebCoreView.h; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
BE8560510701F91100239769 /* WebCoreView.m */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 4; lastKnownFileType = sourcecode.c.objc; path = WebCoreView.m; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
BE88E0BF1715CE2600658D98 /* TrackListBase.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = TrackListBase.cpp; sourceTree = "<group>"; };
@@ -23166,7 +23159,6 @@
7C3D8EE41E08BABE0023B084 /* GC / Wrapping Only */ = {
isa = PBXGroup;
children = (
- 410938282347799A009428BA /* JSAbortControllerCustom.cpp */,
4109382C2347850E009428BA /* JSAbortSignalCustom.cpp */,
9355EF53253A4D5A006FF4A4 /* JSAbstractRangeCustom.cpp */,
71EFCEDE202B39C700D7C411 /* JSAnimationEffectCustom.cpp */,
@@ -23174,8 +23166,6 @@
BC2ED6BB0C6BD2F000920BFF /* JSAttrCustom.cpp */,
46C3A8D32548D4B700C8C53A /* JSAudioBufferCustom.cpp */,
466536FA264C8DD100AAD1D7 /* JSAudioNodeCustom.cpp */,
- BE6DF70E171CA2DA00DD52B8 /* JSAudioTrackCustom.cpp */,
- BE6DF710171CA2DA00DD52B8 /* JSAudioTrackListCustom.cpp */,
83F37A672536B21B00FF5F3B /* JSAudioWorkletProcessorCustom.cpp */,
576082562011BE0200116678 /* JSAuthenticatorResponseCustom.cpp */,
468B8BDE25CC849300F67822 /* JSBaseAudioContextCustom.cpp */,
@@ -23240,15 +23230,11 @@
B2C96D8C0B3AF2B7005E80EC /* JSSVGPathSegCustom.cpp */,
838869EB1CE81E9E00D16A9E /* JSTextCustom.cpp */,
07E117061489EBEB00EC5ACE /* JSTextTrackCueCustom.cpp */,
- 07E116B01489C9A100EC5ACE /* JSTextTrackCustom.cpp */,
- 07B5A30C14687D7100A81ECE /* JSTextTrackListCustom.cpp */,
070334E8145A1F35008D8D45 /* JSTrackCustom.cpp */,
07846384145B1B8E00A58DF1 /* JSTrackCustom.h */,
516BB7920CE91E6800512F79 /* JSTreeWalkerCustom.cpp */,
4BAFD0E22192604D00C0AB64 /* JSTypedOMCSSStyleValueCustom.cpp */,
F4E1965A21F2395000285078 /* JSUndoItemCustom.cpp */,
- BE6DF708171CA2C500DD52B8 /* JSVideoTrackCustom.cpp */,
- BE6DF70A171CA2C500DD52B8 /* JSVideoTrackListCustom.cpp */,
715DA5D3201BB902002EF2B0 /* JSWebAnimationCustom.cpp */,
D3F3D3591A69A3B00059FC2B /* JSWebGL2RenderingContextCustom.cpp */,
49EED14C1051971A00099FAB /* JSWebGLRenderingContextCustom.cpp */,
Deleted: trunk/Source/WebCore/bindings/js/JSAbortControllerCustom.cpp (279760 => 279761)
--- trunk/Source/WebCore/bindings/js/JSAbortControllerCustom.cpp 2021-07-08 22:59:59 UTC (rev 279760)
+++ trunk/Source/WebCore/bindings/js/JSAbortControllerCustom.cpp 2021-07-08 23:08:21 UTC (rev 279761)
@@ -1,39 +0,0 @@
-/*
-* Copyright (C) 2019-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. ``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
-* 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 "JSAbortController.h"
-
-namespace WebCore {
-
-template<typename Visitor>
-void JSAbortController::visitAdditionalChildren(Visitor& visitor)
-{
- visitor.addOpaqueRoot(&wrapped().signal());
-}
-
-DEFINE_VISIT_ADDITIONAL_CHILDREN(JSAbortController);
-
-} // namespace WebCore
Deleted: trunk/Source/WebCore/bindings/js/JSAudioTrackCustom.cpp (279760 => 279761)
--- trunk/Source/WebCore/bindings/js/JSAudioTrackCustom.cpp 2021-07-08 22:59:59 UTC (rev 279760)
+++ trunk/Source/WebCore/bindings/js/JSAudioTrackCustom.cpp 2021-07-08 23:08:21 UTC (rev 279761)
@@ -1,48 +0,0 @@
-/*
- * Copyright (C) 2011-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. ``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
- * 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"
-
-#if ENABLE(VIDEO)
-
-#include "JSAudioTrack.h"
-
-#include "JSTrackCustom.h"
-
-
-namespace WebCore {
-using namespace JSC;
-
-template<typename Visitor>
-void JSAudioTrack::visitAdditionalChildren(Visitor& visitor)
-{
- visitor.addOpaqueRoot(root(&wrapped()));
-}
-
-DEFINE_VISIT_ADDITIONAL_CHILDREN(JSAudioTrack);
-
-} // namespace WebCore
-
-#endif
Deleted: trunk/Source/WebCore/bindings/js/JSAudioTrackListCustom.cpp (279760 => 279761)
--- trunk/Source/WebCore/bindings/js/JSAudioTrackListCustom.cpp 2021-07-08 22:59:59 UTC (rev 279760)
+++ trunk/Source/WebCore/bindings/js/JSAudioTrackListCustom.cpp 2021-07-08 23:08:21 UTC (rev 279761)
@@ -1,49 +0,0 @@
-/*
- * Copyright (C) 2011-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. ``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
- * 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"
-
-#if ENABLE(VIDEO)
-
-#include "JSAudioTrackList.h"
-
-#include "Element.h"
-#include "JSNodeCustom.h"
-
-
-namespace WebCore {
-using namespace JSC;
-
-template<typename Visitor>
-void JSAudioTrackList::visitAdditionalChildren(Visitor& visitor)
-{
- visitor.addOpaqueRoot(root(wrapped().element()));
-}
-
-DEFINE_VISIT_ADDITIONAL_CHILDREN(JSAudioTrackList);
-
-} // namespace WebCore
-
-#endif
Deleted: trunk/Source/WebCore/bindings/js/JSTextTrackCustom.cpp (279760 => 279761)
--- trunk/Source/WebCore/bindings/js/JSTextTrackCustom.cpp 2021-07-08 22:59:59 UTC (rev 279760)
+++ trunk/Source/WebCore/bindings/js/JSTextTrackCustom.cpp 2021-07-08 23:08:21 UTC (rev 279761)
@@ -1,49 +0,0 @@
-/*
- * Copyright (C) 2011-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. ``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
- * 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"
-
-#if ENABLE(VIDEO)
-
-#include "JSTextTrack.h"
-
-#include "JSTextTrackCueList.h"
-#include "JSTrackCustom.h"
-
-
-namespace WebCore {
-using namespace JSC;
-
-template<typename Visitor>
-void JSTextTrack::visitAdditionalChildren(Visitor& visitor)
-{
- visitor.addOpaqueRoot(root(&wrapped()));
-}
-
-DEFINE_VISIT_ADDITIONAL_CHILDREN(JSTextTrack);
-
-} // namespace WebCore
-
-#endif
Deleted: trunk/Source/WebCore/bindings/js/JSTextTrackListCustom.cpp (279760 => 279761)
--- trunk/Source/WebCore/bindings/js/JSTextTrackListCustom.cpp 2021-07-08 22:59:59 UTC (rev 279760)
+++ trunk/Source/WebCore/bindings/js/JSTextTrackListCustom.cpp 2021-07-08 23:08:21 UTC (rev 279761)
@@ -1,49 +0,0 @@
-/*
- * Copyright (C) 2011-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. ``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
- * 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"
-
-#if ENABLE(VIDEO)
-
-#include "JSTextTrackList.h"
-
-#include "Element.h"
-#include "JSNodeCustom.h"
-
-
-namespace WebCore {
-using namespace JSC;
-
-template<typename Visitor>
-void JSTextTrackList::visitAdditionalChildren(Visitor& visitor)
-{
- visitor.addOpaqueRoot(root(wrapped().element()));
-}
-
-DEFINE_VISIT_ADDITIONAL_CHILDREN(JSTextTrackList);
-
-} // namespace WebCore
-
-#endif
Deleted: trunk/Source/WebCore/bindings/js/JSVideoTrackCustom.cpp (279760 => 279761)
--- trunk/Source/WebCore/bindings/js/JSVideoTrackCustom.cpp 2021-07-08 22:59:59 UTC (rev 279760)
+++ trunk/Source/WebCore/bindings/js/JSVideoTrackCustom.cpp 2021-07-08 23:08:21 UTC (rev 279761)
@@ -1,48 +0,0 @@
-/*
- * Copyright (C) 2011-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. ``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
- * 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"
-
-#if ENABLE(VIDEO)
-
-#include "JSVideoTrack.h"
-
-#include "JSTrackCustom.h"
-
-
-namespace WebCore {
-using namespace JSC;
-
-template<typename Visitor>
-void JSVideoTrack::visitAdditionalChildren(Visitor& visitor)
-{
- visitor.addOpaqueRoot(root(&wrapped()));
-}
-
-DEFINE_VISIT_ADDITIONAL_CHILDREN(JSVideoTrack);
-
-} // namespace WebCore
-
-#endif
Deleted: trunk/Source/WebCore/bindings/js/JSVideoTrackListCustom.cpp (279760 => 279761)
--- trunk/Source/WebCore/bindings/js/JSVideoTrackListCustom.cpp 2021-07-08 22:59:59 UTC (rev 279760)
+++ trunk/Source/WebCore/bindings/js/JSVideoTrackListCustom.cpp 2021-07-08 23:08:21 UTC (rev 279761)
@@ -1,48 +0,0 @@
-/*
- * Copyright (C) 2011-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. ``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
- * 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"
-
-#if ENABLE(VIDEO)
-
-#include "Element.h"
-#include "JSVideoTrackList.h"
-#include "JSNodeCustom.h"
-
-
-namespace WebCore {
-using namespace JSC;
-
-template<typename Visitor>
-void JSVideoTrackList::visitAdditionalChildren(Visitor& visitor)
-{
- visitor.addOpaqueRoot(root(wrapped().element()));
-}
-
-DEFINE_VISIT_ADDITIONAL_CHILDREN(JSVideoTrackList);
-
-} // namespace WebCore
-
-#endif
Modified: trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm (279760 => 279761)
--- trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm 2021-07-08 22:59:59 UTC (rev 279760)
+++ trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm 2021-07-08 23:08:21 UTC (rev 279761)
@@ -4889,8 +4889,10 @@
push(@implContent, "#endif\n");
}
if ($interface->extendedAttributes->{GenerateAddOpaqueRoot}) {
+ AddToImplIncludes("<wtf/GetPtr.h>");
my $functionName = $interface->extendedAttributes->{GenerateAddOpaqueRoot};
- push(@implContent, " visitor.addOpaqueRoot(thisObject->wrapped().${functionName}());\n");
+ $functionName = "opaqueRoot" if $functionName eq "VALUE_IS_MISSING";
+ push(@implContent, " visitor.addOpaqueRoot(WTF::getPtr(thisObject->wrapped().${functionName}()));\n");
}
if ($interface->extendedAttributes->{ReportExtraMemoryCost}) {
push(@implContent, " visitor.reportExtraMemoryVisited(thisObject->wrapped().memoryCost());\n");
Modified: trunk/Source/WebCore/bindings/scripts/test/JS/JSTestGenerateAddOpaqueRoot.cpp (279760 => 279761)
--- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestGenerateAddOpaqueRoot.cpp 2021-07-08 22:59:59 UTC (rev 279760)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSTestGenerateAddOpaqueRoot.cpp 2021-07-08 23:08:21 UTC (rev 279761)
@@ -206,7 +206,7 @@
auto* thisObject = jsCast<JSTestGenerateAddOpaqueRoot*>(cell);
ASSERT_GC_OBJECT_INHERITS(thisObject, info());
Base::visitChildren(thisObject, visitor);
- visitor.addOpaqueRoot(thisObject->wrapped().ownerObjectConcurrently());
+ visitor.addOpaqueRoot(WTF::getPtr(thisObject->wrapped().ownerObjectConcurrently()));
}
DEFINE_VISIT_CHILDREN(JSTestGenerateAddOpaqueRoot);
Modified: trunk/Source/WebCore/dom/AbortController.idl (279760 => 279761)
--- trunk/Source/WebCore/dom/AbortController.idl 2021-07-08 22:59:59 UTC (rev 279760)
+++ trunk/Source/WebCore/dom/AbortController.idl 2021-07-08 23:08:21 UTC (rev 279761)
@@ -26,7 +26,7 @@
[
Exposed=(Window,Worker),
ImplementationLacksVTable,
- JSCustomMarkFunction
+ GenerateAddOpaqueRoot=signal
] interface AbortController {
[CallWith=ScriptExecutionContext] constructor();
Modified: trunk/Source/WebCore/html/track/AudioTrack.idl (279760 => 279761)
--- trunk/Source/WebCore/html/track/AudioTrack.idl 2021-07-08 22:59:59 UTC (rev 279760)
+++ trunk/Source/WebCore/html/track/AudioTrack.idl 2021-07-08 23:08:21 UTC (rev 279761)
@@ -27,7 +27,7 @@
Conditional=VIDEO,
ExportMacro=WEBCORE_EXPORT,
GenerateIsReachable=ImplElementRoot,
- JSCustomMarkFunction,
+ GenerateAddOpaqueRoot,
Exposed=Window
] interface AudioTrack {
readonly attribute DOMString id;
Modified: trunk/Source/WebCore/html/track/AudioTrackList.idl (279760 => 279761)
--- trunk/Source/WebCore/html/track/AudioTrackList.idl 2021-07-08 22:59:59 UTC (rev 279760)
+++ trunk/Source/WebCore/html/track/AudioTrackList.idl 2021-07-08 23:08:21 UTC (rev 279761)
@@ -27,7 +27,7 @@
ActiveDOMObject,
Conditional=VIDEO,
GenerateIsReachable=ImplElementRoot,
- JSCustomMarkFunction,
+ GenerateAddOpaqueRoot,
Exposed=Window
] interface AudioTrackList : EventTarget {
readonly attribute unsigned long length;
Modified: trunk/Source/WebCore/html/track/TextTrack.idl (279760 => 279761)
--- trunk/Source/WebCore/html/track/TextTrack.idl 2021-07-08 22:59:59 UTC (rev 279760)
+++ trunk/Source/WebCore/html/track/TextTrack.idl 2021-07-08 23:08:21 UTC (rev 279761)
@@ -31,7 +31,7 @@
Conditional=VIDEO,
ExportToWrappedFunction,
GenerateIsReachable=ImplElementRoot,
- JSCustomMarkFunction,
+ GenerateAddOpaqueRoot,
SkipVTableValidation,
Exposed=Window
] interface TextTrack : EventTarget {
Modified: trunk/Source/WebCore/html/track/TextTrackList.idl (279760 => 279761)
--- trunk/Source/WebCore/html/track/TextTrackList.idl 2021-07-08 22:59:59 UTC (rev 279760)
+++ trunk/Source/WebCore/html/track/TextTrackList.idl 2021-07-08 23:08:21 UTC (rev 279761)
@@ -27,7 +27,7 @@
ActiveDOMObject,
Conditional=VIDEO,
GenerateIsReachable=ImplElementRoot,
- JSCustomMarkFunction,
+ GenerateAddOpaqueRoot,
Exposed=Window
] interface TextTrackList : EventTarget {
readonly attribute unsigned long length;
Modified: trunk/Source/WebCore/html/track/TrackBase.cpp (279760 => 279761)
--- trunk/Source/WebCore/html/track/TrackBase.cpp 2021-07-08 22:59:59 UTC (rev 279760)
+++ trunk/Source/WebCore/html/track/TrackBase.cpp 2021-07-08 23:08:21 UTC (rev 279761)
@@ -75,6 +75,13 @@
return m_mediaElement.get();
}
+void* TrackBase::opaqueRoot()
+{
+ if (auto* associatedElement = element())
+ return associatedElement->opaqueRoot();
+ return this;
+}
+
void TrackBase::setMediaElement(WeakPtr<HTMLMediaElement> element)
{
m_mediaElement = element;
Modified: trunk/Source/WebCore/html/track/TrackBase.h (279760 => 279761)
--- trunk/Source/WebCore/html/track/TrackBase.h 2021-07-08 22:59:59 UTC (rev 279760)
+++ trunk/Source/WebCore/html/track/TrackBase.h 2021-07-08 23:08:21 UTC (rev 279761)
@@ -49,9 +49,10 @@
enum Type { BaseTrack, TextTrack, AudioTrack, VideoTrack };
Type type() const { return m_type; }
+ virtual Element* element();
+ void* opaqueRoot();
virtual void setMediaElement(WeakPtr<HTMLMediaElement>);
WeakPtr<HTMLMediaElement> mediaElement() { return m_mediaElement; }
- virtual Element* element();
virtual AtomString id() const { return m_id; }
virtual void setId(const AtomString& id) { m_id = id; }
Modified: trunk/Source/WebCore/html/track/TrackListBase.cpp (279760 => 279761)
--- trunk/Source/WebCore/html/track/TrackListBase.cpp 2021-07-08 22:59:59 UTC (rev 279760)
+++ trunk/Source/WebCore/html/track/TrackListBase.cpp 2021-07-08 23:08:21 UTC (rev 279761)
@@ -65,6 +65,13 @@
return m_element.get();
}
+void* TrackListBase::opaqueRoot() const
+{
+ if (auto* associatedElement = element())
+ return associatedElement->opaqueRoot();
+ return nullptr;
+}
+
unsigned TrackListBase::length() const
{
return m_inbandTracks.size();
Modified: trunk/Source/WebCore/html/track/TrackListBase.h (279760 => 279761)
--- trunk/Source/WebCore/html/track/TrackListBase.h 2021-07-08 22:59:59 UTC (rev 279760)
+++ trunk/Source/WebCore/html/track/TrackListBase.h 2021-07-08 23:08:21 UTC (rev 279761)
@@ -56,6 +56,7 @@
virtual void clearElement();
Element* element() const;
+ void* opaqueRoot() const;
WeakPtr<HTMLMediaElement> mediaElement() const { return m_element; }
// Needs to be public so tracks can call it
Modified: trunk/Source/WebCore/html/track/VideoTrack.idl (279760 => 279761)
--- trunk/Source/WebCore/html/track/VideoTrack.idl 2021-07-08 22:59:59 UTC (rev 279760)
+++ trunk/Source/WebCore/html/track/VideoTrack.idl 2021-07-08 23:08:21 UTC (rev 279761)
@@ -26,7 +26,7 @@
[
Conditional=VIDEO,
GenerateIsReachable=ImplElementRoot,
- JSCustomMarkFunction,
+ GenerateAddOpaqueRoot,
Exposed=Window
] interface VideoTrack {
readonly attribute DOMString id;
Modified: trunk/Source/WebCore/html/track/VideoTrackList.idl (279760 => 279761)
--- trunk/Source/WebCore/html/track/VideoTrackList.idl 2021-07-08 22:59:59 UTC (rev 279760)
+++ trunk/Source/WebCore/html/track/VideoTrackList.idl 2021-07-08 23:08:21 UTC (rev 279761)
@@ -27,7 +27,7 @@
ActiveDOMObject,
Conditional=VIDEO,
GenerateIsReachable=ImplElementRoot,
- JSCustomMarkFunction,
+ GenerateAddOpaqueRoot,
Exposed=Window
] interface VideoTrackList : EventTarget {
readonly attribute unsigned long length;