Rename SerializedPlatformRepresentation to SerializedPlatformDataCue
authoreric.carlson@apple.com <eric.carlson@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 13 Feb 2020 21:40:08 +0000 (21:40 +0000)
committereric.carlson@apple.com <eric.carlson@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 13 Feb 2020 21:40:08 +0000 (21:40 +0000)
https://bugs.webkit.org/show_bug.cgi?id=207695
<rdar://problem/59422673>

Reviewed by Youenn Fablet.

No new tests, no functional change.

* SourcesCocoa.txt:
* WebCore.xcodeproj/project.pbxproj:
* html/track/DataCue.cpp:
(WebCore::DataCue::DataCue):
(WebCore::DataCue::cueContentsMatch const):
* html/track/DataCue.h:
* html/track/InbandDataTextTrack.cpp:
(WebCore::InbandDataTextTrack::addDataCue):
(WebCore::InbandDataTextTrack::updateDataCue):
(WebCore::InbandDataTextTrack::removeDataCue):
(WebCore::InbandDataTextTrack::removeCue):
* html/track/InbandDataTextTrack.h:
* html/track/InbandTextTrack.h:
* platform/SerializedPlatformDataCue.h: Renamed from Source/WebCore/platform/SerializedPlatformRepresentation.h.
* platform/graphics/InbandTextTrackPrivateClient.h:
* platform/graphics/avfoundation/InbandMetadataTextTrackPrivateAVF.cpp:
(WebCore::InbandMetadataTextTrackPrivateAVF::addDataCue):
* platform/graphics/avfoundation/InbandMetadataTextTrackPrivateAVF.h:
* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
(WebCore::MediaPlayerPrivateAVFoundationObjC::metadataDidArrive):
* platform/mac/SerializedPlatformDataCueMac.h: Renamed from Source/WebCore/platform/mac/SerializedPlatformRepresentationMac.h.
(WebCore::SerializedPlatformDataCueMac::nativeValue const):
* platform/mac/SerializedPlatformDataCueMac.mm: Renamed from Source/WebCore/platform/mac/SerializedPlatformRepresentationMac.mm.
(WebCore::SerializedPlatformDataCueMac::SerializedPlatformDataCueMac):
(WebCore::SerializedPlatformDataCueMac::~SerializedPlatformDataCueMac):
(WebCore::SerializedPlatformDataCueMac::create):
(WebCore::SerializedPlatformDataCueMac::data const):
(WebCore::SerializedPlatformDataCueMac::deserialize const):
(WebCore::SerializedPlatformDataCueMac::isEqual const):
(WebCore::toSerializedPlatformDataCueMac):
(WebCore::jsValueWithValueInContext):
(WebCore::jsValueWithDataInContext):
(WebCore::jsValueWithArrayInContext):
(WebCore::jsValueWithDictionaryInContext):
(WebCore::jsValueWithAVMetadataItemInContext):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@256536 268f45cc-cd09-0410-ab3c-d52691b4dbfc

22 files changed:
Source/WebCore/ChangeLog
Source/WebCore/Headers.cmake
Source/WebCore/PlatformMac.cmake
Source/WebCore/SourcesCocoa.txt
Source/WebCore/WebCore.xcodeproj/project.pbxproj
Source/WebCore/html/track/DataCue.cpp
Source/WebCore/html/track/DataCue.h
Source/WebCore/html/track/InbandDataTextTrack.cpp
Source/WebCore/html/track/InbandDataTextTrack.h
Source/WebCore/html/track/InbandTextTrack.h
Source/WebCore/platform/SerializedPlatformDataCue.h [moved from Source/WebCore/platform/SerializedPlatformRepresentation.h with 83% similarity]
Source/WebCore/platform/graphics/InbandTextTrackPrivateClient.h
Source/WebCore/platform/graphics/avfoundation/InbandMetadataTextTrackPrivateAVF.cpp
Source/WebCore/platform/graphics/avfoundation/InbandMetadataTextTrackPrivateAVF.h
Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm
Source/WebCore/platform/mac/SerializedPlatformDataCueMac.h [moved from Source/WebCore/platform/mac/SerializedPlatformRepresentationMac.h with 61% similarity]
Source/WebCore/platform/mac/SerializedPlatformDataCueMac.mm [moved from Source/WebCore/platform/mac/SerializedPlatformRepresentationMac.mm with 82% similarity]
Source/WebKit/GPUProcess/media/RemoteTextTrackProxy.cpp
Source/WebKit/GPUProcess/media/RemoteTextTrackProxy.h
Source/WebKit/WebProcess/GPU/media/MediaPlayerPrivateRemote.messages.in
Source/WebKit/WebProcess/GPU/media/TextTrackPrivateRemote.cpp
Source/WebKit/WebProcess/GPU/media/TextTrackPrivateRemote.h

