<!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>[164477] 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/164477">164477</a></dd>
<dt>Author</dt> <dd>changseok.oh@collabora.com</dd>
<dt>Date</dt> <dd>2014-02-20 23:46:30 -0800 (Thu, 20 Feb 2014)</dd>
</dl>

<h3>Log Message</h3>
<pre>Rename EXT_draw_buffers to WEBGL_draw_buffers
https://bugs.webkit.org/show_bug.cgi?id=128894

Reviewed by Dean Jackson.

Source/WebCore:

I noticed the related spec has changed. Accordingly chromium also changed its implementation
to meet the spec. So here I'd like to apply it to webkit as well.

Merged from Blink (patch by bajones):
https://src.chromium.org/viewvc/blink?revision=152065&amp;view=revision

Test: fast/canvas/webgl/webgl-draw-buffers.html

* CMakeLists.txt:
* DerivedSources.cpp:
* DerivedSources.make:
* GNUmakefile.list.am:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* WebCore.xcodeproj/project.pbxproj:
* bindings/js/JSWebGLRenderingContextCustom.cpp:
(WebCore::toJS):
* html/canvas/EXTDrawBuffers.idl: Removed.
* html/canvas/WebGLDrawBuffers.cpp: Renamed from Source/WebCore/html/canvas/EXTDrawBuffers.cpp.
(WebCore::WebGLDrawBuffers::WebGLDrawBuffers):
(WebCore::WebGLDrawBuffers::~WebGLDrawBuffers):
(WebCore::WebGLDrawBuffers::getName):
(WebCore::WebGLDrawBuffers::create):
(WebCore::WebGLDrawBuffers::supported):
(WebCore::WebGLDrawBuffers::drawBuffersWEBGL):
(WebCore::WebGLDrawBuffers::satisfiesWebGLRequirements):
* html/canvas/WebGLDrawBuffers.h: Renamed from Source/WebCore/html/canvas/EXTDrawBuffers.h.
* html/canvas/WebGLDrawBuffers.idl: Added.
* html/canvas/WebGLExtension.h:
* html/canvas/WebGLFramebuffer.cpp:
(WebCore::WebGLFramebuffer::drawBuffersIfNecessary):
* html/canvas/WebGLRenderingContext.cpp:
(WebCore::WebGLRenderingContext::getExtension):
(WebCore::WebGLRenderingContext::getParameter):
(WebCore::WebGLRenderingContext::getSupportedExtensions):
(WebCore::WebGLRenderingContext::validateFramebufferFuncParameters):
(WebCore::WebGLRenderingContext::supportsDrawBuffers):
* html/canvas/WebGLRenderingContext.h:

LayoutTests:

webgl-draw-buffers.html came from Khronos's webgl conformace tests. It requires
some new apis in webgl-test-utils.js so that it is updated as well. The attached
test results are for mac. But they're expected to fail since EXT_draw_buffers are
disabled with some reason. See WebGLDrawBuffers::supported. So I add a line
for webgl-draw-buffers.html to mac/TestExpectations.

* fast/canvas/webgl/resources/webgl-test-utils.js:
(WebGLTestUtils):
(WebGLTestUtils.):
* fast/canvas/webgl/webgl-draw-buffers-expected.txt: Added.
* fast/canvas/webgl/webgl-draw-buffers.html: Added.
* platform/mac-mountainlion/fast/canvas/webgl/webgl-draw-buffers-expected.txt: Added.
* platform/mac/TestExpectations:</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsChangeLog">trunk/LayoutTests/ChangeLog</a></li>
<li><a href="#trunkLayoutTestsfastcanvaswebglresourceswebgltestutilsjs">trunk/LayoutTests/fast/canvas/webgl/resources/webgl-test-utils.js</a></li>
<li><a href="#trunkLayoutTestsplatformmacTestExpectations">trunk/LayoutTests/platform/mac/TestExpectations</a></li>
<li><a href="#trunkSourceWebCoreCMakeListstxt">trunk/Source/WebCore/CMakeLists.txt</a></li>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreDerivedSourcescpp">trunk/Source/WebCore/DerivedSources.cpp</a></li>
<li><a href="#trunkSourceWebCoreDerivedSourcesmake">trunk/Source/WebCore/DerivedSources.make</a></li>
<li><a href="#trunkSourceWebCoreGNUmakefilelistam">trunk/Source/WebCore/GNUmakefile.list.am</a></li>
<li><a href="#trunkSourceWebCoreWebCorevcxprojWebCorevcxproj">trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj</a></li>
<li><a href="#trunkSourceWebCoreWebCorevcxprojWebCorevcxprojfilters">trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj.filters</a></li>
<li><a href="#trunkSourceWebCoreWebCorexcodeprojprojectpbxproj">trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj</a></li>
<li><a href="#trunkSourceWebCorebindingsjsJSWebGLRenderingContextCustomcpp">trunk/Source/WebCore/bindings/js/JSWebGLRenderingContextCustom.cpp</a></li>
<li><a href="#trunkSourceWebCorehtmlcanvasWebGLExtensionh">trunk/Source/WebCore/html/canvas/WebGLExtension.h</a></li>
<li><a href="#trunkSourceWebCorehtmlcanvasWebGLFramebuffercpp">trunk/Source/WebCore/html/canvas/WebGLFramebuffer.cpp</a></li>
<li><a href="#trunkSourceWebCorehtmlcanvasWebGLRenderingContextcpp">trunk/Source/WebCore/html/canvas/WebGLRenderingContext.cpp</a></li>
<li><a href="#trunkSourceWebCorehtmlcanvasWebGLRenderingContexth">trunk/Source/WebCore/html/canvas/WebGLRenderingContext.h</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsfastcanvaswebglwebgldrawbuffersexpectedtxt">trunk/LayoutTests/fast/canvas/webgl/webgl-draw-buffers-expected.txt</a></li>
<li><a href="#trunkLayoutTestsfastcanvaswebglwebgldrawbuffershtml">trunk/LayoutTests/fast/canvas/webgl/webgl-draw-buffers.html</a></li>
<li><a href="#trunkLayoutTestsplatformmacmountainlionfastcanvaswebglwebgldrawbuffersexpectedtxt">trunk/LayoutTests/platform/mac-mountainlion/fast/canvas/webgl/webgl-draw-buffers-expected.txt</a></li>
<li><a href="#trunkSourceWebCorehtmlcanvasWebGLDrawBufferscpp">trunk/Source/WebCore/html/canvas/WebGLDrawBuffers.cpp</a></li>
<li><a href="#trunkSourceWebCorehtmlcanvasWebGLDrawBuffersh">trunk/Source/WebCore/html/canvas/WebGLDrawBuffers.h</a></li>
<li><a href="#trunkSourceWebCorehtmlcanvasWebGLDrawBuffersidl">trunk/Source/WebCore/html/canvas/WebGLDrawBuffers.idl</a></li>
</ul>

