Unreviewed, rolling out r212637.
authorryanhaddad@apple.com <ryanhaddad@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 20 Feb 2017 17:12:06 +0000 (17:12 +0000)
committerryanhaddad@apple.com <ryanhaddad@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 20 Feb 2017 17:12:06 +0000 (17:12 +0000)
This change broke iOS builds.

Reverted changeset:

"Add 'webglcontextchanged' WebGLContextEvent"
https://bugs.webkit.org/show_bug.cgi?id=168595
http://trac.webkit.org/changeset/212637

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

17 files changed:
LayoutTests/ChangeLog
LayoutTests/fast/canvas/webgl/webglcontextchangedevent-expected.txt [deleted file]
LayoutTests/fast/canvas/webgl/webglcontextchangedevent.html [deleted file]
LayoutTests/platform/gtk/TestExpectations
LayoutTests/platform/win/TestExpectations
Source/WebCore/ChangeLog
Source/WebCore/dom/EventNames.h
Source/WebCore/html/canvas/WebGLRenderingContextBase.cpp
Source/WebCore/html/canvas/WebGLRenderingContextBase.h
Source/WebCore/html/canvas/WebGLRenderingContextBase.idl
Source/WebCore/platform/graphics/GraphicsContext3D.cpp
Source/WebCore/platform/graphics/GraphicsContext3D.h
Source/WebCore/platform/graphics/mac/GraphicsContext3DMac.mm
Source/WebCore/platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp
Source/WebCore/testing/Internals.cpp
Source/WebCore/testing/Internals.h
Source/WebCore/testing/Internals.idl

index 5b4c9c9..892a71f 100644 (file)
@@ -1,3 +1,15 @@
+2017-02-20  Ryan Haddad  <ryanhaddad@apple.com>
+
+        Unreviewed, rolling out r212637.
+
+        This change broke iOS builds.
+
+        Reverted changeset:
+
+        "Add 'webglcontextchanged' WebGLContextEvent"
+        https://bugs.webkit.org/show_bug.cgi?id=168595
+        http://trac.webkit.org/changeset/212637
+
 2017-02-20  Dean Jackson  <dino@apple.com>
 
         Add 'webglcontextchanged' WebGLContextEvent
diff --git a/LayoutTests/fast/canvas/webgl/webglcontextchangedevent-expected.txt b/LayoutTests/fast/canvas/webgl/webglcontextchangedevent-expected.txt
deleted file mode 100644 (file)
index a3ffb5f..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-  
-We should see three changed events.
-
-Saw webglcontextchanged event.
-
-Saw webglcontextchanged event.
-
-Saw webglcontextchanged event.
diff --git a/LayoutTests/fast/canvas/webgl/webglcontextchangedevent.html b/LayoutTests/fast/canvas/webgl/webglcontextchangedevent.html
deleted file mode 100644 (file)
index 39d77b7..0000000
+++ /dev/null
@@ -1,50 +0,0 @@
-<script>
-if (window.testRunner) {
-    testRunner.dumpAsText();
-    testRunner.waitUntilDone();
-}
-
-function log(msg)
-{
-    let p = document.createElement("p");
-    p.textContent = msg;
-    document.body.appendChild(p);
-}
-
-function runTest()
-{
-    if (!window.internals) {
-        log("This test must run inside DRT/WKTR.");
-        return;
-    }
-
-    log("We should see three changed events.");
-
-    let changedEventsSeen = 0;
-
-    let handleChangedEvent = (event) => {
-        log("Saw webglcontextchanged event.");
-        changedEventsSeen++;
-        if (changedEventsSeen == 3)
-            testRunner.notifyDone();
-    }
-
-    document.querySelectorAll("canvas").forEach((c) =>
-    {
-        c.addEventListener("webglcontextchanged", handleChangedEvent, false);
-        let gl = c.getContext("webgl");
-        gl.clearColor(1, 0, 0, 1);
-        gl.clear(gl.COLOR_BUFFER_BIT);
-    });
-
-    let gl = document.querySelector("canvas").getContext("webgl");
-    window.internals.simulateWebGLContextChanged(gl);
-}
-
-
-window.addEventListener("load", runTest, false);
-</script>
-
-<canvas></canvas>
-<canvas></canvas>
-<canvas></canvas>
index 12006c0..1998c79 100644 (file)
@@ -665,9 +665,6 @@ webkit.org/b/153466 inspector/sampling-profiler [ Skip ]
 # This requires a specific font on Mac
 fast/text/hidpi-text-selection-gap-between-words.html [ Skip ]
 