index 64d648a..3d55d91 100644 (file)
@@ -1,3 +1,49 @@
+2020-02-13  Eric Carlson  <eric.carlson@apple.com>
+
+        Rename SerializedPlatformRepresentation to SerializedPlatformDataCue
+        https://bugs.webkit.org/show_bug.cgi?id=207695
+        <rdar://problem/59422673>
+
+        Reviewed by Youenn Fablet.
+
+        No new tests, no functional change.
+
+        * SourcesCocoa.txt:
+        * WebCore.xcodeproj/project.pbxproj:
+        * html/track/DataCue.cpp:
+        (WebCore::DataCue::DataCue):
+        (WebCore::DataCue::cueContentsMatch const):
+        * html/track/DataCue.h:
+        * html/track/InbandDataTextTrack.cpp:
+        (WebCore::InbandDataTextTrack::addDataCue):
+        (WebCore::InbandDataTextTrack::updateDataCue):
+        (WebCore::InbandDataTextTrack::removeDataCue):
+        (WebCore::InbandDataTextTrack::removeCue):
+        * html/track/InbandDataTextTrack.h:
+        * html/track/InbandTextTrack.h:
+        * platform/SerializedPlatformDataCue.h: Renamed from Source/WebCore/platform/SerializedPlatformRepresentation.h.
+        * platform/graphics/InbandTextTrackPrivateClient.h:
+        * platform/graphics/avfoundation/InbandMetadataTextTrackPrivateAVF.cpp:
+        (WebCore::InbandMetadataTextTrackPrivateAVF::addDataCue):
+        * platform/graphics/avfoundation/InbandMetadataTextTrackPrivateAVF.h:
+        * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
+        (WebCore::MediaPlayerPrivateAVFoundationObjC::metadataDidArrive):
+        * platform/mac/SerializedPlatformDataCueMac.h: Renamed from Source/WebCore/platform/mac/SerializedPlatformRepresentationMac.h.
+        (WebCore::SerializedPlatformDataCueMac::nativeValue const):
+        * platform/mac/SerializedPlatformDataCueMac.mm: Renamed from Source/WebCore/platform/mac/SerializedPlatformRepresentationMac.mm.
+        (WebCore::SerializedPlatformDataCueMac::SerializedPlatformDataCueMac):
+        (WebCore::SerializedPlatformDataCueMac::~SerializedPlatformDataCueMac):
+        (WebCore::SerializedPlatformDataCueMac::create):
+        (WebCore::SerializedPlatformDataCueMac::data const):
+        (WebCore::SerializedPlatformDataCueMac::deserialize const):
+        (WebCore::SerializedPlatformDataCueMac::isEqual const):
+        (WebCore::toSerializedPlatformDataCueMac):
+        (WebCore::jsValueWithValueInContext):
+        (WebCore::jsValueWithDataInContext):
+        (WebCore::jsValueWithArrayInContext):
+        (WebCore::jsValueWithDictionaryInContext):
+        (WebCore::jsValueWithAVMetadataItemInContext):
+
 2020-02-13  Per Arne Vollan  <pvollan@apple.com>
 
         [iOS] Check if PIP is supported in the UI process
