[WPE] Build error with ENABLE_VIDEO=OFF after r244078
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 11 Apr 2019 13:30:01 +0000 (13:30 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 11 Apr 2019 13:30:01 +0000 (13:30 +0000)
https://bugs.webkit.org/show_bug.cgi?id=196811

createGenericCue() is only defined when VIDEO_TRACK is enabled.

Patch by Pablo Saavedra <psaavedra@igalia.com> on 2019-04-11
Reviewed by Eric Carlson.

* testing/Internals.cpp:
(WebCore::Internals::createGenericCue):
* testing/Internals.h:

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

Source/WebCore/ChangeLog
Source/WebCore/testing/Internals.cpp
Source/WebCore/testing/Internals.h

index 8181786..9762bf4 100644 (file)
@@ -1,3 +1,16 @@
+2019-04-11  Pablo Saavedra  <psaavedra@igalia.com>
+
+        [WPE] Build error with ENABLE_VIDEO=OFF after r244078
+        https://bugs.webkit.org/show_bug.cgi?id=196811
+
+        createGenericCue() is only defined when VIDEO_TRACK is enabled.
+
+        Reviewed by Eric Carlson.
+
+        * testing/Internals.cpp:
+        (WebCore::Internals::createGenericCue):
+        * testing/Internals.h:
+
 2019-04-11  Carlos Garcia Campos  <cgarcia@igalia.com>
 
         [GTK] Layout test accessibility/aria-hidden-false-works-in-subtrees.html fails after r184890
index d129066..4da430d 100644 (file)
@@ -3577,20 +3577,15 @@ ExceptionOr<void> Internals::setCaptionDisplayMode(const String& mode)
     return { };
 }
 
+#if ENABLE(VIDEO_TRACK)
 RefPtr<TextTrackCueGeneric> Internals::createGenericCue(double startTime, double endTime, String text)
 {
     Document* document = contextDocument();
     if (!document || !document->page())
         return nullptr;
-#if ENABLE(VIDEO_TRACK)
     return TextTrackCueGeneric::create(*document, MediaTime::createWithDouble(startTime), MediaTime::createWithDouble(endTime), text);
-#else
-    UNUSED_PARAM(startTime);
-    UNUSED_PARAM(endTime);
-    UNUSED_PARAM(text);
-    return nullptr;
-#endif
 }
+#endif
 
 #if ENABLE(VIDEO)
 
index c27f268..56ce6f1 100644 (file)
@@ -91,13 +91,16 @@ class SerializedScriptValue;
 class SourceBuffer;
 class StringCallback;
 class StyleSheet;
-class TextTrackCueGeneric;
 class TimeRanges;
 class TypeConversions;
 class VoidCallback;
 class WebGLRenderingContext;
 class XMLHttpRequest;
 
+#if ENABLE(VIDEO_TRACK)
+class TextTrackCueGeneric;
+#endif
+
 #if ENABLE(SERVICE_WORKER)
 class ServiceWorker;
 #endif
@@ -544,7 +547,9 @@ public:
     ExceptionOr<void> setCaptionsStyleSheetOverride(const String&);
     ExceptionOr<void> setPrimaryAudioTrackLanguageOverride(const String&);
     ExceptionOr<void> setCaptionDisplayMode(const String&);
+#if ENABLE(VIDEO_TRACK)
     RefPtr<TextTrackCueGeneric> createGenericCue(double startTime, double endTime, String text);
+#endif
 
 #if ENABLE(VIDEO)
     Ref<TimeRanges> createTimeRanges(Float32Array& startTimes, Float32Array& endTimes);