-# webglcontextchanged event not supported
-fast/canvas/webgl/webglcontextchangedevent.html [ Skip ]
-
 # Test requires hardcoded font names, which I do not have for this port.
 fast/text/han-generic-font-families.html [ WontFix ]
 fast/text/hangul-generic-font-families.html [ WontFix ]
index 74c0491..ea297a4 100644 (file)
@@ -3784,6 +3784,3 @@ imported/w3c/web-platform-tests/webrtc [ Skip ]
 
 # WebCrypto tests are failing.
 webkit.org/b/165090 imported/w3c/WebCryptoAPI [ Skip ]
-
-# webglcontextchanged event not supported
-fast/canvas/webgl/webglcontextchangedevent.html [ Skip ]
index fec631a..3b7be25 100644 (file)
@@ -1,3 +1,15 @@
+2017-02-20  Ryan Haddad  <ryanhaddad@apple.com>
+
+        Unreviewed, rolling out r212637.
+
+        This change broke iOS builds.
+
+        Reverted changeset:
+
+        "Add 'webglcontextchanged' WebGLContextEvent"
+        https://bugs.webkit.org/show_bug.cgi?id=168595
+        http://trac.webkit.org/changeset/212637
+
 2017-02-20  Carlos Garcia Campos  <cgarcia@igalia.com>
 
         Remove code under USE(GRAPHICS_SURFACE)
index 3ec71c1..877ffb7 100644 (file)
@@ -242,7 +242,6 @@ namespace WebCore {
     macro(volumechange) \
     macro(waiting) \
     macro(waitingforkey) \
-    macro(webglcontextchanged) \
     macro(webglcontextcreationerror) \
     macro(webglcontextlost) \
     macro(webglcontextrestored) \
index 079535a..fe3cb0c 100644 (file)
@@ -5631,17 +5631,6 @@ void WebGLRenderingContextBase::maybeRestoreContext()
     canvas().dispatchEvent(WebGLContextEvent::create(eventNames().webglcontextrestoredEvent, false, true, emptyString()));
 }
 
-void WebGLRenderingContextBase::dispatchContextChangedEvent()
-{
-    canvas().dispatchEvent(WebGLContextEvent::create(eventNames().webglcontextchangedEvent, false, true, emptyString()));
-}
-
-void WebGLRenderingContextBase::simulateContextChanged()
-{
-    if (m_context)
-        m_context->simulateContextChanged();
-}
-
 String WebGLRenderingContextBase::ensureNotNull(const String& text) const
 {
     if (text.isNull())
index 6bb7d44..18334eb 100644 (file)
@@ -340,8 +340,6 @@ public:
     void recycleContext();
     void forceRestoreContext();
     void loseContextImpl(LostContextMode);
-    void dispatchContextChangedEvent();
-    WEBCORE_EXPORT void simulateContextChanged();
 
     GraphicsContext3D* graphicsContext3D() const { return m_context.get(); }
     WebGLContextGroup* contextGroup() const { return m_contextGroup.get(); }
index 11698be..63b64cd 100644 (file)
@@ -51,7 +51,6 @@ typedef (ImageData or HTMLImageElement or HTMLCanvasElement or HTMLVideoElement)
     DoNotCheckConstants,
     JSCustomMarkFunction,
     NoInterfaceObject,
-    ExportMacro=WEBCORE_EXPORT,
 ] interface WebGLRenderingContextBase {
 
     // back-reference to the canvas
index 2b2cd1c..76bab7c 100644 (file)
@@ -659,10 +659,6 @@ unsigned GraphicsContext3D::getChannelBitsByFormat(GC3Denum format)
 void GraphicsContext3D::setContextVisibility(bool)
 {
 }
-
-void GraphicsContext3D::simulateContextChanged()
-{
-}
 #endif
 
 } // namespace WebCore
