Diff
Modified: trunk/Source/WebCore/ChangeLog (237676 => 237677)
--- trunk/Source/WebCore/ChangeLog 2018-11-01 10:03:40 UTC (rev 237676)
+++ trunk/Source/WebCore/ChangeLog 2018-11-01 11:27:11 UTC (rev 237677)
@@ -1,3 +1,25 @@
+2018-11-01 Claudio Saavedra <csaave...@igalia.com>
+
+ Fix build with VIDEO and WEB_AUDIO disabled
+ https://bugs.webkit.org/show_bug.cgi?id=191147
+
+ Reviewed by Philippe Normand.
+
+ Supported or not, there were a few build fixes needed
+ to be able to build WebKit with media disabled. Mostly
+ low-hanging fruits.
+
+ * Modules/mediasource/VideoPlaybackQuality.cpp:
+ * Modules/mediasource/VideoPlaybackQuality.h:
+ * Modules/mediasource/VideoPlaybackQuality.idl:
+ * dom/Document.cpp:
+ (WebCore::Document::dispatchFullScreenChangeOrErrorEvent):
+ * inspector/agents/InspectorDOMAgent.cpp:
+ (WebCore::InspectorDOMAgent::InspectorDOMAgent):
+ (WebCore::InspectorDOMAgent::didCreateFrontendAndBackend):
+ * inspector/agents/InspectorDOMAgent.h:
+ * rendering/RenderThemeGtk.cpp:
+
2018-10-31 Devin Rousso <drou...@apple.com>
Web Inspector: Canvas: create a setting for auto-recording newly created contexts
Modified: trunk/Source/WebCore/Modules/mediasource/VideoPlaybackQuality.cpp (237676 => 237677)
--- trunk/Source/WebCore/Modules/mediasource/VideoPlaybackQuality.cpp 2018-11-01 10:03:40 UTC (rev 237676)
+++ trunk/Source/WebCore/Modules/mediasource/VideoPlaybackQuality.cpp 2018-11-01 11:27:11 UTC (rev 237677)
@@ -26,6 +26,8 @@
#include "config.h"
#include "VideoPlaybackQuality.h"
+#if ENABLE(VIDEO)
+
#include "MediaPlayer.h"
namespace WebCore {
@@ -46,3 +48,5 @@
}
}
+
+#endif // ENABLE(VIDEO)
Modified: trunk/Source/WebCore/Modules/mediasource/VideoPlaybackQuality.h (237676 => 237677)
--- trunk/Source/WebCore/Modules/mediasource/VideoPlaybackQuality.h 2018-11-01 10:03:40 UTC (rev 237676)
+++ trunk/Source/WebCore/Modules/mediasource/VideoPlaybackQuality.h 2018-11-01 11:27:11 UTC (rev 237677)
@@ -25,6 +25,8 @@
#pragma once
+#if ENABLE(VIDEO)
+
#include <wtf/Ref.h>
#include <wtf/RefCounted.h>
@@ -56,3 +58,5 @@
};
} // namespace WebCore
+
+#endif // ENABLE(VIDEO)
Modified: trunk/Source/WebCore/Modules/mediasource/VideoPlaybackQuality.idl (237676 => 237677)
--- trunk/Source/WebCore/Modules/mediasource/VideoPlaybackQuality.idl 2018-11-01 10:03:40 UTC (rev 237676)
+++ trunk/Source/WebCore/Modules/mediasource/VideoPlaybackQuality.idl 2018-11-01 11:27:11 UTC (rev 237677)
@@ -24,6 +24,7 @@
*/
[
+ Conditional=VIDEO,
NoInterfaceObject,
ImplementationLacksVTable,
] interface VideoPlaybackQuality {
Modified: trunk/Source/WebCore/dom/Document.cpp (237676 => 237677)
--- trunk/Source/WebCore/dom/Document.cpp 2018-11-01 10:03:40 UTC (rev 237676)
+++ trunk/Source/WebCore/dom/Document.cpp 2018-11-01 11:27:11 UTC (rev 237677)
@@ -6548,6 +6548,8 @@
#if ENABLE(VIDEO)
if (shouldNotifyMediaElement && is<HTMLMediaElement>(*node))
downcast<HTMLMediaElement>(*node).enteredOrExitedFullscreen();
+#else
+ UNUSED_PARAM(shouldNotifyMediaElement);
#endif
node->dispatchEvent(Event::create(eventName, Event::CanBubble::Yes, Event::IsCancelable::No));
}
Modified: trunk/Source/WebCore/inspector/agents/InspectorDOMAgent.cpp (237676 => 237677)
--- trunk/Source/WebCore/inspector/agents/InspectorDOMAgent.cpp 2018-11-01 10:03:40 UTC (rev 237676)
+++ trunk/Source/WebCore/inspector/agents/InspectorDOMAgent.cpp 2018-11-01 11:27:11 UTC (rev 237677)
@@ -284,7 +284,9 @@
, m_backendDispatcher(Inspector::DOMBackendDispatcher::create(context.backendDispatcher, this))
, m_pageAgent(pageAgent)
, m_overlay(overlay)
+#if ENABLE(VIDEO)
, m_mediaMetricsTimer(*this, &InspectorDOMAgent::mediaMetricsTimerFired)
+#endif
{
}
@@ -302,11 +304,13 @@
m_instrumentingAgents.setInspectorDOMAgent(this);
m_document = m_pageAgent->mainFrame().document();
+#if ENABLE(VIDEO)
if (m_document)
addEventListenersToNode(*m_document);
for (auto* mediaElement : HTMLMediaElement::allMediaElements())
addEventListenersToNode(*mediaElement);
+#endif
if (m_nodeToFocus)
focusNode();
@@ -2146,6 +2150,7 @@
return pushNodePathToFrontend(&node);
}
+#if ENABLE(VIDEO)
void InspectorDOMAgent::addEventListenersToNode(Node& node)
{
auto callback = EventFiredCallback::create(*this);
@@ -2186,6 +2191,7 @@
m_mediaMetricsTimer.start(0_s, 1_s / 15.);
}
}
+#endif
void InspectorDOMAgent::didInsertDOMNode(Node& node)
{
@@ -2453,6 +2459,7 @@
return 0;
}
+#if ENABLE(VIDEO)
void InspectorDOMAgent::mediaMetricsTimerFired()
{
// FIXME: remove metrics information for any media element when it's destroyed
@@ -2495,6 +2502,7 @@
return !HTMLMediaElement::allMediaElements().contains(entry.key);
});
}
+#endif
Node* InspectorDOMAgent::nodeForPath(const String& path)
{
Modified: trunk/Source/WebCore/inspector/agents/InspectorDOMAgent.h (237676 => 237677)
--- trunk/Source/WebCore/inspector/agents/InspectorDOMAgent.h 2018-11-01 10:03:40 UTC (rev 237676)
+++ trunk/Source/WebCore/inspector/agents/InspectorDOMAgent.h 2018-11-01 11:27:11 UTC (rev 237677)
@@ -64,7 +64,9 @@
class InspectorHistory;
class InspectorOverlay;
class InspectorPageAgent;
+#if ENABLE(VIDEO)
class HTMLMediaElement;
+#endif
class HitTestResult;
class Node;
class PseudoElement;
@@ -225,7 +227,9 @@
int idForEventListener(EventTarget&, const AtomicString& eventType, EventListener&, bool capture);
private:
+#if ENABLE(VIDEO)
void mediaMetricsTimerFired();
+#endif
void highlightMousedOverNode();
void setSearchingForNode(ErrorString&, bool enabled, const JSON::Object* highlightConfig);
@@ -288,6 +292,7 @@
bool m_suppressAttributeModifiedEvent { false };
bool m_documentRequested { false };
+#if ENABLE(VIDEO)
Timer m_mediaMetricsTimer;
struct MediaMetrics {
unsigned displayCompositedFrames { 0 };
@@ -303,6 +308,7 @@
// The pointer key for this map should not be used for anything other than matching.
HashMap<HTMLMediaElement*, MediaMetrics> m_mediaMetrics;
+#endif
struct InspectorEventListener {
int identifier { 1 };
Modified: trunk/Source/WebCore/rendering/RenderThemeGtk.cpp (237676 => 237677)
--- trunk/Source/WebCore/rendering/RenderThemeGtk.cpp 2018-11-01 10:03:40 UTC (rev 237676)
+++ trunk/Source/WebCore/rendering/RenderThemeGtk.cpp 2018-11-01 11:27:11 UTC (rev 237677)
@@ -295,6 +295,7 @@
}
#endif // !GTK_CHECK_VERSION(3, 20, 0)
+#if ENABLE(VIDEO)
static bool nodeHasPseudo(Node& node, const char* pseudo)
{
return is<Element>(node) && downcast<Element>(node).pseudo() == pseudo;
@@ -312,6 +313,7 @@
return element.classNames().contains(className);
}
+#endif // ENABLE(VIDEO)
RenderThemeGtk::~RenderThemeGtk() = default;
Modified: trunk/Tools/ChangeLog (237676 => 237677)
--- trunk/Tools/ChangeLog 2018-11-01 10:03:40 UTC (rev 237676)
+++ trunk/Tools/ChangeLog 2018-11-01 11:27:11 UTC (rev 237677)
@@ -1,3 +1,13 @@
+2018-11-01 Claudio Saavedra <csaave...@igalia.com>
+
+ Fix build with VIDEO and WEB_AUDIO disabled
+ https://bugs.webkit.org/show_bug.cgi?id=191147
+
+ Reviewed by Philippe Normand.
+
+ * MiniBrowser/gtk/main.c:
+ (main): Condition GST includes and calls
+
2018-10-31 Justin Michaud <justin_mich...@apple.com>
Add Justin Michaud to the list of WebKit Committers
Modified: trunk/Tools/MiniBrowser/gtk/main.c (237676 => 237677)
--- trunk/Tools/MiniBrowser/gtk/main.c 2018-11-01 10:03:40 UTC (rev 237676)
+++ trunk/Tools/MiniBrowser/gtk/main.c 2018-11-01 11:27:11 UTC (rev 237677)
@@ -29,7 +29,9 @@
#include "BrowserWindow.h"
#include <errno.h>
+#if ENABLE_WEB_AUDIO || ENABLE_VIDEO
#include <gst/gst.h>
+#endif
#include <gtk/gtk.h>
#include <string.h>
#include <webkit2/webkit2.h>
@@ -480,7 +482,9 @@
GOptionContext *context = g_option_context_new(NULL);
g_option_context_add_main_entries(context, commandLineOptions, 0);
g_option_context_add_group(context, gtk_get_option_group(TRUE));
+#if ENABLE_WEB_AUDIO || ENABLE_VIDEO
g_option_context_add_group(context, gst_init_get_option_group());
+#endif
WebKitSettings *webkitSettings = webkit_settings_new();
webkit_settings_set_enable_developer_extras(webkitSettings, TRUE);