<h3>Removed Paths</h3>
<ul>
<li><a href="#trunkSourceWebCorehtmlcanvasEXTDrawBufferscpp">trunk/Source/WebCore/html/canvas/EXTDrawBuffers.cpp</a></li>
<li><a href="#trunkSourceWebCorehtmlcanvasEXTDrawBuffersh">trunk/Source/WebCore/html/canvas/EXTDrawBuffers.h</a></li>
<li><a href="#trunkSourceWebCorehtmlcanvasEXTDrawBuffersidl">trunk/Source/WebCore/html/canvas/EXTDrawBuffers.idl</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ChangeLog (164476 => 164477)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ChangeLog        2014-02-21 06:45:34 UTC (rev 164476)
+++ trunk/LayoutTests/ChangeLog        2014-02-21 07:46:30 UTC (rev 164477)
</span><span class="lines">@@ -1,3 +1,24 @@
</span><ins>+2014-02-20  ChangSeok Oh  &lt;changseok.oh@collabora.com&gt;
+
+        Rename EXT_draw_buffers to WEBGL_draw_buffers
+        https://bugs.webkit.org/show_bug.cgi?id=128894
+
+        Reviewed by Dean Jackson.
+
+        webgl-draw-buffers.html came from Khronos's webgl conformace tests. It requires
+        some new apis in webgl-test-utils.js so that it is updated as well. The attached
+        test results are for mac. But they're expected to fail since EXT_draw_buffers are
+        disabled with some reason. See WebGLDrawBuffers::supported. So I add a line
+        for webgl-draw-buffers.html to mac/TestExpectations.
+
+        * fast/canvas/webgl/resources/webgl-test-utils.js:
+        (WebGLTestUtils):
+        (WebGLTestUtils.):
+        * fast/canvas/webgl/webgl-draw-buffers-expected.txt: Added.
+        * fast/canvas/webgl/webgl-draw-buffers.html: Added.
+        * platform/mac-mountainlion/fast/canvas/webgl/webgl-draw-buffers-expected.txt: Added.
+        * platform/mac/TestExpectations:
+
</ins><span class="cx"> 2014-02-20  Ryosuke Niwa  &lt;rniwa@webkit.org&gt;
</span><span class="cx"> 
</span><span class="cx">         Update test expectations after r164449.
</span></span></pre></div>
<a id="trunkLayoutTestsfastcanvaswebglresourceswebgltestutilsjs"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/canvas/webgl/resources/webgl-test-utils.js (164476 => 164477)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/canvas/webgl/resources/webgl-test-utils.js        2014-02-21 06:45:34 UTC (rev 164476)
+++ trunk/LayoutTests/fast/canvas/webgl/resources/webgl-test-utils.js        2014-02-21 07:46:30 UTC (rev 164477)
</span><span class="lines">@@ -297,6 +297,71 @@
</span><span class="cx"> };
</span><span class="cx"> 
</span><span class="cx"> /**
</span><ins>+ * Creates a program, attaches shaders, binds attrib locations, links the
+ * program and calls useProgram.
+ * @param {!WebGLRenderingContext} gl The WebGLRenderingContext to use.
+ * @param {!Array.&lt;!WebGLShader|string&gt;} shaders The shaders to
+ *        attach, or the source, or the id of a script to get
+ *        the source from.
+ * @param {!Array.&lt;string&gt;} opt_attribs The attribs names.
+ * @param {!Array.&lt;number&gt;} opt_locations The locations for the attribs.
+ */
+var setupProgram = function(gl, shaders, opt_attribs, opt_locations) {
+  var realShaders = [];
+  var program = gl.createProgram();
+  var shaderCount = 0;
+  for (var ii = 0; ii &lt; shaders.length; ++ii) {
+    var shader = shaders[ii];
+    var shaderType = undefined;
+    if (typeof shader == 'string') {
+      var element = document.getElementById(shader);
+      if (element) {
+        if (element.type != &quot;x-shader/x-vertex&quot; &amp;&amp; element.type != &quot;x-shader/x-fragment&quot;)
+          shaderType = ii ? gl.FRAGMENT_SHADER : gl.VERTEX_SHADER;
+        shader = loadShaderFromScript(gl, shader, shaderType);
+      } else if (endsWith(shader, &quot;.vert&quot;)) {
+        shader = loadShaderFromFile(gl, shader, gl.VERTEX_SHADER);
+      } else if (endsWith(shader, &quot;.frag&quot;)) {
+        shader = loadShaderFromFile(gl, shader, gl.FRAGMENT_SHADER);
+      } else {
+        shader = loadShader(gl, shader, ii ? gl.FRAGMENT_SHADER : gl.VERTEX_SHADER);
+      }
+    }
+    if (shader) {
+      ++shaderCount;
+      gl.attachShader(program, shader);
+    }
+  }
+  if (shaderCount != 2) {
+    error(&quot;Error in compiling shader&quot;);
+    return null;
+  }
+  if (opt_attribs) {
+    for (var ii = 0; ii &lt; opt_attribs.length; ++ii) {
+      gl.bindAttribLocation(
+          program,
+          opt_locations ? opt_locations[ii] : ii,
+          opt_attribs[ii]);
+    }
+  }
+  gl.linkProgram(program);
+
+  // Check the link status
+  var linked = gl.getProgramParameter(program, gl.LINK_STATUS);
+  if (!linked) {
+      // something went wrong with the link
+      lastError = gl.getProgramInfoLog (program);
+      error(&quot;Error in program linking:&quot; + lastError);
+
+      gl.deleteProgram(program);
+      return null;
+  }
+
+  gl.useProgram(program);
+  return program;
+};
+
+/**
</ins><span class="cx">  * Creates a unit quad with only positions of a given rez
</span><span class="cx">  * @param {!WebGLContext} gl The WebGLContext to use.
</span><span class="cx">  * @param {number} gridRez The resolution of the mesh grid.
</span><span class="lines">@@ -575,6 +640,32 @@
</span><span class="cx"> };
</span><span class="cx"> 
</span><span class="cx"> /**
</span><ins>+ * Draws a previously setupUnitQuad.
+ * @param {!WebGLRenderingContext} gl The WebGLRenderingContext to use.
+ */
+var drawUnitQuad = function(gl) {
+  gl.drawArrays(gl.TRIANGLES, 0, 6);
+};
+
+/**
+ * Clears then Draws a previously setupUnitQuad.
+ * @param {!WebGLRenderingContext} gl The WebGLRenderingContext to use.
+ * @param {!Array.&lt;number&gt;} opt_color The color to fill clear with before
+ *        drawing. A 4 element array where each element is in the range 0 to
+ *        255. Default [255, 255, 255, 255]
+ */
+var clearAndDrawUnitQuad = function(gl, opt_color) {
+  opt_color = opt_color || [255, 255, 255, 255];
+  gl.clearColor(
+      opt_color[0] / 255,
+      opt_color[1] / 255,
+      opt_color[2] / 255,
+      opt_color[3] / 255);
+  gl.clear(gl.COLOR_BUFFER_BIT | gl.DEPTH_BUFFER_BIT);
+  drawUnitQuad(gl);
+};
+
+/**
</ins><span class="cx">  * Draws a previously setup quad.
</span><span class="cx">  * @param {!WebGLContext} gl The WebGLContext to use.
</span><span class="cx">  * @param {number} gridRes Resolution of grid.
</span><span class="lines">@@ -1248,6 +1339,19 @@
</span><span class="cx"> };
</span><span class="cx"> 
</span><span class="cx"> /**
</span><ins>+ * Gets the content of script.
+ * @param {string} scriptId The id of the script tag.
+ * @return {string} The content of the script.
+ */
+var getScript = function(scriptId) {
+  var shaderScript = document.getElementById(scriptId);
+  if (!shaderScript) {
+    throw(&quot;*** Error: unknown script element&quot; + scriptId);
+  }
+  return shaderScript.text;
+};
+
+/**
</ins><span class="cx">  * Loads a shader from a script tag.
</span><span class="cx">  * @param {!WebGLContext} gl The WebGLContext to use.
</span><span class="cx">  * @param {string} scriptId The id of the script tag.
</span><span class="lines">@@ -1454,6 +1558,52 @@
</span><span class="cx">   return args;
</span><span class="cx"> };
</span><span class="cx"> 
</span><ins>+/**
+ * Inserts a 'label' that when clicked expands to the pre
+ * formatted text supplied by 'source'.
+ * @param {!HTMLElement} element element to append label to.
+ * @param {string} label label for anchor.
+ * @param {string} source preformatted text to expand to.
+ * @param {string} opt_url url of source. If provided a 2nd link
+ *     will be added.
+ */
+var addShaderSource = function(element, label, source, opt_url) {
+  var div = document.createElement(&quot;div&quot;);
+  var s = document.createElement(&quot;pre&quot;);
+  s.className = &quot;shader-source&quot;;
+  s.style.display = &quot;none&quot;;
+  var ol = document.createElement(&quot;ol&quot;);
+  //s.appendChild(document.createTextNode(source));
+  var lines = source.split(&quot;\n&quot;);
+  for (var ii = 0; ii &lt; lines.length; ++ii) {
+    var line = lines[ii];
+    var li = document.createElement(&quot;li&quot;);
+    li.appendChild(document.createTextNode(line));
+    ol.appendChild(li);
+  }
+  s.appendChild(ol);
+  var l = document.createElement(&quot;a&quot;);
+  l.href = &quot;show-shader-source&quot;;
+  l.appendChild(document.createTextNode(label));
+  l.addEventListener('click', function(event) {
+      if (event.preventDefault) {
+        event.preventDefault();
+      }
+      s.style.display = (s.style.display == 'none') ? 'block' : 'none';
+      return false;
+    }, false);
+  div.appendChild(l);
+  if (opt_url) {
+    var u = document.createElement(&quot;a&quot;);
+    u.href = opt_url;
+    div.appendChild(document.createTextNode(&quot; &quot;));
+    u.appendChild(document.createTextNode(&quot;(&quot; + opt_url + &quot;)&quot;));
+    div.appendChild(u);
+  }
+  div.appendChild(s);
+  element.appendChild(div);
+};
+
</ins><span class="cx"> // Add your prefix here.
</span><span class="cx"> var browserPrefixes = [
</span><span class="cx">   &quot;&quot;,
</span><span class="lines">@@ -1498,7 +1648,29 @@
</span><span class="cx">   }
</span><span class="cx"> };
</span><span class="cx"> 
</span><ins>+var replaceRE = /\$\((\w+)\)/g;
+
</ins><span class="cx"> /**
</span><ins>+ * Replaces strings with property values.
+ * Given a string like &quot;hello $(first) $(last)&quot; and an object
+ * like {first:&quot;John&quot;, last:&quot;Smith&quot;} will return
+ * &quot;hello John Smith&quot;.
+ * @param {string} str String to do replacements in.
+ * @param {...} 1 or more objects containing properties.
+ */
+var replaceParams = function(str) {
+  var args = arguments;
+  return str.replace(replaceRE, function(str, p1, offset, s) {
+    for (var ii = 1; ii &lt; args.length; ++ii) {
+      if (args[ii][p1] !== undefined) {
+        return args[ii][p1];
+      }
+    }
+    throw &quot;unknown string param '&quot; + p1 + &quot;'&quot;;
+  });
+};
+
+/**
</ins><span class="cx">  * Provides requestAnimationFrame in a cross browser way.
</span><span class="cx">  */
</span><span class="cx"> var requestAnimFrameImpl_;
</span><span class="lines">@@ -1574,6 +1746,7 @@
</span><span class="cx"> };
</span><span class="cx"> 
</span><span class="cx"> return {
</span><ins>+  addShaderSource: addShaderSource,
</ins><span class="cx">   cancelAnimFrame: cancelAnimFrame,
</span><span class="cx">   clipToRange: clipToRange,
</span><span class="cx">   create3DContext: create3DContext,
</span><span class="lines">@@ -1583,7 +1756,9 @@
</span><span class="cx">   checkCanvasRect: checkCanvasRect,
</span><span class="cx">   checkCanvasRectColor: checkCanvasRectColor,
</span><span class="cx">   createColoredTexture: createColoredTexture,
</span><ins>+  clearAndDrawUnitQuad: clearAndDrawUnitQuad,
</ins><span class="cx">   drawQuad: drawQuad,
</span><ins>+  drawUnitQuad: drawUnitQuad,
</ins><span class="cx">   drawIndexedQuad: drawIndexedQuad,
</span><span class="cx">   drawUByteColorQuad: drawUByteColorQuad,
</span><span class="cx">   drawFloatColorQuad: drawFloatColorQuad,
</span><span class="lines">@@ -1591,6 +1766,7 @@
</span><span class="cx">   getExtensionWithKnownPrefixes: getExtensionWithKnownPrefixes,
</span><span class="cx">   getFileListAsync: getFileListAsync,
</span><span class="cx">   getLastError: getLastError,
</span><ins>+  getScript: getScript,
</ins><span class="cx">   getSupportedExtensionWithKnownPrefixes: getSupportedExtensionWithKnownPrefixes,
</span><span class="cx">   getUrlArguments: getUrlArguments,
</span><span class="cx">   glEnumToString: glEnumToString,
</span><span class="lines">@@ -1627,6 +1803,7 @@
</span><span class="cx">   shouldGenerateGLError: shouldGenerateGLError,
</span><span class="cx">   readFile: readFile,
</span><span class="cx">   readFileList: readFileList,
</span><ins>+  replaceParams: replaceParams,
</ins><span class="cx">   requestAnimFrame: requestAnimFrame,
</span><span class="cx">   waitFrames: waitFrames,
</span><span class="cx">   waitForComposite: waitForComposite,
</span></span></pre></div>
<a id="trunkLayoutTestsfastcanvaswebglwebgldrawbuffersexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/fast/canvas/webgl/webgl-draw-buffers-expected.txt (0 => 164477)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/canvas/webgl/webgl-draw-buffers-expected.txt                                (rev 0)
+++ trunk/LayoutTests/fast/canvas/webgl/webgl-draw-buffers-expected.txt        2014-02-21 07:46:30 UTC (rev 164477)
</span><span class="lines">@@ -0,0 +1,327 @@
</span><ins>+CONSOLE MESSAGE: WebGL: INVALID_ENUM: getParameter: invalid parameter name, WEBGL_draw_buffers not enabled
+CONSOLE MESSAGE: WebGL: INVALID_ENUM: getParameter: invalid parameter name, WEBGL_draw_buffers not enabled
+CONSOLE MESSAGE: line 43: *** Error compiling FRAGMENT_SHADER '[object WebGLShader]':ERROR: 0:2: 'GL_EXT_draw_buffers' : extension is not supported
+
+CONSOLE MESSAGE: line 43: Error in compiling shader
+CONSOLE MESSAGE: WebGL: INVALID_ENUM: framebufferTexture2D: invalid attachment
+CONSOLE MESSAGE: WebGL: INVALID_VALUE: drawBuffersWEBGL: more than one buffer
+CONSOLE MESSAGE: WebGL: INVALID_VALUE: drawBuffersWEBGL: more than one buffer
+CONSOLE MESSAGE: WebGL: INVALID_OPERATION: drawBuffersWEBGL: BACK or NONE
+CONSOLE MESSAGE: WebGL: INVALID_ENUM: framebufferTexture2D: invalid attachment
+CONSOLE MESSAGE: WebGL: INVALID_OPERATION: drawBuffersWEBGL: COLOR_ATTACHMENTi_EXT or NONE
+CONSOLE MESSAGE: WebGL: checkFramebufferStatus: attachments do not have the same dimensions
+CONSOLE MESSAGE: WebGL: checkFramebufferStatus: attachments do not have the same dimensions
+This test verifies the functionality of the WEBGL_draw_buffers 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 binding enum with extension disabled
+PASS getError was expected value: INVALID_ENUM : MAX_COLOR_ATTACHMENTS_WEBGL should not be queryable if extension is disabled
+PASS getError was expected value: INVALID_ENUM : MAX_DRAW_BUFFERS_WEBGL should not be queryable if extension is disabled
+PASS getError was expected value: NO_ERROR : there should be no errors
+
+test shaders disabled
+vertex shader
+fragement shaderPASS GL_EXT_draw_buffers should not be defined in GLSL
+vertex shader
+fragement shaderPASS #extension GL_EXT_draw_buffers should not be allowed in GLSL
+PASS getError was expected value: NO_ERROR : there should be no errors
+
+test attachment disabled
+PASS getError was expected value: INVALID_ENUM : should not be able to attach to gl.COLOR_ATTACHMENT1
+PASS getError was expected value: NO_ERROR : there should be no errors
+
+PASS Successfully enabled WEBGL_draw_buffers extension
+PASS WEBGL_draw_buffers listed as supported and getExtension succeeded
+
+Testing enums with extension enabled
+PASS ext.MAX_COLOR_ATTACHMENTS_WEBGL is 0x8cdf
+PASS getError was expected value: NO_ERROR : foo
+MAX_COLOR_ATTACHMENTS_WEBGL:8cdf
+PASS gl.getParemter(ext.MAX_COLOR_ATTACHMENTS_WEBGL) should be &gt; 0
+PASS getError was expected value: NO_ERROR : MAX_COLOR_ATTACHMENTS_WEBGL query should succeed if extension is enabled
+PASS ext.MAX_DRAW_BUFFERS_WEBGL is 0x8824
+PASS getError was expected value: NO_ERROR : foo
+MAX_DRAW_BUFFERS_WEBGL:8824
+PASS gl.getParemter(ext.MAX_DRAW_BUFFERS_WEBGL) should be &gt; 0
+PASS getError was expected value: NO_ERROR : MAX_DRAW_BUFFERS_WEBGL query should succeed if extension is enabled
+PASS ext.COLOR_ATTACHMENT0_WEBGL is 0x8ce0
+PASS ext.COLOR_ATTACHMENT1_WEBGL is 0x8ce1
+PASS ext.COLOR_ATTACHMENT2_WEBGL is 0x8ce2
+PASS ext.COLOR_ATTACHMENT3_WEBGL is 0x8ce3
+PASS ext.COLOR_ATTACHMENT4_WEBGL is 0x8ce4
+PASS ext.COLOR_ATTACHMENT5_WEBGL is 0x8ce5
+PASS ext.COLOR_ATTACHMENT6_WEBGL is 0x8ce6
+PASS ext.COLOR_ATTACHMENT7_WEBGL is 0x8ce7
+PASS ext.COLOR_ATTACHMENT8_WEBGL is 0x8ce8
+PASS ext.COLOR_ATTACHMENT9_WEBGL is 0x8ce9
+PASS ext.COLOR_ATTACHMENT10_WEBGL is 0x8cea
+PASS ext.COLOR_ATTACHMENT11_WEBGL is 0x8ceb
+PASS ext.COLOR_ATTACHMENT12_WEBGL is 0x8cec
+PASS ext.COLOR_ATTACHMENT13_WEBGL is 0x8ced
+PASS ext.COLOR_ATTACHMENT14_WEBGL is 0x8cee
+PASS ext.COLOR_ATTACHMENT15_WEBGL is 0x8cef
+PASS ext.DRAW_BUFFER0_WEBGL is 0x8825
+PASS ext.DRAW_BUFFER1_WEBGL is 0x8826
+PASS ext.DRAW_BUFFER2_WEBGL is 0x8827
+PASS ext.DRAW_BUFFER3_WEBGL is 0x8828
+PASS ext.DRAW_BUFFER4_WEBGL is 0x8829
+PASS ext.DRAW_BUFFER5_WEBGL is 0x882a
+PASS ext.DRAW_BUFFER6_WEBGL is 0x882b
+PASS ext.DRAW_BUFFER7_WEBGL is 0x882c
+PASS ext.DRAW_BUFFER8_WEBGL is 0x882d
+PASS ext.DRAW_BUFFER9_WEBGL is 0x882e
+PASS ext.DRAW_BUFFER10_WEBGL is 0x882f
+PASS ext.DRAW_BUFFER11_WEBGL is 0x8830
+PASS ext.DRAW_BUFFER12_WEBGL is 0x8831
+PASS ext.DRAW_BUFFER13_WEBGL is 0x8832
+PASS ext.DRAW_BUFFER14_WEBGL is 0x8833
+PASS ext.DRAW_BUFFER15_WEBGL is 0x8834
+Testing drawBuffersWEBGL with default drawing buffer
+PASS gl.getParameter(ext.DRAW_BUFFER0_WEBGL) is gl.BACK
+PASS getError was expected value: INVALID_VALUE : after evaluating: ext.drawBuffersWEBGL([])
+PASS getError was expected value: INVALID_VALUE : after evaluating: ext.drawBuffersWEBGL([gl.NONE, gl.NONE])
+PASS getError was expected value: INVALID_OPERATION : after evaluating: ext.drawBuffersWEBGL([ext.COLOR_ATTACHMENT0_WEBGL])
+PASS gl.getParameter(ext.DRAW_BUFFER0_WEBGL) is gl.BACK
+PASS getError was expected value: NO_ERROR : after evaluating: ext.drawBuffersWEBGL([gl.NONE])
+PASS gl.getParameter(ext.DRAW_BUFFER0_WEBGL) is gl.NONE
+PASS getError was expected value: NO_ERROR : after evaluating: ext.drawBuffersWEBGL([gl.BACK])
+PASS gl.getParameter(ext.DRAW_BUFFER0_WEBGL) is gl.BACK
+PASS getError was expected value: NO_ERROR : there should be no errors
+
+test shaders enabled
+vertex shader
+fragement shaderPASS GL_EXT_draw_buffers should be defined as 1 in GLSL
+fragement shaderPASS should be green
+PASS getError was expected value: NO_ERROR : there should be no errors
+
+test attachment enabled
+PASS getError was expected value: INVALID_ENUM : should not be able to attach pass the max attachment point: gl.COLOR_ATTACHMENT0 + 8
+PASS getError was expected value: NO_ERROR : should be able to attach to the max attachment point: gl.COLOR_ATTACHMENT0 + 7
+PASS getError was expected value: NO_ERROR : should be able to call drawBuffersWEBGL with array NONE of size 8
+PASS getError was expected value: NO_ERROR : should be able to call drawBuffersWEBGL with array attachments of size 8
+PASS getError was expected value: NO_ERROR : should be able to call drawBuffersWEBGL with mixed array attachments of size 8
+PASS getError was expected value: INVALID_OPERATION : should not be able to call drawBuffersWEBGL with out of order attachments of size 8
+PASS getError was expected value: NO_ERROR : should not be able to call drawBuffersWEBGL with short array of attachments of size 8
+PASS getError was expected value: NO_ERROR : there should be no errors
+
+--------- draw tests -----------
+fragement shaderPASS gl.checkFramebufferStatus(gl.FRAMEBUFFER) is gl.FRAMEBUFFER_COMPLETE
+PASS gl.checkFramebufferStatus(gl.FRAMEBUFFER) is gl.FRAMEBUFFER_COMPLETE
+test that each texture got the correct color.
+PASS attachment 0 should be 255,0,0,0
+PASS attachment 1 should be 0,255,0,0
+PASS attachment 2 should be 255,255,0,0
+PASS attachment 3 should be 0,0,255,0
+PASS attachment 4 should be 255,0,255,0
+PASS attachment 5 should be 0,255,255,0
+PASS attachment 6 should be 255,255,255,0
+PASS attachment 7 should be 0,0,0,255
+
+test clearing clears all the textures
+PASS attachment 0 should be 0,255,0,255
+PASS attachment 1 should be 0,255,0,255
+PASS attachment 2 should be 0,255,0,255
+PASS attachment 3 should be 0,255,0,255
+PASS attachment 4 should be 0,255,0,255
+PASS attachment 5 should be 0,255,0,255
+PASS attachment 6 should be 0,255,0,255
+PASS attachment 7 should be 0,255,0,255
+
+test that NONE draws nothing
+PASS attachment 0 should be 0,255,0,255
+PASS attachment 1 should be 0,255,0,255
+PASS attachment 2 should be 0,255,0,255
+PASS attachment 3 should be 0,255,0,255
+PASS attachment 4 should be 0,255,0,255
+PASS attachment 5 should be 0,255,0,255
+PASS attachment 6 should be 0,255,0,255
+PASS attachment 7 should be 0,255,0,255
+
+test that gl_FragColor broadcasts
+PASS attachment 0 should be 255,0,0,255
+PASS attachment 1 should be 255,0,0,255
+PASS attachment 2 should be 255,0,0,255
+PASS attachment 3 should be 255,0,0,255
+PASS attachment 4 should be 255,0,0,255
+PASS attachment 5 should be 255,0,0,255
+PASS attachment 6 should be 255,0,0,255
+PASS attachment 7 should be 255,0,0,255
+
+test setting first half to NONE and clearing
+PASS attachment 0 should be 255,0,0,255
+PASS attachment 1 should be 255,0,0,255
+PASS attachment 2 should be 255,0,0,255
+PASS attachment 3 should be 255,0,0,255
+PASS attachment 4 should be 0,255,0,255
+PASS attachment 5 should be 0,255,0,255
+PASS attachment 6 should be 0,255,0,255
+PASS attachment 7 should be 0,255,0,255
+
+test setting first half to NONE and drawing
+PASS attachment 0 should be 255,0,0,255
+PASS attachment 1 should be 255,0,0,255
+PASS attachment 2 should be 255,0,0,255
+PASS attachment 3 should be 255,0,0,255
+PASS attachment 4 should be 255,0,255,0
+PASS attachment 5 should be 0,255,255,0
+PASS attachment 6 should be 255,255,255,0
+PASS attachment 7 should be 0,0,0,255
+
+test setting second half to NONE and clearing
+PASS attachment 0 should be 0,0,255,255
+PASS attachment 1 should be 0,0,255,255
+PASS attachment 2 should be 0,0,255,255
+PASS attachment 3 should be 0,0,255,255
+PASS attachment 4 should be 255,0,0,255
+PASS attachment 5 should be 255,0,0,255
+PASS attachment 6 should be 255,0,0,255
+PASS attachment 7 should be 255,0,0,255
+
+test setting second half to NONE and drawing
+PASS attachment 0 should be 255,0,0,0
+PASS attachment 1 should be 0,255,0,0
+PASS attachment 2 should be 255,255,0,0
+PASS attachment 3 should be 0,0,255,0
+PASS attachment 4 should be 255,0,0,255
+PASS attachment 5 should be 255,0,0,255
+PASS attachment 6 should be 255,0,0,255
+PASS attachment 7 should be 255,0,0,255
+
+test clearing framebuffer that only has first half of attachments
+attachment: 0 = COLOR_ATTACHMENT0, TEXTURE
+attachment: 1 = 0x8ce1, TEXTURE
+attachment: 2 = 0x8ce2, TEXTURE
+attachment: 3 = 0x8ce3, TEXTURE
+attachment: 4 = 0x8ce4, NO_ERROR
+attachment: 5 = 0x8ce5, NO_ERROR
+attachment: 6 = 0x8ce6, NO_ERROR
+attachment: 7 = 0x8ce7, NO_ERROR
+PASS attachment 0 should be 0,255,0,255
+PASS attachment 1 should be 0,255,0,255
+PASS attachment 2 should be 0,255,0,255
+PASS attachment 3 should be 0,255,0,255
+PASS attachment 4 should be 0,0,0,0
+PASS attachment 5 should be 0,0,0,0
+PASS attachment 6 should be 0,0,0,0
+PASS attachment 7 should be 0,0,0,0
+
+test drawing to framebuffer that only has first half of attachments
+PASS attachment 0 should be 255,0,0,0
+PASS attachment 1 should be 0,255,0,0
+PASS attachment 2 should be 255,255,0,0
+PASS attachment 3 should be 0,0,255,0
+PASS attachment 4 should be 0,0,0,0
+PASS attachment 5 should be 0,0,0,0
+PASS attachment 6 should be 0,0,0,0
+PASS attachment 7 should be 0,0,0,0
+
+test clearing framebuffer that only has second half of attachments
+attachment: 0 = COLOR_ATTACHMENT0, NO_ERROR
+attachment: 1 = 0x8ce1, NO_ERROR
+attachment: 2 = 0x8ce2, NO_ERROR
+attachment: 3 = 0x8ce3, NO_ERROR
+attachment: 4 = 0x8ce4, TEXTURE
+attachment: 5 = 0x8ce5, TEXTURE
+attachment: 6 = 0x8ce6, TEXTURE
+attachment: 7 = 0x8ce7, TEXTURE
+framebuffer not complete
+
+test clearing framebuffer that only has first and last attachments
+attachment: 0 = COLOR_ATTACHMENT0, TEXTURE
+attachment: 1 = 0x8ce1, NO_ERROR
+attachment: 2 = 0x8ce2, NO_ERROR
+attachment: 3 = 0x8ce3, NO_ERROR
+attachment: 4 = 0x8ce4, NO_ERROR
+attachment: 5 = 0x8ce5, NO_ERROR
+attachment: 6 = 0x8ce6, NO_ERROR
+attachment: 7 = 0x8ce7, TEXTURE
+PASS attachment 0 should be 0,255,0,255
+PASS attachment 1 should be 0,0,0,0
+PASS attachment 2 should be 0,0,0,0
+PASS attachment 3 should be 0,0,0,0
+PASS attachment 4 should be 0,0,0,0
+PASS attachment 5 should be 0,0,0,0
+PASS attachment 6 should be 0,0,0,0
+PASS attachment 7 should be 0,255,0,255
+
+test drawing to framebuffer that only has first and last attachments
+PASS attachment 0 should be 255,0,0,0
+PASS attachment 1 should be 0,0,0,0
+PASS attachment 2 should be 0,0,0,0
+PASS attachment 3 should be 0,0,0,0
+PASS attachment 4 should be 0,0,0,0
+PASS attachment 5 should be 0,0,0,0
+PASS attachment 6 should be 0,0,0,0
+PASS attachment 7 should be 0,0,0,255
+
+test clearing framebuffer that has all but the first and last attachments
+attachment: 0 = COLOR_ATTACHMENT0, NO_ERROR
+attachment: 1 = 0x8ce1, TEXTURE
+attachment: 2 = 0x8ce2, TEXTURE
+attachment: 3 = 0x8ce3, TEXTURE
+attachment: 4 = 0x8ce4, TEXTURE
+attachment: 5 = 0x8ce5, TEXTURE
+attachment: 6 = 0x8ce6, TEXTURE
+attachment: 7 = 0x8ce7, NO_ERROR
+framebuffer not complete
+
+test switching between fbos keeps drawbuffer state
+PASS attachment 0 should be 255,0,0,255
+PASS attachment 1 should be 255,0,0,255
+PASS attachment 2 should be 255,0,0,255
+PASS attachment 3 should be 255,0,0,255
+PASS attachment 4 should be 255,0,0,255
+PASS attachment 5 should be 255,0,0,255
+PASS attachment 6 should be 255,0,0,255
+PASS attachment 7 should be 255,0,0,255
+
+PASS attachment 0 should be 255,0,0,255
+PASS attachment 1 should be 255,0,0,255
+PASS attachment 2 should be 255,0,0,255
+PASS attachment 3 should be 255,0,0,255
+PASS attachment 4 should be 255,0,0,255
+PASS attachment 5 should be 255,0,0,255
+PASS attachment 6 should be 255,0,0,255
+PASS attachment 7 should be 255,0,0,255
+
+PASS attachment 0 should be 255,0,0,0
+PASS attachment 1 should be 0,255,0,0
+PASS attachment 2 should be 255,255,0,0
+PASS attachment 3 should be 0,0,255,0
+PASS attachment 4 should be 255,0,255,0
+PASS attachment 5 should be 0,255,255,0
+PASS attachment 6 should be 255,255,255,0
+PASS attachment 7 should be 0,0,0,255
+
+test queries
+check framebuffer with all attachments on
+PASS gl.getParameter(ext.DRAW_BUFFER0_WEBGL + 0) is gl.COLOR_ATTACHMENT0 + 0
+PASS gl.getParameter(ext.DRAW_BUFFER0_WEBGL + 1) is gl.COLOR_ATTACHMENT0 + 1
+PASS gl.getParameter(ext.DRAW_BUFFER0_WEBGL + 2) is gl.COLOR_ATTACHMENT0 + 2
+PASS gl.getParameter(ext.DRAW_BUFFER0_WEBGL + 3) is gl.COLOR_ATTACHMENT0 + 3
+PASS gl.getParameter(ext.DRAW_BUFFER0_WEBGL + 4) is gl.COLOR_ATTACHMENT0 + 4
+PASS gl.getParameter(ext.DRAW_BUFFER0_WEBGL + 5) is gl.COLOR_ATTACHMENT0 + 5
+PASS gl.getParameter(ext.DRAW_BUFFER0_WEBGL + 6) is gl.COLOR_ATTACHMENT0 + 6
+PASS gl.getParameter(ext.DRAW_BUFFER0_WEBGL + 7) is gl.COLOR_ATTACHMENT0 + 7
+check framebuffer with all attachments off
+PASS gl.getParameter(ext.DRAW_BUFFER0_WEBGL + 0) is gl.NONE
+PASS gl.getParameter(ext.DRAW_BUFFER0_WEBGL + 1) is gl.NONE
+PASS gl.getParameter(ext.DRAW_BUFFER0_WEBGL + 2) is gl.NONE
+PASS gl.getParameter(ext.DRAW_BUFFER0_WEBGL + 3) is gl.NONE
+PASS gl.getParameter(ext.DRAW_BUFFER0_WEBGL + 4) is gl.NONE
+PASS gl.getParameter(ext.DRAW_BUFFER0_WEBGL + 5) is gl.NONE
+PASS gl.getParameter(ext.DRAW_BUFFER0_WEBGL + 6) is gl.NONE
+PASS gl.getParameter(ext.DRAW_BUFFER0_WEBGL + 7) is gl.NONE
+test attachment size mis-match
+PASS gl.checkFramebufferStatus(gl.FRAMEBUFFER) != gl.FRAMEBUFFER_COMPLETE is true
+PASS gl.checkFramebufferStatus(gl.FRAMEBUFFER) != gl.FRAMEBUFFER_COMPLETE is true
+PASS getError was expected value: NO_ERROR : there should be no errors
+
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
</ins></span></pre></div>
<a id="trunkLayoutTestsfastcanvaswebglwebgldrawbuffershtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/fast/canvas/webgl/webgl-draw-buffers.html (0 => 164477)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/canvas/webgl/webgl-draw-buffers.html                                (rev 0)
+++ trunk/LayoutTests/fast/canvas/webgl/webgl-draw-buffers.html        2014-02-21 07:46:30 UTC (rev 164477)
</span><span class="lines">@@ -0,0 +1,698 @@
</span><ins>+&lt;!--
+/*
+** Copyright (c) 2013 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_draw_buffers Conformance Tests&lt;/title&gt;
+&lt;script src=&quot;../../../resources/js-test-pre.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; width=&quot;64&quot; height=&quot;64&quot;&gt; &lt;/canvas&gt;
+&lt;div id=&quot;console&quot;&gt;&lt;/div&gt;
+&lt;script id=&quot;vshader&quot; type=&quot;x-shader/x-vertex&quot;&gt;
+attribute vec4 a_position;
+void main() {
+    gl_Position = a_position;
+}
+&lt;/script&gt;
+&lt;script id=&quot;fshader&quot; type=&quot;x-shader/x-fragment&quot;&gt;
+#extension GL_EXT_draw_buffers : require
+precision mediump float;
+uniform vec4 u_colors[$(numDrawingBuffers)];
+void main() {
+    for (int i = 0; i &lt; $(numDrawingBuffers); ++i) {
+        gl_FragData[i] = u_colors[i];
+    }
+}
+&lt;/script&gt;
+&lt;script id=&quot;fshaderRed&quot; type=&quot;x-shader/x-fragment&quot;&gt;
+precision mediump float;
+void main() {
+    gl_FragColor = vec4(1,0,0,1);
+}
+&lt;/script&gt;
+&lt;script id=&quot;fshaderMacroDisabled&quot; type=&quot;x-shader/x-fragment&quot;&gt;
+#ifdef GL_EXT_draw_buffers
+  bad code here
+#endif
+precision mediump float;
+void main() {
+    gl_FragColor = vec4(0,0,0,0);
+}
+&lt;/script&gt;
+&lt;script id=&quot;fshaderMacroEnabled&quot; type=&quot;x-shader/x-fragment&quot;&gt;
+#ifdef GL_EXT_draw_buffers
+  #if GL_EXT_draw_buffers == 1
+    #define CODE
+  #else
+    #define CODE this_code_is_bad_it_should_have_compiled
+  #endif
+#else
+   #define CODE this_code_is_bad_it_should_have_compiled
+#endif
+CODE
+precision mediump float;
+void main() {
+    gl_FragColor = vec4(0,0,0,0);
+}
+&lt;/script&gt;
+&lt;script id=&quot;fshaderBuiltInConstEnabled&quot; type=&quot;x-shader/x-fragment&quot;&gt;
+precision mediump float;
+void main() {
+    gl_FragColor = (gl_MaxDrawBuffers == $(numDrawingBuffers)) ? vec4(0,1,0,1) : vec4(1,0,0,1);
+}
+&lt;/script&gt;
+&lt;script&gt;
+&quot;use strict&quot;;
+description(&quot;This test verifies the functionality of the WEBGL_draw_buffers extension, if it is available.&quot;);
+
+debug(&quot;&quot;);
+
+var wtu = WebGLTestUtils;
+var canvas = document.getElementById(&quot;canvas&quot;);
+var output = document.getElementById(&quot;console&quot;);
+var gl = wtu.create3DContext(canvas);
+var ext = null;
+var vao = null;
+
+var extensionConstants = [
+  { name: &quot;MAX_COLOR_ATTACHMENTS_WEBGL&quot;, enum: 0x8CDF, expectedFn: function(v) { return v &gt; 0; }, passMsg: &quot; should be &gt; 0&quot;},
+  { name: &quot;MAX_DRAW_BUFFERS_WEBGL&quot;,      enum: 0x8824, expectedFn: function(v) { return v &gt; 0; }, passMsg: &quot; should be &gt; 0&quot;},
+
+  { name: &quot;COLOR_ATTACHMENT0_WEBGL&quot;,     enum: 0x8CE0, },
+  { name: &quot;COLOR_ATTACHMENT1_WEBGL&quot;,     enum: 0x8CE1, },
+  { name: &quot;COLOR_ATTACHMENT2_WEBGL&quot;,     enum: 0x8CE2, },
+  { name: &quot;COLOR_ATTACHMENT3_WEBGL&quot;,     enum: 0x8CE3, },
+  { name: &quot;COLOR_ATTACHMENT4_WEBGL&quot;,     enum: 0x8CE4, },
+  { name: &quot;COLOR_ATTACHMENT5_WEBGL&quot;,     enum: 0x8CE5, },
+  { name: &quot;COLOR_ATTACHMENT6_WEBGL&quot;,     enum: 0x8CE6, },
+  { name: &quot;COLOR_ATTACHMENT7_WEBGL&quot;,     enum: 0x8CE7, },
+  { name: &quot;COLOR_ATTACHMENT8_WEBGL&quot;,     enum: 0x8CE8, },
+  { name: &quot;COLOR_ATTACHMENT9_WEBGL&quot;,     enum: 0x8CE9, },
+  { name: &quot;COLOR_ATTACHMENT10_WEBGL&quot;,    enum: 0x8CEA, },
+  { name: &quot;COLOR_ATTACHMENT11_WEBGL&quot;,    enum: 0x8CEB, },
+  { name: &quot;COLOR_ATTACHMENT12_WEBGL&quot;,    enum: 0x8CEC, },
+  { name: &quot;COLOR_ATTACHMENT13_WEBGL&quot;,    enum: 0x8CED, },
+  { name: &quot;COLOR_ATTACHMENT14_WEBGL&quot;,    enum: 0x8CEE, },
+  { name: &quot;COLOR_ATTACHMENT15_WEBGL&quot;,    enum: 0x8CEF, },
+
+  { name: &quot;DRAW_BUFFER0_WEBGL&quot;,          enum: 0x8825, },
+  { name: &quot;DRAW_BUFFER1_WEBGL&quot;,          enum: 0x8826, },
+  { name: &quot;DRAW_BUFFER2_WEBGL&quot;,          enum: 0x8827, },
+  { name: &quot;DRAW_BUFFER3_WEBGL&quot;,          enum: 0x8828, },
+  { name: &quot;DRAW_BUFFER4_WEBGL&quot;,          enum: 0x8829, },
+  { name: &quot;DRAW_BUFFER5_WEBGL&quot;,          enum: 0x882A, },
+  { name: &quot;DRAW_BUFFER6_WEBGL&quot;,          enum: 0x882B, },
+  { name: &quot;DRAW_BUFFER7_WEBGL&quot;,          enum: 0x882C, },
+  { name: &quot;DRAW_BUFFER8_WEBGL&quot;,          enum: 0x882D, },
+  { name: &quot;DRAW_BUFFER9_WEBGL&quot;,          enum: 0x882E, },
+  { name: &quot;DRAW_BUFFER10_WEBGL&quot;,         enum: 0x882F, },
+  { name: &quot;DRAW_BUFFER11_WEBGL&quot;,         enum: 0x8830, },
+  { name: &quot;DRAW_BUFFER12_WEBGL&quot;,         enum: 0x8831, },
+  { name: &quot;DRAW_BUFFER13_WEBGL&quot;,         enum: 0x8832, },
+  { name: &quot;DRAW_BUFFER14_WEBGL&quot;,         enum: 0x8833, },
+  { name: &quot;DRAW_BUFFER15_WEBGL&quot;,         enum: 0x8834, },
+];
+
+if (!gl) {
+  testFailed(&quot;WebGL context does not exist&quot;);
+} else {
+  testPassed(&quot;WebGL context exists&quot;);
+
+  // Run tests with extension disabled
+  runEnumTestDisabled();
+  runShadersTestDisabled();
+  runAttachmentTestDisabled();
+
+  debug(&quot;&quot;);
+
+  // Query the extension and store globally so shouldBe can access it
+  ext = gl.getExtension(&quot;WEBGL_draw_buffers&quot;);
+  if (!ext) {
+    testPassed(&quot;No WEBGL_draw_buffers support -- this is legal&quot;);
+
+    runSupportedTest(false);
+  } else {
+    testPassed(&quot;Successfully enabled WEBGL_draw_buffers extension&quot;);
+
+    runSupportedTest(true);
+    runEnumTestEnabled();
+    runShadersTestEnabled();
+    runAttachmentTestEnabled();
+    runDrawTests();
+
+    wtu.glErrorShouldBe(gl, gl.NO_ERROR, &quot;there should be no errors&quot;);
+  }
+}
+
+function createExtDrawBuffersProgram(scriptId, sub) {
+  var fsource = wtu.getScript(scriptId);
+  fsource = wtu.replaceParams(fsource, sub);
+  wtu.addShaderSource(output, &quot;fragement shader&quot;, fsource);
+  return wtu.setupProgram(gl, [&quot;vshader&quot;, fsource], [&quot;a_position&quot;]);
+}
+
+function runSupportedTest(extensionEnabled) {
+  var supported = gl.getSupportedExtensions();
+  if (supported.indexOf(&quot;WEBGL_draw_buffers&quot;) &gt;= 0) {
+    if (extensionEnabled) {
+      testPassed(&quot;WEBGL_draw_buffers listed as supported and getExtension succeeded&quot;);
+    } else {
+      testFailed(&quot;WEBGL_draw_buffers listed as supported but getExtension failed&quot;);
+    }
+  } else {
+    if (extensionEnabled) {
+      testFailed(&quot;WEBGL_draw_buffers not listed as supported but getExtension succeeded&quot;);
+    } else {
+      testPassed(&quot;WEBGL_draw_buffers not listed as supported and getExtension failed -- this is legal&quot;);
+    }
+  }
+}
+
+function runEnumTestDisabled() {
+  debug(&quot;&quot;);
+  debug(&quot;Testing binding enum with extension disabled&quot;);
+
+  // Use the constant directly as we don't have the extension
+  extensionConstants.forEach(function(c) {
+    if (c.expectedFn) {
+      gl.getParameter(c.enum);
+      wtu.glErrorShouldBe(gl, gl.INVALID_ENUM, c.name + &quot; should not be queryable if extension is disabled&quot;);
+    }
+  });
+  wtu.glErrorShouldBe(gl, gl.NO_ERROR, &quot;there should be no errors&quot;);
+}
+
+function runEnumTestEnabled() {
+  debug(&quot;&quot;);
+  debug(&quot;Testing enums with extension enabled&quot;);
+
+  extensionConstants.forEach(function(c) {
+    shouldBe(&quot;ext.&quot; + c.name, &quot;0x&quot; + c.enum.toString(16));
+    if (c.expectedFn) {
+      wtu.glErrorShouldBe(gl, gl.NO_ERROR, &quot;foo&quot;);
+      debug(c.name + &quot;:&quot; + ext[c.name].toString(16));
+      expectTrue(c.expectedFn(gl.getParameter(ext[c.name])), &quot;gl.getParemter(ext.&quot; + c.name + &quot;)&quot; + c.passMsg);
+      wtu.glErrorShouldBe(gl, gl.NO_ERROR, c.name + &quot; query should succeed if extension is enabled&quot;);
+    }
+  });
+
+  debug(&quot;Testing drawBuffersWEBGL with default drawing buffer&quot;);
+  shouldBe(&quot;gl.getParameter(ext.DRAW_BUFFER0_WEBGL)&quot;, &quot;gl.BACK&quot;);
+  wtu.shouldGenerateGLError(gl, gl.INVALID_VALUE, &quot;ext.drawBuffersWEBGL([])&quot;);
+  wtu.shouldGenerateGLError(gl, gl.INVALID_VALUE, &quot;ext.drawBuffersWEBGL([gl.NONE, gl.NONE])&quot;);
+  wtu.shouldGenerateGLError(gl, gl.INVALID_OPERATION, &quot;ext.drawBuffersWEBGL([ext.COLOR_ATTACHMENT0_WEBGL])&quot;);
+  shouldBe(&quot;gl.getParameter(ext.DRAW_BUFFER0_WEBGL)&quot;, &quot;gl.BACK&quot;);
+  wtu.shouldGenerateGLError(gl, gl.NO_ERROR, &quot;ext.drawBuffersWEBGL([gl.NONE])&quot;);
+  shouldBe(&quot;gl.getParameter(ext.DRAW_BUFFER0_WEBGL)&quot;, &quot;gl.NONE&quot;);
+  wtu.shouldGenerateGLError(gl, gl.NO_ERROR, &quot;ext.drawBuffersWEBGL([gl.BACK])&quot;);
+  shouldBe(&quot;gl.getParameter(ext.DRAW_BUFFER0_WEBGL)&quot;, &quot;gl.BACK&quot;);
+  wtu.glErrorShouldBe(gl, gl.NO_ERROR, &quot;there should be no errors&quot;);
+}
+
+function testShaders(tests, sub) {
+  tests.forEach(function(test) {
+    var shaders = [wtu.getScript(test.shaders[0]), wtu.replaceParams(wtu.getScript(test.shaders[1]), sub)];
+    wtu.addShaderSource(output, &quot;vertex shader&quot;, shaders[0]);
+    wtu.addShaderSource(output, &quot;fragement shader&quot;, shaders[1]);
+    var program = wtu.setupProgram(gl, shaders, [&quot;a_position&quot;]);
+    var programLinkedSuccessfully = (program != null);
+    var expectedProgramToLinkSuccessfully = (test.expectFailure == true);
+    expectTrue(programLinkedSuccessfully != expectedProgramToLinkSuccessfully, test.msg);
+    gl.deleteProgram(program);
+  });
+}
+
+function runShadersTestDisabled() {
+  debug(&quot;&quot;);
+  debug(&quot;test shaders disabled&quot;);
+
+  testShaders([
+    { shaders: [&quot;vshader&quot;, &quot;fshaderMacroDisabled&quot;],
+      msg: &quot;GL_EXT_draw_buffers should not be defined in GLSL&quot;,
+    },
+    { shaders: [&quot;vshader&quot;, &quot;fshader&quot;],
+      msg: &quot;#extension GL_EXT_draw_buffers should not be allowed in GLSL&quot;,
+      expectFailure: true,
+    },
+  ], {numDrawingBuffers: 1});
+  wtu.glErrorShouldBe(gl, gl.NO_ERROR, &quot;there should be no errors&quot;);
+}
+
+function runShadersTestEnabled() {
+  debug(&quot;&quot;);
+  debug(&quot;test shaders enabled&quot;);
+
+  var sub = {numDrawingBuffers: gl.getParameter(ext.MAX_DRAW_BUFFERS_WEBGL)};
+  testShaders([
+    { shaders: [&quot;vshader&quot;, &quot;fshaderMacroEnabled&quot;],
+    msg: &quot;GL_EXT_draw_buffers should be defined as 1 in GLSL&quot;,
+    },
+  ], sub);
+
+  var program = createExtDrawBuffersProgram(&quot;fshaderBuiltInConstEnabled&quot;, sub);
+  wtu.setupUnitQuad(gl);
+  wtu.clearAndDrawUnitQuad(gl);
+  wtu.checkCanvas(gl, [0, 255, 0, 255], &quot;should be green&quot;);
+  gl.deleteProgram(program);
+  wtu.glErrorShouldBe(gl, gl.NO_ERROR, &quot;there should be no errors&quot;);
+}
+
+function runAttachmentTestDisabled() {
+  debug(&quot;&quot;);
+  debug(&quot;test attachment disabled&quot;);
+  var tex = gl.createTexture();
+  var fb = gl.createFramebuffer();
+  gl.bindTexture(gl.TEXTURE_2D, tex);
+  gl.bindFramebuffer(gl.FRAMEBUFFER, fb);
+  gl.framebufferTexture2D(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0 + 1, gl.TEXTURE_2D, tex, 0);
+  wtu.glErrorShouldBe(gl, gl.INVALID_ENUM, &quot;should not be able to attach to gl.COLOR_ATTACHMENT1&quot;);
+  gl.deleteFramebuffer(fb);
+  gl.deleteTexture(tex);
+  wtu.glErrorShouldBe(gl, gl.NO_ERROR, &quot;there should be no errors&quot;);
+}
+
+function makeArray(size, value) {
+  var array = []
+  for (var ii = 0; ii &lt; size; ++ii) {
+    array.push(value);
+  }
+  return array;
+}
+
+function makeColorAttachmentArray(size) {
+  var array = []
+  for (var ii = 0; ii &lt; size; ++ii) {
+    array.push(gl.COLOR_ATTACHMENT0 + ii);
+  }
+  return array;
+}
+
+function runAttachmentTestEnabled() {
+  debug(&quot;&quot;);
+  debug(&quot;test attachment enabled&quot;);
+
+  var maxDrawingBuffers = gl.getParameter(ext.MAX_DRAW_BUFFERS_WEBGL);
+  var maxColorAttachments = gl.getParameter(ext.MAX_COLOR_ATTACHMENTS_WEBGL);
+
+  var tex = gl.createTexture();
+  var fb = gl.createFramebuffer();
+  gl.bindTexture(gl.TEXTURE_2D, tex);
+  gl.bindFramebuffer(gl.FRAMEBUFFER, fb);
+  gl.framebufferTexture2D(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0 + maxColorAttachments, gl.TEXTURE_2D, tex, 0);
+  wtu.glErrorShouldBe(gl, gl.INVALID_ENUM, &quot;should not be able to attach pass the max attachment point: gl.COLOR_ATTACHMENT0 + &quot; + maxColorAttachments);
+  gl.framebufferTexture2D(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0 + maxColorAttachments - 1, gl.TEXTURE_2D, tex, 0);
+  wtu.glErrorShouldBe(gl, gl.NO_ERROR, &quot;should be able to attach to the max attachment point: gl.COLOR_ATTACHMENT0 + &quot; + (maxColorAttachments - 1));
+  ext.drawBuffersWEBGL(makeArray(maxDrawingBuffers, gl.NONE));
+  wtu.glErrorShouldBe(gl, gl.NO_ERROR, &quot;should be able to call drawBuffersWEBGL with array NONE of size &quot; + maxColorAttachments);
+  var bufs = makeColorAttachmentArray(maxDrawingBuffers);
+  ext.drawBuffersWEBGL(bufs);
+  wtu.glErrorShouldBe(gl, gl.NO_ERROR, &quot;should be able to call drawBuffersWEBGL with array attachments of size &quot; + maxColorAttachments);
+  bufs[0] = gl.NONE;
+  ext.drawBuffersWEBGL(bufs);
+  wtu.glErrorShouldBe(gl, gl.NO_ERROR, &quot;should be able to call drawBuffersWEBGL with mixed array attachments of size &quot; + maxColorAttachments);
+  if (maxDrawingBuffers &gt; 1) {
+    bufs[0] = ext.COLOR_ATTACHMENT1_WEBGL;
+    bufs[1] = ext.COLOR_ATTACHMENT0_WEBGL;
+    ext.drawBuffersWEBGL(bufs);
+    wtu.glErrorShouldBe(gl, gl.INVALID_OPERATION, &quot;should not be able to call drawBuffersWEBGL with out of order attachments of size &quot; + maxColorAttachments);
+    var bufs = makeColorAttachmentArray(Math.floor(maxDrawingBuffers / 2));
+    wtu.glErrorShouldBe(gl, gl.NO_ERROR, &quot;should not be able to call drawBuffersWEBGL with short array of attachments of size &quot; + maxColorAttachments);
+  }
+
+  gl.deleteFramebuffer(fb);
+  gl.deleteTexture(tex);
+  wtu.glErrorShouldBe(gl, gl.NO_ERROR, &quot;there should be no errors&quot;);
+}
+
+function makeColorByIndex(index) {
+  var low = (index - 1) % 15 + 1;
+  var high = (index - 1) / 15;
+
+  var zeroOrOne = function(v) {
+    return v ? 1 : 0;
+  };
+
+  var oneOrTwo = function(v) {
+    return v ? 2 : 1;
+  }
+
+  var makeComponent = function(b0, b1, b2) {
+    return Math.floor(255 * zeroOrOne(b0) / oneOrTwo(b1) / oneOrTwo(b2));
+  };
+  return [
+    makeComponent(low &amp; (1 &lt;&lt; 0), high &amp; (1 &lt;&lt; 0), high &amp; (1 &lt;&lt; 4)),
+    makeComponent(low &amp; (1 &lt;&lt; 1), high &amp; (1 &lt;&lt; 1), high &amp; (1 &lt;&lt; 5)),
+    makeComponent(low &amp; (1 &lt;&lt; 2), high &amp; (1 &lt;&lt; 2), high &amp; (1 &lt;&lt; 6)),
+    makeComponent(low &amp; (1 &lt;&lt; 3), high &amp; (1 &lt;&lt; 3), high &amp; (1 &lt;&lt; 7)),
+  ];
+}
+
+function runDrawTests() {
+  debug(&quot;&quot;);
+  debug(&quot;--------- draw tests -----------&quot;);
+  var fb = gl.createFramebuffer();
+  var fb2 = gl.createFramebuffer();
+  var halfFB1 = gl.createFramebuffer();
+  var halfFB2 = gl.createFramebuffer();
+  var endsFB = gl.createFramebuffer();
+  var middleFB = gl.createFramebuffer();
+
+  var maxDrawingBuffers = gl.getParameter(ext.MAX_DRAW_BUFFERS_WEBGL);
+  var maxColorAttachments = gl.getParameter(ext.MAX_COLOR_ATTACHMENTS_WEBGL);
+  var maxUniformVectors = gl.getParameter(gl.MAX_FRAGMENT_UNIFORM_VECTORS);
+  var maxUsable = Math.min(maxDrawingBuffers, maxColorAttachments, maxUniformVectors);
+  var half = Math.floor(maxUsable / 2);
+  var bufs = makeColorAttachmentArray(maxUsable);
+  var nones = makeArray(maxUsable, gl.NONE);
+
+  [fb, fb2, halfFB1, halfFB2, endsFB, middleFB].forEach(function(fbo) {
+    gl.bindFramebuffer(gl.FRAMEBUFFER, fb);
+    ext.drawBuffersWEBGL(bufs);
+  });
+
+  var checkProgram = wtu.setupTexturedQuad(gl);
+  var redProgram = wtu.setupProgram(gl, [&quot;vshader&quot;, &quot;fshaderRed&quot;], [&quot;a_position&quot;]);
+  var drawProgram = createExtDrawBuffersProgram(&quot;fshader&quot;, {numDrawingBuffers: maxDrawingBuffers});
+  var width = 64;
+  var height = 64;
+  var attachments = [];
+  // Makes 6 framebuffers.
+  // fb and fb2 have all the attachments.
+  // halfFB1 has the first half of the attachments
+  // halfFB2 has the second half of the attachments
+  // endsFB has the first and last attachments
+  // middleFB has all but the first and last attachments
+  for (var ii = 0; ii &lt; maxUsable; ++ii) {
+    var tex = gl.createTexture();
+    gl.bindTexture(gl.TEXTURE_2D, tex);
+    gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, width, height, 0, gl.RGBA, gl.UNSIGNED_BYTE, null);
+    gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.NEAREST);
+    gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, gl.NEAREST);
+    gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE);
+    gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, gl.CLAMP_TO_EDGE);
+    gl.bindFramebuffer(gl.FRAMEBUFFER, fb);
+    gl.framebufferTexture2D(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0 + ii, gl.TEXTURE_2D, tex, 0);
+    gl.bindFramebuffer(gl.FRAMEBUFFER, fb2);
+    gl.framebufferTexture2D(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0 + ii, gl.TEXTURE_2D, tex, 0);
+    gl.bindFramebuffer(gl.FRAMEBUFFER, ii &lt; half ? halfFB1 : halfFB2);
+    gl.framebufferTexture2D(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0 + ii, gl.TEXTURE_2D, tex, 0);
+    gl.bindFramebuffer(gl.FRAMEBUFFER, (ii == 0 || ii == (maxUsable - 1)) ? endsFB : middleFB);
+    gl.framebufferTexture2D(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0 + ii, gl.TEXTURE_2D, tex, 0);
+    var location = gl.getUniformLocation(drawProgram, &quot;u_colors[&quot; + ii + &quot;]&quot;);
+    var color = makeColorByIndex(ii + 1);
+    var floatColor = [color[0] / 255, color[1] / 255, color[2] / 255, color[3] / 255];
+    gl.uniform4fv(location, floatColor);
+    attachments.push({
+      texture: tex,
+      location: location,
+      color: color
+    });
+  }
+  gl.bindFramebuffer(gl.FRAMEBUFFER, fb);
+  shouldBe(&quot;gl.checkFramebufferStatus(gl.FRAMEBUFFER)&quot;, &quot;gl.FRAMEBUFFER_COMPLETE&quot;);
+  gl.bindFramebuffer(gl.FRAMEBUFFER, fb2);
+  shouldBe(&quot;gl.checkFramebufferStatus(gl.FRAMEBUFFER)&quot;, &quot;gl.FRAMEBUFFER_COMPLETE&quot;);
+
+  var checkAttachmentsForColorFn = function(attachments, colorFn) {
+    gl.bindFramebuffer(gl.FRAMEBUFFER, null);
+    gl.useProgram(checkProgram);
+    attachments.forEach(function(attachment, index) {
+      gl.bindTexture(gl.TEXTURE_2D, attachment.texture);
+      wtu.clearAndDrawUnitQuad(gl);
+      var expectedColor = colorFn(attachment, index);
+      var tolerance = 0;
+      expectedColor.forEach(function(v) {
+        if (v != 0 &amp;&amp; v != 255) {
+          tolerance = 8;
+        }
+      });
+      wtu.checkCanvas(gl, expectedColor, &quot;attachment &quot; + index + &quot; should be &quot; + expectedColor.toString(), tolerance);
+    });
+    debug(&quot;&quot;);
+  };
+
+  var checkAttachmentsForColor = function(attachments, color) {
+    checkAttachmentsForColorFn(attachments, function(attachment, index) {
+      return color || attachment.color;
+    });
+  };
+
+  var drawAndCheckAttachments = function(testFB, msg, testFn) {
+    debug(&quot;test clearing &quot; + msg);
+
+    gl.bindFramebuffer(gl.FRAMEBUFFER, testFB);
+
+    attachments.forEach(function(attachment, index) {
+      debug(&quot;attachment: &quot; + index + &quot; = &quot; + wtu.glEnumToString(gl, gl.getParameter(ext.DRAW_BUFFER0_WEBGL + index)) +
+            &quot;, &quot; + wtu.glEnumToString(gl, gl.getFramebufferAttachmentParameter(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0 + index, gl.FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE)));
+    });
+
+    if (gl.checkFramebufferStatus(gl.FRAMEBUFFER) != gl.FRAMEBUFFER_COMPLETE) {
+      debug(&quot;framebuffer not complete&quot;);
+      debug(&quot;&quot;);
+      return;
+    }
+
+    // Clear all the attachments
+    gl.bindFramebuffer(gl.FRAMEBUFFER, fb2);
+    gl.clearColor(0, 0, 0, 0);
+    gl.clear(gl.COLOR_BUFFER_BIT);
+    //checkAttachmentsForColorFn(attachments, function(attachment, index) {
+    //  return [0, 0, 0, 0];
+    //});
+    //debug(&quot;--&quot;);
+
+    // Clear some attachments using testFB
+    gl.bindFramebuffer(gl.FRAMEBUFFER, testFB);
+
+    gl.clearColor(0, 1, 0, 1);
+    gl.clear(gl.COLOR_BUFFER_BIT);
+    checkAttachmentsForColorFn(attachments, function(attachment, index) {
+      return testFn(attachment, index) ? [0, 255, 0, 255] : [0, 0, 0, 0];
+    });
+
+    debug(&quot;test drawing to &quot; + msg);
+
+    // Draw to some attachments using testFB
+    gl.useProgram(drawProgram);
+    gl.bindFramebuffer(gl.FRAMEBUFFER, testFB);
+    wtu.drawUnitQuad(gl);
+
+    checkAttachmentsForColorFn(attachments, function(attachment, index) {
+      return testFn(attachment, index) ? attachment.color : [0, 0, 0, 0];
+    });
+  };
+
+  gl.useProgram(drawProgram);
+  gl.bindFramebuffer(gl.FRAMEBUFFER, fb2);
+  ext.drawBuffersWEBGL(bufs);
+  gl.bindFramebuffer(gl.FRAMEBUFFER, fb);
+  ext.drawBuffersWEBGL(bufs);
+
+  wtu.drawUnitQuad(gl);
+
+  debug(&quot;test that each texture got the correct color.&quot;);
+
+  checkAttachmentsForColor(attachments);
+
+  debug(&quot;test clearing clears all the textures&quot;);
+  gl.bindFramebuffer(gl.FRAMEBUFFER, fb);
+  gl.clearColor(0, 1, 0, 1);
+  gl.clear(gl.COLOR_BUFFER_BIT);
+
+  checkAttachmentsForColor(attachments, [0, 255, 0, 255]);
+
+  debug(&quot;test that NONE draws nothing&quot;);
+  gl.bindFramebuffer(gl.FRAMEBUFFER, fb);
+  ext.drawBuffersWEBGL(nones);
+  gl.useProgram(redProgram);
+  wtu.clearAndDrawUnitQuad(gl);
+
+  checkAttachmentsForColor(attachments, [0, 255, 0, 255]);
+
+  debug(&quot;test that gl_FragColor broadcasts&quot;);
+  gl.bindFramebuffer(gl.FRAMEBUFFER, fb);
+  ext.drawBuffersWEBGL(bufs);
+  gl.useProgram(redProgram);
+  wtu.drawUnitQuad(gl);
+
+  checkAttachmentsForColor(attachments, [255, 0, 0, 255]);
+
+  if (maxUsable &gt; 1) {
+    var bufs1 = makeColorAttachmentArray(maxUsable);
+    var bufs2 = makeColorAttachmentArray(maxUsable);
+    for (var ii = 0; ii &lt; maxUsable; ++ii) {
+      if (ii &lt; half) {
+        bufs1[ii] = gl.NONE;
+      } else {
+        bufs2[ii] = gl.NONE;
+      }
+    }
+
+    debug(&quot;test setting first half to NONE and clearing&quot;);
+
+    gl.bindFramebuffer(gl.FRAMEBUFFER, fb);
+    ext.drawBuffersWEBGL(bufs1);
+    gl.clearColor(0, 1, 0, 1);
+    gl.clear(gl.COLOR_BUFFER_BIT);
+
+    checkAttachmentsForColorFn(attachments, function(attachment, index) {
+      return index &lt; half ? [255, 0, 0, 255] : [0, 255, 0, 255];
+    });
+
+    debug(&quot;test setting first half to NONE and drawing&quot;);
+
+    gl.bindFramebuffer(gl.FRAMEBUFFER, fb);
+    gl.useProgram(drawProgram);
+    wtu.drawUnitQuad(gl);
+
+    checkAttachmentsForColorFn(attachments, function(attachment, index) {
+      return index &lt; half ? [255, 0, 0, 255] : attachment.color;
+    });
+
+    debug(&quot;test setting second half to NONE and clearing&quot;);
+
+    gl.bindFramebuffer(gl.FRAMEBUFFER, fb);
+    ext.drawBuffersWEBGL(bufs);
+    gl.clearColor(1, 0, 0, 1);
+    gl.clear(gl.COLOR_BUFFER_BIT);
+    ext.drawBuffersWEBGL(bufs2);
+    gl.clearColor(0, 0, 1, 1);
+    gl.clear(gl.COLOR_BUFFER_BIT);
+    checkAttachmentsForColorFn(attachments, function(attachment, index) {
+      return index &lt; half ? [0, 0, 255, 255] : [255, 0, 0, 255];
+    });
+
+    debug(&quot;test setting second half to NONE and drawing&quot;);
+
+    gl.bindFramebuffer(gl.FRAMEBUFFER, fb);
+    gl.useProgram(drawProgram);
+    wtu.drawUnitQuad(gl);
+
+    checkAttachmentsForColorFn(attachments, function(attachment, index) {
+      return index &lt; half ? attachment.color : [255, 0, 0, 255];
+    });
+
+    gl.bindFramebuffer(gl.FRAMEBUFFER, halfFB1);
+    ext.drawBuffersWEBGL(bufs);
+    drawAndCheckAttachments(
+      halfFB1, &quot;framebuffer that only has first half of attachments&quot;,
+      function(attachment, index) {
+        return index &lt; half;
+      });
+
+    gl.bindFramebuffer(gl.FRAMEBUFFER, halfFB2);
+    ext.drawBuffersWEBGL(bufs);
+    drawAndCheckAttachments(
+      halfFB2, &quot;framebuffer that only has second half of attachments&quot;,
+      function(attachment, index) {
+        return index &gt;= half;
+      });
+
+    if (maxUsable &gt; 2) {
+      gl.bindFramebuffer(gl.FRAMEBUFFER, endsFB);
+      ext.drawBuffersWEBGL(bufs);
+      drawAndCheckAttachments(
+        endsFB, &quot;framebuffer that only has first and last attachments&quot;,
+        function(attachment, index) {
+          return index == 0 || index == (maxUsable - 1);
+        });
+
+      gl.bindFramebuffer(gl.FRAMEBUFFER, middleFB);
+      ext.drawBuffersWEBGL(bufs);
+      drawAndCheckAttachments(
+        middleFB,
+        &quot;framebuffer that has all but the first and last attachments&quot;,
+        function(attachment, index) {
+          return index != 0 &amp;&amp; index != (maxUsable - 1);
+        });
+    }
+  }
+
+  debug(&quot;test switching between fbos keeps drawbuffer state&quot;);
+  gl.bindFramebuffer(gl.FRAMEBUFFER, fb2);
+  ext.drawBuffersWEBGL(nones);
+
+  gl.bindFramebuffer(gl.FRAMEBUFFER, fb);
+  ext.drawBuffersWEBGL(bufs);
+  gl.clearColor(1, 0, 0, 1);
+  gl.clear(gl.COLOR_BUFFER_BIT);
+  checkAttachmentsForColor(attachments, [255, 0, 0, 255]);
+
+  gl.bindFramebuffer(gl.FRAMEBUFFER, fb2);
+  gl.useProgram(drawProgram);
+  wtu.drawUnitQuad(gl);
+  checkAttachmentsForColor(attachments, [255, 0, 0, 255]);
+
+  gl.bindFramebuffer(gl.FRAMEBUFFER, fb);
+  gl.useProgram(drawProgram);
+  wtu.drawUnitQuad(gl);
+  checkAttachmentsForColor(attachments);
+
+  debug(&quot;test queries&quot;);
+  debug(&quot;check framebuffer with all attachments on&quot;);
+  gl.bindFramebuffer(gl.FRAMEBUFFER, fb);
+  for (var ii = 0; ii &lt; maxUsable; ++ii) {
+    shouldBe(&quot;gl.getParameter(ext.DRAW_BUFFER0_WEBGL + &quot; + ii + &quot;)&quot;, &quot;gl.COLOR_ATTACHMENT0 + &quot; + ii);
+  }
+
+  debug(&quot;check framebuffer with all attachments off&quot;);
+  gl.bindFramebuffer(gl.FRAMEBUFFER, fb2);
+  for (var ii = 0; ii &lt; maxUsable; ++ii) {
+    shouldBe(&quot;gl.getParameter(ext.DRAW_BUFFER0_WEBGL + &quot; + ii + &quot;)&quot;, &quot;gl.NONE&quot;);
+  }
+
+  debug(&quot;test attachment size mis-match&quot;);
+  gl.bindTexture(gl.TEXTURE_2D, attachments[0].texture);
+  gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, width * 2, height, 0, gl.RGBA, gl.UNSIGNED_BYTE, null);
+  gl.bindFramebuffer(gl.FRAMEBUFFER, fb);
+  shouldBeTrue(&quot;gl.checkFramebufferStatus(gl.FRAMEBUFFER) != gl.FRAMEBUFFER_COMPLETE&quot;);
+  gl.bindFramebuffer(gl.FRAMEBUFFER, fb2);
+  shouldBeTrue(&quot;gl.checkFramebufferStatus(gl.FRAMEBUFFER) != gl.FRAMEBUFFER_COMPLETE&quot;);
+
+  gl.deleteFramebuffer(fb);
+  gl.deleteFramebuffer(fb2);
+  gl.deleteFramebuffer(halfFB1);
+  gl.deleteFramebuffer(halfFB2);
+  attachments.forEach(function(attachment) {
+    gl.deleteTexture(attachment.texture);
+  });
+  gl.deleteProgram(checkProgram);
+  gl.deleteProgram(redProgram);
+  gl.deleteProgram(drawProgram);
+}
+
+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;
</ins></span></pre></div>
<a id="trunkLayoutTestsplatformmacTestExpectations"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/platform/mac/TestExpectations (164476 => 164477)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/mac/TestExpectations        2014-02-21 06:45:34 UTC (rev 164476)
+++ trunk/LayoutTests/platform/mac/TestExpectations        2014-02-21 07:46:30 UTC (rev 164477)
</span><span class="lines">@@ -946,6 +946,9 @@
</span><span class="cx"> # Expected to fail until WebGL extension implementation lands
</span><span class="cx"> webkit.org/b/98257 fast/canvas/webgl/oes-element-index-uint.html [ Failure Pass ]
</span><span class="cx"> 
</span><ins>+# Expected to fail until GL_EXT_draw_buffers works properly for DARWIN. See WebGLDrawBuffers::supported
+webkit.org/b/112486 fast/canvas/webgl/webgl-draw-buffers.html [ Failure Pass ]
+
</ins><span class="cx"> # Resource Timing is not enable yet, skip it.
</span><span class="cx"> webkit.org/b/61138 http/tests/w3c/webperf/submission/Intel/resource-timing [ Skip ]
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkLayoutTestsplatformmacmountainlionfastcanvaswebglwebgldrawbuffersexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/platform/mac-mountainlion/fast/canvas/webgl/webgl-draw-buffers-expected.txt (0 => 164477)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/mac-mountainlion/fast/canvas/webgl/webgl-draw-buffers-expected.txt                                (rev 0)
+++ trunk/LayoutTests/platform/mac-mountainlion/fast/canvas/webgl/webgl-draw-buffers-expected.txt        2014-02-21 07:46:30 UTC (rev 164477)
</span><span class="lines">@@ -0,0 +1,327 @@
</span><ins>+CONSOLE MESSAGE: WebGL: INVALID_ENUM: getParameter: invalid parameter name, WEBGL_draw_buffers not enabled
+CONSOLE MESSAGE: WebGL: INVALID_ENUM: getParameter: invalid parameter name, WEBGL_draw_buffers not enabled
+CONSOLE MESSAGE: line 24: *** Error compiling shader '[object WebGLShader]':ERROR: 0:2: 'GL_EXT_draw_buffers' : extension is not supported
+
+CONSOLE MESSAGE: line 24: Error in compiling shader
+CONSOLE MESSAGE: WebGL: INVALID_ENUM: framebufferTexture2D: invalid attachment
+CONSOLE MESSAGE: WebGL: INVALID_VALUE: drawBuffersWEBGL: more than one buffer
+CONSOLE MESSAGE: WebGL: INVALID_VALUE: drawBuffersWEBGL: more than one buffer
+CONSOLE MESSAGE: WebGL: INVALID_OPERATION: drawBuffersWEBGL: BACK or NONE
+CONSOLE MESSAGE: WebGL: INVALID_ENUM: framebufferTexture2D: invalid attachment
+CONSOLE MESSAGE: WebGL: INVALID_OPERATION: drawBuffersWEBGL: COLOR_ATTACHMENTi_EXT or NONE
+CONSOLE MESSAGE: WebGL: checkFramebufferStatus: attachments do not have the same dimensions
+CONSOLE MESSAGE: WebGL: checkFramebufferStatus: attachments do not have the same dimensions
+This test verifies the functionality of the WEBGL_draw_buffers 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 binding enum with extension disabled
+PASS getError was expected value: INVALID_ENUM : MAX_COLOR_ATTACHMENTS_WEBGL should not be queryable if extension is disabled
+PASS getError was expected value: INVALID_ENUM : MAX_DRAW_BUFFERS_WEBGL should not be queryable if extension is disabled
+PASS getError was expected value: NO_ERROR : there should be no errors
+
+test shaders disabled
+vertex shader
+fragement shaderPASS GL_EXT_draw_buffers should not be defined in GLSL
+vertex shader
+fragement shaderPASS #extension GL_EXT_draw_buffers should not be allowed in GLSL
+PASS getError was expected value: NO_ERROR : there should be no errors
+
+test attachment disabled
+PASS getError was expected value: INVALID_ENUM : should not be able to attach to gl.COLOR_ATTACHMENT1
+PASS getError was expected value: NO_ERROR : there should be no errors
+
+PASS Successfully enabled WEBGL_draw_buffers extension
+PASS WEBGL_draw_buffers listed as supported and getExtension succeeded
+
+Testing enums with extension enabled
+PASS ext.MAX_COLOR_ATTACHMENTS_WEBGL is 0x8cdf
+PASS getError was expected value: NO_ERROR : foo
+MAX_COLOR_ATTACHMENTS_WEBGL:8cdf
+PASS gl.getParemter(ext.MAX_COLOR_ATTACHMENTS_WEBGL) should be &gt; 0
+PASS getError was expected value: NO_ERROR : MAX_COLOR_ATTACHMENTS_WEBGL query should succeed if extension is enabled
+PASS ext.MAX_DRAW_BUFFERS_WEBGL is 0x8824
+PASS getError was expected value: NO_ERROR : foo
+MAX_DRAW_BUFFERS_WEBGL:8824
+PASS gl.getParemter(ext.MAX_DRAW_BUFFERS_WEBGL) should be &gt; 0
+PASS getError was expected value: NO_ERROR : MAX_DRAW_BUFFERS_WEBGL query should succeed if extension is enabled
+PASS ext.COLOR_ATTACHMENT0_WEBGL is 0x8ce0
+PASS ext.COLOR_ATTACHMENT1_WEBGL is 0x8ce1
+PASS ext.COLOR_ATTACHMENT2_WEBGL is 0x8ce2
+PASS ext.COLOR_ATTACHMENT3_WEBGL is 0x8ce3
+PASS ext.COLOR_ATTACHMENT4_WEBGL is 0x8ce4
+PASS ext.COLOR_ATTACHMENT5_WEBGL is 0x8ce5
+PASS ext.COLOR_ATTACHMENT6_WEBGL is 0x8ce6
+PASS ext.COLOR_ATTACHMENT7_WEBGL is 0x8ce7
+PASS ext.COLOR_ATTACHMENT8_WEBGL is 0x8ce8
+PASS ext.COLOR_ATTACHMENT9_WEBGL is 0x8ce9
+PASS ext.COLOR_ATTACHMENT10_WEBGL is 0x8cea
+PASS ext.COLOR_ATTACHMENT11_WEBGL is 0x8ceb
+PASS ext.COLOR_ATTACHMENT12_WEBGL is 0x8cec
+PASS ext.COLOR_ATTACHMENT13_WEBGL is 0x8ced
+PASS ext.COLOR_ATTACHMENT14_WEBGL is 0x8cee
+PASS ext.COLOR_ATTACHMENT15_WEBGL is 0x8cef
+PASS ext.DRAW_BUFFER0_WEBGL is 0x8825
+PASS ext.DRAW_BUFFER1_WEBGL is 0x8826
+PASS ext.DRAW_BUFFER2_WEBGL is 0x8827
+PASS ext.DRAW_BUFFER3_WEBGL is 0x8828
+PASS ext.DRAW_BUFFER4_WEBGL is 0x8829
+PASS ext.DRAW_BUFFER5_WEBGL is 0x882a
+PASS ext.DRAW_BUFFER6_WEBGL is 0x882b
+PASS ext.DRAW_BUFFER7_WEBGL is 0x882c
+PASS ext.DRAW_BUFFER8_WEBGL is 0x882d
+PASS ext.DRAW_BUFFER9_WEBGL is 0x882e
+PASS ext.DRAW_BUFFER10_WEBGL is 0x882f
+PASS ext.DRAW_BUFFER11_WEBGL is 0x8830
+PASS ext.DRAW_BUFFER12_WEBGL is 0x8831
+PASS ext.DRAW_BUFFER13_WEBGL is 0x8832
+PASS ext.DRAW_BUFFER14_WEBGL is 0x8833
+PASS ext.DRAW_BUFFER15_WEBGL is 0x8834
+Testing drawBuffersWEBGL with default drawing buffer
+PASS gl.getParameter(ext.DRAW_BUFFER0_WEBGL) is gl.BACK
+PASS ext.drawBuffersWEBGL([]) was expected value: INVALID_VALUE.
+PASS ext.drawBuffersWEBGL([gl.NONE, gl.NONE]) was expected value: INVALID_VALUE.
+PASS ext.drawBuffersWEBGL([ext.COLOR_ATTACHMENT0_WEBGL]) was expected value: INVALID_OPERATION.
+PASS gl.getParameter(ext.DRAW_BUFFER0_WEBGL) is gl.BACK
+PASS ext.drawBuffersWEBGL([gl.NONE]) was expected value: NO_ERROR.
+PASS gl.getParameter(ext.DRAW_BUFFER0_WEBGL) is gl.NONE
+PASS ext.drawBuffersWEBGL([gl.BACK]) was expected value: NO_ERROR.
+PASS gl.getParameter(ext.DRAW_BUFFER0_WEBGL) is gl.BACK
+PASS getError was expected value: NO_ERROR : there should be no errors
+
+test shaders enabled
+vertex shader
+fragement shaderPASS GL_EXT_draw_buffers should be defined as 1 in GLSL
+fragement shaderPASS should be green
+PASS getError was expected value: NO_ERROR : there should be no errors
+
+test attachment enabled
+PASS getError was expected value: INVALID_ENUM : should not be able to attach pass the max attachment point: gl.COLOR_ATTACHMENT0 + 8
+PASS getError was expected value: NO_ERROR : should be able to attach to the max attachment point: gl.COLOR_ATTACHMENT0 + 7
+PASS getError was expected value: NO_ERROR : should be able to call drawBuffersWEBGL with array NONE of size 8
+PASS getError was expected value: NO_ERROR : should be able to call drawBuffersWEBGL with array attachments of size 8
+PASS getError was expected value: NO_ERROR : should be able to call drawBuffersWEBGL with mixed array attachments of size 8
+PASS getError was expected value: INVALID_OPERATION : should not be able to call drawBuffersWEBGL with out of order attachments of size 8
+PASS getError was expected value: NO_ERROR : should not be able to call drawBuffersWEBGL with short array of attachments of size 8
+PASS getError was expected value: NO_ERROR : there should be no errors
+
+--------- draw tests -----------
+fragement shaderPASS gl.checkFramebufferStatus(gl.FRAMEBUFFER) is gl.FRAMEBUFFER_COMPLETE
+PASS gl.checkFramebufferStatus(gl.FRAMEBUFFER) is gl.FRAMEBUFFER_COMPLETE
+test that each texture got the correct color.
+PASS attachment 0 should be 255,0,0,0
+PASS attachment 1 should be 0,255,0,0
+PASS attachment 2 should be 255,255,0,0
+PASS attachment 3 should be 0,0,255,0
+PASS attachment 4 should be 255,0,255,0
+PASS attachment 5 should be 0,255,255,0
+PASS attachment 6 should be 255,255,255,0
+PASS attachment 7 should be 0,0,0,255
+
+test clearing clears all the textures
+PASS attachment 0 should be 0,255,0,255
+PASS attachment 1 should be 0,255,0,255
+PASS attachment 2 should be 0,255,0,255
+PASS attachment 3 should be 0,255,0,255
+PASS attachment 4 should be 0,255,0,255
+PASS attachment 5 should be 0,255,0,255
+PASS attachment 6 should be 0,255,0,255
+PASS attachment 7 should be 0,255,0,255
+
+test that NONE draws nothing
+PASS attachment 0 should be 0,255,0,255
+PASS attachment 1 should be 0,255,0,255
+PASS attachment 2 should be 0,255,0,255
+PASS attachment 3 should be 0,255,0,255
+PASS attachment 4 should be 0,255,0,255
+PASS attachment 5 should be 0,255,0,255
+PASS attachment 6 should be 0,255,0,255
+PASS attachment 7 should be 0,255,0,255
+
+test that gl_FragColor broadcasts
+PASS attachment 0 should be 255,0,0,255
+PASS attachment 1 should be 255,0,0,255
+PASS attachment 2 should be 255,0,0,255
+PASS attachment 3 should be 255,0,0,255
+PASS attachment 4 should be 255,0,0,255
+PASS attachment 5 should be 255,0,0,255
+PASS attachment 6 should be 255,0,0,255
+PASS attachment 7 should be 255,0,0,255
+
+test setting first half to NONE and clearing
+PASS attachment 0 should be 255,0,0,255
+PASS attachment 1 should be 255,0,0,255
+PASS attachment 2 should be 255,0,0,255
+PASS attachment 3 should be 255,0,0,255
+PASS attachment 4 should be 0,255,0,255
+PASS attachment 5 should be 0,255,0,255
+PASS attachment 6 should be 0,255,0,255
+PASS attachment 7 should be 0,255,0,255
+
+test setting first half to NONE and drawing
+PASS attachment 0 should be 255,0,0,255
+PASS attachment 1 should be 255,0,0,255
+PASS attachment 2 should be 255,0,0,255
+PASS attachment 3 should be 255,0,0,255
+PASS attachment 4 should be 255,0,255,0
+PASS attachment 5 should be 0,255,255,0
+PASS attachment 6 should be 255,255,255,0
+PASS attachment 7 should be 0,0,0,255
+
+test setting second half to NONE and clearing
+PASS attachment 0 should be 0,0,255,255
+PASS attachment 1 should be 0,0,255,255
+PASS attachment 2 should be 0,0,255,255
+PASS attachment 3 should be 0,0,255,255
+PASS attachment 4 should be 255,0,0,255
+PASS attachment 5 should be 255,0,0,255
+PASS attachment 6 should be 255,0,0,255
+PASS attachment 7 should be 255,0,0,255
+
+test setting second half to NONE and drawing
+PASS attachment 0 should be 255,0,0,0
+PASS attachment 1 should be 0,255,0,0
+PASS attachment 2 should be 255,255,0,0
+PASS attachment 3 should be 0,0,255,0
+PASS attachment 4 should be 255,0,0,255
+PASS attachment 5 should be 255,0,0,255
+PASS attachment 6 should be 255,0,0,255
+PASS attachment 7 should be 255,0,0,255
+
+test clearing framebuffer that only has first half of attachments
+attachment: 0 = COLOR_ATTACHMENT0, TEXTURE
+attachment: 1 = 0x8ce1, TEXTURE
+attachment: 2 = 0x8ce2, TEXTURE
+attachment: 3 = 0x8ce3, TEXTURE
+attachment: 4 = 0x8ce4, ZERO
+attachment: 5 = 0x8ce5, ZERO
+attachment: 6 = 0x8ce6, ZERO
+attachment: 7 = 0x8ce7, ZERO
+PASS attachment 0 should be 0,255,0,255
+PASS attachment 1 should be 0,255,0,255
+PASS attachment 2 should be 0,255,0,255
+PASS attachment 3 should be 0,255,0,255
+PASS attachment 4 should be 0,0,0,0
+PASS attachment 5 should be 0,0,0,0
+PASS attachment 6 should be 0,0,0,0
+PASS attachment 7 should be 0,0,0,0
+
+test drawing to framebuffer that only has first half of attachments
+PASS attachment 0 should be 255,0,0,0
+PASS attachment 1 should be 0,255,0,0
+PASS attachment 2 should be 255,255,0,0
+PASS attachment 3 should be 0,0,255,0
+PASS attachment 4 should be 0,0,0,0
+PASS attachment 5 should be 0,0,0,0
+PASS attachment 6 should be 0,0,0,0
+PASS attachment 7 should be 0,0,0,0
+
+test clearing framebuffer that only has second half of attachments
+attachment: 0 = COLOR_ATTACHMENT0, ZERO
+attachment: 1 = 0x8ce1, ZERO
+attachment: 2 = 0x8ce2, ZERO
+attachment: 3 = 0x8ce3, ZERO
+attachment: 4 = 0x8ce4, TEXTURE
+attachment: 5 = 0x8ce5, TEXTURE
+attachment: 6 = 0x8ce6, TEXTURE
+attachment: 7 = 0x8ce7, TEXTURE
+framebuffer not complete
+
+test clearing framebuffer that only has first and last attachments
+attachment: 0 = COLOR_ATTACHMENT0, TEXTURE
+attachment: 1 = 0x8ce1, ZERO
+attachment: 2 = 0x8ce2, ZERO
+attachment: 3 = 0x8ce3, ZERO
+attachment: 4 = 0x8ce4, ZERO
+attachment: 5 = 0x8ce5, ZERO
+attachment: 6 = 0x8ce6, ZERO
+attachment: 7 = 0x8ce7, TEXTURE
+PASS attachment 0 should be 0,255,0,255
+PASS attachment 1 should be 0,0,0,0
+PASS attachment 2 should be 0,0,0,0
+PASS attachment 3 should be 0,0,0,0
+PASS attachment 4 should be 0,0,0,0
+PASS attachment 5 should be 0,0,0,0
+PASS attachment 6 should be 0,0,0,0
+PASS attachment 7 should be 0,255,0,255
+
+test drawing to framebuffer that only has first and last attachments
+PASS attachment 0 should be 255,0,0,0
+PASS attachment 1 should be 0,0,0,0
+PASS attachment 2 should be 0,0,0,0
+PASS attachment 3 should be 0,0,0,0
+PASS attachment 4 should be 0,0,0,0
+PASS attachment 5 should be 0,0,0,0
+PASS attachment 6 should be 0,0,0,0
+PASS attachment 7 should be 0,0,0,255
+
+test clearing framebuffer that has all but the first and last attachments
+attachment: 0 = COLOR_ATTACHMENT0, ZERO
+attachment: 1 = 0x8ce1, TEXTURE
+attachment: 2 = 0x8ce2, TEXTURE
+attachment: 3 = 0x8ce3, TEXTURE
+attachment: 4 = 0x8ce4, TEXTURE
+attachment: 5 = 0x8ce5, TEXTURE
+attachment: 6 = 0x8ce6, TEXTURE
+attachment: 7 = 0x8ce7, ZERO
+framebuffer not complete
+
+test switching between fbos keeps drawbuffer state
+PASS attachment 0 should be 255,0,0,255
+PASS attachment 1 should be 255,0,0,255
+PASS attachment 2 should be 255,0,0,255
+PASS attachment 3 should be 255,0,0,255
+PASS attachment 4 should be 255,0,0,255
+PASS attachment 5 should be 255,0,0,255
+PASS attachment 6 should be 255,0,0,255
+PASS attachment 7 should be 255,0,0,255
+
+PASS attachment 0 should be 255,0,0,255
+PASS attachment 1 should be 255,0,0,255
+PASS attachment 2 should be 255,0,0,255
+PASS attachment 3 should be 255,0,0,255
+PASS attachment 4 should be 255,0,0,255
+PASS attachment 5 should be 255,0,0,255
+PASS attachment 6 should be 255,0,0,255
+PASS attachment 7 should be 255,0,0,255
+
+PASS attachment 0 should be 255,0,0,0
+PASS attachment 1 should be 0,255,0,0
+PASS attachment 2 should be 255,255,0,0
+PASS attachment 3 should be 0,0,255,0
+PASS attachment 4 should be 255,0,255,0
+PASS attachment 5 should be 0,255,255,0
+PASS attachment 6 should be 255,255,255,0
+PASS attachment 7 should be 0,0,0,255
+
+test queries
+check framebuffer with all attachments on
+PASS gl.getParameter(ext.DRAW_BUFFER0_WEBGL + 0) is gl.COLOR_ATTACHMENT0 + 0
+PASS gl.getParameter(ext.DRAW_BUFFER0_WEBGL + 1) is gl.COLOR_ATTACHMENT0 + 1
+PASS gl.getParameter(ext.DRAW_BUFFER0_WEBGL + 2) is gl.COLOR_ATTACHMENT0 + 2
+PASS gl.getParameter(ext.DRAW_BUFFER0_WEBGL + 3) is gl.COLOR_ATTACHMENT0 + 3
+PASS gl.getParameter(ext.DRAW_BUFFER0_WEBGL + 4) is gl.COLOR_ATTACHMENT0 + 4
+PASS gl.getParameter(ext.DRAW_BUFFER0_WEBGL + 5) is gl.COLOR_ATTACHMENT0 + 5
+PASS gl.getParameter(ext.DRAW_BUFFER0_WEBGL + 6) is gl.COLOR_ATTACHMENT0 + 6
+PASS gl.getParameter(ext.DRAW_BUFFER0_WEBGL + 7) is gl.COLOR_ATTACHMENT0 + 7
+check framebuffer with all attachments off
+PASS gl.getParameter(ext.DRAW_BUFFER0_WEBGL + 0) is gl.NONE
+PASS gl.getParameter(ext.DRAW_BUFFER0_WEBGL + 1) is gl.NONE
+PASS gl.getParameter(ext.DRAW_BUFFER0_WEBGL + 2) is gl.NONE
+PASS gl.getParameter(ext.DRAW_BUFFER0_WEBGL + 3) is gl.NONE
+PASS gl.getParameter(ext.DRAW_BUFFER0_WEBGL + 4) is gl.NONE
+PASS gl.getParameter(ext.DRAW_BUFFER0_WEBGL + 5) is gl.NONE
+PASS gl.getParameter(ext.DRAW_BUFFER0_WEBGL + 6) is gl.NONE
+PASS gl.getParameter(ext.DRAW_BUFFER0_WEBGL + 7) is gl.NONE
+test attachment size mis-match
+PASS gl.checkFramebufferStatus(gl.FRAMEBUFFER) != gl.FRAMEBUFFER_COMPLETE is true
+PASS gl.checkFramebufferStatus(gl.FRAMEBUFFER) != gl.FRAMEBUFFER_COMPLETE is true
+PASS getError was expected value: NO_ERROR : there should be no errors
+
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
</ins></span></pre></div>
<a id="trunkSourceWebCoreCMakeListstxt"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/CMakeLists.txt (164476 => 164477)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/CMakeLists.txt        2014-02-21 06:45:34 UTC (rev 164476)
+++ trunk/Source/WebCore/CMakeLists.txt        2014-02-21 07:46:30 UTC (rev 164477)
</span><span class="lines">@@ -503,7 +503,6 @@
</span><span class="cx">     html/canvas/CanvasRenderingContext.idl
</span><span class="cx">     html/canvas/CanvasRenderingContext2D.idl
</span><span class="cx">     html/canvas/DOMPath.idl
</span><del>-    html/canvas/EXTDrawBuffers.idl
</del><span class="cx">     html/canvas/EXTTextureFilterAnisotropic.idl
</span><span class="cx">     html/canvas/OESElementIndexUint.idl
</span><span class="cx">     html/canvas/OESStandardDerivatives.idl
</span><span class="lines">@@ -522,6 +521,7 @@
</span><span class="cx">     html/canvas/WebGLDebugRendererInfo.idl
</span><span class="cx">     html/canvas/WebGLDebugShaders.idl
</span><span class="cx">     html/canvas/WebGLDepthTexture.idl
</span><ins>+    html/canvas/WebGLDrawBuffers.idl
</ins><span class="cx">     html/canvas/WebGLFramebuffer.idl
</span><span class="cx">     html/canvas/WebGLLoseContext.idl
</span><span class="cx">     html/canvas/WebGLProgram.idl
</span><span class="lines">@@ -1493,7 +1493,6 @@
</span><span class="cx">     html/canvas/CanvasRenderingContext.cpp
</span><span class="cx">     html/canvas/CanvasRenderingContext2D.cpp
</span><span class="cx">     html/canvas/CanvasStyle.cpp
</span><del>-    html/canvas/EXTDrawBuffers.cpp
</del><span class="cx">     html/canvas/EXTTextureFilterAnisotropic.cpp
</span><span class="cx">     html/canvas/OESElementIndexUint.cpp
</span><span class="cx">     html/canvas/OESStandardDerivatives.cpp
</span><span class="lines">@@ -1513,6 +1512,7 @@
</span><span class="cx">     html/canvas/WebGLDebugRendererInfo.cpp
</span><span class="cx">     html/canvas/WebGLDebugShaders.cpp
</span><span class="cx">     html/canvas/WebGLDepthTexture.cpp
</span><ins>+    html/canvas/WebGLDrawBuffers.cpp
</ins><span class="cx">     html/canvas/WebGLExtension.cpp
</span><span class="cx">     html/canvas/WebGLFramebuffer.cpp
</span><span class="cx">     html/canvas/WebGLGetInfo.cpp
</span><span class="lines">@@ -2617,7 +2617,6 @@
</span><span class="cx"> 
</span><span class="cx">     list(APPEND WebCore_SOURCES
</span><span class="cx">         html/canvas/ANGLEInstancedArrays.cpp
</span><del>-        html/canvas/EXTDrawBuffers.cpp
</del><span class="cx">         html/canvas/EXTTextureFilterAnisotropic.cpp
</span><span class="cx">         html/canvas/OESElementIndexUint.cpp
</span><span class="cx">         html/canvas/OESStandardDerivatives.cpp
</span><span class="lines">@@ -2637,6 +2636,7 @@
</span><span class="cx">         html/canvas/WebGLDebugRendererInfo.cpp
</span><span class="cx">         html/canvas/WebGLDebugShaders.cpp
</span><span class="cx">         html/canvas/WebGLDepthTexture.cpp
</span><ins>+        html/canvas/WebGLDrawBuffers.cpp
</ins><span class="cx">         html/canvas/WebGLExtension.cpp
</span><span class="cx">         html/canvas/WebGLFramebuffer.cpp
</span><span class="cx">         html/canvas/WebGLGetInfo.cpp
</span><span class="lines">@@ -2654,7 +2654,6 @@
</span><span class="cx">     )
</span><span class="cx">     list(APPEND WebCore_IDL_FILES
</span><span class="cx">         html/canvas/ANGLEInstancedArrays.idl
</span><del>-        html/canvas/EXTDrawBuffers.idl
</del><span class="cx">         html/canvas/EXTTextureFilterAnisotropic.idl
</span><span class="cx">         html/canvas/OESElementIndexUint.idl
</span><span class="cx">         html/canvas/OESStandardDerivatives.idl
</span><span class="lines">@@ -2673,6 +2672,7 @@
</span><span class="cx">         html/canvas/WebGLDebugRendererInfo.idl
</span><span class="cx">         html/canvas/WebGLDebugShaders.idl
</span><span class="cx">         html/canvas/WebGLDepthTexture.idl
</span><ins>+        html/canvas/WebGLDrawBuffers.idl
</ins><span class="cx">         html/canvas/WebGLFramebuffer.idl
</span><span class="cx">         html/canvas/WebGLLoseContext.idl
</span><span class="cx">         html/canvas/WebGLProgram.idl
</span></span></pre></div>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (164476 => 164477)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2014-02-21 06:45:34 UTC (rev 164476)
+++ trunk/Source/WebCore/ChangeLog        2014-02-21 07:46:30 UTC (rev 164477)
</span><span class="lines">@@ -1,3 +1,49 @@
</span><ins>+2014-02-20  ChangSeok Oh  &lt;changseok.oh@collabora.com&gt;
+
+        Rename EXT_draw_buffers to WEBGL_draw_buffers
+        https://bugs.webkit.org/show_bug.cgi?id=128894
+
+        Reviewed by Dean Jackson.
+
+        I noticed the related spec has changed. Accordingly chromium also changed its implementation
+        to meet the spec. So here I'd like to apply it to webkit as well.
+
+        Merged from Blink (patch by bajones):
+        https://src.chromium.org/viewvc/blink?revision=152065&amp;view=revision
+
+        Test: fast/canvas/webgl/webgl-draw-buffers.html
+
+        * CMakeLists.txt:
+        * DerivedSources.cpp:
+        * DerivedSources.make:
+        * GNUmakefile.list.am:
+        * WebCore.vcxproj/WebCore.vcxproj:
+        * WebCore.vcxproj/WebCore.vcxproj.filters:
+        * WebCore.xcodeproj/project.pbxproj:
+        * bindings/js/JSWebGLRenderingContextCustom.cpp:
+        (WebCore::toJS):
+        * html/canvas/EXTDrawBuffers.idl: Removed.
+        * html/canvas/WebGLDrawBuffers.cpp: Renamed from Source/WebCore/html/canvas/EXTDrawBuffers.cpp.
+        (WebCore::WebGLDrawBuffers::WebGLDrawBuffers):
+        (WebCore::WebGLDrawBuffers::~WebGLDrawBuffers):
+        (WebCore::WebGLDrawBuffers::getName):
+        (WebCore::WebGLDrawBuffers::create):
+        (WebCore::WebGLDrawBuffers::supported):
+        (WebCore::WebGLDrawBuffers::drawBuffersWEBGL):
+        (WebCore::WebGLDrawBuffers::satisfiesWebGLRequirements):
+        * html/canvas/WebGLDrawBuffers.h: Renamed from Source/WebCore/html/canvas/EXTDrawBuffers.h.
+        * html/canvas/WebGLDrawBuffers.idl: Added.
+        * html/canvas/WebGLExtension.h:
+        * html/canvas/WebGLFramebuffer.cpp:
+        (WebCore::WebGLFramebuffer::drawBuffersIfNecessary):
+        * html/canvas/WebGLRenderingContext.cpp:
+        (WebCore::WebGLRenderingContext::getExtension):
+        (WebCore::WebGLRenderingContext::getParameter):
+        (WebCore::WebGLRenderingContext::getSupportedExtensions):
+        (WebCore::WebGLRenderingContext::validateFramebufferFuncParameters):
+        (WebCore::WebGLRenderingContext::supportsDrawBuffers):
+        * html/canvas/WebGLRenderingContext.h:
+
</ins><span class="cx"> 2014-02-20  Ryosuke Niwa  &lt;rniwa@webkit.org&gt;
</span><span class="cx"> 
</span><span class="cx">         m_ancestorDisabledState should never be unknown
</span></span></pre></div>
<a id="trunkSourceWebCoreDerivedSourcescpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/DerivedSources.cpp (164476 => 164477)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/DerivedSources.cpp        2014-02-21 06:45:34 UTC (rev 164476)
+++ trunk/Source/WebCore/DerivedSources.cpp        2014-02-21 07:46:30 UTC (rev 164477)
</span><span class="lines">@@ -41,7 +41,6 @@
</span><span class="cx"> #include &quot;JSCanvasRenderingContext.cpp&quot;
</span><span class="cx"> #include &quot;JSCanvasRenderingContext2D.cpp&quot;
</span><span class="cx"> #if ENABLE(WEBGL)
</span><del>-#include &quot;JSEXTDrawBuffers.cpp&quot;
</del><span class="cx"> #include &quot;JSEXTTextureFilterAnisotropic.cpp&quot;
</span><span class="cx"> #include &quot;JSOESElementIndexUint.cpp&quot;
</span><span class="cx"> #include &quot;JSOESStandardDerivatives.cpp&quot;
</span><span class="lines">@@ -60,6 +59,7 @@
</span><span class="cx"> #include &quot;JSWebGLDebugRendererInfo.cpp&quot;
</span><span class="cx"> #include &quot;JSWebGLDebugShaders.cpp&quot;
</span><span class="cx"> #include &quot;JSWebGLDepthTexture.cpp&quot;
</span><ins>+#include &quot;JSWebGLDrawBuffers.cpp&quot;
</ins><span class="cx"> #include &quot;JSWebGLFramebuffer.cpp&quot;
</span><span class="cx"> #include &quot;JSWebGLLoseContext.cpp&quot;
</span><span class="cx"> #include &quot;JSWebGLProgram.cpp&quot;
</span></span></pre></div>
<a id="trunkSourceWebCoreDerivedSourcesmake"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/DerivedSources.make (164476 => 164477)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/DerivedSources.make        2014-02-21 06:45:34 UTC (rev 164476)
+++ trunk/Source/WebCore/DerivedSources.make        2014-02-21 07:46:30 UTC (rev 164477)
</span><span class="lines">@@ -412,7 +412,6 @@
</span><span class="cx">     $(WebCore)/html/canvas/CanvasRenderingContext.idl \
</span><span class="cx">     $(WebCore)/html/canvas/CanvasRenderingContext2D.idl \
</span><span class="cx">     $(WebCore)/html/canvas/DOMPath.idl \
</span><del>-    $(WebCore)/html/canvas/EXTDrawBuffers.idl \
</del><span class="cx">     $(WebCore)/html/canvas/EXTTextureFilterAnisotropic.idl \
</span><span class="cx">     $(WebCore)/html/canvas/OESElementIndexUint.idl \
</span><span class="cx">     $(WebCore)/html/canvas/OESStandardDerivatives.idl \
</span><span class="lines">@@ -431,6 +430,7 @@
</span><span class="cx">     $(WebCore)/html/canvas/WebGLDebugRendererInfo.idl \
</span><span class="cx">     $(WebCore)/html/canvas/WebGLDebugShaders.idl \
</span><span class="cx">     $(WebCore)/html/canvas/WebGLDepthTexture.idl \
</span><ins>+    $(WebCore)/html/canvas/WebGLDrawBuffers.idl \
</ins><span class="cx">     $(WebCore)/html/canvas/WebGLFramebuffer.idl \
</span><span class="cx">     $(WebCore)/html/canvas/WebGLLoseContext.idl \
</span><span class="cx">     $(WebCore)/html/canvas/WebGLProgram.idl \
</span></span></pre></div>
<a id="trunkSourceWebCoreGNUmakefilelistam"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/GNUmakefile.list.am (164476 => 164477)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/GNUmakefile.list.am        2014-02-21 06:45:34 UTC (rev 164476)
+++ trunk/Source/WebCore/GNUmakefile.list.am        2014-02-21 07:46:30 UTC (rev 164477)
</span><span class="lines">@@ -236,8 +236,6 @@
</span><span class="cx">         DerivedSources/WebCore/JSEntityReference.h \
</span><span class="cx">         DerivedSources/WebCore/JSErrorEvent.cpp \
</span><span class="cx">         DerivedSources/WebCore/JSErrorEvent.h \
</span><del>-        DerivedSources/WebCore/JSEXTDrawBuffers.cpp \
-        DerivedSources/WebCore/JSEXTDrawBuffers.h \
</del><span class="cx">         DerivedSources/WebCore/JSEXTTextureFilterAnisotropic.cpp \
</span><span class="cx">         DerivedSources/WebCore/JSEXTTextureFilterAnisotropic.h \
</span><span class="cx">         DerivedSources/WebCore/JSEvent.cpp \
</span><span class="lines">@@ -771,6 +769,8 @@
</span><span class="cx">         DerivedSources/WebCore/JSWebGLDebugShaders.h \
</span><span class="cx">         DerivedSources/WebCore/JSWebGLDepthTexture.cpp \
</span><span class="cx">         DerivedSources/WebCore/JSWebGLDepthTexture.h \
</span><ins>+        DerivedSources/WebCore/JSWebGLDrawBuffers.cpp \
+        DerivedSources/WebCore/JSWebGLDrawBuffers.h \
</ins><span class="cx">         DerivedSources/WebCore/JSWebGLFramebuffer.cpp \
</span><span class="cx">         DerivedSources/WebCore/JSWebGLFramebuffer.h \
</span><span class="cx">         DerivedSources/WebCore/JSWebGLLoseContext.cpp \
</span><span class="lines">@@ -1511,7 +1511,6 @@
</span><span class="cx">         $(WebCore)/html/canvas/CanvasRenderingContext.idl \
</span><span class="cx">         $(WebCore)/html/canvas/CanvasRenderingContext2D.idl \
</span><span class="cx">         $(WebCore)/html/canvas/DOMPath.idl \
</span><del>-        $(WebCore)/html/canvas/EXTDrawBuffers.idl \
</del><span class="cx">         $(WebCore)/html/canvas/EXTTextureFilterAnisotropic.idl \
</span><span class="cx">         $(WebCore)/html/canvas/OESStandardDerivatives.idl \
</span><span class="cx">         $(WebCore)/html/canvas/OESTextureFloat.idl \
</span><span class="lines">@@ -1530,6 +1529,7 @@
</span><span class="cx">         $(WebCore)/html/canvas/WebGLDebugRendererInfo.idl \
</span><span class="cx">         $(WebCore)/html/canvas/WebGLDebugShaders.idl \
</span><span class="cx">         $(WebCore)/html/canvas/WebGLDepthTexture.idl \
</span><ins>+        $(WebCore)/html/canvas/WebGLDrawBuffers.idl \
</ins><span class="cx">         $(WebCore)/html/canvas/WebGLFramebuffer.idl \
</span><span class="cx">         $(WebCore)/html/canvas/WebGLLoseContext.idl \
</span><span class="cx">         $(WebCore)/html/canvas/WebGLProgram.idl \
</span><span class="lines">@@ -3247,8 +3247,6 @@
</span><span class="cx">         Source/WebCore/html/canvas/CanvasStyle.cpp \
</span><span class="cx">         Source/WebCore/html/canvas/CanvasStyle.h \
</span><span class="cx">         Source/WebCore/html/canvas/DOMPath.h \
</span><del>-        Source/WebCore/html/canvas/EXTDrawBuffers.cpp \
-        Source/WebCore/html/canvas/EXTDrawBuffers.h \
</del><span class="cx">         Source/WebCore/html/canvas/EXTTextureFilterAnisotropic.cpp \
</span><span class="cx">         Source/WebCore/html/canvas/EXTTextureFilterAnisotropic.h \
</span><span class="cx">         Source/WebCore/html/canvas/OESStandardDerivatives.cpp \
</span><span class="lines">@@ -3288,6 +3286,8 @@
</span><span class="cx">         Source/WebCore/html/canvas/WebGLDebugShaders.h \
</span><span class="cx">         Source/WebCore/html/canvas/WebGLDepthTexture.cpp \
</span><span class="cx">         Source/WebCore/html/canvas/WebGLDepthTexture.h \
</span><ins>+        Source/WebCore/html/canvas/WebGLDrawBuffers.cpp \
+        Source/WebCore/html/canvas/WebGLDrawBuffers.h \
</ins><span class="cx">         Source/WebCore/html/canvas/WebGLFramebuffer.cpp \
</span><span class="cx">         Source/WebCore/html/canvas/WebGLFramebuffer.h \
</span><span class="cx">         Source/WebCore/html/canvas/WebGLGetInfo.cpp \
</span></span></pre></div>
<a id="trunkSourceWebCoreWebCorevcxprojWebCorevcxproj"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj (164476 => 164477)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj        2014-02-21 06:45:34 UTC (rev 164476)
+++ trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj        2014-02-21 07:46:30 UTC (rev 164477)
</span><span class="lines">@@ -304,20 +304,6 @@
</span><span class="cx">       &lt;ExcludedFromBuild Condition=&quot;'$(Configuration)|$(Platform)'=='Production|Win32'&quot;&gt;true&lt;/ExcludedFromBuild&gt;
</span><span class="cx">       &lt;ExcludedFromBuild Condition=&quot;'$(Configuration)|$(Platform)'=='Production|x64'&quot;&gt;true&lt;/ExcludedFromBuild&gt;
</span><span class="cx">     &lt;/ClCompile&gt;
</span><del>-    &lt;ClCompile Include=&quot;$(ConfigurationBuildDir)\obj$(PlatformArchitecture)\WebCore\DerivedSources\JSEXTDrawBuffers.cpp&quot;&gt;
-      &lt;ExcludedFromBuild Condition=&quot;'$(Configuration)|$(Platform)'=='Debug|Win32'&quot;&gt;true&lt;/ExcludedFromBuild&gt;
-      &lt;ExcludedFromBuild Condition=&quot;'$(Configuration)|$(Platform)'=='Debug|x64'&quot;&gt;true&lt;/ExcludedFromBuild&gt;
-      &lt;ExcludedFromBuild Condition=&quot;'$(Configuration)|$(Platform)'=='Debug_WinCairo|Win32'&quot;&gt;true&lt;/ExcludedFromBuild&gt;
-      &lt;ExcludedFromBuild Condition=&quot;'$(Configuration)|$(Platform)'=='Debug_WinCairo|x64'&quot;&gt;true&lt;/ExcludedFromBuild&gt;
-      &lt;ExcludedFromBuild Condition=&quot;'$(Configuration)|$(Platform)'=='DebugSuffix|Win32'&quot;&gt;true&lt;/ExcludedFromBuild&gt;
-      &lt;ExcludedFromBuild Condition=&quot;'$(Configuration)|$(Platform)'=='DebugSuffix|x64'&quot;&gt;true&lt;/ExcludedFromBuild&gt;
-      &lt;ExcludedFromBuild Condition=&quot;'$(Configuration)|$(Platform)'=='Release|Win32'&quot;&gt;true&lt;/ExcludedFromBuild&gt;
-      &lt;ExcludedFromBuild Condition=&quot;'$(Configuration)|$(Platform)'=='Release|x64'&quot;&gt;true&lt;/ExcludedFromBuild&gt;
-      &lt;ExcludedFromBuild Condition=&quot;'$(Configuration)|$(Platform)'=='Release_WinCairo|Win32'&quot;&gt;true&lt;/ExcludedFromBuild&gt;
-      &lt;ExcludedFromBuild Condition=&quot;'$(Configuration)|$(Platform)'=='Release_WinCairo|x64'&quot;&gt;true&lt;/ExcludedFromBuild&gt;
-      &lt;ExcludedFromBuild Condition=&quot;'$(Configuration)|$(Platform)'=='Production|Win32'&quot;&gt;true&lt;/ExcludedFromBuild&gt;
-      &lt;ExcludedFromBuild Condition=&quot;'$(Configuration)|$(Platform)'=='Production|x64'&quot;&gt;true&lt;/ExcludedFromBuild&gt;
-    &lt;/ClCompile&gt;
</del><span class="cx">     &lt;ClCompile Include=&quot;$(ConfigurationBuildDir)\obj$(PlatformArchitecture)\WebCore\DerivedSources\JSEXTTextureFilterAnisotropic.cpp&quot;&gt;
</span><span class="cx">       &lt;ExcludedFromBuild Condition=&quot;'$(Configuration)|$(Platform)'=='Debug|Win32'&quot;&gt;true&lt;/ExcludedFromBuild&gt;
</span><span class="cx">       &lt;ExcludedFromBuild Condition=&quot;'$(Configuration)|$(Platform)'=='Debug|x64'&quot;&gt;true&lt;/ExcludedFromBuild&gt;
</span><span class="lines">@@ -570,6 +556,20 @@
</span><span class="cx">       &lt;ExcludedFromBuild Condition=&quot;'$(Configuration)|$(Platform)'=='Production|Win32'&quot;&gt;true&lt;/ExcludedFromBuild&gt;
</span><span class="cx">       &lt;ExcludedFromBuild Condition=&quot;'$(Configuration)|$(Platform)'=='Production|x64'&quot;&gt;true&lt;/ExcludedFromBuild&gt;
</span><span class="cx">     &lt;/ClCompile&gt;
</span><ins>+    &lt;ClCompile Include=&quot;$(ConfigurationBuildDir)\obj$(PlatformArchitecture)\WebCore\DerivedSources\JSWebGLDrawBuffers.cpp&quot;&gt;
+      &lt;ExcludedFromBuild Condition=&quot;'$(Configuration)|$(Platform)'=='Debug|Win32'&quot;&gt;true&lt;/ExcludedFromBuild&gt;
+      &lt;ExcludedFromBuild Condition=&quot;'$(Configuration)|$(Platform)'=='Debug|x64'&quot;&gt;true&lt;/ExcludedFromBuild&gt;
+      &lt;ExcludedFromBuild Condition=&quot;'$(Configuration)|$(Platform)'=='Debug_WinCairo|Win32'&quot;&gt;true&lt;/ExcludedFromBuild&gt;
+      &lt;ExcludedFromBuild Condition=&quot;'$(Configuration)|$(Platform)'=='Debug_WinCairo|x64'&quot;&gt;true&lt;/ExcludedFromBuild&gt;
+      &lt;ExcludedFromBuild Condition=&quot;'$(Configuration)|$(Platform)'=='DebugSuffix|Win32'&quot;&gt;true&lt;/ExcludedFromBuild&gt;
+      &lt;ExcludedFromBuild Condition=&quot;'$(Configuration)|$(Platform)'=='DebugSuffix|x64'&quot;&gt;true&lt;/ExcludedFromBuild&gt;
+      &lt;ExcludedFromBuild Condition=&quot;'$(Configuration)|$(Platform)'=='Release|Win32'&quot;&gt;true&lt;/ExcludedFromBuild&gt;
+      &lt;ExcludedFromBuild Condition=&quot;'$(Configuration)|$(Platform)'=='Release|x64'&quot;&gt;true&lt;/ExcludedFromBuild&gt;
+      &lt;ExcludedFromBuild Condition=&quot;'$(Configuration)|$(Platform)'=='Release_WinCairo|Win32'&quot;&gt;true&lt;/ExcludedFromBuild&gt;
+      &lt;ExcludedFromBuild Condition=&quot;'$(Configuration)|$(Platform)'=='Release_WinCairo|x64'&quot;&gt;true&lt;/ExcludedFromBuild&gt;
+      &lt;ExcludedFromBuild Condition=&quot;'$(Configuration)|$(Platform)'=='Production|Win32'&quot;&gt;true&lt;/ExcludedFromBuild&gt;
+      &lt;ExcludedFromBuild Condition=&quot;'$(Configuration)|$(Platform)'=='Production|x64'&quot;&gt;true&lt;/ExcludedFromBuild&gt;
+    &lt;/ClCompile&gt;
</ins><span class="cx">     &lt;ClCompile Include=&quot;$(ConfigurationBuildDir)\obj$(PlatformArchitecture)\WebCore\DerivedSources\JSWebGLFramebuffer.cpp&quot;&gt;
</span><span class="cx">       &lt;ExcludedFromBuild Condition=&quot;'$(Configuration)|$(Platform)'=='Debug|Win32'&quot;&gt;true&lt;/ExcludedFromBuild&gt;
</span><span class="cx">       &lt;ExcludedFromBuild Condition=&quot;'$(Configuration)|$(Platform)'=='Debug|x64'&quot;&gt;true&lt;/ExcludedFromBuild&gt;
</span><span class="lines">@@ -6509,7 +6509,6 @@
</span><span class="cx">     &lt;ClCompile Include=&quot;..\html\canvas\ANGLEInstancedArrays.cpp&quot; /&gt;
</span><span class="cx">     &lt;ClCompile Include=&quot;..\html\canvas\CanvasContextAttributes.cpp&quot; /&gt;
</span><span class="cx">     &lt;ClCompile Include=&quot;..\html\canvas\CanvasPathMethods.cpp&quot; /&gt;
</span><del>-    &lt;ClCompile Include=&quot;..\html\canvas\EXTDrawBuffers.cpp&quot; /&gt;
</del><span class="cx">     &lt;ClCompile Include=&quot;..\html\canvas\EXTTextureFilterAnisotropic.cpp&quot; /&gt;
</span><span class="cx">     &lt;ClCompile Include=&quot;..\html\canvas\OESElementIndexUint.cpp&quot; /&gt;
</span><span class="cx">     &lt;ClCompile Include=&quot;..\html\canvas\OESStandardDerivatives.cpp&quot; /&gt;
</span><span class="lines">@@ -6529,6 +6528,7 @@
</span><span class="cx">     &lt;ClCompile Include=&quot;..\html\canvas\WebGLDebugRendererInfo.cpp&quot; /&gt;
</span><span class="cx">     &lt;ClCompile Include=&quot;..\html\canvas\WebGLDebugShaders.cpp&quot; /&gt;
</span><span class="cx">     &lt;ClCompile Include=&quot;..\html\canvas\WebGLDepthTexture.cpp&quot; /&gt;
</span><ins>+    &lt;ClCompile Include=&quot;..\html\canvas\WebGLDrawBuffers.cpp&quot; /&gt;
</ins><span class="cx">     &lt;ClCompile Include=&quot;..\html\canvas\WebGLExtension.cpp&quot; /&gt;
</span><span class="cx">     &lt;ClCompile Include=&quot;..\html\canvas\WebGLFramebuffer.cpp&quot; /&gt;
</span><span class="cx">     &lt;ClCompile Include=&quot;..\html\canvas\WebGLGetInfo.cpp&quot; /&gt;
</span><span class="lines">@@ -18359,7 +18359,6 @@
</span><span class="cx">     &lt;ClInclude Include=&quot;$(ConfigurationBuildDir)\obj$(PlatformArchitecture)\$(ProjectName)\DerivedSources\XMLViewerJS.h&quot; /&gt;
</span><span class="cx">     &lt;ClInclude Include=&quot;$(ConfigurationBuildDir)\obj$(PlatformArchitecture)\$(ProjectName)\DerivedSources\XPathGrammar.h&quot; /&gt;
</span><span class="cx">     &lt;ClInclude Include=&quot;$(ConfigurationBuildDir)\obj$(PlatformArchitecture)\WebCore\DerivedSources\JSANGLEInstancedArrays.h&quot; /&gt;
</span><del>-    &lt;ClInclude Include=&quot;$(ConfigurationBuildDir)\obj$(PlatformArchitecture)\WebCore\DerivedSources\JSEXTDrawBuffers.h&quot; /&gt;
</del><span class="cx">     &lt;ClInclude Include=&quot;$(ConfigurationBuildDir)\obj$(PlatformArchitecture)\WebCore\DerivedSources\JSEXTTextureFilterAnisotropic.h&quot; /&gt;
</span><span class="cx">     &lt;ClInclude Include=&quot;$(ConfigurationBuildDir)\obj$(PlatformArchitecture)\WebCore\DerivedSources\JSOESElementIndexUint.h&quot; /&gt;
</span><span class="cx">     &lt;ClInclude Include=&quot;$(ConfigurationBuildDir)\obj$(PlatformArchitecture)\WebCore\DerivedSources\JSOESStandardDerivatives.h&quot; /&gt;
</span><span class="lines">@@ -18378,6 +18377,7 @@
</span><span class="cx">     &lt;ClInclude Include=&quot;$(ConfigurationBuildDir)\obj$(PlatformArchitecture)\WebCore\DerivedSources\JSWebGLDebugRendererInfo.h&quot; /&gt;
</span><span class="cx">     &lt;ClInclude Include=&quot;$(ConfigurationBuildDir)\obj$(PlatformArchitecture)\WebCore\DerivedSources\JSWebGLDebugShaders.h&quot; /&gt;
</span><span class="cx">     &lt;ClInclude Include=&quot;$(ConfigurationBuildDir)\obj$(PlatformArchitecture)\WebCore\DerivedSources\JSWebGLDepthTexture.h&quot; /&gt;
</span><ins>+    &lt;ClInclude Include=&quot;$(ConfigurationBuildDir)\obj$(PlatformArchitecture)\WebCore\DerivedSources\JSWebGLDrawBuffers.h&quot; /&gt;
</ins><span class="cx">     &lt;ClInclude Include=&quot;$(ConfigurationBuildDir)\obj$(PlatformArchitecture)\WebCore\DerivedSources\JSWebGLFramebuffer.h&quot; /&gt;
</span><span class="cx">     &lt;ClInclude Include=&quot;$(ConfigurationBuildDir)\obj$(PlatformArchitecture)\WebCore\DerivedSources\JSWebGLLoseContext.h&quot; /&gt;
</span><span class="cx">     &lt;ClInclude Include=&quot;$(ConfigurationBuildDir)\obj$(PlatformArchitecture)\WebCore\DerivedSources\JSWebGLProgram.h&quot; /&gt;
</span><span class="lines">@@ -18474,7 +18474,6 @@
</span><span class="cx">     &lt;ClInclude Include=&quot;..\html\canvas\ANGLEInstancedArrays.h&quot; /&gt;
</span><span class="cx">     &lt;ClInclude Include=&quot;..\html\canvas\CanvasContextAttributes.h&quot; /&gt;
</span><span class="cx">     &lt;ClInclude Include=&quot;..\html\canvas\CanvasPathMethods.h&quot; /&gt;
</span><del>-    &lt;ClInclude Include=&quot;..\html\canvas\EXTDrawBuffers.h&quot; /&gt;
</del><span class="cx">     &lt;ClInclude Include=&quot;..\html\canvas\EXTTextureFilterAnisotropic.h&quot; /&gt;
</span><span class="cx">     &lt;ClInclude Include=&quot;..\html\canvas\OESElementIndexUint.h&quot; /&gt;
</span><span class="cx">     &lt;ClInclude Include=&quot;..\html\canvas\OESStandardDerivatives.h&quot; /&gt;
</span><span class="lines">@@ -18495,6 +18494,7 @@
</span><span class="cx">     &lt;ClInclude Include=&quot;..\html\canvas\WebGLDebugRendererInfo.h&quot; /&gt;
</span><span class="cx">     &lt;ClInclude Include=&quot;..\html\canvas\WebGLDebugShaders.h&quot; /&gt;
</span><span class="cx">     &lt;ClInclude Include=&quot;..\html\canvas\WebGLDepthTexture.h&quot; /&gt;
</span><ins>+    &lt;ClInclude Include=&quot;..\html\canvas\WebGLDrawBuffers.h&quot; /&gt;
</ins><span class="cx">     &lt;ClInclude Include=&quot;..\html\canvas\WebGLExtension.h&quot; /&gt;
</span><span class="cx">     &lt;ClInclude Include=&quot;..\html\canvas\WebGLFramebuffer.h&quot; /&gt;
</span><span class="cx">     &lt;ClInclude Include=&quot;..\html\canvas\WebGLGetInfo.h&quot; /&gt;
</span></span></pre></div>
<a id="trunkSourceWebCoreWebCorevcxprojWebCorevcxprojfilters"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj.filters (164476 => 164477)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj.filters        2014-02-21 06:45:34 UTC (rev 164476)
+++ trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj.filters        2014-02-21 07:46:30 UTC (rev 164477)
</span><span class="lines">@@ -6463,6 +6463,9 @@
</span><span class="cx">     &lt;ClCompile Include=&quot;$(ConfigurationBuildDir)\obj$(PlatformArchitecture)\WebCore\DerivedSources\JSWebGLDepthTexture.cpp&quot;&gt;
</span><span class="cx">       &lt;Filter&gt;DerivedSources&lt;/Filter&gt;
</span><span class="cx">     &lt;/ClCompile&gt;
</span><ins>+    &lt;ClCompile Include=&quot;$(ConfigurationBuildDir)\obj$(PlatformArchitecture)\WebCore\DerivedSources\JSWebGLDrawBuffers.cpp&quot;&gt;
+      &lt;Filter&gt;DerivedSources&lt;/Filter&gt;
+    &lt;/ClCompile&gt;
</ins><span class="cx">     &lt;ClCompile Include=&quot;$(ConfigurationBuildDir)\obj$(PlatformArchitecture)\WebCore\DerivedSources\JSWebGLFramebuffer.cpp&quot;&gt;
</span><span class="cx">       &lt;Filter&gt;DerivedSources&lt;/Filter&gt;
</span><span class="cx">     &lt;/ClCompile&gt;
</span><span class="lines">@@ -6496,9 +6499,6 @@
</span><span class="cx">     &lt;ClCompile Include=&quot;$(ConfigurationBuildDir)\obj$(PlatformArchitecture)\WebCore\DerivedSources\JSANGLEInstancedArrays.cpp&quot;&gt;
</span><span class="cx">       &lt;Filter&gt;DerivedSources&lt;/Filter&gt;
</span><span class="cx">     &lt;/ClCompile&gt;
</span><del>-    &lt;ClCompile Include=&quot;$(ConfigurationBuildDir)\obj$(PlatformArchitecture)\WebCore\DerivedSources\JSEXTDrawBuffers.cpp&quot;&gt;
-      &lt;Filter&gt;DerivedSources&lt;/Filter&gt;
-    &lt;/ClCompile&gt;
</del><span class="cx">     &lt;ClCompile Include=&quot;$(ConfigurationBuildDir)\obj$(PlatformArchitecture)\WebCore\DerivedSources\JSEXTTextureFilterAnisotropic.cpp&quot;&gt;
</span><span class="cx">       &lt;Filter&gt;DerivedSources&lt;/Filter&gt;
</span><span class="cx">     &lt;/ClCompile&gt;
</span><span class="lines">@@ -6559,6 +6559,9 @@
</span><span class="cx">     &lt;ClCompile Include=&quot;..\html\canvas\WebGLDepthTexture.cpp&quot;&gt;
</span><span class="cx">       &lt;Filter&gt;html\canvas&lt;/Filter&gt;
</span><span class="cx">     &lt;/ClCompile&gt;
</span><ins>+    &lt;ClCompile Include=&quot;..\html\canvas\WebGLDrawBuffers.cpp&quot;&gt;
+      &lt;Filter&gt;html\canvas&lt;/Filter&gt;
+    &lt;/ClCompile&gt;
</ins><span class="cx">     &lt;ClCompile Include=&quot;..\html\canvas\WebGLExtension.cpp&quot;&gt;
</span><span class="cx">       &lt;Filter&gt;html\canvas&lt;/Filter&gt;
</span><span class="cx">     &lt;/ClCompile&gt;
</span><span class="lines">@@ -6622,9 +6625,6 @@
</span><span class="cx">     &lt;ClCompile Include=&quot;..\html\canvas\OESVertexArrayObject.cpp&quot;&gt;
</span><span class="cx">       &lt;Filter&gt;html\canvas&lt;/Filter&gt;
</span><span class="cx">     &lt;/ClCompile&gt;
</span><del>-    &lt;ClCompile Include=&quot;..\html\canvas\EXTDrawBuffers.cpp&quot;&gt;
-      &lt;Filter&gt;html\canvas&lt;/Filter&gt;
-    &lt;/ClCompile&gt;
</del><span class="cx">     &lt;ClCompile Include=&quot;..\html\canvas\EXTTextureFilterAnisotropic.cpp&quot;&gt;
</span><span class="cx">       &lt;Filter&gt;html\canvas&lt;/Filter&gt;
</span><span class="cx">     &lt;/ClCompile&gt;
</span><span class="lines">@@ -14224,6 +14224,9 @@
</span><span class="cx">     &lt;ClInclude Include=&quot;$(ConfigurationBuildDir)\obj$(PlatformArchitecture)\WebCore\DerivedSources\JSWebGLDepthTexture.h&quot;&gt;
</span><span class="cx">       &lt;Filter&gt;DerivedSources&lt;/Filter&gt;
</span><span class="cx">     &lt;/ClInclude&gt;
</span><ins>+    &lt;ClInclude Include=&quot;$(ConfigurationBuildDir)\obj$(PlatformArchitecture)\WebCore\DerivedSources\JSWebGLDrawBuffers.h&quot;&gt;
+      &lt;Filter&gt;DerivedSources&lt;/Filter&gt;
+    &lt;/ClInclude&gt;
</ins><span class="cx">     &lt;ClInclude Include=&quot;$(ConfigurationBuildDir)\obj$(PlatformArchitecture)\WebCore\DerivedSources\JSWebGLFramebuffer.h&quot;&gt;
</span><span class="cx">       &lt;Filter&gt;DerivedSources&lt;/Filter&gt;
</span><span class="cx">     &lt;/ClInclude&gt;
</span><span class="lines">@@ -14254,9 +14257,6 @@
</span><span class="cx">     &lt;ClInclude Include=&quot;$(ConfigurationBuildDir)\obj$(PlatformArchitecture)\WebCore\DerivedSources\JSWebGLVertexArrayObjectOES.h&quot;&gt;
</span><span class="cx">       &lt;Filter&gt;DerivedSources&lt;/Filter&gt;
</span><span class="cx">     &lt;/ClInclude&gt;
</span><del>-    &lt;ClInclude Include=&quot;$(ConfigurationBuildDir)\obj$(PlatformArchitecture)\WebCore\DerivedSources\JSEXTDrawBuffers.h&quot;&gt;
-      &lt;Filter&gt;DerivedSources&lt;/Filter&gt;
-    &lt;/ClInclude&gt;
</del><span class="cx">     &lt;ClInclude Include=&quot;$(ConfigurationBuildDir)\obj$(PlatformArchitecture)\WebCore\DerivedSources\JSEXTTextureFilterAnisotropic.h&quot;&gt;
</span><span class="cx">       &lt;Filter&gt;DerivedSources&lt;/Filter&gt;
</span><span class="cx">     &lt;/ClInclude&gt;
</span><span class="lines">@@ -14323,6 +14323,9 @@
</span><span class="cx">     &lt;ClInclude Include=&quot;..\html\canvas\WebGLDepthTexture.h&quot;&gt;
</span><span class="cx">       &lt;Filter&gt;html\canvas&lt;/Filter&gt;
</span><span class="cx">     &lt;/ClInclude&gt;
</span><ins>+    &lt;ClInclude Include=&quot;..\html\canvas\WebGLDrawBuffers.h&quot;&gt;
+      &lt;Filter&gt;html\canvas&lt;/Filter&gt;
+    &lt;/ClInclude&gt;
</ins><span class="cx">     &lt;ClInclude Include=&quot;..\html\canvas\WebGLExtension.h&quot;&gt;
</span><span class="cx">       &lt;Filter&gt;html\canvas&lt;/Filter&gt;
</span><span class="cx">     &lt;/ClInclude&gt;
</span><span class="lines">@@ -14386,9 +14389,6 @@
</span><span class="cx">     &lt;ClInclude Include=&quot;..\html\canvas\OESVertexArrayObject.h&quot;&gt;
</span><span class="cx">       &lt;Filter&gt;html\canvas&lt;/Filter&gt;
</span><span class="cx">     &lt;/ClInclude&gt;
</span><del>-    &lt;ClInclude Include=&quot;..\html\canvas\EXTDrawBuffers.h&quot;&gt;
-      &lt;Filter&gt;html\canvas&lt;/Filter&gt;
-    &lt;/ClInclude&gt;
</del><span class="cx">     &lt;ClInclude Include=&quot;..\html\canvas\EXTTextureFilterAnisotropic.h&quot;&gt;
</span><span class="cx">       &lt;Filter&gt;html\canvas&lt;/Filter&gt;
</span><span class="cx">     &lt;/ClInclude&gt;
</span></span></pre></div>
<a id="trunkSourceWebCoreWebCorexcodeprojprojectpbxproj"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj (164476 => 164477)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj        2014-02-21 06:45:34 UTC (rev 164476)
+++ trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj        2014-02-21 07:46:30 UTC (rev 164477)
</span><span class="lines">@@ -2010,6 +2010,8 @@
</span><span class="cx">                 5A574F25131DB93900471B88 /* RenderQuote.h in Headers */ = {isa = PBXBuildFile; fileRef = 5A574F23131DB93900471B88 /* RenderQuote.h */; };
</span><span class="cx">                 5A574F28131DB96D00471B88 /* QuotesData.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5A574F26131DB96D00471B88 /* QuotesData.cpp */; };
</span><span class="cx">                 5A574F29131DB96D00471B88 /* QuotesData.h in Headers */ = {isa = PBXBuildFile; fileRef = 5A574F27131DB96D00471B88 /* QuotesData.h */; };
</span><ins>+                5B30695D18B3D3450099D5E8 /* WebGLDrawBuffers.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5B30695A18B3D3450099D5E8 /* WebGLDrawBuffers.cpp */; };
+                5B30695E18B3D3450099D5E8 /* WebGLDrawBuffers.h in Headers */ = {isa = PBXBuildFile; fileRef = 5B30695B18B3D3450099D5E8 /* WebGLDrawBuffers.h */; };
</ins><span class="cx">                 5B7A208D2E12979B4AE19DE6 /* RenderMathMLSpace.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DBFCB0EBFF5CD77EBEB35395 /* RenderMathMLSpace.cpp */; };
</span><span class="cx">                 5D21A80213ECE5DF00BB7064 /* WebVTTParser.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5D21A80013ECE5DF00BB7064 /* WebVTTParser.cpp */; };
</span><span class="cx">                 5D21A80313ECE5DF00BB7064 /* WebVTTParser.h in Headers */ = {isa = PBXBuildFile; fileRef = 5D21A80113ECE5DF00BB7064 /* WebVTTParser.h */; };
</span><span class="lines">@@ -2167,9 +2169,9 @@
</span><span class="cx">                 6EBF0E5412A8929800DB1709 /* WebGLExtension.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 6EBF0E5212A8929800DB1709 /* WebGLExtension.cpp */; };
</span><span class="cx">                 6EBF0E5512A8929800DB1709 /* WebGLExtension.h in Headers */ = {isa = PBXBuildFile; fileRef = 6EBF0E5312A8929800DB1709 /* WebGLExtension.h */; };
</span><span class="cx">                 6EBF0E7612A9868800DB1709 /* JSOESTextureFloat.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 6EBF0E7412A9868800DB1709 /* JSOESTextureFloat.cpp */; };
</span><del>-                6EBF0E7612A9868800DB170A /* JSEXTDrawBuffers.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 6EBF0E7412A9868800DB170A /* JSEXTDrawBuffers.cpp */; };
</del><ins>+                6EBF0E7612A9868800DB170A /* JSWebGLDrawBuffers.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 6EBF0E7412A9868800DB170A /* JSWebGLDrawBuffers.cpp */; };
</ins><span class="cx">                 6EBF0E7712A9868800DB1709 /* JSOESTextureFloat.h in Headers */ = {isa = PBXBuildFile; fileRef = 6EBF0E7512A9868800DB1709 /* JSOESTextureFloat.h */; };
</span><del>-                6EBF0E7712A9868800DB170A /* JSEXTDrawBuffers.h in Headers */ = {isa = PBXBuildFile; fileRef = 6EBF0E7512A9868800DB170A /* JSEXTDrawBuffers.h */; };
</del><ins>+                6EBF0E7712A9868800DB170A /* JSWebGLDrawBuffers.h in Headers */ = {isa = PBXBuildFile; fileRef = 6EBF0E7512A9868800DB170A /* JSWebGLDrawBuffers.h */; };
</ins><span class="cx">                 6EC480A116EA638A00A48DCB /* FloatPolygon.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 6EC4809F16EA638A00A48DCB /* FloatPolygon.cpp */; };
</span><span class="cx">                 6EC480A216EA638A00A48DCB /* FloatPolygon.h in Headers */ = {isa = PBXBuildFile; fileRef = 6EC480A016EA638A00A48DCB /* FloatPolygon.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="cx">                 6ED878C4147493F4004C3597 /* RenderTableCaption.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 6ED878C2147493F4004C3597 /* RenderTableCaption.cpp */; };
</span><span class="lines">@@ -3520,8 +3522,6 @@
</span><span class="cx">                 9FA37EFB1172FDA600C4CD55 /* JSScriptProfile.h in Headers */ = {isa = PBXBuildFile; fileRef = 9FA37EF71172FD9300C4CD55 /* JSScriptProfile.h */; };
</span><span class="cx">                 9FA37EFC1172FDA600C4CD55 /* JSScriptProfileNode.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9FA37EF81172FD9300C4CD55 /* JSScriptProfileNode.cpp */; };
</span><span class="cx">                 9FA37EFD1172FDA600C4CD55 /* JSScriptProfileNode.h in Headers */ = {isa = PBXBuildFile; fileRef = 9FA37EF91172FD9300C4CD55 /* JSScriptProfileNode.h */; };
</span><del>-                A024575116CEAA27000E5671 /* EXTDrawBuffers.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A024574E16CEAA27000E5671 /* EXTDrawBuffers.cpp */; };
-                A024575216CEAA27000E5671 /* EXTDrawBuffers.h in Headers */ = {isa = PBXBuildFile; fileRef = A024574F16CEAA27000E5671 /* EXTDrawBuffers.h */; };
</del><span class="cx">                 A07D3355152B630E001B6393 /* JSWebGLShaderPrecisionFormat.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A07D3353152B630E001B6393 /* JSWebGLShaderPrecisionFormat.cpp */; };
</span><span class="cx">                 A07D3356152B630E001B6393 /* JSWebGLShaderPrecisionFormat.h in Headers */ = {isa = PBXBuildFile; fileRef = A07D3354152B630E001B6393 /* JSWebGLShaderPrecisionFormat.h */; };
</span><span class="cx">                 A07D3358152B632D001B6393 /* WebGLShaderPrecisionFormat.h in Headers */ = {isa = PBXBuildFile; fileRef = A07D3357152B632D001B6393 /* WebGLShaderPrecisionFormat.h */; };
</span><span class="lines">@@ -8920,6 +8920,9 @@
</span><span class="cx">                 5A574F26131DB96D00471B88 /* QuotesData.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = QuotesData.cpp; path = style/QuotesData.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 5A574F27131DB96D00471B88 /* QuotesData.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = QuotesData.h; path = style/QuotesData.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 5A91469E8E9F8485C37A2876 /* JSSVGGraphicsElement.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = JSSVGGraphicsElement.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><ins>+                5B30695A18B3D3450099D5E8 /* WebGLDrawBuffers.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = WebGLDrawBuffers.cpp; path = canvas/WebGLDrawBuffers.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
+                5B30695B18B3D3450099D5E8 /* WebGLDrawBuffers.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = WebGLDrawBuffers.h; path = canvas/WebGLDrawBuffers.h; sourceTree = &quot;&lt;group&gt;&quot;; };
+                5B30695C18B3D3450099D5E8 /* WebGLDrawBuffers.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = WebGLDrawBuffers.idl; path = canvas/WebGLDrawBuffers.idl; sourceTree = &quot;&lt;group&gt;&quot;; };
</ins><span class="cx">                 5D21A80013ECE5DF00BB7064 /* WebVTTParser.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WebVTTParser.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 5D21A80113ECE5DF00BB7064 /* WebVTTParser.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebVTTParser.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 5D4B8C5211E52C8B00BBB62F /* WebCore.exp.in */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = WebCore.exp.in; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="lines">@@ -9090,9 +9093,9 @@
</span><span class="cx">                 6EBF0E5212A8929800DB1709 /* WebGLExtension.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = WebGLExtension.cpp; path = canvas/WebGLExtension.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 6EBF0E5312A8929800DB1709 /* WebGLExtension.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = WebGLExtension.h; path = canvas/WebGLExtension.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 6EBF0E7412A9868800DB1709 /* JSOESTextureFloat.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSOESTextureFloat.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><del>-                6EBF0E7412A9868800DB170A /* JSEXTDrawBuffers.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSEXTDrawBuffers.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</del><ins>+                6EBF0E7412A9868800DB170A /* JSWebGLDrawBuffers.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSWebGLDrawBuffers.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</ins><span class="cx">                 6EBF0E7512A9868800DB1709 /* JSOESTextureFloat.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSOESTextureFloat.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><del>-                6EBF0E7512A9868800DB170A /* JSEXTDrawBuffers.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSEXTDrawBuffers.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</del><ins>+                6EBF0E7512A9868800DB170A /* JSWebGLDrawBuffers.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSWebGLDrawBuffers.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</ins><span class="cx">                 6EC4809F16EA638A00A48DCB /* FloatPolygon.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = FloatPolygon.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 6EC480A016EA638A00A48DCB /* FloatPolygon.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FloatPolygon.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 6ED878C2147493F4004C3597 /* RenderTableCaption.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = RenderTableCaption.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="lines">@@ -10476,9 +10479,6 @@
</span><span class="cx">                 9FA37EF71172FD9300C4CD55 /* JSScriptProfile.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSScriptProfile.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 9FA37EF81172FD9300C4CD55 /* JSScriptProfileNode.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSScriptProfileNode.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 9FA37EF91172FD9300C4CD55 /* JSScriptProfileNode.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSScriptProfileNode.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><del>-                A024574E16CEAA27000E5671 /* EXTDrawBuffers.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = EXTDrawBuffers.cpp; path = canvas/EXTDrawBuffers.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
-                A024574F16CEAA27000E5671 /* EXTDrawBuffers.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = EXTDrawBuffers.h; path = canvas/EXTDrawBuffers.h; sourceTree = &quot;&lt;group&gt;&quot;; };
-                A024575016CEAA27000E5671 /* EXTDrawBuffers.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = EXTDrawBuffers.idl; path = canvas/EXTDrawBuffers.idl; sourceTree = &quot;&lt;group&gt;&quot;; };
</del><span class="cx">                 A07D3353152B630E001B6393 /* JSWebGLShaderPrecisionFormat.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSWebGLShaderPrecisionFormat.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 A07D3354152B630E001B6393 /* JSWebGLShaderPrecisionFormat.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSWebGLShaderPrecisionFormat.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 A07D3357152B632D001B6393 /* WebGLShaderPrecisionFormat.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = WebGLShaderPrecisionFormat.h; path = canvas/WebGLShaderPrecisionFormat.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="lines">@@ -15326,9 +15326,6 @@
</span><span class="cx">                                 49484FC0102CF23C00187DD3 /* CanvasStyle.h */,
</span><span class="cx">                                 FB91392016AE4B0B001FE682 /* DOMPath.h */,
</span><span class="cx">                                 FB91392116AE4B0B001FE682 /* DOMPath.idl */,
</span><del>-                                A024574E16CEAA27000E5671 /* EXTDrawBuffers.cpp */,
-                                A024574F16CEAA27000E5671 /* EXTDrawBuffers.h */,
-                                A024575016CEAA27000E5671 /* EXTDrawBuffers.idl */,
</del><span class="cx">                                 7728694B14F8882500F484DC /* EXTTextureFilterAnisotropic.cpp */,
</span><span class="cx">                                 7728694C14F8882500F484DC /* EXTTextureFilterAnisotropic.h */,
</span><span class="cx">                                 7728694D14F8882500F484DC /* EXTTextureFilterAnisotropic.idl */,
</span><span class="lines">@@ -15386,6 +15383,9 @@
</span><span class="cx">                                 6E3FAE8C14733FDB00E42307 /* WebGLDepthTexture.cpp */,
</span><span class="cx">                                 6E3FAE8D14733FDB00E42307 /* WebGLDepthTexture.h */,
</span><span class="cx">                                 6E3FAE9014733FEA00E42307 /* WebGLDepthTexture.idl */,
</span><ins>+                                5B30695A18B3D3450099D5E8 /* WebGLDrawBuffers.cpp */,
+                                5B30695B18B3D3450099D5E8 /* WebGLDrawBuffers.h */,
+                                5B30695C18B3D3450099D5E8 /* WebGLDrawBuffers.idl */,
</ins><span class="cx">                                 6EBF0E5212A8929800DB1709 /* WebGLExtension.cpp */,
</span><span class="cx">                                 6EBF0E5312A8929800DB1709 /* WebGLExtension.h */,
</span><span class="cx">                                 49C7B9AE1042D32E0009D447 /* WebGLFramebuffer.cpp */,
</span><span class="lines">@@ -18064,8 +18064,6 @@
</span><span class="cx">                                 7694563B1214D97C0007CBAE /* JSDOMTokenList.h */,
</span><span class="cx">                                 2E37E00312DBC5A400A6B233 /* JSDOMURL.cpp */,
</span><span class="cx">                                 2E37E00412DBC5A400A6B233 /* JSDOMURL.h */,
</span><del>-                                6EBF0E7412A9868800DB170A /* JSEXTDrawBuffers.cpp */,
-                                6EBF0E7512A9868800DB170A /* JSEXTDrawBuffers.h */,
</del><span class="cx">                                 7728698114FD9ADA00F484DC /* JSEXTTextureFilterAnisotropic.cpp */,
</span><span class="cx">                                 7728698214FD9ADA00F484DC /* JSEXTTextureFilterAnisotropic.h */,
</span><span class="cx">                                 BC97E410109154FA0010D361 /* JSHTMLAllCollection.cpp */,
</span><span class="lines">@@ -18287,6 +18285,8 @@
</span><span class="cx">                                 6E3FAD3714733F4022E42307 /* JSWebGLDebugShaders.h */,
</span><span class="cx">                                 6E3FAD3614733F4000E42307 /* JSWebGLDepthTexture.cpp */,
</span><span class="cx">                                 6E3FAD3714733F4000E42307 /* JSWebGLDepthTexture.h */,
</span><ins>+                                6EBF0E7412A9868800DB170A /* JSWebGLDrawBuffers.cpp */,
+                                6EBF0E7512A9868800DB170A /* JSWebGLDrawBuffers.h */,
</ins><span class="cx">                                 49C7B9841042D2D30009D447 /* JSWebGLFramebuffer.cpp */,
</span><span class="cx">                                 49C7B9851042D2D30009D447 /* JSWebGLFramebuffer.h */,
</span><span class="cx">                                 93F1D5BE12D5335600832BEC /* JSWebGLLoseContext.cpp */,
</span><span class="lines">@@ -23548,7 +23548,6 @@
</span><span class="cx">                                 9767CE0B145ABC13005E64DB /* ExceptionHeaders.h in Headers */,
</span><span class="cx">                                 3FBC4AEC1898810E0046EE38 /* WebVideoFullscreenInterface.h in Headers */,
</span><span class="cx">                                 9767CE0C145ABC13005E64DB /* ExceptionInterfaces.h in Headers */,
</span><del>-                                A024575216CEAA27000E5671 /* EXTDrawBuffers.h in Headers */,
</del><span class="cx">                                 6E67D2A91280E8BD008758F7 /* Extensions3D.h in Headers */,
</span><span class="cx">                                 6E67D2A71280E8A4008758F7 /* Extensions3DOpenGL.h in Headers */,
</span><span class="cx">                                 44DAB5B215A623580097C1E4 /* Extensions3DOpenGLCommon.h in Headers */,
</span><span class="lines">@@ -24097,7 +24096,7 @@
</span><span class="cx">                                 E0FEF372B37C53EAC1C1FBEE /* JSEventSource.h in Headers */,
</span><span class="cx">                                 5FC7DC26CFE2563200B85AE4 /* JSEventTarget.h in Headers */,
</span><span class="cx">                                 3314ACEC10892086000F0E56 /* JSExceptionBase.h in Headers */,
</span><del>-                                6EBF0E7712A9868800DB170A /* JSEXTDrawBuffers.h in Headers */,
</del><ins>+                                6EBF0E7712A9868800DB170A /* JSWebGLDrawBuffers.h in Headers */,
</ins><span class="cx">                                 7728698414FD9ADA00F484DC /* JSEXTTextureFilterAnisotropic.h in Headers */,
</span><span class="cx">                                 E4E39AFB1330EFA8003AB274 /* TileLayerPool.h in Headers */,
</span><span class="cx">                                 BC00F0150E0A189500FD04E3 /* JSFile.h in Headers */,
</span><span class="lines">@@ -25956,6 +25955,7 @@
</span><span class="cx">                                 BC10D76817D8EE71005E2626 /* RenderBlockFlow.h in Headers */,
</span><span class="cx">                                 CD3E251C18046B0600E27F56 /* GridCoordinate.h in Headers */,
</span><span class="cx">                                 CD3E252418046BCD00E27F56 /* CSSGridTemplateAreasValue.h in Headers */,
</span><ins>+                                5B30695E18B3D3450099D5E8 /* WebGLDrawBuffers.h in Headers */,
</ins><span class="cx">                                 CDEF4FD717E85C8F00AEE24B /* GridLength.h in Headers */,
</span><span class="cx">                                 CDE7FC45181904B1002BBB77 /* OrderIterator.h in Headers */,
</span><span class="cx">                                 BE913D80181EF92400DCB09E /* TrackPrivateBase.h in Headers */,
</span><span class="lines">@@ -26924,7 +26924,6 @@
</span><span class="cx">                                 973DC63F145A9409002842C2 /* ExceptionCodeDescription.cpp in Sources */,
</span><span class="cx">                                 A7CACDB113CE875C00BBBE3F /* ExceptionCodePlaceholder.cpp in Sources */,
</span><span class="cx">                                 148AFDA60AF58360008CC700 /* ExceptionHandlers.mm in Sources */,
</span><del>-                                A024575116CEAA27000E5671 /* EXTDrawBuffers.cpp in Sources */,
</del><span class="cx">                                 6E67D2A61280E8A4008758F7 /* Extensions3DOpenGL.cpp in Sources */,
</span><span class="cx">                                 26F9A83818A046AC00AEB88A /* ViewportConfiguration.cpp in Sources */,
</span><span class="cx">                                 44DAB5B115A623580097C1E4 /* Extensions3DOpenGLCommon.cpp in Sources */,
</span><span class="lines">@@ -27458,7 +27457,7 @@
</span><span class="cx">                                 C6A703325C9D0B6CDCBC4D77 /* JSEventTarget.cpp in Sources */,
</span><span class="cx">                                 BC6090200E91B8EC000C68B5 /* JSEventTargetCustom.cpp in Sources */,
</span><span class="cx">                                 3314ACEB10892086000F0E56 /* JSExceptionBase.cpp in Sources */,
</span><del>-                                6EBF0E7612A9868800DB170A /* JSEXTDrawBuffers.cpp in Sources */,
</del><ins>+                                6EBF0E7612A9868800DB170A /* JSWebGLDrawBuffers.cpp in Sources */,
</ins><span class="cx">                                 E45390490EAFD637003695C8 /* WebCoreSystemInterfaceIOS.mm in Sources */,
</span><span class="cx">                                 7728698314FD9ADA00F484DC /* JSEXTTextureFilterAnisotropic.cpp in Sources */,
</span><span class="cx">                                 BC00F0140E0A189500FD04E3 /* JSFile.cpp in Sources */,
</span><span class="lines">@@ -27580,6 +27579,7 @@
</span><span class="cx">                                 070756D314239A4E00414161 /* JSHTMLTrackElement.cpp in Sources */,
</span><span class="cx">                                 1A85B2100A1B258700D8C87C /* JSHTMLUListElement.cpp in Sources */,
</span><span class="cx">                                 6E4ABCD4138EA0B70071D291 /* JSHTMLUnknownElement.cpp in Sources */,
</span><ins>+                                5B30695D18B3D3450099D5E8 /* WebGLDrawBuffers.cpp in Sources */,
</ins><span class="cx">                                 E44614160CD6826900FADA75 /* JSHTMLVideoElement.cpp in Sources */,
</span><span class="cx">                                 BC6C49F30D7DBA0500FFA558 /* JSImageConstructor.cpp in Sources */,
</span><span class="cx">                                 A77979280D6B9E64003851B9 /* JSImageData.cpp in Sources */,
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsjsJSWebGLRenderingContextCustomcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/js/JSWebGLRenderingContextCustom.cpp (164476 => 164477)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/JSWebGLRenderingContextCustom.cpp        2014-02-21 06:45:34 UTC (rev 164476)
+++ trunk/Source/WebCore/bindings/js/JSWebGLRenderingContextCustom.cpp        2014-02-21 07:46:30 UTC (rev 164477)
</span><span class="lines">@@ -30,13 +30,11 @@
</span><span class="cx"> #include &quot;JSWebGLRenderingContext.h&quot;
</span><span class="cx"> 
</span><span class="cx"> #include &quot;ANGLEInstancedArrays.h&quot;
</span><del>-#include &quot;EXTDrawBuffers.h&quot;
</del><span class="cx"> #include &quot;EXTTextureFilterAnisotropic.h&quot;
</span><span class="cx"> #include &quot;ExceptionCode.h&quot;
</span><span class="cx"> #include &quot;HTMLCanvasElement.h&quot;
</span><span class="cx"> #include &quot;HTMLImageElement.h&quot;
</span><span class="cx"> #include &quot;JSANGLEInstancedArrays.h&quot;
</span><del>-#include &quot;JSEXTDrawBuffers.h&quot;
</del><span class="cx"> #include &quot;JSEXTTextureFilterAnisotropic.h&quot;
</span><span class="cx"> #include &quot;JSHTMLCanvasElement.h&quot;
</span><span class="cx"> #include &quot;JSHTMLImageElement.h&quot;
</span><span class="lines">@@ -55,6 +53,7 @@
</span><span class="cx"> #include &quot;JSWebGLDebugRendererInfo.h&quot;
</span><span class="cx"> #include &quot;JSWebGLDebugShaders.h&quot;
</span><span class="cx"> #include &quot;JSWebGLDepthTexture.h&quot;
</span><ins>+#include &quot;JSWebGLDrawBuffers.h&quot;
</ins><span class="cx"> #include &quot;JSWebGLFramebuffer.h&quot;
</span><span class="cx"> #include &quot;JSWebGLLoseContext.h&quot;
</span><span class="cx"> #include &quot;JSWebGLProgram.h&quot;
</span><span class="lines">@@ -79,6 +78,7 @@
</span><span class="cx"> #include &quot;WebGLDebugRendererInfo.h&quot;
</span><span class="cx"> #include &quot;WebGLDebugShaders.h&quot;
</span><span class="cx"> #include &quot;WebGLDepthTexture.h&quot;
</span><ins>+#include &quot;WebGLDrawBuffers.h&quot;
</ins><span class="cx"> #include &quot;WebGLExtension.h&quot;
</span><span class="cx"> #include &quot;WebGLFramebuffer.h&quot;
</span><span class="cx"> #include &quot;WebGLGetInfo.h&quot;
</span><span class="lines">@@ -205,8 +205,6 @@
</span><span class="cx">     switch (extension-&gt;getName()) {
</span><span class="cx">     case WebGLExtension::WebGLLoseContextName:
</span><span class="cx">         return toJS(exec, globalObject, static_cast&lt;WebGLLoseContext*&gt;(extension));
</span><del>-    case WebGLExtension::EXTDrawBuffersName:
-        return toJS(exec, globalObject, static_cast&lt;EXTDrawBuffers*&gt;(extension));
</del><span class="cx">     case WebGLExtension::EXTTextureFilterAnisotropicName:
</span><span class="cx">         return toJS(exec, globalObject, static_cast&lt;EXTTextureFilterAnisotropic*&gt;(extension));
</span><span class="cx">     case WebGLExtension::OESStandardDerivativesName:
</span><span class="lines">@@ -235,6 +233,8 @@
</span><span class="cx">         return toJS(exec, globalObject, static_cast&lt;WebGLCompressedTextureS3TC*&gt;(extension));
</span><span class="cx">     case WebGLExtension::WebGLDepthTextureName:
</span><span class="cx">         return toJS(exec, globalObject, static_cast&lt;WebGLDepthTexture*&gt;(extension));
</span><ins>+    case WebGLExtension::WebGLDrawBuffersName:
+        return toJS(exec, globalObject, static_cast&lt;WebGLDrawBuffers*&gt;(extension));
</ins><span class="cx">     case WebGLExtension::ANGLEInstancedArraysName:
</span><span class="cx">         return toJS(exec, globalObject, static_cast&lt;ANGLEInstancedArrays*&gt;(extension));
</span><span class="cx">     }
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlcanvasEXTDrawBufferscpp"></a>
<div class="delfile"><h4>Deleted: trunk/Source/WebCore/html/canvas/EXTDrawBuffers.cpp (164476 => 164477)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/canvas/EXTDrawBuffers.cpp        2014-02-21 06:45:34 UTC (rev 164476)
+++ trunk/Source/WebCore/html/canvas/EXTDrawBuffers.cpp        2014-02-21 07:46:30 UTC (rev 164477)
</span><span class="lines">@@ -1,183 +0,0 @@
</span><del>-/*
- * Copyright (C) 2013 Google Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1.  Redistributions of source code must retain the above copyright
- *     notice, this list of conditions and the following disclaimer.
- * 2.  Redistributions in binary form must reproduce the above copyright
- *     notice, this list of conditions and the following disclaimer in the
- *     documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS &quot;AS IS&quot; AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include &quot;config.h&quot;
-
-#if ENABLE(WEBGL)
-
-#include &quot;EXTDrawBuffers.h&quot;
-
-#include &quot;Extensions3D.h&quot;
-
-namespace WebCore {
-
-EXTDrawBuffers::EXTDrawBuffers(WebGLRenderingContext* context)
-    : WebGLExtension(context)
-{
-}
-
-EXTDrawBuffers::~EXTDrawBuffers()
-{
-}
-
-WebGLExtension::ExtensionName EXTDrawBuffers::getName() const
-{
-    return WebGLExtension::EXTDrawBuffersName;
-}
-
-OwnPtr&lt;EXTDrawBuffers&gt; EXTDrawBuffers::create(WebGLRenderingContext* context)
-{
-    return adoptPtr(new EXTDrawBuffers(context));
-}
-
-// static
-bool EXTDrawBuffers::supported(WebGLRenderingContext* context)
-{
-#if OS(DARWIN)
-    // https://bugs.webkit.org/show_bug.cgi?id=112486
-    return false;
-#endif
-    Extensions3D* extensions = context-&gt;graphicsContext3D()-&gt;getExtensions();
-    return (extensions-&gt;supports(&quot;GL_EXT_draw_buffers&quot;)
-        &amp;&amp; satisfiesWebGLRequirements(context));
-}
-
-void EXTDrawBuffers::drawBuffersEXT(const Vector&lt;GC3Denum&gt;&amp; buffers)
-{
-    if (m_context-&gt;isContextLost())
-        return;
-    GC3Dsizei n = buffers.size();
-    const GC3Denum* bufs = buffers.data();
-    if (!m_context-&gt;m_framebufferBinding) {
-        if (n != 1) {
-            m_context-&gt;synthesizeGLError(GraphicsContext3D::INVALID_VALUE, &quot;drawBuffersEXT&quot;, &quot;more than one buffer&quot;);
-            return;
-        }
-        if (bufs[0] != GraphicsContext3D::BACK &amp;&amp; bufs[0] != GraphicsContext3D::NONE) {
-            m_context-&gt;synthesizeGLError(GraphicsContext3D::INVALID_OPERATION, &quot;drawBuffersEXT&quot;, &quot;BACK or NONE&quot;);
-            return;
-        }
-        // Because the backbuffer is simulated on all current WebKit ports, we need to change BACK to COLOR_ATTACHMENT0.
-        GC3Denum value = (bufs[0] == GraphicsContext3D::BACK) ? GraphicsContext3D::COLOR_ATTACHMENT0 : GraphicsContext3D::NONE;
-        m_context-&gt;graphicsContext3D()-&gt;getExtensions()-&gt;drawBuffersEXT(1, &amp;value);
-        m_context-&gt;setBackDrawBuffer(bufs[0]);
-    } else {
-        if (n &gt; m_context-&gt;getMaxDrawBuffers()) {
-            m_context-&gt;synthesizeGLError(GraphicsContext3D::INVALID_VALUE, &quot;drawBuffersEXT&quot;, &quot;more than max draw buffers&quot;);
-            return;
-        }
-        for (GC3Dsizei i = 0; i &lt; n; ++i) {
-            if (bufs[i] != GraphicsContext3D::NONE &amp;&amp; bufs[i] != static_cast&lt;GC3Denum&gt;(Extensions3D::COLOR_ATTACHMENT0_EXT + i)) {
-                m_context-&gt;synthesizeGLError(GraphicsContext3D::INVALID_OPERATION, &quot;drawBuffersEXT&quot;, &quot;COLOR_ATTACHMENTi_EXT or NONE&quot;);
-                return;
-            }
-        }
-        m_context-&gt;m_framebufferBinding-&gt;drawBuffers(buffers);
-    }
-}
-
-// static
-bool EXTDrawBuffers::satisfiesWebGLRequirements(WebGLRenderingContext* webglContext)
-{
-    GraphicsContext3D* context = webglContext-&gt;graphicsContext3D();
-
-    // This is called after we make sure GL_EXT_draw_buffers is supported.
-    GC3Dint maxDrawBuffers = 0;
-    GC3Dint maxColorAttachments = 0;
-    context-&gt;getIntegerv(Extensions3D::MAX_DRAW_BUFFERS_EXT, &amp;maxDrawBuffers);
-    context-&gt;getIntegerv(Extensions3D::MAX_COLOR_ATTACHMENTS_EXT, &amp;maxColorAttachments);
-    if (maxDrawBuffers &lt; 4 || maxColorAttachments &lt; 4)
-        return false;
-
-    Platform3DObject fbo = context-&gt;createFramebuffer();
-    context-&gt;bindFramebuffer(GraphicsContext3D::FRAMEBUFFER, fbo);
-
-    const unsigned char buffer[4] = { 0, 0, 0, 0 }; // textures are required to be initialized for other ports.
-    bool supportsDepth = (context-&gt;getExtensions()-&gt;supports(&quot;GL_CHROMIUM_depth_texture&quot;)
-        || context-&gt;getExtensions()-&gt;supports(&quot;GL_OES_depth_texture&quot;)
-        || context-&gt;getExtensions()-&gt;supports(&quot;GL_ARB_depth_texture&quot;));
-    bool supportsDepthStencil = (context-&gt;getExtensions()-&gt;supports(&quot;GL_EXT_packed_depth_stencil&quot;)
-        || context-&gt;getExtensions()-&gt;supports(&quot;GL_OES_packed_depth_stencil&quot;));
-    Platform3DObject depthStencil = 0;
-    if (supportsDepthStencil) {
-        depthStencil = context-&gt;createTexture();
-        context-&gt;bindTexture(GraphicsContext3D::TEXTURE_2D, depthStencil);
-        context-&gt;texImage2D(GraphicsContext3D::TEXTURE_2D, 0, GraphicsContext3D::DEPTH_STENCIL, 1, 1, 0, GraphicsContext3D::DEPTH_STENCIL, GraphicsContext3D::UNSIGNED_INT_24_8, buffer);
-    }
-    Platform3DObject depth = 0;
-    if (supportsDepth) {
-        depth = context-&gt;createTexture();
-        context-&gt;bindTexture(GraphicsContext3D::TEXTURE_2D, depth);
-        context-&gt;texImage2D(GraphicsContext3D::TEXTURE_2D, 0, GraphicsContext3D::DEPTH_COMPONENT, 1, 1, 0, GraphicsContext3D::DEPTH_COMPONENT, GraphicsContext3D::UNSIGNED_INT, buffer);
-    }
-
-    Vector&lt;Platform3DObject&gt; colors;
-    bool ok = true;
-    GC3Dint maxAllowedBuffers = std::min(maxDrawBuffers, maxColorAttachments);
-    for (GC3Dint i = 0; i &lt; maxAllowedBuffers; ++i) {
-        Platform3DObject color = context-&gt;createTexture();
-        colors.append(color);
-        context-&gt;bindTexture(GraphicsContext3D::TEXTURE_2D, color);
-        context-&gt;texImage2D(GraphicsContext3D::TEXTURE_2D, 0, GraphicsContext3D::RGBA, 1, 1, 0, GraphicsContext3D::RGBA, GraphicsContext3D::UNSIGNED_BYTE, buffer);
-        context-&gt;framebufferTexture2D(GraphicsContext3D::FRAMEBUFFER, GraphicsContext3D::COLOR_ATTACHMENT0 + i, GraphicsContext3D::TEXTURE_2D, color, 0);
-        if (context-&gt;checkFramebufferStatus(GraphicsContext3D::FRAMEBUFFER) != GraphicsContext3D::FRAMEBUFFER_COMPLETE) {
-            ok = false;
-            break;
-        }
-        if (supportsDepth) {
-            context-&gt;framebufferTexture2D(GraphicsContext3D::FRAMEBUFFER, GraphicsContext3D::DEPTH_ATTACHMENT, GraphicsContext3D::TEXTURE_2D, depth, 0);
-            if (context-&gt;checkFramebufferStatus(GraphicsContext3D::FRAMEBUFFER) != GraphicsContext3D::FRAMEBUFFER_COMPLETE) {
-                ok = false;
-                break;
-            }
-            context-&gt;framebufferTexture2D(GraphicsContext3D::FRAMEBUFFER, GraphicsContext3D::DEPTH_ATTACHMENT, GraphicsContext3D::TEXTURE_2D, 0, 0);
-        }
-        if (supportsDepthStencil) {
-            context-&gt;framebufferTexture2D(GraphicsContext3D::FRAMEBUFFER, GraphicsContext3D::DEPTH_ATTACHMENT, GraphicsContext3D::TEXTURE_2D, depthStencil, 0);
-            context-&gt;framebufferTexture2D(GraphicsContext3D::FRAMEBUFFER, GraphicsContext3D::STENCIL_ATTACHMENT, GraphicsContext3D::TEXTURE_2D, depthStencil, 0);
-            if (context-&gt;checkFramebufferStatus(GraphicsContext3D::FRAMEBUFFER) != GraphicsContext3D::FRAMEBUFFER_COMPLETE) {
-                ok = false;
-                break;
-            }
-            context-&gt;framebufferTexture2D(GraphicsContext3D::FRAMEBUFFER, GraphicsContext3D::DEPTH_ATTACHMENT, GraphicsContext3D::TEXTURE_2D, 0, 0);
-            context-&gt;framebufferTexture2D(GraphicsContext3D::FRAMEBUFFER, GraphicsContext3D::STENCIL_ATTACHMENT, GraphicsContext3D::TEXTURE_2D, 0, 0);
-        }
-    }
-
-    webglContext-&gt;restoreCurrentFramebuffer();
-    context-&gt;deleteFramebuffer(fbo);
-    webglContext-&gt;restoreCurrentTexture2D();
-    if (supportsDepth)
-        context-&gt;deleteTexture(depth);
-    if (supportsDepthStencil)
-        context-&gt;deleteTexture(depthStencil);
-    for (size_t i = 0; i &lt; colors.size(); ++i)
-        context-&gt;deleteTexture(colors[i]);
-    return ok;
-}
-
-} // namespace WebCore
-
-#endif // ENABLE(WEBGL)
</del></span></pre></div>
<a id="trunkSourceWebCorehtmlcanvasEXTDrawBuffersh"></a>
<div class="delfile"><h4>Deleted: trunk/Source/WebCore/html/canvas/EXTDrawBuffers.h (164476 => 164477)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/canvas/EXTDrawBuffers.h        2014-02-21 06:45:34 UTC (rev 164476)
+++ trunk/Source/WebCore/html/canvas/EXTDrawBuffers.h        2014-02-21 07:46:30 UTC (rev 164477)
</span><span class="lines">@@ -1,53 +0,0 @@
</span><del>-/*
- * Copyright (C) 2013 Google Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1.  Redistributions of source code must retain the above copyright
- *     notice, this list of conditions and the following disclaimer.
- * 2.  Redistributions in binary form must reproduce the above copyright
- *     notice, this list of conditions and the following disclaimer in the
- *     documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS &quot;AS IS&quot; AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef EXTDrawBuffers_h
-#define EXTDrawBuffers_h
-
-#include &quot;WebGLExtension.h&quot;
-#include &lt;wtf/PassOwnPtr.h&gt;
-
-namespace WebCore {
-
-class EXTDrawBuffers : public WebGLExtension {
-public:
-    static OwnPtr&lt;EXTDrawBuffers&gt; create(WebGLRenderingContext*);
-
-    static bool supported(WebGLRenderingContext*);
-
-    virtual ~EXTDrawBuffers();
-    virtual ExtensionName getName() const override;
-
-    void drawBuffersEXT(const Vector&lt;GC3Denum&gt;&amp; buffers);
-
-private:
-    EXTDrawBuffers(WebGLRenderingContext*);
-
-    static bool satisfiesWebGLRequirements(WebGLRenderingContext*);
-};
-
-} // namespace WebCore
-
-#endif // EXTDrawBuffers_h
</del></span></pre></div>
<a id="trunkSourceWebCorehtmlcanvasEXTDrawBuffersidl"></a>
<div class="delfile"><h4>Deleted: trunk/Source/WebCore/html/canvas/EXTDrawBuffers.idl (164476 => 164477)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/canvas/EXTDrawBuffers.idl        2014-02-21 06:45:34 UTC (rev 164476)
+++ trunk/Source/WebCore/html/canvas/EXTDrawBuffers.idl        2014-02-21 07:46:30 UTC (rev 164477)
</span><span class="lines">@@ -1,72 +0,0 @@
</span><del>-/*
- * Copyright (C) 2013 Google Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1.  Redistributions of source code must retain the above copyright
- *     notice, this list of conditions and the following disclaimer.
- * 2.  Redistributions in binary form must reproduce the above copyright
- *     notice, this list of conditions and the following disclaimer in the
- *     documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS &quot;AS IS&quot; AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-typedef unsigned long GLenum;
-
-[
-    NoInterfaceObject,
-    Conditional=WEBGL,
-    GenerateIsReachable=ImplWebGLRenderingContext,
-    DoNotCheckConstants,
-] interface EXTDrawBuffers {
-    const GLenum COLOR_ATTACHMENT0_EXT = 0x8CE0;
-    const GLenum COLOR_ATTACHMENT1_EXT = 0x8CE1;
-    const GLenum COLOR_ATTACHMENT2_EXT = 0x8CE2;
-    const GLenum COLOR_ATTACHMENT3_EXT = 0x8CE3;
-    const GLenum COLOR_ATTACHMENT4_EXT = 0x8CE4;
-    const GLenum COLOR_ATTACHMENT5_EXT = 0x8CE5;
-    const GLenum COLOR_ATTACHMENT6_EXT = 0x8CE6;
-    const GLenum COLOR_ATTACHMENT7_EXT = 0x8CE7;
-    const GLenum COLOR_ATTACHMENT8_EXT = 0x8CE8;
-    const GLenum COLOR_ATTACHMENT9_EXT = 0x8CE9;
-    const GLenum COLOR_ATTACHMENT10_EXT = 0x8CEA;
-    const GLenum COLOR_ATTACHMENT11_EXT = 0x8CEB;
-    const GLenum COLOR_ATTACHMENT12_EXT = 0x8CEC;
-    const GLenum COLOR_ATTACHMENT13_EXT = 0x8CED;
-    const GLenum COLOR_ATTACHMENT14_EXT = 0x8CEE;
-    const GLenum COLOR_ATTACHMENT15_EXT = 0x8CEF;
-
-    const GLenum DRAW_BUFFER0_EXT = 0x8825;
-    const GLenum DRAW_BUFFER1_EXT = 0x8826;
-    const GLenum DRAW_BUFFER2_EXT = 0x8827;
-    const GLenum DRAW_BUFFER3_EXT = 0x8828;
-    const GLenum DRAW_BUFFER4_EXT = 0x8829;
-    const GLenum DRAW_BUFFER5_EXT = 0x882A;
-    const GLenum DRAW_BUFFER6_EXT = 0x882B;
-    const GLenum DRAW_BUFFER7_EXT = 0x882C;
-    const GLenum DRAW_BUFFER8_EXT = 0x882D;
-    const GLenum DRAW_BUFFER9_EXT = 0x882E;
-    const GLenum DRAW_BUFFER10_EXT = 0x882F;
-    const GLenum DRAW_BUFFER11_EXT = 0x8830;
-    const GLenum DRAW_BUFFER12_EXT = 0x8831;
-    const GLenum DRAW_BUFFER13_EXT = 0x8832;
-    const GLenum DRAW_BUFFER14_EXT = 0x8833;
-    const GLenum DRAW_BUFFER15_EXT = 0x8834;
-
-    const GLenum MAX_COLOR_ATTACHMENTS_EXT = 0x8CDF;
-    const GLenum MAX_DRAW_BUFFERS_EXT = 0x8824;
-
-    void drawBuffersEXT(sequence&lt;GLenum&gt; buffers);
-};
</del></span></pre></div>
<a id="trunkSourceWebCorehtmlcanvasWebGLDrawBufferscppfromrev164476trunkSourceWebCorehtmlcanvasEXTDrawBufferscpp"></a>
<div class="copfile"><h4>Copied: trunk/Source/WebCore/html/canvas/WebGLDrawBuffers.cpp (from rev 164476, trunk/Source/WebCore/html/canvas/EXTDrawBuffers.cpp) (0 => 164477)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/canvas/WebGLDrawBuffers.cpp                                (rev 0)
+++ trunk/Source/WebCore/html/canvas/WebGLDrawBuffers.cpp        2014-02-21 07:46:30 UTC (rev 164477)
</span><span class="lines">@@ -0,0 +1,182 @@
</span><ins>+/*
+ * Copyright (C) 2013 Google Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1.  Redistributions of source code must retain the above copyright
+ *     notice, this list of conditions and the following disclaimer.
+ * 2.  Redistributions in binary form must reproduce the above copyright
+ *     notice, this list of conditions and the following disclaimer in the
+ *     documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS &quot;AS IS&quot; AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include &quot;config.h&quot;
+
+#if ENABLE(WEBGL)
+#include &quot;WebGLDrawBuffers.h&quot;
+
+#include &quot;Extensions3D.h&quot;
+
+namespace WebCore {
+
+WebGLDrawBuffers::WebGLDrawBuffers(WebGLRenderingContext* context)
+    : WebGLExtension(context)
+{
+}
+
+WebGLDrawBuffers::~WebGLDrawBuffers()
+{
+}
+
+WebGLExtension::ExtensionName WebGLDrawBuffers::getName() const
+{
+    return WebGLExtension::WebGLDrawBuffersName;
+}
+
+OwnPtr&lt;WebGLDrawBuffers&gt; WebGLDrawBuffers::create(WebGLRenderingContext* context)
+{
+    return adoptPtr(new WebGLDrawBuffers(context));
+}
+
+// static
+bool WebGLDrawBuffers::supported(WebGLRenderingContext* context)
+{
+#if OS(DARWIN)
+    // https://bugs.webkit.org/show_bug.cgi?id=112486
+    return false;
+#endif
+    Extensions3D* extensions = context-&gt;graphicsContext3D()-&gt;getExtensions();
+    return (extensions-&gt;supports(&quot;GL_EXT_draw_buffers&quot;)
+        &amp;&amp; satisfiesWebGLRequirements(context));
+}
+
+void WebGLDrawBuffers::drawBuffersWEBGL(const Vector&lt;GC3Denum&gt;&amp; buffers)
+{
+    if (m_context-&gt;isContextLost())
+        return;
+    GC3Dsizei n = buffers.size();
+    const GC3Denum* bufs = buffers.data();
+    if (!m_context-&gt;m_framebufferBinding) {
+        if (n != 1) {
+            m_context-&gt;synthesizeGLError(GraphicsContext3D::INVALID_VALUE, &quot;drawBuffersWEBGL&quot;, &quot;more than one buffer&quot;);
+            return;
+        }
+        if (bufs[0] != GraphicsContext3D::BACK &amp;&amp; bufs[0] != GraphicsContext3D::NONE) {
+            m_context-&gt;synthesizeGLError(GraphicsContext3D::INVALID_OPERATION, &quot;drawBuffersWEBGL&quot;, &quot;BACK or NONE&quot;);
+            return;
+        }
+        // Because the backbuffer is simulated on all current WebKit ports, we need to change BACK to COLOR_ATTACHMENT0.
+        GC3Denum value = (bufs[0] == GraphicsContext3D::BACK) ? GraphicsContext3D::COLOR_ATTACHMENT0 : GraphicsContext3D::NONE;
+        m_context-&gt;graphicsContext3D()-&gt;getExtensions()-&gt;drawBuffersEXT(1, &amp;value);
+        m_context-&gt;setBackDrawBuffer(bufs[0]);
+    } else {
+        if (n &gt; m_context-&gt;getMaxDrawBuffers()) {
+            m_context-&gt;synthesizeGLError(GraphicsContext3D::INVALID_VALUE, &quot;drawBuffersWEBGL&quot;, &quot;more than max draw buffers&quot;);
+            return;
+        }
+        for (GC3Dsizei i = 0; i &lt; n; ++i) {
+            if (bufs[i] != GraphicsContext3D::NONE &amp;&amp; bufs[i] != static_cast&lt;GC3Denum&gt;(Extensions3D::COLOR_ATTACHMENT0_EXT + i)) {
+                m_context-&gt;synthesizeGLError(GraphicsContext3D::INVALID_OPERATION, &quot;drawBuffersWEBGL&quot;, &quot;COLOR_ATTACHMENTi_EXT or NONE&quot;);
+                return;
+            }
+        }
+        m_context-&gt;m_framebufferBinding-&gt;drawBuffers(buffers);
+    }
+}
+
+// static
+bool WebGLDrawBuffers::satisfiesWebGLRequirements(WebGLRenderingContext* webglContext)
+{
+    GraphicsContext3D* context = webglContext-&gt;graphicsContext3D();
+
+    // This is called after we make sure GL_EXT_draw_buffers is supported.
+    GC3Dint maxDrawBuffers = 0;
+    GC3Dint maxColorAttachments = 0;
+    context-&gt;getIntegerv(Extensions3D::MAX_DRAW_BUFFERS_EXT, &amp;maxDrawBuffers);
+    context-&gt;getIntegerv(Extensions3D::MAX_COLOR_ATTACHMENTS_EXT, &amp;maxColorAttachments);
+    if (maxDrawBuffers &lt; 4 || maxColorAttachments &lt; 4)
+        return false;
+
+    Platform3DObject fbo = context-&gt;createFramebuffer();
+    context-&gt;bindFramebuffer(GraphicsContext3D::FRAMEBUFFER, fbo);
+
+    const unsigned char buffer[4] = { 0, 0, 0, 0 }; // textures are required to be initialized for other ports.
+    bool supportsDepth = (context-&gt;getExtensions()-&gt;supports(&quot;GL_CHROMIUM_depth_texture&quot;)
+        || context-&gt;getExtensions()-&gt;supports(&quot;GL_OES_depth_texture&quot;)
+        || context-&gt;getExtensions()-&gt;supports(&quot;GL_ARB_depth_texture&quot;));
+    bool supportsDepthStencil = (context-&gt;getExtensions()-&gt;supports(&quot;GL_EXT_packed_depth_stencil&quot;)
+        || context-&gt;getExtensions()-&gt;supports(&quot;GL_OES_packed_depth_stencil&quot;));
+    Platform3DObject depthStencil = 0;
+    if (supportsDepthStencil) {
+        depthStencil = context-&gt;createTexture();
+        context-&gt;bindTexture(GraphicsContext3D::TEXTURE_2D, depthStencil);
+        context-&gt;texImage2D(GraphicsContext3D::TEXTURE_2D, 0, GraphicsContext3D::DEPTH_STENCIL, 1, 1, 0, GraphicsContext3D::DEPTH_STENCIL, GraphicsContext3D::UNSIGNED_INT_24_8, buffer);
+    }
+    Platform3DObject depth = 0;
+    if (supportsDepth) {
+        depth = context-&gt;createTexture();
+        context-&gt;bindTexture(GraphicsContext3D::TEXTURE_2D, depth);
+        context-&gt;texImage2D(GraphicsContext3D::TEXTURE_2D, 0, GraphicsContext3D::DEPTH_COMPONENT, 1, 1, 0, GraphicsContext3D::DEPTH_COMPONENT, GraphicsContext3D::UNSIGNED_INT, buffer);
+    }
+
+    Vector&lt;Platform3DObject&gt; colors;
+    bool ok = true;
+    GC3Dint maxAllowedBuffers = std::min(maxDrawBuffers, maxColorAttachments);
+    for (GC3Dint i = 0; i &lt; maxAllowedBuffers; ++i) {
+        Platform3DObject color = context-&gt;createTexture();
+        colors.append(color);
+        context-&gt;bindTexture(GraphicsContext3D::TEXTURE_2D, color);
+        context-&gt;texImage2D(GraphicsContext3D::TEXTURE_2D, 0, GraphicsContext3D::RGBA, 1, 1, 0, GraphicsContext3D::RGBA, GraphicsContext3D::UNSIGNED_BYTE, buffer);
+        context-&gt;framebufferTexture2D(GraphicsContext3D::FRAMEBUFFER, GraphicsContext3D::COLOR_ATTACHMENT0 + i, GraphicsContext3D::TEXTURE_2D, color, 0);
+        if (context-&gt;checkFramebufferStatus(GraphicsContext3D::FRAMEBUFFER) != GraphicsContext3D::FRAMEBUFFER_COMPLETE) {
+            ok = false;
+            break;
+        }
+        if (supportsDepth) {
+            context-&gt;framebufferTexture2D(GraphicsContext3D::FRAMEBUFFER, GraphicsContext3D::DEPTH_ATTACHMENT, GraphicsContext3D::TEXTURE_2D, depth, 0);
+            if (context-&gt;checkFramebufferStatus(GraphicsContext3D::FRAMEBUFFER) != GraphicsContext3D::FRAMEBUFFER_COMPLETE) {
+                ok = false;
+                break;
+            }
+            context-&gt;framebufferTexture2D(GraphicsContext3D::FRAMEBUFFER, GraphicsContext3D::DEPTH_ATTACHMENT, GraphicsContext3D::TEXTURE_2D, 0, 0);
+        }
+        if (supportsDepthStencil) {
+            context-&gt;framebufferTexture2D(GraphicsContext3D::FRAMEBUFFER, GraphicsContext3D::DEPTH_ATTACHMENT, GraphicsContext3D::TEXTURE_2D, depthStencil, 0);
+            context-&gt;framebufferTexture2D(GraphicsContext3D::FRAMEBUFFER, GraphicsContext3D::STENCIL_ATTACHMENT, GraphicsContext3D::TEXTURE_2D, depthStencil, 0);
+            if (context-&gt;checkFramebufferStatus(GraphicsContext3D::FRAMEBUFFER) != GraphicsContext3D::FRAMEBUFFER_COMPLETE) {
+                ok = false;
+                break;
+            }
+            context-&gt;framebufferTexture2D(GraphicsContext3D::FRAMEBUFFER, GraphicsContext3D::DEPTH_ATTACHMENT, GraphicsContext3D::TEXTURE_2D, 0, 0);
+            context-&gt;framebufferTexture2D(GraphicsContext3D::FRAMEBUFFER, GraphicsContext3D::STENCIL_ATTACHMENT, GraphicsContext3D::TEXTURE_2D, 0, 0);
+        }
+    }
+
+    webglContext-&gt;restoreCurrentFramebuffer();
+    context-&gt;deleteFramebuffer(fbo);
+    webglContext-&gt;restoreCurrentTexture2D();
+    if (supportsDepth)
+        context-&gt;deleteTexture(depth);
+    if (supportsDepthStencil)
+        context-&gt;deleteTexture(depthStencil);
+    for (size_t i = 0; i &lt; colors.size(); ++i)
+        context-&gt;deleteTexture(colors[i]);
+    return ok;
+}
+
+} // namespace WebCore
+
+#endif // ENABLE(WEBGL)
</ins></span></pre></div>
<a id="trunkSourceWebCorehtmlcanvasWebGLDrawBuffershfromrev164476trunkSourceWebCorehtmlcanvasEXTDrawBuffersh"></a>
<div class="copfile"><h4>Copied: trunk/Source/WebCore/html/canvas/WebGLDrawBuffers.h (from rev 164476, trunk/Source/WebCore/html/canvas/EXTDrawBuffers.h) (0 => 164477)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/canvas/WebGLDrawBuffers.h                                (rev 0)
+++ trunk/Source/WebCore/html/canvas/WebGLDrawBuffers.h        2014-02-21 07:46:30 UTC (rev 164477)
</span><span class="lines">@@ -0,0 +1,53 @@
</span><ins>+/*
+ * Copyright (C) 2013 Google Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1.  Redistributions of source code must retain the above copyright
+ *     notice, this list of conditions and the following disclaimer.
+ * 2.  Redistributions in binary form must reproduce the above copyright
+ *     notice, this list of conditions and the following disclaimer in the
+ *     documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS &quot;AS IS&quot; AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef WebGLDrawBuffers_h
+#define WebGLDrawBuffers_h
+
+#include &quot;WebGLExtension.h&quot;
+#include &lt;wtf/PassOwnPtr.h&gt;
+
+namespace WebCore {
+
+class WebGLDrawBuffers : public WebGLExtension {
+public:
+    static OwnPtr&lt;WebGLDrawBuffers&gt; create(WebGLRenderingContext*);
+
+    static bool supported(WebGLRenderingContext*);
+
+    virtual ~WebGLDrawBuffers();
+    virtual ExtensionName getName() const override;
+
+    void drawBuffersWEBGL(const Vector&lt;GC3Denum&gt;&amp; buffers);
+
+private:
+    WebGLDrawBuffers(WebGLRenderingContext*);
+
+    static bool satisfiesWebGLRequirements(WebGLRenderingContext*);
+};
+
+} // namespace WebCore
+
+#endif // WebGLDrawBuffers_h
</ins></span></pre></div>
<a id="trunkSourceWebCorehtmlcanvasWebGLDrawBuffersidl"></a>
<div class="addfile"><h4>Added: trunk/Source/WebCore/html/canvas/WebGLDrawBuffers.idl (0 => 164477)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/canvas/WebGLDrawBuffers.idl                                (rev 0)
+++ trunk/Source/WebCore/html/canvas/WebGLDrawBuffers.idl        2014-02-21 07:46:30 UTC (rev 164477)
</span><span class="lines">@@ -0,0 +1,72 @@
</span><ins>+/*
+ * Copyright (C) 2013 Google Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1.  Redistributions of source code must retain the above copyright
+ *     notice, this list of conditions and the following disclaimer.
+ * 2.  Redistributions in binary form must reproduce the above copyright
+ *     notice, this list of conditions and the following disclaimer in the
+ *     documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS &quot;AS IS&quot; AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+typedef unsigned long GLenum;
+
+[
+    NoInterfaceObject,
+    Conditional=WEBGL,
+    GenerateIsReachable=ImplWebGLRenderingContext,
+    DoNotCheckConstants,
+] interface WebGLDrawBuffers {
+    const GLenum COLOR_ATTACHMENT0_WEBGL = 0x8CE0;
+    const GLenum COLOR_ATTACHMENT1_WEBGL = 0x8CE1;
+    const GLenum COLOR_ATTACHMENT2_WEBGL = 0x8CE2;
+    const GLenum COLOR_ATTACHMENT3_WEBGL = 0x8CE3;
+    const GLenum COLOR_ATTACHMENT4_WEBGL = 0x8CE4;
+    const GLenum COLOR_ATTACHMENT5_WEBGL = 0x8CE5;
+    const GLenum COLOR_ATTACHMENT6_WEBGL = 0x8CE6;
+    const GLenum COLOR_ATTACHMENT7_WEBGL = 0x8CE7;
+    const GLenum COLOR_ATTACHMENT8_WEBGL = 0x8CE8;
+    const GLenum COLOR_ATTACHMENT9_WEBGL = 0x8CE9;
+    const GLenum COLOR_ATTACHMENT10_WEBGL = 0x8CEA;
+    const GLenum COLOR_ATTACHMENT11_WEBGL = 0x8CEB;
+    const GLenum COLOR_ATTACHMENT12_WEBGL = 0x8CEC;
+    const GLenum COLOR_ATTACHMENT13_WEBGL = 0x8CED;
+    const GLenum COLOR_ATTACHMENT14_WEBGL = 0x8CEE;
+    const GLenum COLOR_ATTACHMENT15_WEBGL = 0x8CEF;
+
+    const GLenum DRAW_BUFFER0_WEBGL = 0x8825;
+    const GLenum DRAW_BUFFER1_WEBGL = 0x8826;
+    const GLenum DRAW_BUFFER2_WEBGL = 0x8827;
+    const GLenum DRAW_BUFFER3_WEBGL = 0x8828;
+    const GLenum DRAW_BUFFER4_WEBGL = 0x8829;
+    const GLenum DRAW_BUFFER5_WEBGL = 0x882A;
+    const GLenum DRAW_BUFFER6_WEBGL = 0x882B;
+    const GLenum DRAW_BUFFER7_WEBGL = 0x882C;
+    const GLenum DRAW_BUFFER8_WEBGL = 0x882D;
+    const GLenum DRAW_BUFFER9_WEBGL = 0x882E;
+    const GLenum DRAW_BUFFER10_WEBGL = 0x882F;
+    const GLenum DRAW_BUFFER11_WEBGL = 0x8830;
+    const GLenum DRAW_BUFFER12_WEBGL = 0x8831;
+    const GLenum DRAW_BUFFER13_WEBGL = 0x8832;
+    const GLenum DRAW_BUFFER14_WEBGL = 0x8833;
+    const GLenum DRAW_BUFFER15_WEBGL = 0x8834;
+
+    const GLenum MAX_COLOR_ATTACHMENTS_WEBGL = 0x8CDF;
+    const GLenum MAX_DRAW_BUFFERS_WEBGL = 0x8824;
+
+    void drawBuffersWEBGL(sequence&lt;GLenum&gt; buffers);
+};
</ins></span></pre></div>
<a id="trunkSourceWebCorehtmlcanvasWebGLExtensionh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/canvas/WebGLExtension.h (164476 => 164477)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/canvas/WebGLExtension.h        2014-02-21 06:45:34 UTC (rev 164476)
+++ trunk/Source/WebCore/html/canvas/WebGLExtension.h        2014-02-21 07:46:30 UTC (rev 164477)
</span><span class="lines">@@ -36,7 +36,6 @@
</span><span class="cx">     // Extension names are needed to properly wrap instances in JavaScript objects.
</span><span class="cx">     enum ExtensionName {
</span><span class="cx">         WebGLLoseContextName,
</span><del>-        EXTDrawBuffersName,
</del><span class="cx">         EXTTextureFilterAnisotropicName,
</span><span class="cx">         OESTextureFloatName,
</span><span class="cx">         OESTextureFloatLinearName,
</span><span class="lines">@@ -48,6 +47,7 @@
</span><span class="cx">         WebGLDebugShadersName,
</span><span class="cx">         WebGLCompressedTextureS3TCName,
</span><span class="cx">         WebGLDepthTextureName,
</span><ins>+        WebGLDrawBuffersName,
</ins><span class="cx">         OESElementIndexUintName,
</span><span class="cx">         WebGLCompressedTextureATCName,
</span><span class="cx">         WebGLCompressedTexturePVRTCName,
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlcanvasWebGLFramebuffercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/canvas/WebGLFramebuffer.cpp (164476 => 164477)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/canvas/WebGLFramebuffer.cpp        2014-02-21 06:45:34 UTC (rev 164476)
+++ trunk/Source/WebCore/html/canvas/WebGLFramebuffer.cpp        2014-02-21 07:46:30 UTC (rev 164477)
</span><span class="lines">@@ -29,9 +29,9 @@
</span><span class="cx"> 
</span><span class="cx"> #include &quot;WebGLFramebuffer.h&quot;
</span><span class="cx"> 
</span><del>-#include &quot;EXTDrawBuffers.h&quot;
</del><span class="cx"> #include &quot;Extensions3D.h&quot;
</span><span class="cx"> #include &quot;WebGLContextGroup.h&quot;
</span><ins>+#include &quot;WebGLDrawBuffers.h&quot;
</ins><span class="cx"> #include &quot;WebGLRenderingContext.h&quot;
</span><span class="cx"> 
</span><span class="cx"> namespace WebCore {
</span><span class="lines">@@ -601,7 +601,7 @@
</span><span class="cx"> 
</span><span class="cx"> void WebGLFramebuffer::drawBuffersIfNecessary(bool force)
</span><span class="cx"> {
</span><del>-    if (!context()-&gt;m_extDrawBuffers)
</del><ins>+    if (!context()-&gt;m_webglDrawBuffers)
</ins><span class="cx">         return;
</span><span class="cx">     bool reset = force;
</span><span class="cx">     // This filtering works around graphics driver bugs on Mac OS X.
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlcanvasWebGLRenderingContextcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/canvas/WebGLRenderingContext.cpp (164476 => 164477)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/canvas/WebGLRenderingContext.cpp        2014-02-21 06:45:34 UTC (rev 164476)
+++ trunk/Source/WebCore/html/canvas/WebGLRenderingContext.cpp        2014-02-21 07:46:30 UTC (rev 164477)
</span><span class="lines">@@ -33,7 +33,6 @@
</span><span class="cx"> #include &quot;CachedImage.h&quot;
</span><span class="cx"> #include &quot;DOMWindow.h&quot;
</span><span class="cx"> #include &quot;Document.h&quot;
</span><del>-#include &quot;EXTDrawBuffers.h&quot;
</del><span class="cx"> #include &quot;EXTTextureFilterAnisotropic.h&quot;
</span><span class="cx"> #include &quot;ExceptionCode.h&quot;
</span><span class="cx"> #include &quot;Extensions3D.h&quot;
</span><span class="lines">@@ -71,6 +70,7 @@
</span><span class="cx"> #include &quot;WebGLDebugRendererInfo.h&quot;
</span><span class="cx"> #include &quot;WebGLDebugShaders.h&quot;
</span><span class="cx"> #include &quot;WebGLDepthTexture.h&quot;
</span><ins>+#include &quot;WebGLDrawBuffers.h&quot;
</ins><span class="cx"> #include &quot;WebGLFramebuffer.h&quot;
</span><span class="cx"> #include &quot;WebGLLoseContext.h&quot;
</span><span class="cx"> #include &quot;WebGLProgram.h&quot;
</span><span class="lines">@@ -2478,12 +2478,12 @@
</span><span class="cx">         }
</span><span class="cx">         return m_webglDepthTexture.get();
</span><span class="cx">     }
</span><del>-    if (equalIgnoringCase(name, &quot;EXT_draw_buffers&quot;) &amp;&amp; supportsDrawBuffers()) {
-        if (!m_extDrawBuffers) {
</del><ins>+    if (equalIgnoringCase(name, &quot;WEBGL_draw_buffers&quot;) &amp;&amp; supportsDrawBuffers()) {
+        if (!m_webglDrawBuffers) {
</ins><span class="cx">             m_context-&gt;getExtensions()-&gt;ensureEnabled(&quot;GL_EXT_draw_buffers&quot;);
</span><del>-            m_extDrawBuffers = EXTDrawBuffers::create(this);
</del><ins>+            m_webglDrawBuffers = WebGLDrawBuffers::create(this);
</ins><span class="cx">         }
</span><del>-        return m_extDrawBuffers.get();
</del><ins>+        return m_webglDrawBuffers.get();
</ins><span class="cx">     }
</span><span class="cx">     if (equalIgnoringCase(name, &quot;ANGLE_instanced_arrays&quot;) &amp;&amp; ANGLEInstancedArrays::supported(this)) {
</span><span class="cx">         if (!m_angleInstancedArrays) {
</span><span class="lines">@@ -2774,17 +2774,17 @@
</span><span class="cx">         synthesizeGLError(GraphicsContext3D::INVALID_ENUM, &quot;getParameter&quot;, &quot;invalid parameter name, EXT_texture_filter_anisotropic not enabled&quot;);
</span><span class="cx">         return WebGLGetInfo();
</span><span class="cx">     case Extensions3D::MAX_COLOR_ATTACHMENTS_EXT: // EXT_draw_buffers BEGIN
</span><del>-        if (m_extDrawBuffers)
</del><ins>+        if (m_webglDrawBuffers)
</ins><span class="cx">             return WebGLGetInfo(getMaxColorAttachments());
</span><del>-        synthesizeGLError(GraphicsContext3D::INVALID_ENUM, &quot;getParameter&quot;, &quot;invalid parameter name, EXT_draw_buffers not enabled&quot;);
</del><ins>+        synthesizeGLError(GraphicsContext3D::INVALID_ENUM, &quot;getParameter&quot;, &quot;invalid parameter name, WEBGL_draw_buffers not enabled&quot;);
</ins><span class="cx">         return WebGLGetInfo();
</span><span class="cx">     case Extensions3D::MAX_DRAW_BUFFERS_EXT:
</span><del>-        if (m_extDrawBuffers)
</del><ins>+        if (m_webglDrawBuffers)
</ins><span class="cx">             return WebGLGetInfo(getMaxDrawBuffers());
</span><del>-        synthesizeGLError(GraphicsContext3D::INVALID_ENUM, &quot;getParameter&quot;, &quot;invalid parameter name, EXT_draw_buffers not enabled&quot;);
</del><ins>+        synthesizeGLError(GraphicsContext3D::INVALID_ENUM, &quot;getParameter&quot;, &quot;invalid parameter name, WEBGL_draw_buffers not enabled&quot;);
</ins><span class="cx">         return WebGLGetInfo();
</span><span class="cx">     default:
</span><del>-        if (m_extDrawBuffers
</del><ins>+        if (m_webglDrawBuffers
</ins><span class="cx">             &amp;&amp; pname &gt;= Extensions3D::DRAW_BUFFER0_EXT
</span><span class="cx">             &amp;&amp; pname &lt; static_cast&lt;GC3Denum&gt;(Extensions3D::DRAW_BUFFER0_EXT + getMaxDrawBuffers())) {
</span><span class="cx">             GC3Dint value = GraphicsContext3D::NONE;
</span><span class="lines">@@ -3005,7 +3005,7 @@
</span><span class="cx">     if (WebGLDepthTexture::supported(graphicsContext3D()))
</span><span class="cx">         result.append(&quot;WEBGL_depth_texture&quot;);
</span><span class="cx">     if (supportsDrawBuffers())
</span><del>-        result.append(&quot;EXT_draw_buffers&quot;);
</del><ins>+        result.append(&quot;WEBGL_draw_buffers&quot;);
</ins><span class="cx">     if (ANGLEInstancedArrays::supported(this))
</span><span class="cx">         result.append(&quot;ANGLE_instanced_arrays&quot;);
</span><span class="cx"> 
</span><span class="lines">@@ -5491,7 +5491,7 @@
</span><span class="cx">     case GraphicsContext3D::DEPTH_STENCIL_ATTACHMENT:
</span><span class="cx">         break;
</span><span class="cx">     default:
</span><del>-        if (m_extDrawBuffers
</del><ins>+        if (m_webglDrawBuffers
</ins><span class="cx">             &amp;&amp; attachment &gt; GraphicsContext3D::COLOR_ATTACHMENT0
</span><span class="cx">             &amp;&amp; attachment &lt; static_cast&lt;GC3Denum&gt;(GraphicsContext3D::COLOR_ATTACHMENT0 + getMaxColorAttachments()))
</span><span class="cx">             break;
</span><span class="lines">@@ -6080,7 +6080,7 @@
</span><span class="cx"> {
</span><span class="cx">     if (!m_drawBuffersWebGLRequirementsChecked) {
</span><span class="cx">         m_drawBuffersWebGLRequirementsChecked = true;
</span><del>-        m_drawBuffersSupported = EXTDrawBuffers::supported(this);
</del><ins>+        m_drawBuffersSupported = WebGLDrawBuffers::supported(this);
</ins><span class="cx">     }
</span><span class="cx">     return m_drawBuffersSupported;
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlcanvasWebGLRenderingContexth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/canvas/WebGLRenderingContext.h (164476 => 164477)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/canvas/WebGLRenderingContext.h        2014-02-21 06:45:34 UTC (rev 164476)
+++ trunk/Source/WebCore/html/canvas/WebGLRenderingContext.h        2014-02-21 07:46:30 UTC (rev 164477)
</span><span class="lines">@@ -42,7 +42,6 @@
</span><span class="cx"> namespace WebCore {
</span><span class="cx"> 
</span><span class="cx"> class ANGLEInstancedArrays;
</span><del>-class EXTDrawBuffers;
</del><span class="cx"> class EXTTextureFilterAnisotropic;
</span><span class="cx"> class HTMLImageElement;
</span><span class="cx"> class HTMLVideoElement;
</span><span class="lines">@@ -67,6 +66,7 @@
</span><span class="cx"> class WebGLDebugRendererInfo;
</span><span class="cx"> class WebGLDebugShaders;
</span><span class="cx"> class WebGLDepthTexture;
</span><ins>+class WebGLDrawBuffers;
</ins><span class="cx"> class WebGLExtension;
</span><span class="cx"> class WebGLFramebuffer;
</span><span class="cx"> class WebGLLoseContext;
</span><span class="lines">@@ -328,7 +328,7 @@
</span><span class="cx">     void vertexAttribDivisor(GC3Duint index, GC3Duint divisor);
</span><span class="cx"> 
</span><span class="cx"> private:
</span><del>-    friend class EXTDrawBuffers;
</del><ins>+    friend class WebGLDrawBuffers;
</ins><span class="cx">     friend class WebGLFramebuffer;
</span><span class="cx">     friend class WebGLObject;
</span><span class="cx">     friend class OESVertexArrayObject;
</span><span class="lines">@@ -533,7 +533,6 @@
</span><span class="cx">     bool isContextLostOrPending();
</span><span class="cx"> 
</span><span class="cx">     // Enabled extension objects.
</span><del>-    OwnPtr&lt;EXTDrawBuffers&gt; m_extDrawBuffers;
</del><span class="cx">     OwnPtr&lt;EXTTextureFilterAnisotropic&gt; m_extTextureFilterAnisotropic;
</span><span class="cx">     OwnPtr&lt;OESTextureFloat&gt; m_oesTextureFloat;
</span><span class="cx">     OwnPtr&lt;OESTextureFloatLinear&gt; m_oesTextureFloatLinear;
</span><span class="lines">@@ -549,6 +548,7 @@
</span><span class="cx">     OwnPtr&lt;WebGLCompressedTexturePVRTC&gt; m_webglCompressedTexturePVRTC;
</span><span class="cx">     OwnPtr&lt;WebGLCompressedTextureS3TC&gt; m_webglCompressedTextureS3TC;
</span><span class="cx">     OwnPtr&lt;WebGLDepthTexture&gt; m_webglDepthTexture;
</span><ins>+    OwnPtr&lt;WebGLDrawBuffers&gt; m_webglDrawBuffers;
</ins><span class="cx">     OwnPtr&lt;ANGLEInstancedArrays&gt; m_angleInstancedArrays;
</span><span class="cx"> 
</span><span class="cx">     // Helpers for getParameter and others
</span></span></pre>
</div>
</div>

</body>
</html>