Changeset 256536 in webkit
- Timestamp:
- Feb 13, 2020 1:40:08 PM (4 years ago)
- Location:
- trunk/Source
- Files:
-
- 19 edited
- 3 moved
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r256531 r256536 1 2020-02-13 Eric Carlson <eric.carlson@apple.com> 2 3 Rename SerializedPlatformRepresentation to SerializedPlatformDataCue 4 https://bugs.webkit.org/show_bug.cgi?id=207695 5 <rdar://problem/59422673> 6 7 Reviewed by Youenn Fablet. 8 9 No new tests, no functional change. 10 11 * SourcesCocoa.txt: 12 * WebCore.xcodeproj/project.pbxproj: 13 * html/track/DataCue.cpp: 14 (WebCore::DataCue::DataCue): 15 (WebCore::DataCue::cueContentsMatch const): 16 * html/track/DataCue.h: 17 * html/track/InbandDataTextTrack.cpp: 18 (WebCore::InbandDataTextTrack::addDataCue): 19 (WebCore::InbandDataTextTrack::updateDataCue): 20 (WebCore::InbandDataTextTrack::removeDataCue): 21 (WebCore::InbandDataTextTrack::removeCue): 22 * html/track/InbandDataTextTrack.h: 23 * html/track/InbandTextTrack.h: 24 * platform/SerializedPlatformDataCue.h: Renamed from Source/WebCore/platform/SerializedPlatformRepresentation.h. 25 * platform/graphics/InbandTextTrackPrivateClient.h: 26 * platform/graphics/avfoundation/InbandMetadataTextTrackPrivateAVF.cpp: 27 (WebCore::InbandMetadataTextTrackPrivateAVF::addDataCue): 28 * platform/graphics/avfoundation/InbandMetadataTextTrackPrivateAVF.h: 29 * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm: 30 (WebCore::MediaPlayerPrivateAVFoundationObjC::metadataDidArrive): 31 * platform/mac/SerializedPlatformDataCueMac.h: Renamed from Source/WebCore/platform/mac/SerializedPlatformRepresentationMac.h. 32 (WebCore::SerializedPlatformDataCueMac::nativeValue const): 33 * platform/mac/SerializedPlatformDataCueMac.mm: Renamed from Source/WebCore/platform/mac/SerializedPlatformRepresentationMac.mm. 34 (WebCore::SerializedPlatformDataCueMac::SerializedPlatformDataCueMac): 35 (WebCore::SerializedPlatformDataCueMac::~SerializedPlatformDataCueMac): 36 (WebCore::SerializedPlatformDataCueMac::create): 37 (WebCore::SerializedPlatformDataCueMac::data const): 38 (WebCore::SerializedPlatformDataCueMac::deserialize const): 39 (WebCore::SerializedPlatformDataCueMac::isEqual const): 40 (WebCore::toSerializedPlatformDataCueMac): 41 (WebCore::jsValueWithValueInContext): 42 (WebCore::jsValueWithDataInContext): 43 (WebCore::jsValueWithArrayInContext): 44 (WebCore::jsValueWithDictionaryInContext): 45 (WebCore::jsValueWithAVMetadataItemInContext): 46 1 47 2020-02-13 Per Arne Vollan <pvollan@apple.com> 2 48 -
trunk/Source/WebCore/Headers.cmake
r256512 r256536 995 995 platform/ScrollbarThemeComposite.h 996 996 platform/SearchPopupMenu.h 997 platform/SerializedPlatform Representation.h997 platform/SerializedPlatformDataCue.h 998 998 platform/SharedBuffer.h 999 999 platform/SharedStringHash.h -
trunk/Source/WebCore/PlatformMac.cmake
r256007 r256536 382 382 platform/mac/ScrollViewMac.mm 383 383 platform/mac/ScrollbarThemeMac.mm 384 platform/mac/SerializedPlatform RepresentationMac.mm384 platform/mac/SerializedPlatformDataCueMac.mm 385 385 platform/mac/StringUtilities.mm 386 386 platform/mac/SuddenTermination.mm -
trunk/Source/WebCore/SourcesCocoa.txt
r256424 r256536 464 464 platform/mac/ScrollViewMac.mm 465 465 platform/mac/ScrollbarThemeMac.mm @no-unify 466 platform/mac/SerializedPlatform RepresentationMac.mm466 platform/mac/SerializedPlatformDataCueMac.mm 467 467 platform/mac/StringUtilities.mm 468 468 platform/mac/SuddenTermination.mm -
trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj
r256512 r256536 138 138 076F0D0E12B8192700C26AA4 /* MediaPlayerPrivateAVFoundation.h in Headers */ = {isa = PBXBuildFile; fileRef = 076F0D0A12B8192700C26AA4 /* MediaPlayerPrivateAVFoundation.h */; }; 139 139 077664FD183E6B5C00133B92 /* JSQuickTimePluginReplacement.h in Headers */ = {isa = PBXBuildFile; fileRef = 077664FB183E6B5C00133B92 /* JSQuickTimePluginReplacement.h */; }; 140 077AF14018F4AE400001ED61 /* SerializedPlatform Representation.h in Headers */ = {isa = PBXBuildFile; fileRef = 077AF13E18F4AE400001ED61 /* SerializedPlatformRepresentation.h */; settings = {ATTRIBUTES = (Private, ); }; };141 077AF14318F4B1BB0001ED61 /* SerializedPlatform RepresentationMac.h in Headers */ = {isa = PBXBuildFile; fileRef = 077AF14118F4B1BB0001ED61 /* SerializedPlatformRepresentationMac.h */; };140 077AF14018F4AE400001ED61 /* SerializedPlatformDataCue.h in Headers */ = {isa = PBXBuildFile; fileRef = 077AF13E18F4AE400001ED61 /* SerializedPlatformDataCue.h */; settings = {ATTRIBUTES = (Private, ); }; }; 141 077AF14318F4B1BB0001ED61 /* SerializedPlatformDataCueMac.h in Headers */ = {isa = PBXBuildFile; fileRef = 077AF14118F4B1BB0001ED61 /* SerializedPlatformDataCueMac.h */; }; 142 142 077B64131B94F12E003E9AD5 /* MediaPlaybackTargetPickerMock.h in Headers */ = {isa = PBXBuildFile; fileRef = 077B64111B94F12E003E9AD5 /* MediaPlaybackTargetPickerMock.h */; settings = {ATTRIBUTES = (Private, ); }; }; 143 143 077B64171B95F703003E9AD5 /* MediaPlaybackTargetMock.h in Headers */ = {isa = PBXBuildFile; fileRef = 077B64151B95F703003E9AD5 /* MediaPlaybackTargetMock.h */; settings = {ATTRIBUTES = (Private, ); }; }; … … 5476 5476 077664FA183E6B5C00133B92 /* JSQuickTimePluginReplacement.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSQuickTimePluginReplacement.cpp; sourceTree = "<group>"; }; 5477 5477 077664FB183E6B5C00133B92 /* JSQuickTimePluginReplacement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSQuickTimePluginReplacement.h; sourceTree = "<group>"; }; 5478 077AF13E18F4AE400001ED61 /* SerializedPlatform Representation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SerializedPlatformRepresentation.h; sourceTree = "<group>"; };5479 077AF14118F4B1BB0001ED61 /* SerializedPlatform RepresentationMac.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SerializedPlatformRepresentationMac.h; sourceTree = "<group>"; };5480 077AF14218F4B1BB0001ED61 /* SerializedPlatform RepresentationMac.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = SerializedPlatformRepresentationMac.mm; sourceTree = "<group>"; };5478 077AF13E18F4AE400001ED61 /* SerializedPlatformDataCue.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SerializedPlatformDataCue.h; sourceTree = "<group>"; }; 5479 077AF14118F4B1BB0001ED61 /* SerializedPlatformDataCueMac.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SerializedPlatformDataCueMac.h; sourceTree = "<group>"; }; 5480 077AF14218F4B1BB0001ED61 /* SerializedPlatformDataCueMac.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = SerializedPlatformDataCueMac.mm; sourceTree = "<group>"; }; 5481 5481 077B64101B94F12E003E9AD5 /* MediaPlaybackTargetPickerMock.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = MediaPlaybackTargetPickerMock.cpp; sourceTree = "<group>"; }; 5482 5482 077B64111B94F12E003E9AD5 /* MediaPlaybackTargetPickerMock.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MediaPlaybackTargetPickerMock.h; sourceTree = "<group>"; }; … … 20465 20465 BCEF869E0E844E9D00A85CD5 /* ScrollbarThemeMac.mm */, 20466 20466 9353676A09AED88B00D35CD6 /* ScrollViewMac.mm */, 20467 077AF14118F4B1BB0001ED61 /* SerializedPlatform RepresentationMac.h */,20468 077AF14218F4B1BB0001ED61 /* SerializedPlatform RepresentationMac.mm */,20467 077AF14118F4B1BB0001ED61 /* SerializedPlatformDataCueMac.h */, 20468 077AF14218F4B1BB0001ED61 /* SerializedPlatformDataCueMac.mm */, 20469 20469 84B2B24F056BF15F00D2B771 /* SSLKeyGeneratorMac.mm */, 20470 20470 ECA680C61E67724500731D20 /* StringUtilities.h */, … … 25961 25961 BC6D6E2509AF943500F59759 /* ScrollView.h */, 25962 25962 AB7170880B3118080017123E /* SearchPopupMenu.h */, 25963 077AF13E18F4AE400001ED61 /* SerializedPlatform Representation.h */,25963 077AF13E18F4AE400001ED61 /* SerializedPlatformDataCue.h */, 25964 25964 1A4A954B0B4EDCCB002D8C3C /* SharedBuffer.cpp */, 25965 25965 1A4A954C0B4EDCCB002D8C3C /* SharedBuffer.h */, … … 32216 32216 F4D43D662188038B00ECECAC /* SerializedAttachmentData.h in Headers */, 32217 32217 E18DF33518AAF12C00773E59 /* SerializedCryptoKeyWrap.h in Headers */, 32218 077AF14018F4AE400001ED61 /* SerializedPlatform Representation.h in Headers */,32219 077AF14318F4B1BB0001ED61 /* SerializedPlatform RepresentationMac.h in Headers */,32218 077AF14018F4AE400001ED61 /* SerializedPlatformDataCue.h in Headers */, 32219 077AF14318F4B1BB0001ED61 /* SerializedPlatformDataCueMac.h in Headers */, 32220 32220 A75E497610752ACB00C9B896 /* SerializedScriptValue.h in Headers */, 32221 32221 516F7F6D1C31E39A00F111DC /* ServerOpenDBRequest.h in Headers */, -
trunk/Source/WebCore/html/track/DataCue.cpp
r251425 r256536 55 55 } 56 56 57 DataCue::DataCue(ScriptExecutionContext& context, const MediaTime& start, const MediaTime& end, RefPtr<SerializedPlatform Representation>&& platformValue, const String& type)57 DataCue::DataCue(ScriptExecutionContext& context, const MediaTime& start, const MediaTime& end, RefPtr<SerializedPlatformDataCue>&& platformValue, const String& type) 58 58 : TextTrackCue(context, start, end) 59 59 , m_type(type) … … 117 117 return false; 118 118 119 const SerializedPlatformRepresentation*otherPlatformValue = dataCue->platformValue();119 auto otherPlatformValue = dataCue->platformValue(); 120 120 if ((otherPlatformValue && !m_platformValue) || (!otherPlatformValue && m_platformValue)) 121 121 return false; -
trunk/Source/WebCore/html/track/DataCue.h
r251425 r256536 29 29 #if ENABLE(VIDEO_TRACK) 30 30 31 #include "SerializedPlatform Representation.h"31 #include "SerializedPlatformDataCue.h" 32 32 #include "TextTrackCue.h" 33 33 #include <JavaScriptCore/ArrayBuffer.h> … … 58 58 } 59 59 60 static Ref<DataCue> create(ScriptExecutionContext& context, const MediaTime& start, const MediaTime& end, RefPtr<SerializedPlatform Representation>&& platformValue, const String& type)60 static Ref<DataCue> create(ScriptExecutionContext& context, const MediaTime& start, const MediaTime& end, RefPtr<SerializedPlatformDataCue>&& platformValue, const String& type) 61 61 { 62 62 return adoptRef(*new DataCue(context, start, end, WTFMove(platformValue), type)); … … 78 78 void setData(JSC::ArrayBuffer&); 79 79 80 const SerializedPlatform Representation* platformValue() const { return m_platformValue.get(); }80 const SerializedPlatformDataCue* platformValue() const { return m_platformValue.get(); } 81 81 82 82 JSC::JSValue value(JSC::JSGlobalObject&) const; … … 95 95 DataCue(ScriptExecutionContext&, const MediaTime& start, const MediaTime& end, ArrayBuffer&, const String&); 96 96 DataCue(ScriptExecutionContext&, const MediaTime& start, const MediaTime& end, const void*, unsigned); 97 DataCue(ScriptExecutionContext&, const MediaTime& start, const MediaTime& end, RefPtr<SerializedPlatform Representation>&&, const String&);97 DataCue(ScriptExecutionContext&, const MediaTime& start, const MediaTime& end, RefPtr<SerializedPlatformDataCue>&&, const String&); 98 98 DataCue(ScriptExecutionContext&, const MediaTime& start, const MediaTime& end, JSC::JSValue, const String&); 99 99 … … 102 102 RefPtr<ArrayBuffer> m_data; 103 103 String m_type; 104 RefPtr<SerializedPlatform Representation> m_platformValue;104 RefPtr<SerializedPlatformDataCue> m_platformValue; 105 105 // FIXME: The following use of JSC::Strong is incorrect and can lead to storage leaks 106 106 // due to reference cycles; we should use JSValueInWrappedObject instead. -
trunk/Source/WebCore/html/track/InbandDataTextTrack.cpp
r243887 r256536 58 58 #if ENABLE(DATACUE_VALUE) 59 59 60 void InbandDataTextTrack::addDataCue(const MediaTime& start, const MediaTime& end, Ref<SerializedPlatform Representation>&& platformValue, const String& type)60 void InbandDataTextTrack::addDataCue(const MediaTime& start, const MediaTime& end, Ref<SerializedPlatformDataCue>&& platformValue, const String& type) 61 61 { 62 62 if (m_incompleteCueMap.contains(platformValue.ptr())) … … 79 79 } 80 80 81 void InbandDataTextTrack::updateDataCue(const MediaTime& start, const MediaTime& inEnd, SerializedPlatform Representation& platformValue)81 void InbandDataTextTrack::updateDataCue(const MediaTime& start, const MediaTime& inEnd, SerializedPlatformDataCue& platformValue) 82 82 { 83 83 RefPtr<DataCue> cue = m_incompleteCueMap.get(&platformValue); … … 101 101 } 102 102 103 void InbandDataTextTrack::removeDataCue(const MediaTime&, const MediaTime&, SerializedPlatform Representation& platformValue)103 void InbandDataTextTrack::removeDataCue(const MediaTime&, const MediaTime&, SerializedPlatformDataCue& platformValue) 104 104 { 105 105 if (auto cue = m_incompleteCueMap.take(&platformValue)) { … … 113 113 ASSERT(cue.cueType() == TextTrackCue::Data); 114 114 115 m_incompleteCueMap.remove(const_cast<SerializedPlatform Representation*>(toDataCue(&cue)->platformValue()));115 m_incompleteCueMap.remove(const_cast<SerializedPlatformDataCue*>(toDataCue(&cue)->platformValue())); 116 116 117 117 return InbandTextTrack::removeCue(cue); -
trunk/Source/WebCore/html/track/InbandDataTextTrack.h
r243887 r256536 51 51 52 52 #if ENABLE(DATACUE_VALUE) 53 void addDataCue(const MediaTime& start, const MediaTime& end, Ref<SerializedPlatform Representation>&&, const String&) final;54 void updateDataCue(const MediaTime& start, const MediaTime& end, SerializedPlatform Representation&) final;55 void removeDataCue(const MediaTime& start, const MediaTime& end, SerializedPlatform Representation&) final;53 void addDataCue(const MediaTime& start, const MediaTime& end, Ref<SerializedPlatformDataCue>&&, const String&) final; 54 void updateDataCue(const MediaTime& start, const MediaTime& end, SerializedPlatformDataCue&) final; 55 void removeDataCue(const MediaTime& start, const MediaTime& end, SerializedPlatformDataCue&) final; 56 56 ExceptionOr<void> removeCue(TextTrackCue&) final; 57 57 58 HashMap<RefPtr<SerializedPlatform Representation>, RefPtr<DataCue>> m_incompleteCueMap;58 HashMap<RefPtr<SerializedPlatformDataCue>, RefPtr<DataCue>> m_incompleteCueMap; 59 59 #endif 60 60 }; -
trunk/Source/WebCore/html/track/InbandTextTrack.h
r256353 r256536 73 73 74 74 #if ENABLE(DATACUE_VALUE) 75 void addDataCue(const MediaTime&, const MediaTime&, Ref<SerializedPlatform Representation>&&, const String&) override { ASSERT_NOT_REACHED(); }76 void updateDataCue(const MediaTime&, const MediaTime&, SerializedPlatform Representation&) override { ASSERT_NOT_REACHED(); }77 void removeDataCue(const MediaTime&, const MediaTime&, SerializedPlatform Representation&) override { ASSERT_NOT_REACHED(); }75 void addDataCue(const MediaTime&, const MediaTime&, Ref<SerializedPlatformDataCue>&&, const String&) override { ASSERT_NOT_REACHED(); } 76 void updateDataCue(const MediaTime&, const MediaTime&, SerializedPlatformDataCue&) override { ASSERT_NOT_REACHED(); } 77 void removeDataCue(const MediaTime&, const MediaTime&, SerializedPlatformDataCue&) override { ASSERT_NOT_REACHED(); } 78 78 #endif 79 79 -
trunk/Source/WebCore/platform/SerializedPlatformDataCue.h
r256535 r256536 1 1 /* 2 * Copyright (C) 2014 Apple Inc. All rights reserved.2 * Copyright (C) 2014-2020 Apple Inc. All rights reserved. 3 3 * 4 4 * Redistribution and use in source and binary forms, with or without … … 33 33 namespace WebCore { 34 34 35 class SerializedPlatform Representation : public RefCounted<SerializedPlatformRepresentation> {35 class SerializedPlatformDataCue : public RefCounted<SerializedPlatformDataCue> { 36 36 public: 37 virtual ~SerializedPlatform Representation() = default;37 virtual ~SerializedPlatformDataCue() = default; 38 38 39 39 virtual JSC::JSValue deserialize(JSC::JSGlobalObject*) const = 0; 40 40 virtual RefPtr<JSC::ArrayBuffer> data() const = 0; 41 virtual bool isEqual(const SerializedPlatform Representation&) const = 0;41 virtual bool isEqual(const SerializedPlatformDataCue&) const = 0; 42 42 43 43 enum PlatformType { … … 47 47 48 48 protected: 49 SerializedPlatform Representation() = default;49 SerializedPlatformDataCue() = default; 50 50 }; 51 51 -
trunk/Source/WebCore/platform/graphics/InbandTextTrackPrivateClient.h
r256353 r256536 34 34 35 35 #if ENABLE(DATACUE_VALUE) 36 #include "SerializedPlatform Representation.h"36 #include "SerializedPlatformDataCue.h" 37 37 #endif 38 38 … … 230 230 231 231 #if ENABLE(DATACUE_VALUE) 232 virtual void addDataCue(const MediaTime& start, const MediaTime& end, Ref<SerializedPlatform Representation>&&, const String&) = 0;233 virtual void updateDataCue(const MediaTime& start, const MediaTime& end, SerializedPlatform Representation&) = 0;234 virtual void removeDataCue(const MediaTime& start, const MediaTime& end, SerializedPlatform Representation&) = 0;232 virtual void addDataCue(const MediaTime& start, const MediaTime& end, Ref<SerializedPlatformDataCue>&&, const String&) = 0; 233 virtual void updateDataCue(const MediaTime& start, const MediaTime& end, SerializedPlatformDataCue&) = 0; 234 virtual void removeDataCue(const MediaTime& start, const MediaTime& end, SerializedPlatformDataCue&) = 0; 235 235 #endif 236 236 -
trunk/Source/WebCore/platform/graphics/avfoundation/InbandMetadataTextTrackPrivateAVF.cpp
r256353 r256536 55 55 #if ENABLE(DATACUE_VALUE) 56 56 57 void InbandMetadataTextTrackPrivateAVF::addDataCue(const MediaTime& start, const MediaTime& end, Ref<SerializedPlatform Representation>&& cueData, const String& type)57 void InbandMetadataTextTrackPrivateAVF::addDataCue(const MediaTime& start, const MediaTime& end, Ref<SerializedPlatformDataCue>&& cueData, const String& type) 58 58 { 59 59 ASSERT(cueFormat() == CueFormat::Data); -
trunk/Source/WebCore/platform/graphics/avfoundation/InbandMetadataTextTrackPrivateAVF.h
r246490 r256536 35 35 #if ENABLE(DATACUE_VALUE) 36 36 struct IncompleteMetaDataCue { 37 RefPtr<SerializedPlatform Representation> cueData;37 RefPtr<SerializedPlatformDataCue> cueData; 38 38 MediaTime startTime; 39 39 }; … … 52 52 53 53 #if ENABLE(DATACUE_VALUE) 54 void addDataCue(const MediaTime& start, const MediaTime& end, Ref<SerializedPlatform Representation>&&, const String&);54 void addDataCue(const MediaTime& start, const MediaTime& end, Ref<SerializedPlatformDataCue>&&, const String&); 55 55 void updatePendingCueEndTimes(const MediaTime&); 56 56 #endif -
trunk/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm
r256424 r256536 56 56 #import "PlatformTimeRanges.h" 57 57 #import "SecurityOrigin.h" 58 #import "SerializedPlatform RepresentationMac.h"58 #import "SerializedPlatformDataCueMac.h" 59 59 #import "SharedBuffer.h" 60 60 #import "TextEncoding.h" … … 3074 3074 type = metadataType(item.keySpace); 3075 3075 3076 m_metadataTrack->addDataCue(start, end, SerializedPlatform RepresentationMac::create(item), type);3076 m_metadataTrack->addDataCue(start, end, SerializedPlatformDataCueMac::create(item), type); 3077 3077 } 3078 3078 #endif -
trunk/Source/WebCore/platform/mac/SerializedPlatformDataCueMac.h
r256535 r256536 1 1 /* 2 * Copyright (C) 2014 Apple Inc. All rights reserved.2 * Copyright (C) 2014-2020 Apple Inc. All rights reserved. 3 3 * 4 4 * Redistribution and use in source and binary forms, with or without … … 24 24 */ 25 25 26 #ifndef SerializedPlatformRepresentationMac_h 27 #define SerializedPlatformRepresentationMac_h 26 #pragma once 28 27 29 28 #if ENABLE(VIDEO_TRACK) && ENABLE(DATACUE_VALUE) 30 29 31 #include "SerializedPlatform Representation.h"30 #include "SerializedPlatformDataCue.h" 32 31 33 32 #if USE(FOUNDATION) && !defined(__OBJC__) … … 37 36 namespace WebCore { 38 37 39 class SerializedPlatform RepresentationMac : public SerializedPlatformRepresentation{38 class SerializedPlatformDataCueMac final : public SerializedPlatformDataCue { 40 39 public: 41 virtual ~SerializedPlatform RepresentationMac();42 static Ref<SerializedPlatform Representation> create(id);40 virtual ~SerializedPlatformDataCueMac(); 41 static Ref<SerializedPlatformDataCue> create(id); 43 42 44 JSC::JSValue deserialize(JSC::JSGlobalObject*) const override;45 RefPtr<ArrayBuffer> data() const override;43 JSC::JSValue deserialize(JSC::JSGlobalObject*) const final; 44 RefPtr<ArrayBuffer> data() const final; 46 45 47 bool isEqual(const SerializedPlatform Representation&) const override;46 bool isEqual(const SerializedPlatformDataCue&) const final; 48 47 49 PlatformType platformType() const override { return SerializedPlatformRepresentation::ObjC; }48 PlatformType platformType() const final { return SerializedPlatformDataCue::ObjC; } 50 49 51 50 id nativeValue() const { return m_nativeValue.get(); } 52 51 53 52 private: 54 SerializedPlatformRepresentationMac(id nativeValue);53 explicit SerializedPlatformDataCueMac(id nativeValue); 55 54 56 55 RetainPtr<id> m_nativeValue; 57 56 }; 58 57 59 SerializedPlatform RepresentationMac* toSerializedPlatformRepresentationMac(SerializedPlatformRepresentation*);60 const SerializedPlatform RepresentationMac* toSerializedPlatformRepresentationMac(const SerializedPlatformRepresentation*);58 SerializedPlatformDataCueMac* toSerializedPlatformDataCueMac(SerializedPlatformDataCue*); 59 const SerializedPlatformDataCueMac* toSerializedPlatformDataCueMac(const SerializedPlatformDataCue*); 61 60 62 61 } // namespace WebCore 63 62 64 63 #endif 65 #endif // SerializedPlatformRepresentationMac_h -
trunk/Source/WebCore/platform/mac/SerializedPlatformDataCueMac.mm
r256535 r256536 1 1 /* 2 * Copyright (C) 2014 , 2015Apple Inc. All rights reserved.2 * Copyright (C) 2014-2020 Apple Inc. All rights reserved. 3 3 * 4 4 * Redistribution and use in source and binary forms, with or without … … 25 25 26 26 #include "config.h" 27 #include "SerializedPlatformDataCueMac.h" 27 28 28 29 #if ENABLE(VIDEO_TRACK) && ENABLE(DATACUE_VALUE) 29 #include "SerializedPlatformRepresentationMac.h"30 30 31 31 #import "JSDOMConvertBufferSource.h" … … 39 39 #import <JavaScriptCore/JavaScriptCore.h> 40 40 #import <objc/runtime.h> 41 #import <wtf/text/Base64.h>42 43 41 #import <pal/cocoa/AVFoundationSoftLink.h> 44 42 … … 53 51 #endif 54 52 55 SerializedPlatform RepresentationMac::SerializedPlatformRepresentationMac(id nativeValue)56 : SerializedPlatform Representation()53 SerializedPlatformDataCueMac::SerializedPlatformDataCueMac(id nativeValue) 54 : SerializedPlatformDataCue() 57 55 , m_nativeValue(nativeValue) 58 56 { 59 57 } 60 58 61 SerializedPlatform RepresentationMac::~SerializedPlatformRepresentationMac()62 { 63 } 64 65 Ref<SerializedPlatform Representation> SerializedPlatformRepresentationMac::create(id nativeValue)66 { 67 return adoptRef(*new SerializedPlatform RepresentationMac(nativeValue));68 } 69 70 RefPtr<ArrayBuffer> SerializedPlatform RepresentationMac::data() const59 SerializedPlatformDataCueMac::~SerializedPlatformDataCueMac() 60 { 61 } 62 63 Ref<SerializedPlatformDataCue> SerializedPlatformDataCueMac::create(id nativeValue) 64 { 65 return adoptRef(*new SerializedPlatformDataCueMac(nativeValue)); 66 } 67 68 RefPtr<ArrayBuffer> SerializedPlatformDataCueMac::data() const 71 69 { 72 70 return nullptr; 73 71 } 74 72 75 JSC::JSValue SerializedPlatform RepresentationMac::deserialize(JSC::JSGlobalObject* lexicalGlobalObject) const73 JSC::JSValue SerializedPlatformDataCueMac::deserialize(JSC::JSGlobalObject* lexicalGlobalObject) const 76 74 { 77 75 #if JSC_OBJC_API_ENABLED … … 90 88 } 91 89 92 bool SerializedPlatform RepresentationMac::isEqual(const SerializedPlatformRepresentation& other) const93 { 94 if (other.platformType() != SerializedPlatform Representation::ObjC)90 bool SerializedPlatformDataCueMac::isEqual(const SerializedPlatformDataCue& other) const 91 { 92 if (other.platformType() != SerializedPlatformDataCue::ObjC) 95 93 return false; 96 94 97 const SerializedPlatform RepresentationMac* otherObjC = toSerializedPlatformRepresentationMac(&other);95 const SerializedPlatformDataCueMac* otherObjC = toSerializedPlatformDataCueMac(&other); 98 96 99 97 if (!m_nativeValue || !otherObjC->nativeValue()) … … 103 101 } 104 102 105 SerializedPlatform RepresentationMac* toSerializedPlatformRepresentationMac(SerializedPlatformRepresentation* rep)106 { 107 return const_cast<SerializedPlatform RepresentationMac*>(toSerializedPlatformRepresentationMac(const_cast<const SerializedPlatformRepresentation*>(rep)));108 } 109 110 const SerializedPlatform RepresentationMac* toSerializedPlatformRepresentationMac(const SerializedPlatformRepresentation* rep)111 { 112 ASSERT_WITH_SECURITY_IMPLICATION(rep->platformType() == SerializedPlatformRepresentation::ObjC);113 return static_cast<const SerializedPlatform RepresentationMac*>(rep);103 SerializedPlatformDataCueMac* toSerializedPlatformDataCueMac(SerializedPlatformDataCue* rep) 104 { 105 return const_cast<SerializedPlatformDataCueMac*>(toSerializedPlatformDataCueMac(const_cast<const SerializedPlatformDataCue*>(rep))); 106 } 107 108 const SerializedPlatformDataCueMac* toSerializedPlatformDataCueMac(const SerializedPlatformDataCue* rep) 109 { 110 RELEASE_ASSERT_WITH_SECURITY_IMPLICATION(rep->platformType() == SerializedPlatformDataCue::ObjC); 111 return static_cast<const SerializedPlatformDataCueMac*>(rep); 114 112 } 115 113 -
trunk/Source/WebKit/GPUProcess/media/RemoteTextTrackProxy.cpp
r256353 r256536 103 103 104 104 #if ENABLE(DATACUE_VALUE) 105 void RemoteTextTrackProxy::addDataCue(const MediaTime&, const MediaTime&, Ref<SerializedPlatform Representation>&&, const String&)105 void RemoteTextTrackProxy::addDataCue(const MediaTime&, const MediaTime&, Ref<SerializedPlatformDataCue>&&, const String&) 106 106 { 107 107 notImplemented(); 108 108 } 109 109 110 void RemoteTextTrackProxy::updateDataCue(const MediaTime&, const MediaTime&, SerializedPlatform Representation&)110 void RemoteTextTrackProxy::updateDataCue(const MediaTime&, const MediaTime&, SerializedPlatformDataCue&) 111 111 { 112 112 notImplemented(); 113 113 } 114 114 115 void RemoteTextTrackProxy::removeDataCue(const MediaTime&, const MediaTime&, SerializedPlatform Representation&)115 void RemoteTextTrackProxy::removeDataCue(const MediaTime&, const MediaTime&, SerializedPlatformDataCue&) 116 116 { 117 117 notImplemented(); -
trunk/Source/WebKit/GPUProcess/media/RemoteTextTrackProxy.h
r256353 r256536 57 57 58 58 #if ENABLE(DATACUE_VALUE) 59 virtual void addDataCue(const MediaTime& start, const MediaTime& end, Ref<SerializedPlatform Representation>&&, const String&);60 virtual void updateDataCue(const MediaTime& start, const MediaTime& end, SerializedPlatform Representation&);61 virtual void removeDataCue(const MediaTime& start, const MediaTime& end, SerializedPlatform Representation&);59 virtual void addDataCue(const MediaTime& start, const MediaTime& end, Ref<SerializedPlatformDataCue>&&, const String&); 60 virtual void updateDataCue(const MediaTime& start, const MediaTime& end, SerializedPlatformDataCue&); 61 virtual void removeDataCue(const MediaTime& start, const MediaTime& end, SerializedPlatformDataCue&); 62 62 #endif 63 63 -
trunk/Source/WebKit/WebProcess/GPU/media/MediaPlayerPrivateRemote.messages.in
r256353 r256536 52 52 53 53 ## AddDataCue(MediaTime start, MediaTime end, IPC::DataReference data) 54 ## AddDataCue(MediaTime start, MediaTime end, WebCore::SerializedPlatform Representationdata, String type)55 ## UpdateDataCue(MediaTime start, MediaTime end, WebCore::SerializedPlatform Representationdata)56 ## RemoveDataCue(MediaTime start, MediaTime end, WebCore::SerializedPlatform Representationdata)54 ## AddDataCue(MediaTime start, MediaTime end, WebCore::SerializedPlatformDataCue data, String type) 55 ## UpdateDataCue(MediaTime start, MediaTime end, WebCore::SerializedPlatformDataCue data) 56 ## RemoveDataCue(MediaTime start, MediaTime end, WebCore::SerializedPlatformDataCue data) 57 57 58 58 ## AddGenericCue(WebCore::GenericCueData cue) -
trunk/Source/WebKit/WebProcess/GPU/media/TextTrackPrivateRemote.cpp
r256353 r256536 95 95 96 96 #if ENABLE(DATACUE_VALUE) 97 void TextTrackPrivateRemote::addDataCue(const MediaTime& start, const MediaTime& end, Ref<SerializedPlatform Representation>&&, const String&)97 void TextTrackPrivateRemote::addDataCue(const MediaTime& start, const MediaTime& end, Ref<SerializedPlatformDataCue>&&, const String&) 98 98 { 99 99 notImplemented(); 100 100 } 101 101 102 void TextTrackPrivateRemote::updateDataCue(const MediaTime& start, const MediaTime& end, SerializedPlatform Representation&)102 void TextTrackPrivateRemote::updateDataCue(const MediaTime& start, const MediaTime& end, SerializedPlatformDataCue&) 103 103 { 104 104 notImplemented(); 105 105 } 106 106 107 void TextTrackPrivateRemote::removeDataCue(const MediaTime& start, const MediaTime& end, SerializedPlatform Representation&)107 void TextTrackPrivateRemote::removeDataCue(const MediaTime& start, const MediaTime& end, SerializedPlatformDataCue&) 108 108 { 109 109 notImplemented(); -
trunk/Source/WebKit/WebProcess/GPU/media/TextTrackPrivateRemote.h
r256353 r256536 48 48 49 49 #if ENABLE(DATACUE_VALUE) 50 void addDataCue(const MediaTime& start, const MediaTime& end, Ref<SerializedPlatform Representation>&&, const String&);51 void updateDataCue(const MediaTime& start, const MediaTime& end, SerializedPlatform Representation&);52 void removeDataCue(const MediaTime& start, const MediaTime& end, SerializedPlatform Representation&);50 void addDataCue(const MediaTime& start, const MediaTime& end, Ref<SerializedPlatformDataCue>&&, const String&); 51 void updateDataCue(const MediaTime& start, const MediaTime& end, SerializedPlatformDataCue&); 52 void removeDataCue(const MediaTime& start, const MediaTime& end, SerializedPlatformDataCue&); 53 53 #endif 54 54
Note: See TracChangeset
for help on using the changeset viewer.