index 99cb866..3329ab0 100644 (file)
@@ -994,7 +994,7 @@ set(WebCore_PRIVATE_FRAMEWORK_HEADERS
     platform/ScrollbarTheme.h
     platform/ScrollbarThemeComposite.h
     platform/SearchPopupMenu.h
-    platform/SerializedPlatformRepresentation.h
+    platform/SerializedPlatformDataCue.h
     platform/SharedBuffer.h
     platform/SharedStringHash.h
     platform/SuddenTermination.h
index bf4ad32..93350d7 100644 (file)
@@ -381,7 +381,7 @@ list(APPEND WebCore_SOURCES
     platform/mac/ScrollAnimatorMac.mm
     platform/mac/ScrollViewMac.mm
     platform/mac/ScrollbarThemeMac.mm
-    platform/mac/SerializedPlatformRepresentationMac.mm
+    platform/mac/SerializedPlatformDataCueMac.mm
     platform/mac/StringUtilities.mm
     platform/mac/SuddenTermination.mm
     platform/mac/ThemeMac.mm
index ab3a579..a05e01c 100644 (file)
@@ -463,7 +463,7 @@ platform/mac/SSLKeyGeneratorMac.mm
 platform/mac/ScrollAnimatorMac.mm @no-unify
 platform/mac/ScrollViewMac.mm
 platform/mac/ScrollbarThemeMac.mm @no-unify
-platform/mac/SerializedPlatformRepresentationMac.mm
+platform/mac/SerializedPlatformDataCueMac.mm
 platform/mac/StringUtilities.mm
 platform/mac/SuddenTermination.mm
 platform/mac/ThemeMac.mm
index c796b03..08d5a2d 100644 (file)
                076970871463AD8700F502CF /* TextTrackList.h in Headers */ = {isa = PBXBuildFile; fileRef = 076970851463AD8700F502CF /* TextTrackList.h */; };
                076F0D0E12B8192700C26AA4 /* MediaPlayerPrivateAVFoundation.h in Headers */ = {isa = PBXBuildFile; fileRef = 076F0D0A12B8192700C26AA4 /* MediaPlayerPrivateAVFoundation.h */; };
                077664FD183E6B5C00133B92 /* JSQuickTimePluginReplacement.h in Headers */ = {isa = PBXBuildFile; fileRef = 077664FB183E6B5C00133B92 /* JSQuickTimePluginReplacement.h */; };
-               077AF14018F4AE400001ED61 /* SerializedPlatformRepresentation.h in Headers */ = {isa = PBXBuildFile; fileRef = 077AF13E18F4AE400001ED61 /* SerializedPlatformRepresentation.h */; settings = {ATTRIBUTES = (Private, ); }; };
-               077AF14318F4B1BB0001ED61 /* SerializedPlatformRepresentationMac.h in Headers */ = {isa = PBXBuildFile; fileRef = 077AF14118F4B1BB0001ED61 /* SerializedPlatformRepresentationMac.h */; };
+               077AF14018F4AE400001ED61 /* SerializedPlatformDataCue.h in Headers */ = {isa = PBXBuildFile; fileRef = 077AF13E18F4AE400001ED61 /* SerializedPlatformDataCue.h */; settings = {ATTRIBUTES = (Private, ); }; };
+               077AF14318F4B1BB0001ED61 /* SerializedPlatformDataCueMac.h in Headers */ = {isa = PBXBuildFile; fileRef = 077AF14118F4B1BB0001ED61 /* SerializedPlatformDataCueMac.h */; };
                077B64131B94F12E003E9AD5 /* MediaPlaybackTargetPickerMock.h in Headers */ = {isa = PBXBuildFile; fileRef = 077B64111B94F12E003E9AD5 /* MediaPlaybackTargetPickerMock.h */; settings = {ATTRIBUTES = (Private, ); }; };
                077B64171B95F703003E9AD5 /* MediaPlaybackTargetMock.h in Headers */ = {isa = PBXBuildFile; fileRef = 077B64151B95F703003E9AD5 /* MediaPlaybackTargetMock.h */; settings = {ATTRIBUTES = (Private, ); }; };
                0783228518013ED800999E0C /* MediaStreamAudioSource.h in Headers */ = {isa = PBXBuildFile; fileRef = 0783228318013ED800999E0C /* MediaStreamAudioSource.h */; };
                076F0D0A12B8192700C26AA4 /* MediaPlayerPrivateAVFoundation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MediaPlayerPrivateAVFoundation.h; sourceTree = "<group>"; };
                077664FA183E6B5C00133B92 /* JSQuickTimePluginReplacement.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSQuickTimePluginReplacement.cpp; sourceTree = "<group>"; };
                077664FB183E6B5C00133B92 /* JSQuickTimePluginReplacement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSQuickTimePluginReplacement.h; sourceTree = "<group>"; };
-               077AF13E18F4AE400001ED61 /* SerializedPlatformRepresentation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SerializedPlatformRepresentation.h; sourceTree = "<group>"; };
-               077AF14118F4B1BB0001ED61 /* SerializedPlatformRepresentationMac.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SerializedPlatformRepresentationMac.h; sourceTree = "<group>"; };
-               077AF14218F4B1BB0001ED61 /* SerializedPlatformRepresentationMac.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = SerializedPlatformRepresentationMac.mm; sourceTree = "<group>"; };
+               077AF13E18F4AE400001ED61 /* SerializedPlatformDataCue.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SerializedPlatformDataCue.h; sourceTree = "<group>"; };
+               077AF14118F4B1BB0001ED61 /* SerializedPlatformDataCueMac.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SerializedPlatformDataCueMac.h; sourceTree = "<group>"; };
+               077AF14218F4B1BB0001ED61 /* SerializedPlatformDataCueMac.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = SerializedPlatformDataCueMac.mm; sourceTree = "<group>"; };
                077B64101B94F12E003E9AD5 /* MediaPlaybackTargetPickerMock.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = MediaPlaybackTargetPickerMock.cpp; sourceTree = "<group>"; };
                077B64111B94F12E003E9AD5 /* MediaPlaybackTargetPickerMock.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MediaPlaybackTargetPickerMock.h; sourceTree = "<group>"; };
                077B64141B95F703003E9AD5 /* MediaPlaybackTargetMock.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = MediaPlaybackTargetMock.cpp; sourceTree = "<group>"; };
                                BC8B853C0E7C7F1100AB6984 /* ScrollbarThemeMac.h */,
                                BCEF869E0E844E9D00A85CD5 /* ScrollbarThemeMac.mm */,
                                9353676A09AED88B00D35CD6 /* ScrollViewMac.mm */,
-                               077AF14118F4B1BB0001ED61 /* SerializedPlatformRepresentationMac.h */,
-                               077AF14218F4B1BB0001ED61 /* SerializedPlatformRepresentationMac.mm */,
+                               077AF14118F4B1BB0001ED61 /* SerializedPlatformDataCueMac.h */,
+                               077AF14218F4B1BB0001ED61 /* SerializedPlatformDataCueMac.mm */,
                                84B2B24F056BF15F00D2B771 /* SSLKeyGeneratorMac.mm */,
                                ECA680C61E67724500731D20 /* StringUtilities.h */,
                                ECA680C81E67730B00731D20 /* StringUtilities.mm */,
                                BC2441C30E8B65D00055320F /* ScrollView.cpp */,
                                BC6D6E2509AF943500F59759 /* ScrollView.h */,
                                AB7170880B3118080017123E /* SearchPopupMenu.h */,
-                               077AF13E18F4AE400001ED61 /* SerializedPlatformRepresentation.h */,
+                               077AF13E18F4AE400001ED61 /* SerializedPlatformDataCue.h */,
                                1A4A954B0B4EDCCB002D8C3C /* SharedBuffer.cpp */,
                                1A4A954C0B4EDCCB002D8C3C /* SharedBuffer.h */,
                                834DFACE1F7DAE5700C2725B /* SharedStringHash.cpp */,
                                E45322AC140CE267005A0F92 /* SelectorQuery.h in Headers */,
                                F4D43D662188038B00ECECAC /* SerializedAttachmentData.h in Headers */,
                                E18DF33518AAF12C00773E59 /* SerializedCryptoKeyWrap.h in Headers */,
-                               077AF14018F4AE400001ED61 /* SerializedPlatformRepresentation.h in Headers */,
-                               077AF14318F4B1BB0001ED61 /* SerializedPlatformRepresentationMac.h in Headers */,
+                               077AF14018F4AE400001ED61 /* SerializedPlatformDataCue.h in Headers */,
+                               077AF14318F4B1BB0001ED61 /* SerializedPlatformDataCueMac.h in Headers */,
                                A75E497610752ACB00C9B896 /* SerializedScriptValue.h in Headers */,
                                516F7F6D1C31E39A00F111DC /* ServerOpenDBRequest.h in Headers */,
                                2D93AEE319DF5641002A86C3 /* ServicesOverlayController.h in Headers */,
index 2ed748c..5d5e3f3 100644 (file)
@@ -54,7 +54,7 @@ DataCue::DataCue(ScriptExecutionContext& context, const MediaTime& start, const
 {
 }
 
-DataCue::DataCue(ScriptExecutionContext& context, const MediaTime& start, const MediaTime& end, RefPtr<SerializedPlatformRepresentation>&& platformValue, const String& type)
+DataCue::DataCue(ScriptExecutionContext& context, const MediaTime& start, const MediaTime& end, RefPtr<SerializedPlatformDataCue>&& platformValue, const String& type)
     : TextTrackCue(context, start, end)
     , m_type(type)
     , m_platformValue(WTFMove(platformValue))
@@ -116,7 +116,7 @@ bool DataCue::cueContentsMatch(const TextTrackCue& cue) const
     if (m_data && m_data->data() && memcmp(m_data->data(), otherData->data(), m_data->byteLength()))
         return false;
 
-    const SerializedPlatformRepresentation* otherPlatformValue = dataCue->platformValue();
+    auto otherPlatformValue = dataCue->platformValue();
     if ((otherPlatformValue && !m_platformValue) || (!otherPlatformValue && m_platformValue))
         return false;
     if (m_platformValue && !m_platformValue->isEqual(*otherPlatformValue))
index 764b80d..63a67c0 100644 (file)
@@ -28,7 +28,7 @@
 
 #if ENABLE(VIDEO_TRACK)
 
-#include "SerializedPlatformRepresentation.h"
+#include "SerializedPlatformDataCue.h"
 #include "TextTrackCue.h"
 #include <JavaScriptCore/ArrayBuffer.h>
 #include <JavaScriptCore/JSCJSValue.h>
@@ -57,7 +57,7 @@ public:
         return adoptRef(*new DataCue(context, start, end, data, type));
     }
 
-    static Ref<DataCue> create(ScriptExecutionContext& context, const MediaTime& start, const MediaTime& end, RefPtr<SerializedPlatformRepresentation>&& platformValue, const String& type)
+    static Ref<DataCue> create(ScriptExecutionContext& context, const MediaTime& start, const MediaTime& end, RefPtr<SerializedPlatformDataCue>&& platformValue, const String& type)
     {
         return adoptRef(*new DataCue(context, start, end, WTFMove(platformValue), type));
     }
@@ -77,7 +77,7 @@ public:
     RefPtr<JSC::ArrayBuffer> data() const;
     void setData(JSC::ArrayBuffer&);
 
-    const SerializedPlatformRepresentation* platformValue() const { return m_platformValue.get(); }
+    const SerializedPlatformDataCue* platformValue() const { return m_platformValue.get(); }
 
     JSC::JSValue value(JSC::JSGlobalObject&) const;
     void setValue(JSC::JSGlobalObject&, JSC::JSValue);
@@ -94,14 +94,14 @@ public:
 private:
     DataCue(ScriptExecutionContext&, const MediaTime& start, const MediaTime& end, ArrayBuffer&, const String&);
     DataCue(ScriptExecutionContext&, const MediaTime& start, const MediaTime& end, const void*, unsigned);
-    DataCue(ScriptExecutionContext&, const MediaTime& start, const MediaTime& end, RefPtr<SerializedPlatformRepresentation>&&, const String&);
+    DataCue(ScriptExecutionContext&, const MediaTime& start, const MediaTime& end, RefPtr<SerializedPlatformDataCue>&&, const String&);
     DataCue(ScriptExecutionContext&, const MediaTime& start, const MediaTime& end, JSC::JSValue, const String&);
 
     JSC::JSValue valueOrNull() const;
 
     RefPtr<ArrayBuffer> m_data;
     String m_type;
-    RefPtr<SerializedPlatformRepresentation> m_platformValue;
+    RefPtr<SerializedPlatformDataCue> m_platformValue;
     // FIXME: The following use of JSC::Strong is incorrect and can lead to storage leaks
     // due to reference cycles; we should use JSValueInWrappedObject instead.
     // https://bugs.webkit.org/show_bug.cgi?id=201173
index c1bec9a..f07f738 100644 (file)
@@ -57,7 +57,7 @@ void InbandDataTextTrack::addDataCue(const MediaTime& start, const MediaTime& en
 
 #if ENABLE(DATACUE_VALUE)
 
-void InbandDataTextTrack::addDataCue(const MediaTime& start, const MediaTime& end, Ref<SerializedPlatformRepresentation>&& platformValue, const String& type)
+void InbandDataTextTrack::addDataCue(const MediaTime& start, const MediaTime& end, Ref<SerializedPlatformDataCue>&& platformValue, const String& type)
 {
     if (m_incompleteCueMap.contains(platformValue.ptr()))
         return;
@@ -78,7 +78,7 @@ void InbandDataTextTrack::addDataCue(const MediaTime& start, const MediaTime& en
     addCue(WTFMove(cue));
 }
 
-void InbandDataTextTrack::updateDataCue(const MediaTime& start, const MediaTime& inEnd, SerializedPlatformRepresentation& platformValue)
+void InbandDataTextTrack::updateDataCue(const MediaTime& start, const MediaTime& inEnd, SerializedPlatformDataCue& platformValue)
 {
     RefPtr<DataCue> cue = m_incompleteCueMap.get(&platformValue);
     if (!cue)
@@ -100,7 +100,7 @@ void InbandDataTextTrack::updateDataCue(const MediaTime& start, const MediaTime&
     cue->didChange();
 }
 
-void InbandDataTextTrack::removeDataCue(const MediaTime&, const MediaTime&, SerializedPlatformRepresentation& platformValue)
+void InbandDataTextTrack::removeDataCue(const MediaTime&, const MediaTime&, SerializedPlatformDataCue& platformValue)
 {
     if (auto cue = m_incompleteCueMap.take(&platformValue)) {
         INFO_LOG(LOGIDENTIFIER, "removing: ", *cue);
@@ -112,7 +112,7 @@ ExceptionOr<void> InbandDataTextTrack::removeCue(TextTrackCue& cue)
 {
     ASSERT(cue.cueType() == TextTrackCue::Data);
 
-    m_incompleteCueMap.remove(const_cast<SerializedPlatformRepresentation*>(toDataCue(&cue)->platformValue()));
+    m_incompleteCueMap.remove(const_cast<SerializedPlatformDataCue*>(toDataCue(&cue)->platformValue()));
 
     return InbandTextTrack::removeCue(cue);
 }
index 1b038f3..1a8bdf6 100644 (file)
@@ -50,12 +50,12 @@ private:
 #endif
 
 #if ENABLE(DATACUE_VALUE)
-    void addDataCue(const MediaTime& start, const MediaTime& end, Ref<SerializedPlatformRepresentation>&&, const String&) final;
-    void updateDataCue(const MediaTime& start, const MediaTime& end, SerializedPlatformRepresentation&) final;
-    void removeDataCue(const MediaTime& start, const MediaTime& end, SerializedPlatformRepresentation&) final;
+    void addDataCue(const MediaTime& start, const MediaTime& end, Ref<SerializedPlatformDataCue>&&, const String&) final;
+    void updateDataCue(const MediaTime& start, const MediaTime& end, SerializedPlatformDataCue&) final;
+    void removeDataCue(const MediaTime& start, const MediaTime& end, SerializedPlatformDataCue&) final;
     ExceptionOr<void> removeCue(TextTrackCue&) final;
 
-    HashMap<RefPtr<SerializedPlatformRepresentation>, RefPtr<DataCue>> m_incompleteCueMap;
+    HashMap<RefPtr<SerializedPlatformDataCue>, RefPtr<DataCue>> m_incompleteCueMap;
 #endif
 };
 
index e14103d..8fef9f3 100644 (file)
@@ -72,9 +72,9 @@ private:
     void addDataCue(const MediaTime&, const MediaTime&, const void*, unsigned) override { ASSERT_NOT_REACHED(); }
 
 #if ENABLE(DATACUE_VALUE)
-    void addDataCue(const MediaTime&, const MediaTime&, Ref<SerializedPlatformRepresentation>&&, const String&) override { ASSERT_NOT_REACHED(); }
-    void updateDataCue(const MediaTime&, const MediaTime&, SerializedPlatformRepresentation&) override  { ASSERT_NOT_REACHED(); }
-    void removeDataCue(const MediaTime&, const MediaTime&, SerializedPlatformRepresentation&) override  { ASSERT_NOT_REACHED(); }
+    void addDataCue(const MediaTime&, const MediaTime&, Ref<SerializedPlatformDataCue>&&, const String&) override { ASSERT_NOT_REACHED(); }
+    void updateDataCue(const MediaTime&, const MediaTime&, SerializedPlatformDataCue&) override  { ASSERT_NOT_REACHED(); }
+    void removeDataCue(const MediaTime&, const MediaTime&, SerializedPlatformDataCue&) override  { ASSERT_NOT_REACHED(); }
 #endif
 
     void addGenericCue(GenericCueData&) override { ASSERT_NOT_REACHED(); }
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2014 Apple Inc. All rights reserved.
+ * Copyright (C) 2014-2020 Apple Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
 
 namespace WebCore {
 
-class SerializedPlatformRepresentation : public RefCounted<SerializedPlatformRepresentation> {
+class SerializedPlatformDataCue : public RefCounted<SerializedPlatformDataCue> {
 public:
-    virtual ~SerializedPlatformRepresentation() = default;
+    virtual ~SerializedPlatformDataCue() = default;
 
     virtual JSC::JSValue deserialize(JSC::JSGlobalObject*) const = 0;
     virtual RefPtr<JSC::ArrayBuffer> data() const = 0;
-    virtual bool isEqual(const SerializedPlatformRepresentation&) const = 0;
+    virtual bool isEqual(const SerializedPlatformDataCue&) const = 0;
 
     enum PlatformType {
         ObjC,
@@ -46,7 +46,7 @@ public:
     virtual PlatformType platformType() const = 0;
 
 protected:
-    SerializedPlatformRepresentation() = default;
+    SerializedPlatformDataCue() = default;
 };
 
 } // namespace WebCore
index 6e0c8f9..f430645 100644 (file)
@@ -33,7 +33,7 @@
 #include <wtf/MediaTime.h>
 
 #if ENABLE(DATACUE_VALUE)
-#include "SerializedPlatformRepresentation.h"
+#include "SerializedPlatformDataCue.h"
 #endif
 
 namespace WebCore {
@@ -229,9 +229,9 @@ public:
     virtual void addDataCue(const MediaTime& start, const MediaTime& end, const void*, unsigned) = 0;
 
 #if ENABLE(DATACUE_VALUE)
-    virtual void addDataCue(const MediaTime& start, const MediaTime& end, Ref<SerializedPlatformRepresentation>&&, const String&) = 0;
-    virtual void updateDataCue(const MediaTime& start, const MediaTime& end, SerializedPlatformRepresentation&) = 0;
-    virtual void removeDataCue(const MediaTime& start, const MediaTime& end, SerializedPlatformRepresentation&) = 0;
+    virtual void addDataCue(const MediaTime& start, const MediaTime& end, Ref<SerializedPlatformDataCue>&&, const String&) = 0;
+    virtual void updateDataCue(const MediaTime& start, const MediaTime& end, SerializedPlatformDataCue&) = 0;
+    virtual void removeDataCue(const MediaTime& start, const MediaTime& end, SerializedPlatformDataCue&) = 0;
 #endif
 
     virtual void addGenericCue(GenericCueData&) = 0;
index 35da95e..86e34ce 100644 (file)
@@ -54,7 +54,7 @@ InbandMetadataTextTrackPrivateAVF::~InbandMetadataTextTrackPrivateAVF() = defaul
 
 #if ENABLE(DATACUE_VALUE)
 
-void InbandMetadataTextTrackPrivateAVF::addDataCue(const MediaTime& start, const MediaTime& end, Ref<SerializedPlatformRepresentation>&& cueData, const String& type)
+void InbandMetadataTextTrackPrivateAVF::addDataCue(const MediaTime& start, const MediaTime& end, Ref<SerializedPlatformDataCue>&& cueData, const String& type)
 {
     ASSERT(cueFormat() == CueFormat::Data);
     ASSERT(start >= MediaTime::zeroTime());
index 2ec7d5c..cf00471 100644 (file)
@@ -34,7 +34,7 @@ namespace WebCore {
 
 #if ENABLE(DATACUE_VALUE)
 struct IncompleteMetaDataCue {
-    RefPtr<SerializedPlatformRepresentation> cueData;
+    RefPtr<SerializedPlatformDataCue> cueData;
     MediaTime startTime;
 };
 #endif
@@ -51,7 +51,7 @@ public:
     void setInBandMetadataTrackDispatchType(const AtomString& value) { m_inBandMetadataTrackDispatchType = value; }
 
 #if ENABLE(DATACUE_VALUE)
-    void addDataCue(const MediaTime& start, const MediaTime& end, Ref<SerializedPlatformRepresentation>&&, const String&);
+    void addDataCue(const MediaTime& start, const MediaTime& end, Ref<SerializedPlatformDataCue>&&, const String&);
     void updatePendingCueEndTimes(const MediaTime&);
 #endif
 
index 0dc2e77..f8cff21 100644 (file)
@@ -55,7 +55,7 @@
 #import "PixelBufferConformerCV.h"
 #import "PlatformTimeRanges.h"
 #import "SecurityOrigin.h"
-#import "SerializedPlatformRepresentationMac.h"
+#import "SerializedPlatformDataCueMac.h"
 #import "SharedBuffer.h"
 #import "TextEncoding.h"
 #import "TextTrackRepresentation.h"
@@ -3073,7 +3073,7 @@ void MediaPlayerPrivateAVFoundationObjC::metadataDidArrive(const RetainPtr<NSArr
         if (item.keySpace)
             type = metadataType(item.keySpace);
 
-        m_metadataTrack->addDataCue(start, end, SerializedPlatformRepresentationMac::create(item), type);
+        m_metadataTrack->addDataCue(start, end, SerializedPlatformDataCueMac::create(item), type);
     }
 #endif
 }
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2014 Apple Inc. All rights reserved.
+ * Copyright (C) 2014-2020 Apple Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
  * THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-#ifndef SerializedPlatformRepresentationMac_h
-#define SerializedPlatformRepresentationMac_h
+#pragma once
 
 #if ENABLE(VIDEO_TRACK) && ENABLE(DATACUE_VALUE)
 
-#include "SerializedPlatformRepresentation.h"
+#include "SerializedPlatformDataCue.h"
 
 #if USE(FOUNDATION) && !defined(__OBJC__)
 typedef struct objc_object *id;
@@ -36,30 +35,29 @@ typedef struct objc_object *id;
 
 namespace WebCore {
 
-class SerializedPlatformRepresentationMac : public SerializedPlatformRepresentation {
+class SerializedPlatformDataCueMac final : public SerializedPlatformDataCue {
 public:
-    virtual ~SerializedPlatformRepresentationMac();
-    static Ref<SerializedPlatformRepresentation> create(id);
+    virtual ~SerializedPlatformDataCueMac();
+    static Ref<SerializedPlatformDataCue> create(id);
 
-    JSC::JSValue deserialize(JSC::JSGlobalObject*) const override;
-    RefPtr<ArrayBuffer> data() const override;
+    JSC::JSValue deserialize(JSC::JSGlobalObject*) const final;
+    RefPtr<ArrayBuffer> data() const final;
 
-    bool isEqual(const SerializedPlatformRepresentation&) const override;
+    bool isEqual(const SerializedPlatformDataCue&) const final;
 
-    PlatformType platformType() const override { return SerializedPlatformRepresentation::ObjC; }
+    PlatformType platformType() const final { return SerializedPlatformDataCue::ObjC; }
 
     id nativeValue() const { return m_nativeValue.get(); }
 
 private:
-    SerializedPlatformRepresentationMac(id nativeValue);
+    explicit SerializedPlatformDataCueMac(id nativeValue);
 
     RetainPtr<id> m_nativeValue;
 };
 
-SerializedPlatformRepresentationMac* toSerializedPlatformRepresentationMac(SerializedPlatformRepresentation*);
-const SerializedPlatformRepresentationMac* toSerializedPlatformRepresentationMac(const SerializedPlatformRepresentation*);
+SerializedPlatformDataCueMac* toSerializedPlatformDataCueMac(SerializedPlatformDataCue*);
+const SerializedPlatformDataCueMac* toSerializedPlatformDataCueMac(const SerializedPlatformDataCue*);
 
 } // namespace WebCore
 
 #endif
-#endif // SerializedPlatformRepresentationMac_h
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2014, 2015 Apple Inc. All rights reserved.
+ * Copyright (C) 2014-2020 Apple Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -24,9 +24,9 @@
  */
 
 #include "config.h"
+#include "SerializedPlatformDataCueMac.h"
 
 #if ENABLE(VIDEO_TRACK) && ENABLE(DATACUE_VALUE)
-#include "SerializedPlatformRepresentationMac.h"
 
 #import "JSDOMConvertBufferSource.h"
 #import <AVFoundation/AVMetadataItem.h>
@@ -38,8 +38,6 @@
 #import <JavaScriptCore/JSObjectRef.h>
 #import <JavaScriptCore/JavaScriptCore.h>
 #import <objc/runtime.h>
-#import <wtf/text/Base64.h>
-
 #import <pal/cocoa/AVFoundationSoftLink.h>
 
 namespace WebCore {
@@ -52,27 +50,27 @@ static JSValue *jsValueWithAVMetadataItemInContext(AVMetadataItem *, JSContext *
 static JSValue *jsValueWithValueInContext(id, JSContext *);
 #endif
 
-SerializedPlatformRepresentationMac::SerializedPlatformRepresentationMac(id nativeValue)
-    : SerializedPlatformRepresentation()
+SerializedPlatformDataCueMac::SerializedPlatformDataCueMac(id nativeValue)
+    : SerializedPlatformDataCue()
     , m_nativeValue(nativeValue)
 {
 }
 
-SerializedPlatformRepresentationMac::~SerializedPlatformRepresentationMac()
+SerializedPlatformDataCueMac::~SerializedPlatformDataCueMac()
 {
 }
 
-Ref<SerializedPlatformRepresentation> SerializedPlatformRepresentationMac::create(id nativeValue)
+Ref<SerializedPlatformDataCue> SerializedPlatformDataCueMac::create(id nativeValue)
 {
-    return adoptRef(*new SerializedPlatformRepresentationMac(nativeValue));
+    return adoptRef(*new SerializedPlatformDataCueMac(nativeValue));
 }
 
-RefPtr<ArrayBuffer> SerializedPlatformRepresentationMac::data() const
+RefPtr<ArrayBuffer> SerializedPlatformDataCueMac::data() const
 {
     return nullptr;
 }
 
-JSC::JSValue SerializedPlatformRepresentationMac::deserialize(JSC::JSGlobalObject* lexicalGlobalObject) const
+JSC::JSValue SerializedPlatformDataCueMac::deserialize(JSC::JSGlobalObject* lexicalGlobalObject) const
 {
 #if JSC_OBJC_API_ENABLED
     if (!m_nativeValue)
@@ -89,12 +87,12 @@ JSC::JSValue SerializedPlatformRepresentationMac::deserialize(JSC::JSGlobalObjec
 #endif
 }
 
-bool SerializedPlatformRepresentationMac::isEqual(const SerializedPlatformRepresentation& other) const
+bool SerializedPlatformDataCueMac::isEqual(const SerializedPlatformDataCue& other) const
 {
-    if (other.platformType() != SerializedPlatformRepresentation::ObjC)
+    if (other.platformType() != SerializedPlatformDataCue::ObjC)
         return false;
 
-    const SerializedPlatformRepresentationMac* otherObjC = toSerializedPlatformRepresentationMac(&other);
+    const SerializedPlatformDataCueMac* otherObjC = toSerializedPlatformDataCueMac(&other);
 
     if (!m_nativeValue || !otherObjC->nativeValue())
         return false;
@@ -102,15 +100,15 @@ bool SerializedPlatformRepresentationMac::isEqual(const SerializedPlatformRepres
     return [m_nativeValue.get() isEqual:otherObjC->nativeValue()];
 }
 
-SerializedPlatformRepresentationMac* toSerializedPlatformRepresentationMac(SerializedPlatformRepresentation* rep)
+SerializedPlatformDataCueMac* toSerializedPlatformDataCueMac(SerializedPlatformDataCue* rep)
 {
-    return const_cast<SerializedPlatformRepresentationMac*>(toSerializedPlatformRepresentationMac(const_cast<const SerializedPlatformRepresentation*>(rep)));
+    return const_cast<SerializedPlatformDataCueMac*>(toSerializedPlatformDataCueMac(const_cast<const SerializedPlatformDataCue*>(rep)));
 }
 
-const SerializedPlatformRepresentationMac* toSerializedPlatformRepresentationMac(const SerializedPlatformRepresentation* rep)
+const SerializedPlatformDataCueMac* toSerializedPlatformDataCueMac(const SerializedPlatformDataCue* rep)
 {
-    ASSERT_WITH_SECURITY_IMPLICATION(rep->platformType() == SerializedPlatformRepresentation::ObjC);
-    return static_cast<const SerializedPlatformRepresentationMac*>(rep);
+    RELEASE_ASSERT_WITH_SECURITY_IMPLICATION(rep->platformType() == SerializedPlatformDataCue::ObjC);
+    return static_cast<const SerializedPlatformDataCueMac*>(rep);
 }
 
 #if JSC_OBJC_API_ENABLED
index 80f78f7..b76dc9b 100644 (file)
@@ -102,17 +102,17 @@ void RemoteTextTrackProxy::addDataCue(const MediaTime&, const MediaTime&, const
 }
 
 #if ENABLE(DATACUE_VALUE)
-void RemoteTextTrackProxy::addDataCue(const MediaTime&, const MediaTime&, Ref<SerializedPlatformRepresentation>&&, const String&)
+void RemoteTextTrackProxy::addDataCue(const MediaTime&, const MediaTime&, Ref<SerializedPlatformDataCue>&&, const String&)
 {
     notImplemented();
 }
 
-void RemoteTextTrackProxy::updateDataCue(const MediaTime&, const MediaTime&, SerializedPlatformRepresentation&)
+void RemoteTextTrackProxy::updateDataCue(const MediaTime&, const MediaTime&, SerializedPlatformDataCue&)
 {
     notImplemented();
 }
 
-void RemoteTextTrackProxy::removeDataCue(const MediaTime&, const MediaTime&, SerializedPlatformRepresentation&)
+void RemoteTextTrackProxy::removeDataCue(const MediaTime&, const MediaTime&, SerializedPlatformDataCue&)
 {
     notImplemented();
 }
index cf4a66a..e286ec4 100644 (file)
@@ -56,9 +56,9 @@ private:
     virtual void addDataCue(const MediaTime& start, const MediaTime& end, const void*, unsigned);
 
 #if ENABLE(DATACUE_VALUE)
-    virtual void addDataCue(const MediaTime& start, const MediaTime& end, Ref<SerializedPlatformRepresentation>&&, const String&);
-    virtual void updateDataCue(const MediaTime& start, const MediaTime& end, SerializedPlatformRepresentation&);
-    virtual void removeDataCue(const MediaTime& start, const MediaTime& end, SerializedPlatformRepresentation&);
+    virtual void addDataCue(const MediaTime& start, const MediaTime& end, Ref<SerializedPlatformDataCue>&&, const String&);
+    virtual void updateDataCue(const MediaTime& start, const MediaTime& end, SerializedPlatformDataCue&);
+    virtual void removeDataCue(const MediaTime& start, const MediaTime& end, SerializedPlatformDataCue&);
 #endif
 
     virtual void addGenericCue(GenericCueData&);
index f459980..c404dc6 100644 (file)
@@ -51,9 +51,9 @@ messages -> MediaPlayerPrivateRemote NotRefCounted {
     ParseWebVTTCueDataStruct(WebKit::TrackPrivateRemoteIdentifier trackID, WebCore::ISOWebVTTCue cueData)
 
     ## AddDataCue(MediaTime start, MediaTime end, IPC::DataReference data)
-    ## AddDataCue(MediaTime start, MediaTime end, WebCore::SerializedPlatformRepresentation data, String type)
-    ## UpdateDataCue(MediaTime start, MediaTime end, WebCore::SerializedPlatformRepresentation data)
-    ## RemoveDataCue(MediaTime start, MediaTime end, WebCore::SerializedPlatformRepresentation data)
+    ## AddDataCue(MediaTime start, MediaTime end, WebCore::SerializedPlatformDataCue data, String type)
+    ## UpdateDataCue(MediaTime start, MediaTime end, WebCore::SerializedPlatformDataCue data)
+    ## RemoveDataCue(MediaTime start, MediaTime end, WebCore::SerializedPlatformDataCue data)
 
     ## AddGenericCue(WebCore::GenericCueData cue)
     ## UpdateGenericCue(WebCore::GenericCueData cue)
index b00040f..5c78764 100644 (file)
@@ -94,17 +94,17 @@ void TextTrackPrivateRemote::addDataCue(const MediaTime& start, const MediaTime&
 }
 
 #if ENABLE(DATACUE_VALUE)
-void TextTrackPrivateRemote::addDataCue(const MediaTime& start, const MediaTime& end, Ref<SerializedPlatformRepresentation>&&, const String&)
+void TextTrackPrivateRemote::addDataCue(const MediaTime& start, const MediaTime& end, Ref<SerializedPlatformDataCue>&&, const String&)
 {
     notImplemented();
 }
 
-void TextTrackPrivateRemote::updateDataCue(const MediaTime& start, const MediaTime& end, SerializedPlatformRepresentation&)
+void TextTrackPrivateRemote::updateDataCue(const MediaTime& start, const MediaTime& end, SerializedPlatformDataCue&)
 {
     notImplemented();
 }
 
-void TextTrackPrivateRemote::removeDataCue(const MediaTime& start, const MediaTime& end, SerializedPlatformRepresentation&)
+void TextTrackPrivateRemote::removeDataCue(const MediaTime& start, const MediaTime& end, SerializedPlatformDataCue&)
 {
     notImplemented();
 }
index 6cf3975..6ac9c69 100644 (file)
@@ -47,9 +47,9 @@ public:
     void addDataCue(const MediaTime& start, const MediaTime& end, const void*, unsigned);
 
 #if ENABLE(DATACUE_VALUE)
-    void addDataCue(const MediaTime& start, const MediaTime& end, Ref<SerializedPlatformRepresentation>&&, const String&);
-    void updateDataCue(const MediaTime& start, const MediaTime& end, SerializedPlatformRepresentation&);
-    void removeDataCue(const MediaTime& start, const MediaTime& end, SerializedPlatformRepresentation&);
+    void addDataCue(const MediaTime& start, const MediaTime& end, Ref<SerializedPlatformDataCue>&&, const String&);
+    void updateDataCue(const MediaTime& start, const MediaTime& end, SerializedPlatformDataCue&);
+    void removeDataCue(const MediaTime& start, const MediaTime& end, SerializedPlatformDataCue&);
 #endif
 
     void addGenericCue(GenericCueData&);