<!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>[190449] 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/190449">190449</a></dd>
<dt>Author</dt> <dd>dino@apple.com</dd>
<dt>Date</dt> <dd>2015-10-01 19:15:11 -0700 (Thu, 01 Oct 2015)</dd>
</dl>

<h3>Log Message</h3>
<pre>Rollout <a href="http://trac.webkit.org/projects/webkit/changeset/190446">r190446</a> for the moment. It broke the build.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsChangeLog">trunk/LayoutTests/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCorehtmlcanvasWebGL2RenderingContextcpp">trunk/Source/WebCore/html/canvas/WebGL2RenderingContext.cpp</a></li>
<li><a href="#trunkSourceWebCorehtmlcanvasWebGLRenderingContextcpp">trunk/Source/WebCore/html/canvas/WebGLRenderingContext.cpp</a></li>
<li><a href="#trunkSourceWebCorehtmlcanvasWebGLRenderingContextBasecpp">trunk/Source/WebCore/html/canvas/WebGLRenderingContextBase.cpp</a></li>
<li><a href="#trunkSourceWebCorehtmlcanvasWebGLRenderingContextBaseh">trunk/Source/WebCore/html/canvas/WebGLRenderingContextBase.h</a></li>
<li><a href="#trunkSourceWebCorepageSettingsin">trunk/Source/WebCore/page/Settings.in</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicsopenglExtensions3DOpenGLcpp">trunk/Source/WebCore/platform/graphics/opengl/Extensions3DOpenGL.cpp</a></li>
</ul>

