<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[237677] trunk</title>
</head>
<body>

<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/237677">237677</a></dd>
<dt>Author</dt> <dd>csaavedra@igalia.com</dd>
<dt>Date</dt> <dd>2018-11-01 04:27:11 -0700 (Thu, 01 Nov 2018)</dd>
</dl>

<h3>Log Message</h3>
<pre>Fix build with VIDEO and WEB_AUDIO disabled
https://bugs.webkit.org/show_bug.cgi?id=191147

Reviewed by Philippe Normand.

Source/WebCore:

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:

Tools:

* MiniBrowser/gtk/main.c:
(main): Condition GST includes and calls</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreModulesmediasourceVideoPlaybackQualitycpp">trunk/Source/WebCore/Modules/mediasource/VideoPlaybackQuality.cpp</a></li>
<li><a href="#trunkSourceWebCoreModulesmediasourceVideoPlaybackQualityh">trunk/Source/WebCore/Modules/mediasource/VideoPlaybackQuality.h</a></li>
<li><a href="#trunkSourceWebCoreModulesmediasourceVideoPlaybackQualityidl">trunk/Source/WebCore/Modules/mediasource/VideoPlaybackQuality.idl</a></li>
<li><a href="#trunkSourceWebCoredomDocumentcpp">trunk/Source/WebCore/dom/Document.cpp</a></li>
<li><a href="#trunkSourceWebCoreinspectoragentsInspectorDOMAgentcpp">trunk/Source/WebCore/inspector/agents/InspectorDOMAgent.cpp</a></li>
<li><a href="#trunkSourceWebCoreinspectoragentsInspectorDOMAgenth">trunk/Source/WebCore/inspector/agents/InspectorDOMAgent.h</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderThemeGtkcpp">trunk/Source/WebCore/rendering/RenderThemeGtk.cpp</a></li>
<li><a href="#trunkToolsChangeLog">trunk/Tools/ChangeLog</a></li>
<li><a href="#trunkToolsMiniBrowsergtkmainc">trunk/Tools/MiniBrowser/gtk/main.c</a></li>
</ul>

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

</body>
</html>