index 0dfe935..5f25e3a 100644 (file)
@@ -1133,9 +1133,6 @@ public:
     void forceContextLost();
     void recycleContext();
 
-    void dispatchContextChangedNotification();
-    void simulateContextChanged();
-
     void paintRenderingResultsToCanvas(ImageBuffer*);
     RefPtr<ImageData> paintRenderingResultsToImageData();
     bool paintCompositedResultsToCanvas(ImageBuffer*);
@@ -1430,8 +1427,7 @@ private:
     friend class GraphicsContext3DPrivate;
     std::unique_ptr<GraphicsContext3DPrivate> m_private;
 #endif
-
-    // FIXME: Layering violation.
+    
     WebGLRenderingContextBase* m_webglContext;
 
     bool m_isForWebGL2 { false };
index 35a0cd8..acae373 100644 (file)
@@ -189,10 +189,8 @@ static void displayWasReconfigured(CGDirectDisplayID, CGDisplayChangeSummaryFlag
 void GraphicsContext3DManager::updateAllContexts()
 {
 #if PLATFORM(MAC)
-    for (auto* context : m_contexts) {
+    for (auto* context : m_contexts)
         context->updateCGLContext();
-        context->dispatchContextChangedNotification();
-    }
 #endif
 }
 
@@ -722,11 +720,6 @@ void GraphicsContext3D::setErrorMessageCallback(std::unique_ptr<ErrorMessageCall
 {
 }
 
-void GraphicsContext3D::simulateContextChanged()
-{
-    manager().updateAllContexts();
-}
-
 }
 
 #endif // ENABLE(GRAPHICS_CONTEXT_3D)
index d69d62d..1536faf 100644 (file)
@@ -1895,14 +1895,6 @@ void GraphicsContext3D::recycleContext()
 #endif
 }
 
-void GraphicsContext3D::dispatchContextChangedNotification()
-{
-#if ENABLE(WEBGL)
-    if (m_webglContext)
-        m_webglContext->dispatchContextChangedEvent();
-#endif
-}
-
 void GraphicsContext3D::texImage2DDirect(GC3Denum target, GC3Dint level, GC3Denum internalformat, GC3Dsizei width, GC3Dsizei height, GC3Dint border, GC3Denum format, GC3Denum type, const void* pixels)
 {
     makeContextCurrent();
index cbb14f7..6d26d55 100644 (file)
 #include "UserMediaController.h"
 #include "ViewportArguments.h"
 #include "WebCoreJSClientData.h"
-#include "WebGLRenderingContextBase.h"
 #include "WorkerThread.h"
 #include "WritingDirection.h"
 #include "XMLHttpRequest.h"
@@ -3713,12 +3712,4 @@ void Internals::setAsRunningUserScripts(Document& document)
         document.page()->setAsRunningUserScripts();
 }
 
-#if ENABLE(WEBGL)
-void Internals::simulateWebGLContextChanged(WebGLRenderingContextBase& context)
-{
-    context.simulateContextChanged();
-}
-#endif
-
-
 } // namespace WebCore
index 473a344..f5c08a8 100644 (file)
@@ -71,7 +71,6 @@ class SourceBuffer;
 class StyleSheet;
 class TimeRanges;
 class TypeConversions;
-class WebGLRenderingContextBase;
 class XMLHttpRequest;
 
 class Internals final : public RefCounted<Internals>, private ContextDestructionObserver {
@@ -532,10 +531,6 @@ public:
 
     void setAsRunningUserScripts(Document&);
 
-#if ENABLE(WEBGL)
-    void simulateWebGLContextChanged(WebGLRenderingContextBase&);
-#endif
-
 private:
     explicit Internals(Document&);
     Document* contextDocument() const;
index 8bbb9de..155b70b 100644 (file)
@@ -504,6 +504,4 @@ enum EventThrottlingBehavior {
     [CallWith=Document] void setAsRunningUserScripts();
 
     void disableTileSizeUpdateDelay();
-
-    [Conditional=WEBGL] void simulateWebGLContextChanged(WebGLRenderingContextBase context);
 };