Unreviewed. Comment out part of r162036 which broke WebGL on many ports.
authorroger_fong@apple.com <roger_fong@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 15 Jan 2014 18:11:15 +0000 (18:11 +0000)
committerroger_fong@apple.com <roger_fong@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 15 Jan 2014 18:11:15 +0000 (18:11 +0000)
* html/HTMLCanvasElement.cpp:
(WebCore::HTMLCanvasElement::getContext):

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

Source/WebCore/ChangeLog
Source/WebCore/html/HTMLCanvasElement.cpp

index d2cbe27..92ae9af 100644 (file)
@@ -1,3 +1,10 @@
+2014-01-15  Roger Fong  <roger_fong@apple.com>
+
+        Unreviewed. Comment out part of r162036 which broke WebGL on many ports.
+
+        * html/HTMLCanvasElement.cpp:
+        (WebCore::HTMLCanvasElement::getContext):
+
 2014-01-15  Zoltan Horvath  <zoltan@webkit.org>
 
         WordMeasurement is a struct, not a class
index 0bf46af..96cad29 100644 (file)
@@ -229,11 +229,14 @@ CanvasRenderingContext* HTMLCanvasElement::getContext(const String& type, Canvas
                 Page* page = document().page();
                 if (page && !document().url().isLocalFile()) {
                     WebGLLoadPolicy policy = page->mainFrame().loader().client().webGLPolicyForHost(document().url().host());
-
-                    if (policy == WebGLAsk) {
-                        page->chrome().client().webGLContextCreated(this);
-                        return nullptr;
-                    }
+                    // FIXME: This breaks most clients because they will not implement webGLContextCreated in the way want them to
+                    //        nor should they be expected to. We need to find a way to not run this code if the client hasn't implemented
+                    //        webGLContextCreated. It might also make sense for the method to return true or false depending on
+                    //        whether or not the client wants the page to continue loading after the call.
+                    // if (policy == WebGLAsk) {
+                    //    page->chrome().client().webGLContextCreated(this);
+                    //    return nullptr;
+                    // }
                     if (policy == WebGLBlock)
                         return nullptr;
                 }