<h3>Removed Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsfastcanvaswebglwebgldebugrendererinfoexpectedtxt">trunk/LayoutTests/fast/canvas/webgl/webgl-debug-renderer-info-expected.txt</a></li>
<li><a href="#trunkLayoutTestsfastcanvaswebglwebgldebugrendererinfohtml">trunk/LayoutTests/fast/canvas/webgl/webgl-debug-renderer-info.html</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ChangeLog (190448 => 190449)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ChangeLog        2015-10-02 01:53:45 UTC (rev 190448)
+++ trunk/LayoutTests/ChangeLog        2015-10-02 02:15:11 UTC (rev 190449)
</span><span class="lines">@@ -1,5 +1,12 @@
</span><span class="cx"> 2015-10-01  Dean Jackson  &lt;dino@apple.com&gt;
</span><span class="cx"> 
</span><ins>+        Rollout r190446 for the moment. It broke the build.
+
+        * fast/canvas/webgl/webgl-debug-renderer-info-expected.txt: Removed.
+        * fast/canvas/webgl/webgl-debug-renderer-info.html: Removed.
+
+2015-10-01  Dean Jackson  &lt;dino@apple.com&gt;
+
</ins><span class="cx">         Expose WEBGL_debug_renderer_info
</span><span class="cx">         https://bugs.webkit.org/show_bug.cgi?id=149735
</span><span class="cx">         &lt;rdar://problem/18343500&gt;
</span></span></pre></div>
<a id="trunkLayoutTestsfastcanvaswebglwebgldebugrendererinfoexpectedtxt"></a>
<div class="delfile"><h4>Deleted: trunk/LayoutTests/fast/canvas/webgl/webgl-debug-renderer-info-expected.txt (190448 => 190449)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/canvas/webgl/webgl-debug-renderer-info-expected.txt        2015-10-02 01:53:45 UTC (rev 190448)
+++ trunk/LayoutTests/fast/canvas/webgl/webgl-debug-renderer-info-expected.txt        2015-10-02 02:15:11 UTC (rev 190449)
</span><span class="lines">@@ -1,23 +0,0 @@
</span><del>-CONSOLE MESSAGE: line 97: WebGL: INVALID_ENUM: getParameter: invalid parameter name, WEBGL_debug_renderer_info not enabled
-CONSOLE MESSAGE: line 101: WebGL: INVALID_ENUM: getParameter: invalid parameter name, WEBGL_debug_renderer_info not enabled
-This test verifies the functionality of the WEBGL_debug_renderer_info extension, if it is available.
-
-On success, you will see a series of &quot;PASS&quot; messages, followed by &quot;TEST COMPLETE&quot;.
-
-
-PASS WebGL context exists
-Testing enums with extension disabled
-PASS getError was expected value: INVALID_ENUM : UNMASKED_VENDOR_WEBGL should not be queryable if extension is disabled
-PASS getError was expected value: INVALID_ENUM : UNMASKED_RENDERER_WEBGL should not be queryable if extension is disabled
-PASS Successfully enabled WEBGL_debug_renderer_info extension
-PASS WEBGL_debug_renderer_info listed as supported and getExtension succeeded
-Testing enums with extension enabled
-PASS ext.UNMASKED_VENDOR_WEBGL is 0x9245
-PASS getError was expected value: NO_ERROR : UNMASKED_VENDOR_WEBGL query should succeed if extension is enable
-PASS ext.UNMASKED_RENDERER_WEBGL is 0x9246
-PASS getError was expected value: NO_ERROR : UNMASKED_RENDERER_WEBGL query should succeed if extension is enable
-
-PASS successfullyParsed is true
-
-TEST COMPLETE
-
</del></span></pre></div>
<a id="trunkLayoutTestsfastcanvaswebglwebgldebugrendererinfohtml"></a>
<div class="delfile"><h4>Deleted: trunk/LayoutTests/fast/canvas/webgl/webgl-debug-renderer-info.html (190448 => 190449)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/canvas/webgl/webgl-debug-renderer-info.html        2015-10-02 01:53:45 UTC (rev 190448)
+++ trunk/LayoutTests/fast/canvas/webgl/webgl-debug-renderer-info.html        2015-10-02 02:15:11 UTC (rev 190449)
</span><span class="lines">@@ -1,123 +0,0 @@
</span><del>-&lt;!--
-
-/*
-** Copyright (c) 2012 The Khronos Group Inc.
-**
-** Permission is hereby granted, free of charge, to any person obtaining a
-** copy of this software and/or associated documentation files (the
-** &quot;Materials&quot;), to deal in the Materials without restriction, including
-** without limitation the rights to use, copy, modify, merge, publish,
-** distribute, sublicense, and/or sell copies of the Materials, and to
-** permit persons to whom the Materials are furnished to do so, subject to
-** the following conditions:
-**
-** The above copyright notice and this permission notice shall be included
-** in all copies or substantial portions of the Materials.
-**
-** THE MATERIALS ARE PROVIDED &quot;AS IS&quot;, WITHOUT WARRANTY OF ANY KIND,
-** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
-** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
-** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
-** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
-** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
-*/
-
---&gt;
-
-&lt;!DOCTYPE html&gt;
-&lt;html&gt;
-&lt;head&gt;
-&lt;meta charset=&quot;utf-8&quot;&gt;
-&lt;title&gt;WebGL WebGL_debug_renderer_info Conformance Tests&lt;/title&gt;
-&lt;script src=&quot;resources/desktop-gl-constants.js&quot; type=&quot;text/javascript&quot;&gt;&lt;/script&gt;
-&lt;script src=&quot;../../../resources/js-test-pre.js&quot;&gt;&lt;/script&gt;
-&lt;script src=&quot;resources/webgl-test.js&quot;&gt;&lt;/script&gt;
-&lt;script src=&quot;resources/webgl-test-utils.js&quot;&gt;&lt;/script&gt;
-&lt;/head&gt;
-&lt;body&gt;
-&lt;div id=&quot;description&quot;&gt;&lt;/div&gt;
-&lt;canvas id=&quot;canvas&quot; style=&quot;width: 1px; height: 1px;&quot;&gt; &lt;/canvas&gt;
-&lt;div id=&quot;console&quot;&gt;&lt;/div&gt;
-
-&lt;script&gt;
-&quot;use strict&quot;;
-description(&quot;This test verifies the functionality of the WEBGL_debug_renderer_info extension, if it is available.&quot;);
-
-debug(&quot;&quot;);
-
-var wtu = WebGLTestUtils;
-var gl = wtu.create3DContext(&quot;canvas&quot;);
-var ext = null;
-var vao = null;
-
-if (!gl) {
-    testFailed(&quot;WebGL context does not exist&quot;);
-} else {
-    testPassed(&quot;WebGL context exists&quot;);
-
-    // Run tests with extension disabled
-    runTestDisabled();
-
-    // Query the extension and store globally so shouldBe can access it
-    ext = gl.getExtension(&quot;WEBGL_debug_renderer_info&quot;);
-    if (!ext) {
-        testFailed(&quot;No WEBGL_debug_renderer_info support&quot;);
-    } else {
-        testPassed(&quot;Successfully enabled WEBGL_debug_renderer_info extension&quot;);
-
-        runSupportedTest(true);
-        runTestEnabled();
-    }
-}
-
-function runSupportedTest(extensionEnabled) {
-    var supported = gl.getSupportedExtensions();
-    if (supported.indexOf(&quot;WEBGL_debug_renderer_info&quot;) &gt;= 0) {
-        if (extensionEnabled) {
-            testPassed(&quot;WEBGL_debug_renderer_info listed as supported and getExtension succeeded&quot;);
-        } else {
-            testFailed(&quot;WEBGL_debug_renderer_info listed as supported but getExtension failed&quot;);
-        }
-    } else {
-        if (extensionEnabled) {
-            testFailed(&quot;WEBGL_debug_renderer_info not listed as supported but getExtension succeeded&quot;);
-        } else {
-            testPassed(&quot;WEBGL_debug_renderer_info not listed as supported and getExtension failed -- this is legal&quot;);
-        }
-    }
-}
-
-function runTestDisabled() {
-    debug(&quot;Testing enums with extension disabled&quot;);
-
-    // Use the constants directly as we don't have the extension
-
-    var UNMASKED_VENDOR_WEBGL = 0x9245;
-    gl.getParameter(UNMASKED_VENDOR_WEBGL);
-    glErrorShouldBe(gl, gl.INVALID_ENUM, &quot;UNMASKED_VENDOR_WEBGL should not be queryable if extension is disabled&quot;);
-
-    var UNMASKED_RENDERER_WEBGL = 0x9246;
-    gl.getParameter(UNMASKED_RENDERER_WEBGL);
-    glErrorShouldBe(gl, gl.INVALID_ENUM, &quot;UNMASKED_RENDERER_WEBGL should not be queryable if extension is disabled&quot;);
-}
-
-function runTestEnabled() {
-    debug(&quot;Testing enums with extension enabled&quot;);
-
-    shouldBe(&quot;ext.UNMASKED_VENDOR_WEBGL&quot;, &quot;0x9245&quot;);
-    gl.getParameter(ext.UNMASKED_VENDOR_WEBGL);
-    glErrorShouldBe(gl, gl.NO_ERROR, &quot;UNMASKED_VENDOR_WEBGL query should succeed if extension is enable&quot;);
-
-    shouldBe(&quot;ext.UNMASKED_RENDERER_WEBGL&quot;, &quot;0x9246&quot;);
-    gl.getParameter(ext.UNMASKED_RENDERER_WEBGL);
-    glErrorShouldBe(gl, gl.NO_ERROR, &quot;UNMASKED_RENDERER_WEBGL query should succeed if extension is enable&quot;);
-}
-
-debug(&quot;&quot;);
-var successfullyParsed = true;
-&lt;/script&gt;
-&lt;script src=&quot;../../../resources/js-test-post.js&quot;&gt;&lt;/script&gt;
-
-&lt;/body&gt;
-&lt;/html&gt;
</del></span></pre></div>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (190448 => 190449)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2015-10-02 01:53:45 UTC (rev 190448)
+++ trunk/Source/WebCore/ChangeLog        2015-10-02 02:15:11 UTC (rev 190449)
</span><span class="lines">@@ -1,3 +1,20 @@
</span><ins>+2015-10-01  Dean Jackson  &lt;dino@apple.com&gt;
+
+        Rollout r190446 for the moment. It broke the build.
+
+        * html/canvas/WebGL2RenderingContext.cpp:
+        (WebCore::WebGL2RenderingContext::getExtension):
+        (WebCore::WebGL2RenderingContext::getSupportedExtensions):
+        * html/canvas/WebGLRenderingContext.cpp:
+        (WebCore::WebGLRenderingContext::getExtension):
+        (WebCore::WebGLRenderingContext::getSupportedExtensions):
+        * html/canvas/WebGLRenderingContextBase.cpp:
+        (WebCore::WebGLRenderingContextBase::allowPrivilegedExtensions):
+        * html/canvas/WebGLRenderingContextBase.h:
+        * page/Settings.in:
+        * platform/graphics/opengl/Extensions3DOpenGL.cpp:
+        (WebCore::Extensions3DOpenGL::supportsExtension): Deleted.
+
</ins><span class="cx"> 2015-10-01  Jaehun Lim  &lt;ljaehun.lim@samsung.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Unreviewed, fix build warning after r190434
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlcanvasWebGL2RenderingContextcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/canvas/WebGL2RenderingContext.cpp (190448 => 190449)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/canvas/WebGL2RenderingContext.cpp        2015-10-02 01:53:45 UTC (rev 190448)
+++ trunk/Source/WebCore/html/canvas/WebGL2RenderingContext.cpp        2015-10-02 02:15:11 UTC (rev 190449)
</span><span class="lines">@@ -1021,18 +1021,20 @@
</span><span class="cx">         }
</span><span class="cx">         return m_webglDepthTexture.get();
</span><span class="cx">     }
</span><del>-    if (equalIgnoringCase(name, &quot;WEBGL_debug_renderer_info&quot;)) {
-        if (!m_webglDebugRendererInfo)
-            m_webglDebugRendererInfo = std::make_unique&lt;WebGLDebugRendererInfo&gt;(this);
-        return m_webglDebugRendererInfo.get();
</del><ins>+    if (allowPrivilegedExtensions()) {
+        if (equalIgnoringCase(name, &quot;WEBGL_debug_renderer_info&quot;)) {
+            if (!m_webglDebugRendererInfo)
+                m_webglDebugRendererInfo = std::make_unique&lt;WebGLDebugRendererInfo&gt;(this);
+            return m_webglDebugRendererInfo.get();
+        }
+        if (equalIgnoringCase(name, &quot;WEBGL_debug_shaders&quot;)
+            &amp;&amp; m_context-&gt;getExtensions()-&gt;supports(&quot;GL_ANGLE_translated_shader_source&quot;)) {
+            if (!m_webglDebugShaders)
+                m_webglDebugShaders = std::make_unique&lt;WebGLDebugShaders&gt;(this);
+            return m_webglDebugShaders.get();
+        }
</ins><span class="cx">     }
</span><del>-    if (equalIgnoringCase(name, &quot;WEBGL_debug_shaders&quot;)
-        &amp;&amp; m_context-&gt;getExtensions()-&gt;supports(&quot;GL_ANGLE_translated_shader_source&quot;)) {
-        if (!m_webglDebugShaders)
-            m_webglDebugShaders = std::make_unique&lt;WebGLDebugShaders&gt;(this);
-        return m_webglDebugShaders.get();
-    }
-
</del><ins>+    
</ins><span class="cx">     return nullptr;
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -1062,10 +1064,12 @@
</span><span class="cx">     if (WebGLDepthTexture::supported(graphicsContext3D()))
</span><span class="cx">         result.append(&quot;WEBGL_depth_texture&quot;);
</span><span class="cx">     result.append(&quot;WEBGL_lose_context&quot;);
</span><del>-    if (m_context-&gt;getExtensions()-&gt;supports(&quot;GL_ANGLE_translated_shader_source&quot;))
-        result.append(&quot;WEBGL_debug_shaders&quot;);
-    result.append(&quot;WEBGL_debug_renderer_info&quot;);
-
</del><ins>+    if (allowPrivilegedExtensions()) {
+        if (m_context-&gt;getExtensions()-&gt;supports(&quot;GL_ANGLE_translated_shader_source&quot;))
+            result.append(&quot;WEBGL_debug_shaders&quot;);
+        result.append(&quot;WEBGL_debug_renderer_info&quot;);
+    }
+    
</ins><span class="cx">     return result;
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlcanvasWebGLRenderingContextcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/canvas/WebGLRenderingContext.cpp (190448 => 190449)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/canvas/WebGLRenderingContext.cpp        2015-10-02 01:53:45 UTC (rev 190448)
+++ trunk/Source/WebCore/html/canvas/WebGLRenderingContext.cpp        2015-10-02 02:15:11 UTC (rev 190449)
</span><span class="lines">@@ -230,18 +230,20 @@
</span><span class="cx">         }
</span><span class="cx">         return m_angleInstancedArrays.get();
</span><span class="cx">     }
</span><del>-    if (equalIgnoringCase(name, &quot;WEBGL_debug_renderer_info&quot;)) {
-        if (!m_webglDebugRendererInfo)
-            m_webglDebugRendererInfo = std::make_unique&lt;WebGLDebugRendererInfo&gt;(this);
-        return m_webglDebugRendererInfo.get();
</del><ins>+    if (allowPrivilegedExtensions()) {
+        if (equalIgnoringCase(name, &quot;WEBGL_debug_renderer_info&quot;)) {
+            if (!m_webglDebugRendererInfo)
+                m_webglDebugRendererInfo = std::make_unique&lt;WebGLDebugRendererInfo&gt;(this);
+            return m_webglDebugRendererInfo.get();
+        }
+        if (equalIgnoringCase(name, &quot;WEBGL_debug_shaders&quot;)
+            &amp;&amp; m_context-&gt;getExtensions()-&gt;supports(&quot;GL_ANGLE_translated_shader_source&quot;)) {
+            if (!m_webglDebugShaders)
+                m_webglDebugShaders = std::make_unique&lt;WebGLDebugShaders&gt;(this);
+            return m_webglDebugShaders.get();
+        }
</ins><span class="cx">     }
</span><del>-    if (equalIgnoringCase(name, &quot;WEBGL_debug_shaders&quot;)
-        &amp;&amp; m_context-&gt;getExtensions()-&gt;supports(&quot;GL_ANGLE_translated_shader_source&quot;)) {
-        if (!m_webglDebugShaders)
-            m_webglDebugShaders = std::make_unique&lt;WebGLDebugShaders&gt;(this);
-        return m_webglDebugShaders.get();
-    }
-
</del><ins>+    
</ins><span class="cx">     return nullptr;
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -289,10 +291,13 @@
</span><span class="cx">         result.append(&quot;WEBGL_draw_buffers&quot;);
</span><span class="cx">     if (ANGLEInstancedArrays::supported(this))
</span><span class="cx">         result.append(&quot;ANGLE_instanced_arrays&quot;);
</span><del>-    if (m_context-&gt;getExtensions()-&gt;supports(&quot;GL_ANGLE_translated_shader_source&quot;))
-        result.append(&quot;WEBGL_debug_shaders&quot;);
-    result.append(&quot;WEBGL_debug_renderer_info&quot;);
-
</del><ins>+    
+    if (allowPrivilegedExtensions()) {
+        if (m_context-&gt;getExtensions()-&gt;supports(&quot;GL_ANGLE_translated_shader_source&quot;))
+            result.append(&quot;WEBGL_debug_shaders&quot;);
+        result.append(&quot;WEBGL_debug_renderer_info&quot;);
+    }
+    
</ins><span class="cx">     return result;
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlcanvasWebGLRenderingContextBasecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/canvas/WebGLRenderingContextBase.cpp (190448 => 190449)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/canvas/WebGLRenderingContextBase.cpp        2015-10-02 01:53:45 UTC (rev 190448)
+++ trunk/Source/WebCore/html/canvas/WebGLRenderingContextBase.cpp        2015-10-02 02:15:11 UTC (rev 190449)
</span><span class="lines">@@ -576,6 +576,13 @@
</span><span class="cx">     m_isRobustnessEXTSupported = m_context-&gt;getExtensions()-&gt;isEnabled(&quot;GL_EXT_robustness&quot;);
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+bool WebGLRenderingContextBase::allowPrivilegedExtensions() const
+{
+    if (Page* page = canvas()-&gt;document().page())
+        return page-&gt;settings().privilegedWebGLExtensionsEnabled();
+    return false;
+}
+
</ins><span class="cx"> void WebGLRenderingContextBase::addCompressedTextureFormat(GC3Denum format)
</span><span class="cx"> {
</span><span class="cx">     if (!m_compressedTextureFormats.contains(format))
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlcanvasWebGLRenderingContextBaseh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/canvas/WebGLRenderingContextBase.h (190448 => 190449)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/canvas/WebGLRenderingContextBase.h        2015-10-02 01:53:45 UTC (rev 190448)
+++ trunk/Source/WebCore/html/canvas/WebGLRenderingContextBase.h        2015-10-02 02:15:11 UTC (rev 190449)
</span><span class="lines">@@ -800,6 +800,10 @@
</span><span class="cx">     // Helper for restoration after context lost.
</span><span class="cx">     void maybeRestoreContext();
</span><span class="cx"> 
</span><ins>+    // Determine if we are running privileged code in the browser, for example,
+    // a Safari or Chrome extension.
+    bool allowPrivilegedExtensions() const;
+
</ins><span class="cx">     enum ConsoleDisplayPreference {
</span><span class="cx">         DisplayInConsole,
</span><span class="cx">         DontDisplayInConsole
</span></span></pre></div>
<a id="trunkSourceWebCorepageSettingsin"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/Settings.in (190448 => 190449)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/Settings.in        2015-10-02 01:53:45 UTC (rev 190448)
+++ trunk/Source/WebCore/page/Settings.in        2015-10-02 02:15:11 UTC (rev 190449)
</span><span class="lines">@@ -103,6 +103,7 @@
</span><span class="cx"> webGLEnabled initial=false
</span><span class="cx"> webGLErrorsToConsoleEnabled initial=true
</span><span class="cx"> openGLMultisamplingEnabled initial=true
</span><ins>+privilegedWebGLExtensionsEnabled initial=false
</ins><span class="cx"> forceSoftwareWebGLRendering initial=false
</span><span class="cx"> accelerated2dCanvasEnabled initial=false
</span><span class="cx"> antialiased2dCanvasEnabled initial=true
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicsopenglExtensions3DOpenGLcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/opengl/Extensions3DOpenGL.cpp (190448 => 190449)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/opengl/Extensions3DOpenGL.cpp        2015-10-02 01:53:45 UTC (rev 190448)
+++ trunk/Source/WebCore/platform/graphics/opengl/Extensions3DOpenGL.cpp        2015-10-02 02:15:11 UTC (rev 190449)
</span><span class="lines">@@ -167,12 +167,6 @@
</span><span class="cx">             &amp;&amp; (m_availableExtensions.contains(&quot;GL_ARB_draw_instanced&quot;) || m_availableExtensions.contains(&quot;GL_EXT_draw_instanced&quot;));
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    // We explicitly do not support this extension until
-    // we fix the following bug:
-    // https://bugs.webkit.org/show_bug.cgi?id=149734
-    if (name == &quot;GL_ANGLE_translated_shader_source&quot;)
-        return false;
-
</del><span class="cx">     if (name == &quot;GL_EXT_sRGB&quot;)
</span><span class="cx"> #if PLATFORM(IOS)
</span><span class="cx">         return m_availableExtensions.contains(&quot;GL_EXT_sRGB&quot;);
</span></span></pre>
</div>
</div>

</body>
</html>