Diff
Modified: trunk/Source/WebCore/ChangeLog (219342 => 219343)
--- trunk/Source/WebCore/ChangeLog 2017-07-11 18:01:15 UTC (rev 219342)
+++ trunk/Source/WebCore/ChangeLog 2017-07-11 18:07:24 UTC (rev 219343)
@@ -1,3 +1,22 @@
+2017-07-11 Timothy Hatcher <timo...@hatcher.name>
+
+ Fix broken build when ENABLE_VIDEO is disabled.
+ https://bugs.webkit.org/show_bug.cgi?id=174368
+
+ Reviewed by Alex Christensen.
+
+ * dom/Document.cpp:
+ * html/canvas/WebGLRenderingContextBase.cpp:
+ (WebCore::WebGLRenderingContextBase::texSubImage2D):
+ (WebCore::WebGLRenderingContextBase::texImage2D):
+ * html/canvas/WebGLRenderingContextBase.h:
+ * html/canvas/WebGLRenderingContextBase.idl:
+ * testing/Internals.cpp:
+ (WebCore::Internals::mediaResponseSources):
+ (WebCore::Internals::mediaResponseContentRanges):
+ * testing/Internals.h:
+ * testing/Internals.idl:
+
2017-07-11 Ali Juma <aj...@chromium.org>
elementFromPoint() should consider x and y to be in client (layout viewport) coordinates
Modified: trunk/Source/WebCore/dom/Document.cpp (219342 => 219343)
--- trunk/Source/WebCore/dom/Document.cpp 2017-07-11 18:01:15 UTC (rev 219342)
+++ trunk/Source/WebCore/dom/Document.cpp 2017-07-11 18:07:24 UTC (rev 219343)
@@ -188,6 +188,7 @@
#include "TransformSource.h"
#include "TreeWalker.h"
#include "ValidationMessageClient.h"
+#include "VisibilityChangeClient.h"
#include "VisitedLinkState.h"
#include "WheelEvent.h"
#include "WindowFeatures.h"
Modified: trunk/Source/WebCore/html/canvas/WebGLRenderingContextBase.cpp (219342 => 219343)
--- trunk/Source/WebCore/html/canvas/WebGLRenderingContextBase.cpp 2017-07-11 18:01:15 UTC (rev 219342)
+++ trunk/Source/WebCore/html/canvas/WebGLRenderingContextBase.cpp 2017-07-11 18:07:24 UTC (rev 219343)
@@ -3621,7 +3621,9 @@
else
texSubImage2DImpl(target, level, xoffset, yoffset, format, type, canvas->copiedImage(), GraphicsContext3D::HtmlDomCanvas, m_unpackFlipY, m_unpackPremultiplyAlpha);
return { };
- }, [&](const RefPtr<HTMLVideoElement>& video) -> ExceptionOr<void> {
+ }
+#if ENABLE(VIDEO)
+ , [&](const RefPtr<HTMLVideoElement>& video) -> ExceptionOr<void> {
ExceptionCode ec = 0;
if (isContextLostOrPending() || !validateHTMLVideoElement("texSubImage2D", video.get(), ec))
return ec ? Exception { ec } : ExceptionOr<void> { };
@@ -3644,7 +3646,9 @@
return { };
texSubImage2DImpl(target, level, xoffset, yoffset, format, type, image.get(), GraphicsContext3D::HtmlDomVideo, m_unpackFlipY, m_unpackPremultiplyAlpha);
return { };
- });
+ }
+#endif
+ );
return WTF::visit(visitor, source.value());
}
@@ -4131,7 +4135,9 @@
else
texImage2DImpl(target, level, internalformat, format, type, canvas->copiedImage(), GraphicsContext3D::HtmlDomCanvas, m_unpackFlipY, m_unpackPremultiplyAlpha);
return { };
- }, [&](const RefPtr<HTMLVideoElement>& video) -> ExceptionOr<void> {
+ }
+#if ENABLE(VIDEO)
+ , [&](const RefPtr<HTMLVideoElement>& video) -> ExceptionOr<void> {
ExceptionCode ec = 0;
if (isContextLostOrPending() || !validateHTMLVideoElement("texImage2D", video.get(), ec)
|| !validateTexFunc("texImage2D", TexImage, SourceHTMLVideoElement, target, level, internalformat, video->videoWidth(), video->videoHeight(), 0, format, type, 0, 0))
@@ -4161,7 +4167,9 @@
return { };
texImage2DImpl(target, level, internalformat, format, type, image.get(), GraphicsContext3D::HtmlDomVideo, m_unpackFlipY, m_unpackPremultiplyAlpha);
return { };
- });
+ }
+#endif
+ );
return WTF::visit(visitor, source.value());
}
Modified: trunk/Source/WebCore/html/canvas/WebGLRenderingContextBase.h (219342 => 219343)
--- trunk/Source/WebCore/html/canvas/WebGLRenderingContextBase.h 2017-07-11 18:01:15 UTC (rev 219342)
+++ trunk/Source/WebCore/html/canvas/WebGLRenderingContextBase.h 2017-07-11 18:07:24 UTC (rev 219343)
@@ -56,7 +56,6 @@
class EXTsRGB;
class EXTFragDepth;
class HTMLImageElement;
-class HTMLVideoElement;
class ImageData;
class IntSize;
class OESStandardDerivatives;
@@ -84,6 +83,10 @@
class WebGLShaderPrecisionFormat;
class WebGLUniformLocation;
+#if ENABLE(VIDEO)
+class HTMLVideoElement;
+#endif
+
inline void clip1D(GC3Dint start, GC3Dsizei range, GC3Dsizei sourceRange, GC3Dint* clippedStart, GC3Dsizei* clippedRange)
{
ASSERT(clippedStart && clippedRange);
@@ -242,7 +245,12 @@
void texImage2D(GC3Denum target, GC3Dint level, GC3Denum internalformat, GC3Dsizei width, GC3Dsizei height, GC3Dint border, GC3Denum format, GC3Denum type, RefPtr<ArrayBufferView>&&);
+#if ENABLE(VIDEO)
using TexImageSource = WTF::Variant<RefPtr<ImageData>, RefPtr<HTMLImageElement>, RefPtr<HTMLCanvasElement>, RefPtr<HTMLVideoElement>>;
+#else
+ using TexImageSource = WTF::Variant<RefPtr<ImageData>, RefPtr<HTMLImageElement>, RefPtr<HTMLCanvasElement>>;
+#endif
+
ExceptionOr<void> texImage2D(GC3Denum target, GC3Dint level, GC3Denum internalformat, GC3Denum format, GC3Denum type, std::optional<TexImageSource>);
void texParameterf(GC3Denum target, GC3Denum pname, GC3Dfloat param);
@@ -683,7 +691,9 @@
SourceImageData,
SourceHTMLImageElement,
SourceHTMLCanvasElement,
+#if ENABLE(VIDEO)
SourceHTMLVideoElement,
+#endif
};
// Helper function for tex{Sub}Image2D to check if the input format/type/level/target/width/height/border/xoffset/yoffset are valid.
Modified: trunk/Source/WebCore/html/canvas/WebGLRenderingContextBase.idl (219342 => 219343)
--- trunk/Source/WebCore/html/canvas/WebGLRenderingContextBase.idl 2017-07-11 18:01:15 UTC (rev 219342)
+++ trunk/Source/WebCore/html/canvas/WebGLRenderingContextBase.idl 2017-07-11 18:07:24 UTC (rev 219343)
@@ -42,7 +42,11 @@
typedef (Int32Array or sequence<GLint>) Int32List;
// FIXME: Should allow ImageBitmap too.
+#ifdef ENABLE_VIDEO
typedef (ImageData or HTMLImageElement or HTMLCanvasElement or HTMLVideoElement) TexImageSource;
+#else
+typedef (ImageData or HTMLImageElement or HTMLCanvasElement) TexImageSource;
+#endif
[
Conditional=WEBGL,
Modified: trunk/Source/WebCore/testing/Internals.cpp (219342 => 219343)
--- trunk/Source/WebCore/testing/Internals.cpp 2017-07-11 18:01:15 UTC (rev 219342)
+++ trunk/Source/WebCore/testing/Internals.cpp 2017-07-11 18:07:24 UTC (rev 219343)
@@ -647,30 +647,6 @@
return responseSourceToString(request.resourceResponse());
}
-Vector<String> Internals::mediaResponseSources(HTMLMediaElement& media)
-{
- auto* resourceLoader = media.lastMediaResourceLoaderForTesting();
- if (!resourceLoader)
- return { };
- Vector<String> result;
- auto responses = resourceLoader->responsesForTesting();
- for (auto& response : responses)
- result.append(responseSourceToString(response));
- return result;
-}
-
-Vector<String> Internals::mediaResponseContentRanges(HTMLMediaElement& media)
-{
- auto* resourceLoader = media.lastMediaResourceLoaderForTesting();
- if (!resourceLoader)
- return { };
- Vector<String> result;
- auto responses = resourceLoader->responsesForTesting();
- for (auto& response : responses)
- result.append(response.httpHeaderField(HTTPHeaderName::ContentRange));
- return result;
-}
-
bool Internals::isSharingStyleSheetContents(HTMLLinkElement& a, HTMLLinkElement& b)
{
if (!a.sheet() || !b.sheet())
@@ -3059,6 +3035,30 @@
#if ENABLE(VIDEO)
+Vector<String> Internals::mediaResponseSources(HTMLMediaElement& media)
+{
+ auto* resourceLoader = media.lastMediaResourceLoaderForTesting();
+ if (!resourceLoader)
+ return { };
+ Vector<String> result;
+ auto responses = resourceLoader->responsesForTesting();
+ for (auto& response : responses)
+ result.append(responseSourceToString(response));
+ return result;
+}
+
+Vector<String> Internals::mediaResponseContentRanges(HTMLMediaElement& media)
+{
+ auto* resourceLoader = media.lastMediaResourceLoaderForTesting();
+ if (!resourceLoader)
+ return { };
+ Vector<String> result;
+ auto responses = resourceLoader->responsesForTesting();
+ for (auto& response : responses)
+ result.append(response.httpHeaderField(HTTPHeaderName::ContentRange));
+ return result;
+}
+
void Internals::simulateAudioInterruption(HTMLMediaElement& element)
{
#if USE(GSTREAMER)
Modified: trunk/Source/WebCore/testing/Internals.h (219342 => 219343)
--- trunk/Source/WebCore/testing/Internals.h 2017-07-11 18:01:15 UTC (rev 219342)
+++ trunk/Source/WebCore/testing/Internals.h 2017-07-11 18:07:24 UTC (rev 219343)
@@ -104,8 +104,6 @@
bool isPreloaded(const String& url);
bool isLoadingFromMemoryCache(const String& url);
String xhrResponseSource(XMLHttpRequest&);
- Vector<String> mediaResponseSources(HTMLMediaElement&);
- Vector<String> mediaResponseContentRanges(HTMLMediaElement&);
bool isSharingStyleSheetContents(HTMLLinkElement&, HTMLLinkElement&);
bool isStyleSheetLoadingSubresources(HTMLLinkElement&);
enum class CachePolicy { UseProtocolCachePolicy, ReloadIgnoringCacheData, ReturnCacheDataElseLoad, ReturnCacheDataDontLoad };
@@ -444,6 +442,8 @@
String getImageSourceURL(Element&);
#if ENABLE(VIDEO)
+ Vector<String> mediaResponseSources(HTMLMediaElement&);
+ Vector<String> mediaResponseContentRanges(HTMLMediaElement&);
void simulateAudioInterruption(HTMLMediaElement&);
ExceptionOr<bool> mediaElementHasCharacteristic(HTMLMediaElement&, const String&);
#endif
Modified: trunk/Source/WebCore/testing/Internals.idl (219342 => 219343)
--- trunk/Source/WebCore/testing/Internals.idl 2017-07-11 18:01:15 UTC (rev 219342)
+++ trunk/Source/WebCore/testing/Internals.idl 2017-07-11 18:07:24 UTC (rev 219343)
@@ -97,8 +97,6 @@
boolean isPreloaded(DOMString url);
boolean isLoadingFromMemoryCache(DOMString url);
DOMString xhrResponseSource(XMLHttpRequest xhr);
- sequence<DOMString> mediaResponseSources(HTMLMediaElement media);
- sequence<DOMString> mediaResponseContentRanges(HTMLMediaElement media);
boolean isSharingStyleSheetContents(HTMLLinkElement a, HTMLLinkElement b);
boolean isStyleSheetLoadingSubresources(HTMLLinkElement link);
void clearMemoryCache();
@@ -406,6 +404,8 @@
void enableAutoSizeMode(boolean enabled, long minimumWidth, long minimumHeight, long maximumWidth, long maximumHeight);
+ [Conditional=VIDEO] sequence<DOMString> mediaResponseSources(HTMLMediaElement media);
+ [Conditional=VIDEO] sequence<DOMString> mediaResponseContentRanges(HTMLMediaElement media);
[Conditional=VIDEO] void simulateAudioInterruption(HTMLMediaElement element);
[Conditional=VIDEO, MayThrowException] boolean mediaElementHasCharacteristic(HTMLMediaElement element, DOMString characteristic);