<!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>[210567] 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/210567">210567</a></dd>
<dt>Author</dt> <dd>commit-queue@webkit.org</dd>
<dt>Date</dt> <dd>2017-01-10 17:02:34 -0800 (Tue, 10 Jan 2017)</dd>
</dl>

<h3>Log Message</h3>
<pre>[WebIDL] Remove most of the custom bindings for the WebGL code
https://bugs.webkit.org/show_bug.cgi?id=166834

Patch by Sam Weinig &lt;sam@webkit.org&gt; on 2017-01-10
Reviewed by Alex Christensen.

Source/JavaScriptCore:

* runtime/ArrayPrototype.h:
* runtime/ObjectPrototype.h:
Export the ClassInfo so it can be used from WebCore.

Source/WebCore:

Removes all but one custom getter (getExtension) from the WebGL code.

* Modules/indexeddb/IDBKeyRange.idl:
Replace use of non-standard type, with new OverrideIDLType extended attribute, allowing us
to stay more consistent with the IDL files spec's provide.

* WebCore.xcodeproj/project.pbxproj:
Move JSWebGL2RenderingContextCustom to the GC/Wrapping only group.

* bindings/IDLTypes.h:
Add IDLWebGLAny, and simplify IDLIDBKey to not be templatized.

* bindings/js/JSDOMConvert.h:
(WebCore::Converter&lt;IDLLong&gt;::convert):
(WebCore::Converter&lt;IDLFloat&gt;::convert):
(WebCore::Converter&lt;IDLUnrestrictedFloat&gt;::convert):
(WebCore::Converter&lt;IDLDouble&gt;::convert):
(WebCore::Converter&lt;IDLUnrestrictedDouble&gt;::convert):
Add overloads of convert that convert a double to the numeric type.

(WebCore::Detail::GenericSequenceConverter::convert):
Add optimized specialization for JSArrays that does not use the iterator protocol.

(WebCore::Detail::NumericSequenceConverter::convert):
Add an even more optimized specialization for numeric types, which checks to see
if the array's butterfly has an optimized shape, and extracts the numeric values
from that.

(WebCore::Detail::SequenceConverter::convert):
(WebCore::Detail::SequenceConverter&lt;IDLLong&gt;::convert):
(WebCore::Detail::SequenceConverter&lt;IDLFloat&gt;::convert):
(WebCore::Detail::SequenceConverter&lt;IDLUnrestrictedFloat&gt;::convert):
(WebCore::Detail::SequenceConverter&lt;IDLDouble&gt;::convert):
(WebCore::Detail::SequenceConverter&lt;IDLUnrestrictedDouble&gt;::convert):
Select the right specialization based on type.

(WebCore::Converter&lt;IDLSequence&lt;T&gt;&gt;::convert):
(WebCore::Converter&lt;IDLFrozenArray&lt;T&gt;&gt;::convert):
Rename converter to be more accurate.

(WebCore::JSConverter&lt;IDLWebGLAny&gt;::convert):
Added. Calls through to converter in WebGLAny.h. We should replace this with a
call to the IDLUnion JSConverter when feasible.

* bindings/js/JSWebGL2RenderingContextCustom.cpp:
(WebCore::JSWebGL2RenderingContext::getInternalformatParameter): Deleted.
(WebCore::JSWebGL2RenderingContext::getQueryParameter): Deleted.
(WebCore::JSWebGL2RenderingContext::getSamplerParameter): Deleted.
(WebCore::JSWebGL2RenderingContext::getSyncParameter): Deleted.
(WebCore::JSWebGL2RenderingContext::getIndexedParameter): Deleted.
(WebCore::JSWebGL2RenderingContext::getActiveUniformBlockParameter): Deleted.
(WebCore::JSWebGL2RenderingContext::getActiveUniformBlockName): Deleted.
Remove unnecessary custom functions.

* bindings/js/JSWebGLRenderingContextBaseCustom.cpp:
(WebCore::objectParameter): Deleted.
(WebCore::JSWebGLRenderingContextBase::getAttachedShaders): Deleted.
(WebCore::JSWebGLRenderingContextBase::getBufferParameter): Deleted.
(WebCore::JSWebGLRenderingContextBase::getFramebufferAttachmentParameter): Deleted.
(WebCore::JSWebGLRenderingContextBase::getParameter): Deleted.
(WebCore::JSWebGLRenderingContextBase::getProgramParameter): Deleted.
(WebCore::JSWebGLRenderingContextBase::getRenderbufferParameter): Deleted.
(WebCore::JSWebGLRenderingContextBase::getShaderParameter): Deleted.
(WebCore::JSWebGLRenderingContextBase::getSupportedExtensions): Deleted.
(WebCore::JSWebGLRenderingContextBase::getTexParameter): Deleted.
(WebCore::JSWebGLRenderingContextBase::getUniform): Deleted.
(WebCore::JSWebGLRenderingContextBase::getVertexAttrib): Deleted.
(WebCore::toNumberVector): Deleted.
(WebCore::functionForUniform): Deleted.
(WebCore::dataFunctionf): Deleted.
(WebCore::dataFunctioni): Deleted.
(WebCore::dataFunctionMatrix): Deleted.
(WebCore::JSWebGLRenderingContextBase::uniform1fv): Deleted.
(WebCore::JSWebGLRenderingContextBase::uniform1iv): Deleted.
(WebCore::JSWebGLRenderingContextBase::uniform2fv): Deleted.
(WebCore::JSWebGLRenderingContextBase::uniform2iv): Deleted.
(WebCore::JSWebGLRenderingContextBase::uniform3fv): Deleted.
(WebCore::JSWebGLRenderingContextBase::uniform3iv): Deleted.
(WebCore::JSWebGLRenderingContextBase::uniform4fv): Deleted.
(WebCore::JSWebGLRenderingContextBase::uniform4iv): Deleted.
(WebCore::JSWebGLRenderingContextBase::uniformMatrix2fv): Deleted.
(WebCore::JSWebGLRenderingContextBase::uniformMatrix3fv): Deleted.
(WebCore::JSWebGLRenderingContextBase::uniformMatrix4fv): Deleted.
(WebCore::JSWebGLRenderingContextBase::vertexAttrib1fv): Deleted.
(WebCore::JSWebGLRenderingContextBase::vertexAttrib2fv): Deleted.
(WebCore::JSWebGLRenderingContextBase::vertexAttrib3fv): Deleted.
(WebCore::JSWebGLRenderingContextBase::vertexAttrib4fv): Deleted.
Remove unnecessary custom functions.

* bindings/scripts/CodeGenerator.pm:
(IsBuiltinType):
Remove specialization of IDBKey.

* bindings/scripts/CodeGeneratorJS.pm:
(GetBaseIDLType):
(GetIDLType):
(NativeToJSValueDOMConvertNeedsState):
(NativeToJSValueDOMConvertNeedsGlobalObject):
(NativeToJSValue):
Allow IDL files to override the type of signature using a new OverrideIDLType
extended attribute. Currently this only works conversion to JS, but could be
extended to support more.

* bindings/scripts/IDLAttributes.txt:
Add OverrideIDLType.

* html/canvas/WebGL2RenderingContext.idl:
Add OverrideIDLType=IDLWebGLAny annotations to remove the need for custom functions.

* html/canvas/WebGLAny.cpp:
(WebCore::convertToJSValue):
(WebCore::toJS): Deleted.
* html/canvas/WebGLAny.h:
Rename the toJS function to convertToJSValue to avoid a template specialization issue.

* html/canvas/WebGLRenderingContextBase.cpp:
(WebCore::WebGLRenderingContextBase::getAttachedShaders):
Update signature to match IDL, replacing bool return value plus out parameter with an
optional return value. Modernize the code a bit.

(WebCore::WebGLRenderingContextBase::uniform2f):
(WebCore::WebGLRenderingContextBase::uniform3f):
(WebCore::WebGLRenderingContextBase::uniform4f):
(WebCore::WebGLRenderingContextBase::uniform1i):
(WebCore::WebGLRenderingContextBase::uniform3i):
(WebCore::WebGLRenderingContextBase::uniform4i):
(WebCore::WebGLRenderingContextBase::uniform1fv):
(WebCore::WebGLRenderingContextBase::uniform2fv):
(WebCore::WebGLRenderingContextBase::uniform3fv):
(WebCore::WebGLRenderingContextBase::uniform4fv):
(WebCore::WebGLRenderingContextBase::uniform1iv):
(WebCore::WebGLRenderingContextBase::uniform2iv):
(WebCore::WebGLRenderingContextBase::uniform3iv):
(WebCore::WebGLRenderingContextBase::uniform4iv):
(WebCore::WebGLRenderingContextBase::uniformMatrix2fv):
(WebCore::WebGLRenderingContextBase::uniformMatrix3fv):
(WebCore::WebGLRenderingContextBase::uniformMatrix4fv):
(WebCore::WebGLRenderingContextBase::vertexAttrib4f):
(WebCore::WebGLRenderingContextBase::vertexAttrib1fv):
(WebCore::WebGLRenderingContextBase::vertexAttrib2fv):
(WebCore::WebGLRenderingContextBase::vertexAttrib3fv):
(WebCore::WebGLRenderingContextBase::vertexAttrib4fv):
(WebCore::WebGLRenderingContextBase::validateUniformParameters):
(WebCore::WebGLRenderingContextBase::validateUniformMatrixParameters):
(WebCore::WebGLRenderingContextBase::vertexAttribfvImpl):
* html/canvas/WebGLRenderingContextBase.h:
(WebCore::WebGLRenderingContextBase::TypedList::TypedList):
(WebCore::WebGLRenderingContextBase::TypedList::data):
(WebCore::WebGLRenderingContextBase::TypedList::length):
Re-order/group to match order in the IDL file. Remove overloads taking a pointer and
length, and replace it by having the main function take a specialized TypedList. TypedList
allows the bindings to pass the correct Variant type, but then the code to only think in
terms of the data() and length() functions.

* html/canvas/WebGLRenderingContextBase.idl:
Remove [Custom] annotations and re-order/group to match the spec. Update types of uniform*fv/iv
functions to take typedef'd unions.

LayoutTests:

* fast/canvas/webgl/gl-object-get-calls-expected.txt:
Update result for better error message.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsChangeLog">trunk/LayoutTests/ChangeLog</a></li>
<li><a href="#trunkLayoutTestsfastcanvaswebglglobjectgetcallsexpectedtxt">trunk/LayoutTests/fast/canvas/webgl/gl-object-get-calls-expected.txt</a></li>
<li><a href="#trunkSourceJavaScriptCoreChangeLog">trunk/Source/JavaScriptCore/ChangeLog</a></li>
<li><a href="#trunkSourceJavaScriptCoreruntimeArrayPrototypeh">trunk/Source/JavaScriptCore/runtime/ArrayPrototype.h</a></li>
<li><a href="#trunkSourceJavaScriptCoreruntimeObjectPrototypeh">trunk/Source/JavaScriptCore/runtime/ObjectPrototype.h</a></li>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbIDBKeyRangeidl">trunk/Source/WebCore/Modules/indexeddb/IDBKeyRange.idl</a></li>
<li><a href="#trunkSourceWebCoreWebCorexcodeprojprojectpbxproj">trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj</a></li>
<li><a href="#trunkSourceWebCorebindingsIDLTypesh">trunk/Source/WebCore/bindings/IDLTypes.h</a></li>
<li><a href="#trunkSourceWebCorebindingsjsJSDOMConverth">trunk/Source/WebCore/bindings/js/JSDOMConvert.h</a></li>
<li><a href="#trunkSourceWebCorebindingsjsJSWebGL2RenderingContextCustomcpp">trunk/Source/WebCore/bindings/js/JSWebGL2RenderingContextCustom.cpp</a></li>
<li><a href="#trunkSourceWebCorebindingsjsJSWebGLRenderingContextBaseCustomcpp">trunk/Source/WebCore/bindings/js/JSWebGLRenderingContextBaseCustom.cpp</a></li>
<li><a href="#trunkSourceWebCorebindingsscriptsCodeGeneratorpm">trunk/Source/WebCore/bindings/scripts/CodeGenerator.pm</a></li>
<li><a href="#trunkSourceWebCorebindingsscriptsCodeGeneratorJSpm">trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm</a></li>
<li><a href="#trunkSourceWebCorebindingsscriptsIDLAttributestxt">trunk/Source/WebCore/bindings/scripts/IDLAttributes.txt</a></li>
<li><a href="#trunkSourceWebCorehtmlcanvasWebGL2RenderingContextcpp">trunk/Source/WebCore/html/canvas/WebGL2RenderingContext.cpp</a></li>
<li><a href="#trunkSourceWebCorehtmlcanvasWebGL2RenderingContexth">trunk/Source/WebCore/html/canvas/WebGL2RenderingContext.h</a></li>
<li><a href="#trunkSourceWebCorehtmlcanvasWebGL2RenderingContextidl">trunk/Source/WebCore/html/canvas/WebGL2RenderingContext.idl</a></li>
<li><a href="#trunkSourceWebCorehtmlcanvasWebGLAnycpp">trunk/Source/WebCore/html/canvas/WebGLAny.cpp</a></li>
<li><a href="#trunkSourceWebCorehtmlcanvasWebGLAnyh">trunk/Source/WebCore/html/canvas/WebGLAny.h</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>
<li><a href="#trunkSourceWebCorehtmlcanvasWebGLRenderingContextBasecpp">trunk/Source/WebCore/html/canvas/WebGLRenderingContextBase.cpp</a></li>
<li><a href="#trunkSourceWebCorehtmlcanvasWebGLRenderingContextBaseh">trunk/Source/WebCore/html/canvas/WebGLRenderingContextBase.h</a></li>
<li><a href="#trunkSourceWebCorehtmlcanvasWebGLRenderingContextBaseidl">trunk/Source/WebCore/html/canvas/WebGLRenderingContextBase.idl</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li><a href="#trunkSourceWebCoreForwardingHeadersruntimeJSGlobalObjectInlinesh">trunk/Source/WebCore/ForwardingHeaders/runtime/JSGlobalObjectInlines.h</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ChangeLog (210566 => 210567)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ChangeLog        2017-01-10 23:45:22 UTC (rev 210566)
+++ trunk/LayoutTests/ChangeLog        2017-01-11 01:02:34 UTC (rev 210567)
</span><span class="lines">@@ -1,3 +1,13 @@
</span><ins>+2017-01-10  Sam Weinig  &lt;sam@webkit.org&gt;
+
+        [WebIDL] Remove most of the custom bindings for the WebGL code
+        https://bugs.webkit.org/show_bug.cgi?id=166834
+
+        Reviewed by Alex Christensen.
+
+        * fast/canvas/webgl/gl-object-get-calls-expected.txt:
+        Update result for better error message.
+
</ins><span class="cx"> 2017-01-10  Ryosuke Niwa  &lt;rniwa@webkit.org&gt;
</span><span class="cx"> 
</span><span class="cx">         :active and :hover states may not be updated across slots
</span></span></pre></div>
<a id="trunkLayoutTestsfastcanvaswebglglobjectgetcallsexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/canvas/webgl/gl-object-get-calls-expected.txt (210566 => 210567)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/canvas/webgl/gl-object-get-calls-expected.txt        2017-01-10 23:45:22 UTC (rev 210566)
+++ trunk/LayoutTests/fast/canvas/webgl/gl-object-get-calls-expected.txt        2017-01-11 01:02:34 UTC (rev 210567)
</span><span class="lines">@@ -7,7 +7,7 @@
</span><span class="cx"> PASS getError was expected value: NO_ERROR : 
</span><span class="cx"> PASS gl.getAttachedShaders(null) is null
</span><span class="cx"> PASS getError was expected value: INVALID_VALUE : 
</span><del>-PASS gl.getAttachedShaders(standardVert) threw exception TypeError: Type error.
</del><ins>+PASS gl.getAttachedShaders(standardVert) threw exception TypeError: Argument 1 ('program') to WebGLRenderingContextBase.getAttachedShaders must be an instance of WebGLProgram.
</ins><span class="cx"> PASS getError was expected value: NO_ERROR : 
</span><span class="cx"> PASS gl.getBufferParameter(gl.ARRAY_BUFFER, gl.BUFFER_SIZE) is 16
</span><span class="cx"> PASS gl.getBufferParameter(gl.ARRAY_BUFFER, gl.BUFFER_USAGE) is gl.DYNAMIC_DRAW
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/ChangeLog (210566 => 210567)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/ChangeLog        2017-01-10 23:45:22 UTC (rev 210566)
+++ trunk/Source/JavaScriptCore/ChangeLog        2017-01-11 01:02:34 UTC (rev 210567)
</span><span class="lines">@@ -1,3 +1,14 @@
</span><ins>+2017-01-10  Sam Weinig  &lt;sam@webkit.org&gt;
+
+        [WebIDL] Remove most of the custom bindings for the WebGL code
+        https://bugs.webkit.org/show_bug.cgi?id=166834
+
+        Reviewed by Alex Christensen.
+
+        * runtime/ArrayPrototype.h:
+        * runtime/ObjectPrototype.h:
+        Export the ClassInfo so it can be used from WebCore.
+
</ins><span class="cx"> 2017-01-09  Filip Pizlo  &lt;fpizlo@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Streamline the GC barrier slowpath
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreruntimeArrayPrototypeh"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/runtime/ArrayPrototype.h (210566 => 210567)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/runtime/ArrayPrototype.h        2017-01-10 23:45:22 UTC (rev 210566)
+++ trunk/Source/JavaScriptCore/runtime/ArrayPrototype.h        2017-01-11 01:02:34 UTC (rev 210567)
</span><span class="lines">@@ -42,7 +42,7 @@
</span><span class="cx"> 
</span><span class="cx">     static ArrayPrototype* create(VM&amp;, JSGlobalObject*, Structure*);
</span><span class="cx">         
</span><del>-    DECLARE_INFO;
</del><ins>+    DECLARE_EXPORT_INFO;
</ins><span class="cx"> 
</span><span class="cx">     static Structure* createStructure(VM&amp; vm, JSGlobalObject* globalObject, JSValue prototype)
</span><span class="cx">     {
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreruntimeObjectPrototypeh"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/runtime/ObjectPrototype.h (210566 => 210567)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/runtime/ObjectPrototype.h        2017-01-10 23:45:22 UTC (rev 210566)
+++ trunk/Source/JavaScriptCore/runtime/ObjectPrototype.h        2017-01-11 01:02:34 UTC (rev 210567)
</span><span class="lines">@@ -31,7 +31,7 @@
</span><span class="cx"> 
</span><span class="cx">     static ObjectPrototype* create(VM&amp;, JSGlobalObject*, Structure*);
</span><span class="cx"> 
</span><del>-    DECLARE_INFO;
</del><ins>+    DECLARE_EXPORT_INFO;
</ins><span class="cx"> 
</span><span class="cx">     static Structure* createStructure(VM&amp; vm, JSGlobalObject* globalObject, JSValue prototype)
</span><span class="cx">     {
</span></span></pre></div>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (210566 => 210567)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2017-01-10 23:45:22 UTC (rev 210566)
+++ trunk/Source/WebCore/ChangeLog        2017-01-11 01:02:34 UTC (rev 210567)
</span><span class="lines">@@ -1,3 +1,168 @@
</span><ins>+2017-01-10  Sam Weinig  &lt;sam@webkit.org&gt;
+
+        [WebIDL] Remove most of the custom bindings for the WebGL code
+        https://bugs.webkit.org/show_bug.cgi?id=166834
+
+        Reviewed by Alex Christensen.
+
+        Removes all but one custom getter (getExtension) from the WebGL code.
+
+        * Modules/indexeddb/IDBKeyRange.idl:
+        Replace use of non-standard type, with new OverrideIDLType extended attribute, allowing us
+        to stay more consistent with the IDL files spec's provide.
+
+        * WebCore.xcodeproj/project.pbxproj:
+        Move JSWebGL2RenderingContextCustom to the GC/Wrapping only group.
+
+        * bindings/IDLTypes.h:
+        Add IDLWebGLAny, and simplify IDLIDBKey to not be templatized.
+
+        * bindings/js/JSDOMConvert.h:
+        (WebCore::Converter&lt;IDLLong&gt;::convert):
+        (WebCore::Converter&lt;IDLFloat&gt;::convert):
+        (WebCore::Converter&lt;IDLUnrestrictedFloat&gt;::convert):
+        (WebCore::Converter&lt;IDLDouble&gt;::convert):
+        (WebCore::Converter&lt;IDLUnrestrictedDouble&gt;::convert):
+        Add overloads of convert that convert a double to the numeric type.
+
+        (WebCore::Detail::GenericSequenceConverter::convert):
+        Add optimized specialization for JSArrays that does not use the iterator protocol.
+
+        (WebCore::Detail::NumericSequenceConverter::convert):
+        Add an even more optimized specialization for numeric types, which checks to see
+        if the array's butterfly has an optimized shape, and extracts the numeric values
+        from that.
+
+        (WebCore::Detail::SequenceConverter::convert):
+        (WebCore::Detail::SequenceConverter&lt;IDLLong&gt;::convert):
+        (WebCore::Detail::SequenceConverter&lt;IDLFloat&gt;::convert):
+        (WebCore::Detail::SequenceConverter&lt;IDLUnrestrictedFloat&gt;::convert):
+        (WebCore::Detail::SequenceConverter&lt;IDLDouble&gt;::convert):
+        (WebCore::Detail::SequenceConverter&lt;IDLUnrestrictedDouble&gt;::convert):
+        Select the right specialization based on type.
+
+        (WebCore::Converter&lt;IDLSequence&lt;T&gt;&gt;::convert):
+        (WebCore::Converter&lt;IDLFrozenArray&lt;T&gt;&gt;::convert):
+        Rename converter to be more accurate.
+
+        (WebCore::JSConverter&lt;IDLWebGLAny&gt;::convert):
+        Added. Calls through to converter in WebGLAny.h. We should replace this with a
+        call to the IDLUnion JSConverter when feasible.
+
+        * bindings/js/JSWebGL2RenderingContextCustom.cpp:
+        (WebCore::JSWebGL2RenderingContext::getInternalformatParameter): Deleted.
+        (WebCore::JSWebGL2RenderingContext::getQueryParameter): Deleted.
+        (WebCore::JSWebGL2RenderingContext::getSamplerParameter): Deleted.
+        (WebCore::JSWebGL2RenderingContext::getSyncParameter): Deleted.
+        (WebCore::JSWebGL2RenderingContext::getIndexedParameter): Deleted.
+        (WebCore::JSWebGL2RenderingContext::getActiveUniformBlockParameter): Deleted.
+        (WebCore::JSWebGL2RenderingContext::getActiveUniformBlockName): Deleted.
+        Remove unnecessary custom functions.
+
+        * bindings/js/JSWebGLRenderingContextBaseCustom.cpp:
+        (WebCore::objectParameter): Deleted.
+        (WebCore::JSWebGLRenderingContextBase::getAttachedShaders): Deleted.
+        (WebCore::JSWebGLRenderingContextBase::getBufferParameter): Deleted.
+        (WebCore::JSWebGLRenderingContextBase::getFramebufferAttachmentParameter): Deleted.
+        (WebCore::JSWebGLRenderingContextBase::getParameter): Deleted.
+        (WebCore::JSWebGLRenderingContextBase::getProgramParameter): Deleted.
+        (WebCore::JSWebGLRenderingContextBase::getRenderbufferParameter): Deleted.
+        (WebCore::JSWebGLRenderingContextBase::getShaderParameter): Deleted.
+        (WebCore::JSWebGLRenderingContextBase::getSupportedExtensions): Deleted.
+        (WebCore::JSWebGLRenderingContextBase::getTexParameter): Deleted.
+        (WebCore::JSWebGLRenderingContextBase::getUniform): Deleted.
+        (WebCore::JSWebGLRenderingContextBase::getVertexAttrib): Deleted.
+        (WebCore::toNumberVector): Deleted.
+        (WebCore::functionForUniform): Deleted.
+        (WebCore::dataFunctionf): Deleted.
+        (WebCore::dataFunctioni): Deleted.
+        (WebCore::dataFunctionMatrix): Deleted.
+        (WebCore::JSWebGLRenderingContextBase::uniform1fv): Deleted.
+        (WebCore::JSWebGLRenderingContextBase::uniform1iv): Deleted.
+        (WebCore::JSWebGLRenderingContextBase::uniform2fv): Deleted.
+        (WebCore::JSWebGLRenderingContextBase::uniform2iv): Deleted.
+        (WebCore::JSWebGLRenderingContextBase::uniform3fv): Deleted.
+        (WebCore::JSWebGLRenderingContextBase::uniform3iv): Deleted.
+        (WebCore::JSWebGLRenderingContextBase::uniform4fv): Deleted.
+        (WebCore::JSWebGLRenderingContextBase::uniform4iv): Deleted.
+        (WebCore::JSWebGLRenderingContextBase::uniformMatrix2fv): Deleted.
+        (WebCore::JSWebGLRenderingContextBase::uniformMatrix3fv): Deleted.
+        (WebCore::JSWebGLRenderingContextBase::uniformMatrix4fv): Deleted.
+        (WebCore::JSWebGLRenderingContextBase::vertexAttrib1fv): Deleted.
+        (WebCore::JSWebGLRenderingContextBase::vertexAttrib2fv): Deleted.
+        (WebCore::JSWebGLRenderingContextBase::vertexAttrib3fv): Deleted.
+        (WebCore::JSWebGLRenderingContextBase::vertexAttrib4fv): Deleted.
+        Remove unnecessary custom functions.
+
+        * bindings/scripts/CodeGenerator.pm:
+        (IsBuiltinType):
+        Remove specialization of IDBKey.
+
+        * bindings/scripts/CodeGeneratorJS.pm:
+        (GetBaseIDLType):
+        (GetIDLType):
+        (NativeToJSValueDOMConvertNeedsState):
+        (NativeToJSValueDOMConvertNeedsGlobalObject):
+        (NativeToJSValue):
+        Allow IDL files to override the type of signature using a new OverrideIDLType
+        extended attribute. Currently this only works conversion to JS, but could be
+        extended to support more.
+
+        * bindings/scripts/IDLAttributes.txt:
+        Add OverrideIDLType.
+
+        * html/canvas/WebGL2RenderingContext.idl:
+        Add OverrideIDLType=IDLWebGLAny annotations to remove the need for custom functions.
+
+        * html/canvas/WebGLAny.cpp:
+        (WebCore::convertToJSValue):
+        (WebCore::toJS): Deleted.
+        * html/canvas/WebGLAny.h:
+        Rename the toJS function to convertToJSValue to avoid a template specialization issue.
+
+        * html/canvas/WebGLRenderingContextBase.cpp:
+        (WebCore::WebGLRenderingContextBase::getAttachedShaders):
+        Update signature to match IDL, replacing bool return value plus out parameter with an
+        optional return value. Modernize the code a bit.
+
+        (WebCore::WebGLRenderingContextBase::uniform2f):
+        (WebCore::WebGLRenderingContextBase::uniform3f):
+        (WebCore::WebGLRenderingContextBase::uniform4f):
+        (WebCore::WebGLRenderingContextBase::uniform1i):
+        (WebCore::WebGLRenderingContextBase::uniform3i):
+        (WebCore::WebGLRenderingContextBase::uniform4i):
+        (WebCore::WebGLRenderingContextBase::uniform1fv):
+        (WebCore::WebGLRenderingContextBase::uniform2fv):
+        (WebCore::WebGLRenderingContextBase::uniform3fv):
+        (WebCore::WebGLRenderingContextBase::uniform4fv):
+        (WebCore::WebGLRenderingContextBase::uniform1iv):
+        (WebCore::WebGLRenderingContextBase::uniform2iv):
+        (WebCore::WebGLRenderingContextBase::uniform3iv):
+        (WebCore::WebGLRenderingContextBase::uniform4iv):
+        (WebCore::WebGLRenderingContextBase::uniformMatrix2fv):
+        (WebCore::WebGLRenderingContextBase::uniformMatrix3fv):
+        (WebCore::WebGLRenderingContextBase::uniformMatrix4fv):
+        (WebCore::WebGLRenderingContextBase::vertexAttrib4f):
+        (WebCore::WebGLRenderingContextBase::vertexAttrib1fv):
+        (WebCore::WebGLRenderingContextBase::vertexAttrib2fv):
+        (WebCore::WebGLRenderingContextBase::vertexAttrib3fv):
+        (WebCore::WebGLRenderingContextBase::vertexAttrib4fv):
+        (WebCore::WebGLRenderingContextBase::validateUniformParameters):
+        (WebCore::WebGLRenderingContextBase::validateUniformMatrixParameters):
+        (WebCore::WebGLRenderingContextBase::vertexAttribfvImpl):
+        * html/canvas/WebGLRenderingContextBase.h:
+        (WebCore::WebGLRenderingContextBase::TypedList::TypedList):
+        (WebCore::WebGLRenderingContextBase::TypedList::data):
+        (WebCore::WebGLRenderingContextBase::TypedList::length):
+        Re-order/group to match order in the IDL file. Remove overloads taking a pointer and 
+        length, and replace it by having the main function take a specialized TypedList. TypedList
+        allows the bindings to pass the correct Variant type, but then the code to only think in
+        terms of the data() and length() functions.
+
+        * html/canvas/WebGLRenderingContextBase.idl:
+        Remove [Custom] annotations and re-order/group to match the spec. Update types of uniform*fv/iv
+        functions to take typedef'd unions.
+
</ins><span class="cx"> 2017-01-10  Ryosuke Niwa  &lt;rniwa@webkit.org&gt;
</span><span class="cx"> 
</span><span class="cx">         :active and :hover states may not be updated across slots
</span></span></pre></div>
<a id="trunkSourceWebCoreForwardingHeadersruntimeJSGlobalObjectInlinesh"></a>
<div class="addfile"><h4>Added: trunk/Source/WebCore/ForwardingHeaders/runtime/JSGlobalObjectInlines.h (0 => 210567)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ForwardingHeaders/runtime/JSGlobalObjectInlines.h                                (rev 0)
+++ trunk/Source/WebCore/ForwardingHeaders/runtime/JSGlobalObjectInlines.h        2017-01-11 01:02:34 UTC (rev 210567)
</span><span class="lines">@@ -0,0 +1,2 @@
</span><ins>+#pragma once
+#include &lt;JavaScriptCore/JSGlobalObjectInlines.h&gt;
</ins></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbIDBKeyRangeidl"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/IDBKeyRange.idl (210566 => 210567)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/IDBKeyRange.idl        2017-01-10 23:45:22 UTC (rev 210566)
+++ trunk/Source/WebCore/Modules/indexeddb/IDBKeyRange.idl        2017-01-11 01:02:34 UTC (rev 210567)
</span><span class="lines">@@ -28,11 +28,8 @@
</span><span class="cx">     ImplementationLacksVTable,
</span><span class="cx">     EnabledAtRuntime=IndexedDB,
</span><span class="cx"> ] interface IDBKeyRange {
</span><del>-    // NOTE: The 'lower' and 'upper' attributes are specified to be of type 'any'
-    // but we use the extension type IDBKey, to allow code generator to know our
-    // which conversion to use based on our actual implementation type.
-    readonly attribute IDBKey lower;
-    readonly attribute IDBKey upper;
</del><ins>+    [OverrideIDLType=IDLIDBKey] readonly attribute any lower;
+    [OverrideIDLType=IDLIDBKey] readonly attribute any upper;
</ins><span class="cx">     readonly attribute boolean lowerOpen;
</span><span class="cx">     readonly attribute boolean upperOpen;
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCoreWebCorexcodeprojprojectpbxproj"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj (210566 => 210567)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj        2017-01-10 23:45:22 UTC (rev 210566)
+++ trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj        2017-01-11 01:02:34 UTC (rev 210567)
</span><span class="lines">@@ -2610,7 +2610,7 @@
</span><span class="cx">                 6E3FAE8F14733FDB00E42306 /* WebGLCompressedTextureS3TC.h in Headers */ = {isa = PBXBuildFile; fileRef = 6E3FAE8D14733FDB00E42306 /* WebGLCompressedTextureS3TC.h */; };
</span><span class="cx">                 6E3FAE8F14733FDB00E42307 /* WebGLDepthTexture.h in Headers */ = {isa = PBXBuildFile; fileRef = 6E3FAE8D14733FDB00E42307 /* WebGLDepthTexture.h */; };
</span><span class="cx">                 6E47E66010B7944B00B186C8 /* WebGLAny.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 6E47E65E10B7944B00B186C8 /* WebGLAny.cpp */; };
</span><del>-                6E47E66110B7944B00B186C8 /* WebGLAny.h in Headers */ = {isa = PBXBuildFile; fileRef = 6E47E65F10B7944B00B186C8 /* WebGLAny.h */; };
</del><ins>+                6E47E66110B7944B00B186C8 /* WebGLAny.h in Headers */ = {isa = PBXBuildFile; fileRef = 6E47E65F10B7944B00B186C8 /* WebGLAny.h */; settings = {ATTRIBUTES = (Private, ); }; };
</ins><span class="cx">                 6E4ABCD4138EA0B70071D291 /* JSHTMLUnknownElement.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 6E4ABCD2138EA0B70071D291 /* JSHTMLUnknownElement.cpp */; };
</span><span class="cx">                 6E4ABCD5138EA0B70071D291 /* JSHTMLUnknownElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 6E4ABCD3138EA0B70071D291 /* JSHTMLUnknownElement.h */; };
</span><span class="cx">                 6E4E91AF10F7FB3100A2779C /* WebGLContextAttributes.h in Headers */ = {isa = PBXBuildFile; fileRef = 6E4E91AA10F7FB3100A2779C /* WebGLContextAttributes.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="lines">@@ -18362,6 +18362,7 @@
</span><span class="cx">                                 07846384145B1B8E00A58DF1 /* JSTrackCustom.h */,
</span><span class="cx">                                 516BB7920CE91E6800512F79 /* JSTreeWalkerCustom.cpp */,
</span><span class="cx">                                 BE6DF70A171CA2C500DD52B8 /* JSVideoTrackListCustom.cpp */,
</span><ins>+                                D3F3D3591A69A3B00059FC2B /* JSWebGL2RenderingContextCustom.cpp */,
</ins><span class="cx">                                 49EED14C1051971A00099FAB /* JSWebGLRenderingContextCustom.cpp */,
</span><span class="cx">                                 83A4A9F81CE7FD7E00709B00 /* JSXMLDocumentCustom.cpp */,
</span><span class="cx">                                 836C14421CDEAFCA0073493F /* JSXPathNSResolverCustom.cpp */,
</span><span class="lines">@@ -22155,7 +22156,6 @@
</span><span class="cx">                                 07E116B01489C9A100EC5ACE /* JSTextTrackCustom.cpp */,
</span><span class="cx">                                 7C73FB17191EF808007DE061 /* JSUserMessageHandlersNamespaceCustom.cpp */,
</span><span class="cx">                                 BE6DF708171CA2C500DD52B8 /* JSVideoTrackCustom.cpp */,
</span><del>-                                D3F3D3591A69A3B00059FC2B /* JSWebGL2RenderingContextCustom.cpp */,
</del><span class="cx">                                 D3F3D35A1A69A3B00059FC2B /* JSWebGLRenderingContextBaseCustom.cpp */,
</span><span class="cx">                                 E1FF8F661807460800132674 /* JSWebKitSubtleCryptoCustom.cpp */,
</span><span class="cx">                                 E1CA5CBB0E8CDCAF00E8EF90 /* JSWorkerCustom.cpp */,
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsIDLTypesh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/IDLTypes.h (210566 => 210567)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/IDLTypes.h        2017-01-10 23:45:22 UTC (rev 210566)
+++ trunk/Source/WebCore/bindings/IDLTypes.h        2017-01-11 01:02:34 UTC (rev 210567)
</span><span class="lines">@@ -31,6 +31,10 @@
</span><span class="cx"> #include &lt;wtf/StdLibExtras.h&gt;
</span><span class="cx"> #include &lt;wtf/text/WTFString.h&gt;
</span><span class="cx"> 
</span><ins>+#if ENABLE(WEBGL)
+#include &quot;WebGLAny.h&quot;
+#endif
+
</ins><span class="cx"> namespace JSC {
</span><span class="cx"> class ArrayBuffer;
</span><span class="cx"> class ArrayBufferView;
</span><span class="lines">@@ -41,6 +45,7 @@
</span><span class="cx"> 
</span><span class="cx"> namespace WebCore {
</span><span class="cx"> 
</span><ins>+class IDBKey;
</ins><span class="cx"> template&lt;typename&gt; class DOMPromise;
</span><span class="cx"> 
</span><span class="cx"> template&lt;typename T&gt;
</span><span class="lines">@@ -83,13 +88,11 @@
</span><span class="cx"> struct IDLLongLong : IDLInteger&lt;int64_t&gt; { };
</span><span class="cx"> struct IDLUnsignedLongLong : IDLInteger&lt;uint64_t&gt; { };
</span><span class="cx"> 
</span><del>-template&lt;typename FloatingPointType, bool unrestricted = false&gt; struct IDLFloatingPoint : IDLNumber&lt;FloatingPointType&gt; {
-    static constexpr bool isUnrestricted = unrestricted;
-};
</del><ins>+template&lt;typename FloatingPointType&gt; struct IDLFloatingPoint : IDLNumber&lt;FloatingPointType&gt; { };
</ins><span class="cx"> struct IDLFloat : IDLFloatingPoint&lt;float&gt; { };
</span><del>-struct IDLUnrestrictedFloat : IDLFloatingPoint&lt;float, true&gt; { };
</del><ins>+struct IDLUnrestrictedFloat : IDLFloatingPoint&lt;float&gt; { };
</ins><span class="cx"> struct IDLDouble : IDLFloatingPoint&lt;double&gt; { };
</span><del>-struct IDLUnrestrictedDouble : IDLFloatingPoint&lt;double, true&gt; { };
</del><ins>+struct IDLUnrestrictedDouble : IDLFloatingPoint&lt;double&gt; { };
</ins><span class="cx"> 
</span><span class="cx"> struct IDLString : IDLType&lt;String&gt; {
</span><span class="cx">     using ParameterType = const String&amp;;
</span><span class="lines">@@ -190,8 +193,13 @@
</span><span class="cx"> template&lt;typename T&gt; struct IDLSerializedScriptValue : IDLWrapper&lt;T&gt; { };
</span><span class="cx"> template&lt;typename T&gt; struct IDLEventListener : IDLWrapper&lt;T&gt; { };
</span><span class="cx"> template&lt;typename T&gt; struct IDLXPathNSResolver : IDLWrapper&lt;T&gt; { };
</span><del>-template&lt;typename T&gt; struct IDLIDBKey : IDLWrapper&lt;T&gt; { };
</del><span class="cx"> 
</span><ins>+struct IDLIDBKey : IDLWrapper&lt;IDBKey&gt; { };
+
+#if ENABLE(WEBGL)
+struct IDLWebGLAny : IDLType&lt;WebGLAny&gt; { };
+#endif
+
</ins><span class="cx"> // Non-WebIDL convenience type aliases
</span><span class="cx"> 
</span><span class="cx"> using IDLBufferSource = IDLUnion&lt;IDLInterface&lt;JSC::ArrayBufferView&gt;, IDLInterface&lt;JSC::ArrayBuffer&gt;&gt;;
</span><span class="lines">@@ -223,4 +231,7 @@
</span><span class="cx"> template&lt;typename T&gt;
</span><span class="cx"> struct IsIDLInteger : public std::integral_constant&lt;bool, WTF::IsBaseOfTemplate&lt;IDLInteger, T&gt;::value&gt; { };
</span><span class="cx"> 
</span><ins>+template&lt;typename T&gt;
+struct IsIDLFloatingPoint : public std::integral_constant&lt;bool, WTF::IsBaseOfTemplate&lt;IDLFloatingPoint, T&gt;::value&gt; { };
+
</ins><span class="cx"> } // namespace WebCore
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsjsJSDOMConverth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/js/JSDOMConvert.h (210566 => 210567)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/JSDOMConvert.h        2017-01-10 23:45:22 UTC (rev 210566)
+++ trunk/Source/WebCore/bindings/js/JSDOMConvert.h        2017-01-11 01:02:34 UTC (rev 210567)
</span><span class="lines">@@ -29,6 +29,7 @@
</span><span class="cx"> #include &quot;IDBBindingUtilities.h&quot;
</span><span class="cx"> #include &quot;IDLTypes.h&quot;
</span><span class="cx"> #include &quot;JSDOMBinding.h&quot;
</span><ins>+#include &lt;runtime/JSGlobalObjectInlines.h&gt;
</ins><span class="cx"> #include &lt;runtime/JSONObject.h&gt;
</span><span class="cx"> 
</span><span class="cx"> namespace WebCore {
</span><span class="lines">@@ -583,6 +584,11 @@
</span><span class="cx"> };
</span><span class="cx"> 
</span><span class="cx"> template&lt;&gt; struct Converter&lt;IDLLong&gt; : DefaultConverter&lt;IDLLong&gt; {
</span><ins>+    static inline int32_t convert(JSC::ExecState&amp;, JSC::ThrowScope&amp;, double number)
+    {
+        return JSC::toInt32(number);
+    }
+
</ins><span class="cx">     static int32_t convert(JSC::ExecState&amp; state, JSC::JSValue value, IntegerConversionConfiguration configuration = IntegerConversionConfiguration::Normal)
</span><span class="cx">     {
</span><span class="cx">         switch (configuration) {
</span><span class="lines">@@ -700,6 +706,14 @@
</span><span class="cx"> // MARK: Floating point types
</span><span class="cx"> 
</span><span class="cx"> template&lt;&gt; struct Converter&lt;IDLFloat&gt; : DefaultConverter&lt;IDLFloat&gt; {
</span><ins>+
+    static inline float convert(JSC::ExecState&amp; state, JSC::ThrowScope&amp; scope, double number)
+    {
+        if (UNLIKELY(!std::isfinite(number)))
+            throwNonFiniteTypeError(state, scope);
+        return static_cast&lt;float&gt;(number);
+    }
+
</ins><span class="cx">     static float convert(JSC::ExecState&amp; state, JSC::JSValue value)
</span><span class="cx">     {
</span><span class="cx">         JSC::VM&amp; vm = state.vm();
</span><span class="lines">@@ -724,6 +738,11 @@
</span><span class="cx"> };
</span><span class="cx"> 
</span><span class="cx"> template&lt;&gt; struct Converter&lt;IDLUnrestrictedFloat&gt; : DefaultConverter&lt;IDLUnrestrictedFloat&gt; {
</span><ins>+    static inline float convert(JSC::ExecState&amp;, JSC::ThrowScope&amp;, double number)
+    {
+        return static_cast&lt;float&gt;(number);
+    }
+
</ins><span class="cx">     static float convert(JSC::ExecState&amp; state, JSC::JSValue value)
</span><span class="cx">     {
</span><span class="cx">         return static_cast&lt;float&gt;(value.toNumber(&amp;state));
</span><span class="lines">@@ -743,6 +762,13 @@
</span><span class="cx"> };
</span><span class="cx"> 
</span><span class="cx"> template&lt;&gt; struct Converter&lt;IDLDouble&gt; : DefaultConverter&lt;IDLDouble&gt; {
</span><ins>+    static inline double convert(JSC::ExecState&amp; state, JSC::ThrowScope&amp; scope, double number)
+    {
+        if (UNLIKELY(!std::isfinite(number)))
+            throwNonFiniteTypeError(state, scope);
+        return number;
+    }
+
</ins><span class="cx">     static double convert(JSC::ExecState&amp; state, JSC::JSValue value)
</span><span class="cx">     {
</span><span class="cx">         JSC::VM&amp; vm = state.vm();
</span><span class="lines">@@ -767,6 +793,11 @@
</span><span class="cx"> };
</span><span class="cx"> 
</span><span class="cx"> template&lt;&gt; struct Converter&lt;IDLUnrestrictedDouble&gt; : DefaultConverter&lt;IDLUnrestrictedDouble&gt; {
</span><ins>+    static inline double convert(JSC::ExecState&amp;, JSC::ThrowScope&amp;, double number)
+    {
+        return number;
+    }
+
</ins><span class="cx">     static double convert(JSC::ExecState&amp; state, JSC::JSValue value)
</span><span class="cx">     {
</span><span class="cx">         return value.toNumber(&amp;state);
</span><span class="lines">@@ -875,21 +906,125 @@
</span><span class="cx"> 
</span><span class="cx"> namespace Detail {
</span><span class="cx">     template&lt;typename IDLType&gt;
</span><del>-    struct ArrayConverterBase;
</del><ins>+    struct GenericSequenceConverter {
+        using ReturnType = Vector&lt;typename IDLType::ImplementationType&gt;;
</ins><span class="cx"> 
</span><del>-    template&lt;typename IDLType&gt; 
-    struct ArrayConverterBase {
-        using ReturnType = Vector&lt;typename IDLType::ImplementationType&gt;;
</del><ins>+        static ReturnType convert(JSC::ExecState&amp; state, JSC::JSObject* jsObject)
+        {
+            ReturnType result;
+            forEachInIterable(&amp;state, jsObject, [&amp;result](JSC::VM&amp; vm, JSC::ExecState* state, JSC::JSValue jsValue) {
+                auto scope = DECLARE_THROW_SCOPE(vm);
+
+                auto convertedValue = Converter&lt;IDLType&gt;::convert(*state, jsValue);
+                if (UNLIKELY(scope.exception()))
+                    return;
+                result.append(WTFMove(convertedValue));
+            });
+            return result;
+        }
</ins><span class="cx">     };
</span><span class="cx"> 
</span><del>-    template&lt;typename T&gt;
-    struct ArrayConverterBase&lt;IDLInterface&lt;T&gt;&gt; {
-        using ReturnType = Vector&lt;RefPtr&lt;T&gt;&gt;;
</del><ins>+    // Specialization for numeric types
+    // FIXME: This is only implemented for the IDLFloatingPointTypes and IDLLong. To add
+    // support for more numeric types, add an overload of Converter&lt;IDLType&gt;::convert that
+    // takes an ExecState, ThrowScope, double as its arguments.
+    template&lt;typename IDLType&gt;
+    struct NumericSequenceConverter {
+        using GenericConverter = GenericSequenceConverter&lt;IDLType&gt;;
+        using ReturnType = typename GenericConverter::ReturnType;
+
+        static ReturnType convert(JSC::ExecState&amp; state, JSC::JSValue value)
+        {
+            auto&amp; vm = state.vm();
+            auto scope = DECLARE_THROW_SCOPE(vm);
+
+            if (!value.isObject()) {
+                throwSequenceTypeError(state, scope);
+                return { };
+            }
+
+            JSC::JSObject* object = JSC::asObject(value);
+            if (!JSC::isJSArray(object))
+                return GenericConverter::convert(state, object);
+
+            JSC::JSArray* array = JSC::asArray(object);
+            if (!array-&gt;globalObject()-&gt;isArrayIteratorProtocolFastAndNonObservable())
+                return GenericConverter::convert(state, object);
+
+            unsigned length = array-&gt;length();
+
+            ReturnType result;
+            if (!result.tryReserveCapacity(length)) {
+                // FIXME: Is the right exception to throw?
+                throwTypeError(&amp;state, scope);
+                return { };
+            }
+
+            JSC::IndexingType indexingType = array-&gt;indexingType() &amp; JSC::IndexingShapeMask;
+
+            if (indexingType == JSC::ContiguousShape) {
+                for (unsigned i = 0; i &lt; length; i++) {
+                    auto indexValue = array-&gt;butterfly()-&gt;contiguous()[i].get();
+                    if (!indexValue)
+                        result.uncheckedAppend(0);
+                    else {
+                        auto convertedValue = Converter&lt;IDLType&gt;::convert(state, indexValue);
+                        RETURN_IF_EXCEPTION(scope, { });
+
+                        result.uncheckedAppend(convertedValue);
+                    }
+                }
+                return result;
+            }
+            
+            if (indexingType == JSC::Int32Shape) {
+                for (unsigned i = 0; i &lt; length; i++) {
+                    auto indexValue = array-&gt;butterfly()-&gt;contiguousInt32()[i].get();
+                    ASSERT(!indexValue || indexValue.isInt32());
+                    if (!indexValue)
+                        result.uncheckedAppend(0);
+                    else
+                        result.uncheckedAppend(indexValue.asInt32());
+                }
+                return result;
+            }
+
+            if (indexingType == JSC::DoubleShape) {
+                for (unsigned i = 0; i &lt; length; i++) {
+                    auto doubleValue = array-&gt;butterfly()-&gt;contiguousDouble()[i];
+                    if (std::isnan(doubleValue))
+                        result.uncheckedAppend(0);
+                    else {
+                        auto convertedValue = Converter&lt;IDLType&gt;::convert(state, scope, doubleValue);
+                        RETURN_IF_EXCEPTION(scope, { });
+
+                        result.uncheckedAppend(convertedValue);
+                    }
+                }
+                return result;
+            }
+
+            for (unsigned i = 0; i &lt; length; i++) {
+                auto indexValue = array-&gt;getDirectIndex(&amp;state, i);
+                RETURN_IF_EXCEPTION(scope, { });
+                
+                if (!indexValue)
+                    result.uncheckedAppend(0);
+                else {
+                    auto convertedValue = Converter&lt;IDLType&gt;::convert(state, indexValue);
+                    RETURN_IF_EXCEPTION(scope, { });
+                    
+                    result.uncheckedAppend(convertedValue);
+                }
+            }
+            return result;
+        }
</ins><span class="cx">     };
</span><span class="cx"> 
</span><span class="cx">     template&lt;typename IDLType&gt;
</span><del>-    struct ArrayConverter : ArrayConverterBase&lt;IDLType&gt; {
-        using ReturnType = typename ArrayConverterBase&lt;IDLType&gt;::ReturnType;
</del><ins>+    struct SequenceConverter {
+        using GenericConverter = GenericSequenceConverter&lt;IDLType&gt;;
+        using ReturnType = typename GenericConverter::ReturnType;
</ins><span class="cx"> 
</span><span class="cx">         static ReturnType convert(JSC::ExecState&amp; state, JSC::JSValue value)
</span><span class="cx">         {
</span><span class="lines">@@ -901,26 +1036,112 @@
</span><span class="cx">                 return { };
</span><span class="cx">             }
</span><span class="cx"> 
</span><ins>+            JSC::JSObject* object = JSC::asObject(value);
+            if (!JSC::isJSArray(object))
+                return GenericConverter::convert(state, object);
+
+            JSC::JSArray* array = JSC::asArray(object);
+            if (!array-&gt;globalObject()-&gt;isArrayIteratorProtocolFastAndNonObservable())
+                return GenericConverter::convert(state, object);
+
+            unsigned length = array-&gt;length();
+
</ins><span class="cx">             ReturnType result;
</span><del>-            forEachInIterable(&amp;state, value, [&amp;result](JSC::VM&amp; vm, JSC::ExecState* state, JSC::JSValue jsValue) {
-                auto scope = DECLARE_THROW_SCOPE(vm);
</del><ins>+            if (!result.tryReserveCapacity(length)) {
+                // FIXME: Is the right exception to throw?
+                throwTypeError(&amp;state, scope);
+                return { };
+            }
</ins><span class="cx"> 
</span><del>-                auto convertedValue = Converter&lt;IDLType&gt;::convert(*state, jsValue);
-                if (UNLIKELY(scope.exception()))
-                    return;
-                result.append(WTFMove(convertedValue));
-            });
</del><ins>+            JSC::IndexingType indexingType = array-&gt;indexingType() &amp; JSC::IndexingShapeMask;
+
+            if (indexingType == JSC::ContiguousShape) {
+                for (unsigned i = 0; i &lt; length; i++) {
+                    auto indexValue = array-&gt;butterfly()-&gt;contiguous()[i].get();
+                    if (!indexValue)
+                        indexValue = JSC::jsUndefined();
+
+                    auto convertedValue = Converter&lt;IDLType&gt;::convert(state, indexValue);
+                    RETURN_IF_EXCEPTION(scope, { });
+
+                    result.uncheckedAppend(convertedValue);
+                }
+                return result;
+            }
+
+            for (unsigned i = 0; i &lt; length; i++) {
+                auto indexValue = array-&gt;getDirectIndex(&amp;state, i);
+                RETURN_IF_EXCEPTION(scope, { });
+
+                if (!indexValue)
+                    indexValue = JSC::jsUndefined();
+
+                auto convertedValue = Converter&lt;IDLType&gt;::convert(state, indexValue);
+                RETURN_IF_EXCEPTION(scope, { });
+                
+                result.uncheckedAppend(convertedValue);
+            }
</ins><span class="cx">             return result;
</span><span class="cx">         }
</span><span class="cx">     };
</span><ins>+
+    template&lt;&gt;
+    struct SequenceConverter&lt;IDLLong&gt; {
+        using ReturnType = typename GenericSequenceConverter&lt;IDLLong&gt;::ReturnType;
+
+        static ReturnType convert(JSC::ExecState&amp; state, JSC::JSValue value)
+        {
+            return NumericSequenceConverter&lt;IDLLong&gt;::convert(state, value);
+        }
+    };
+
+    template&lt;&gt;
+    struct SequenceConverter&lt;IDLFloat&gt; {
+        using ReturnType = typename GenericSequenceConverter&lt;IDLFloat&gt;::ReturnType;
+
+        static ReturnType convert(JSC::ExecState&amp; state, JSC::JSValue value)
+        {
+            return NumericSequenceConverter&lt;IDLFloat&gt;::convert(state, value);
+        }
+    };
+
+    template&lt;&gt;
+    struct SequenceConverter&lt;IDLUnrestrictedFloat&gt; {
+        using ReturnType = typename GenericSequenceConverter&lt;IDLUnrestrictedFloat&gt;::ReturnType;
+
+        static ReturnType convert(JSC::ExecState&amp; state, JSC::JSValue value)
+        {
+            return NumericSequenceConverter&lt;IDLUnrestrictedFloat&gt;::convert(state, value);
+        }
+    };
+
+    template&lt;&gt;
+    struct SequenceConverter&lt;IDLDouble&gt; {
+        using ReturnType = typename GenericSequenceConverter&lt;IDLDouble&gt;::ReturnType;
+
+        static ReturnType convert(JSC::ExecState&amp; state, JSC::JSValue value)
+        {
+            return NumericSequenceConverter&lt;IDLDouble&gt;::convert(state, value);
+        }
+    };
+
+    template&lt;&gt;
+    struct SequenceConverter&lt;IDLUnrestrictedDouble&gt; {
+        using ReturnType = typename GenericSequenceConverter&lt;IDLUnrestrictedDouble&gt;::ReturnType;
+
+        static ReturnType convert(JSC::ExecState&amp; state, JSC::JSValue value)
+        {
+            return NumericSequenceConverter&lt;IDLUnrestrictedDouble&gt;::convert(state, value);
+        }
+    };
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> template&lt;typename T&gt; struct Converter&lt;IDLSequence&lt;T&gt;&gt; : DefaultConverter&lt;IDLSequence&lt;T&gt;&gt; {
</span><del>-    using ReturnType = typename Detail::ArrayConverter&lt;T&gt;::ReturnType;
</del><ins>+    using ReturnType = typename Detail::SequenceConverter&lt;T&gt;::ReturnType;
</ins><span class="cx"> 
</span><span class="cx">     static ReturnType convert(JSC::ExecState&amp; state, JSC::JSValue value)
</span><span class="cx">     {
</span><del>-        return Detail::ArrayConverter&lt;T&gt;::convert(state, value);
</del><ins>+        return Detail::SequenceConverter&lt;T&gt;::convert(state, value);
</ins><span class="cx">     }
</span><span class="cx"> };
</span><span class="cx"> 
</span><span class="lines">@@ -939,11 +1160,11 @@
</span><span class="cx"> };
</span><span class="cx"> 
</span><span class="cx"> template&lt;typename T&gt; struct Converter&lt;IDLFrozenArray&lt;T&gt;&gt; : DefaultConverter&lt;IDLFrozenArray&lt;T&gt;&gt; {
</span><del>-    using ReturnType = typename Detail::ArrayConverter&lt;T&gt;::ReturnType;
</del><ins>+    using ReturnType = typename Detail::SequenceConverter&lt;T&gt;::ReturnType;
</ins><span class="cx"> 
</span><span class="cx">     static ReturnType convert(JSC::ExecState&amp; state, JSC::JSValue value)
</span><span class="cx">     {
</span><del>-        return Detail::ArrayConverter&lt;T&gt;::convert(state, value);
</del><ins>+        return Detail::SequenceConverter&lt;T&gt;::convert(state, value);
</ins><span class="cx">     }
</span><span class="cx"> };
</span><span class="cx"> 
</span><span class="lines">@@ -1577,7 +1798,7 @@
</span><span class="cx"> // MARK: -
</span><span class="cx"> // MARK: IDLIDBKey type
</span><span class="cx"> 
</span><del>-template&lt;typename T&gt; struct JSConverter&lt;IDLIDBKey&lt;T&gt;&gt; {
</del><ins>+template&lt;&gt; struct JSConverter&lt;IDLIDBKey&gt; {
</ins><span class="cx">     static constexpr bool needsState = true;
</span><span class="cx">     static constexpr bool needsGlobalObject = true;
</span><span class="cx"> 
</span><span class="lines">@@ -1588,7 +1809,24 @@
</span><span class="cx">     }
</span><span class="cx"> };
</span><span class="cx"> 
</span><ins>+#if ENABLE(WEBGL)
+
</ins><span class="cx"> // MARK: -
</span><ins>+// MARK: IDLWebGLAny type
+
+template&lt;&gt; struct JSConverter&lt;IDLWebGLAny&gt; {
+    static constexpr bool needsState = true;
+    static constexpr bool needsGlobalObject = true;
+
+    static JSC::JSValue convert(JSC::ExecState&amp; state, JSDOMGlobalObject&amp; globalObject, const WebGLAny&amp; value)
+    {
+        return convertToJSValue(state, globalObject, value);
+    }
+};
+
+#endif
+
+// MARK: -
</ins><span class="cx"> // MARK: Support for variadic tail convertions
</span><span class="cx"> 
</span><span class="cx"> namespace Detail {
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsjsJSWebGL2RenderingContextCustomcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/js/JSWebGL2RenderingContextCustom.cpp (210566 => 210567)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/JSWebGL2RenderingContextCustom.cpp        2017-01-10 23:45:22 UTC (rev 210566)
+++ trunk/Source/WebCore/bindings/js/JSWebGL2RenderingContextCustom.cpp        2017-01-11 01:02:34 UTC (rev 210567)
</span><span class="lines">@@ -28,9 +28,7 @@
</span><span class="cx"> #if ENABLE(WEBGL) &amp;&amp; ENABLE(WEBGL2)
</span><span class="cx"> 
</span><span class="cx"> #include &quot;JSWebGL2RenderingContext.h&quot;
</span><del>-#include &quot;NotImplemented.h&quot;
</del><span class="cx"> #include &lt;heap/HeapInlines.h&gt;
</span><del>-#include &lt;runtime/Error.h&gt;
</del><span class="cx"> 
</span><span class="cx"> using namespace JSC;
</span><span class="cx"> 
</span><span class="lines">@@ -41,51 +39,6 @@
</span><span class="cx">     visitor.addOpaqueRoot(&amp;wrapped());
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-JSValue JSWebGL2RenderingContext::getInternalformatParameter(ExecState&amp;)
-{
-    return jsUndefined();
-}
-
-JSValue JSWebGL2RenderingContext::getQueryParameter(ExecState&amp;)
-{
-    return jsUndefined();
-}
-
-JSValue JSWebGL2RenderingContext::getSamplerParameter(ExecState&amp;)
-{
-    return jsUndefined();
-}
-
-JSValue JSWebGL2RenderingContext::getSyncParameter(ExecState&amp;)
-{
-    return jsUndefined();
-}
-
-JSValue JSWebGL2RenderingContext::getIndexedParameter(ExecState&amp; state)
-{
-    VM&amp; vm = state.vm();
-    auto scope = DECLARE_THROW_SCOPE(vm);
-
-    if (state.argumentCount() &lt; 2)
-        return throwException(&amp;state, scope, createNotEnoughArgumentsError(&amp;state));
-
-    unsigned pname = state.uncheckedArgument(0).toInt32(&amp;state);
-    RETURN_IF_EXCEPTION(scope, JSValue());
-    unsigned index = state.uncheckedArgument(1).toInt32(&amp;state);
-    RETURN_IF_EXCEPTION(scope, JSValue());
-    return toJS(state, *globalObject(), wrapped().getIndexedParameter(pname, index));
-}
-
-JSValue JSWebGL2RenderingContext::getActiveUniformBlockParameter(ExecState&amp;)
-{
-    return jsUndefined();
-}
-
-JSValue JSWebGL2RenderingContext::getActiveUniformBlockName(ExecState&amp;)
-{
-    return jsUndefined();
-}
-
</del><span class="cx"> } // namespace WebCore
</span><span class="cx"> 
</span><span class="cx"> #endif // ENABLE(WEBGL)
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsjsJSWebGLRenderingContextBaseCustomcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/js/JSWebGLRenderingContextBaseCustom.cpp (210566 => 210567)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/JSWebGLRenderingContextBaseCustom.cpp        2017-01-10 23:45:22 UTC (rev 210566)
+++ trunk/Source/WebCore/bindings/js/JSWebGLRenderingContextBaseCustom.cpp        2017-01-11 01:02:34 UTC (rev 210567)
</span><span class="lines">@@ -123,21 +123,6 @@
</span><span class="cx">     return wrap(state, globalObject, object);
</span><span class="cx"> }
</span><span class="cx">     
</span><del>-static JSValue objectParameter(JSWebGLRenderingContextBase&amp; context, ExecState&amp; state, WebGLAny (WebGLRenderingContextBase::*getter)(GC3Denum target, GC3Denum pname))
-{
-    VM&amp; vm = state.vm();
-    auto scope = DECLARE_THROW_SCOPE(vm);
-
-    if (state.argumentCount() != 2)
-        return throwException(&amp;state, scope, createNotEnoughArgumentsError(&amp;state));
-    
-    auto target = state.uncheckedArgument(0).toInt32(&amp;state);
-    RETURN_IF_EXCEPTION(scope, { });
-    auto pname = state.uncheckedArgument(1).toInt32(&amp;state);
-    RETURN_IF_EXCEPTION(scope, { });
-    return toJS(state, *context.globalObject(), (context.wrapped().*getter)(target, pname));
-}
-
</del><span class="cx"> static JSValue toJS(ExecState&amp; state, JSDOMGlobalObject&amp; globalObject, WebGLExtension* extension)
</span><span class="cx"> {
</span><span class="cx">     if (!extension)
</span><span class="lines">@@ -203,26 +188,6 @@
</span><span class="cx">     visitor.addOpaqueRoot(root(wrapped().canvas()));
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-JSValue JSWebGLRenderingContextBase::getAttachedShaders(ExecState&amp; state)
-{
-    VM&amp; vm = state.vm();
-    auto scope = DECLARE_THROW_SCOPE(vm);
-
-    if (state.argumentCount() &lt; 1)
-        return throwException(&amp;state, scope, createNotEnoughArgumentsError(&amp;state));
-    auto&amp; context = wrapped();
-    auto* program = JSWebGLProgram::toWrapped(state.uncheckedArgument(0));
-    if (!program &amp;&amp; !state.uncheckedArgument(0).isUndefinedOrNull())
-        return throwTypeError(&amp;state, scope);
-    Vector&lt;RefPtr&lt;WebGLShader&gt;&gt; shaders;
-    if (!context.getAttachedShaders(program, shaders))
-        return jsNull();
-    MarkedArgumentBuffer list;
-    for (auto&amp; shader : shaders)
-        list.append(toJS(&amp;state, globalObject(), shader.get()));
-    return constructArray(&amp;state, 0, globalObject(), list);
-}
-
</del><span class="cx"> JSValue JSWebGLRenderingContextBase::getExtension(ExecState&amp; state)
</span><span class="cx"> {
</span><span class="cx">     VM&amp; vm = state.vm();
</span><span class="lines">@@ -236,423 +201,6 @@
</span><span class="cx">     return toJS(state, *globalObject(), wrapped().getExtension(name));
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-JSValue JSWebGLRenderingContextBase::getBufferParameter(ExecState&amp; state)
-{
-    return objectParameter(*this, state, &amp;WebGLRenderingContextBase::getBufferParameter);
-}
-
-JSValue JSWebGLRenderingContextBase::getFramebufferAttachmentParameter(ExecState&amp; state)
-{
-    VM&amp; vm = state.vm();
-    auto scope = DECLARE_THROW_SCOPE(vm);
-
-    if (state.argumentCount() != 3)
-        return throwException(&amp;state, scope, createNotEnoughArgumentsError(&amp;state));
-    
-    auto target = state.uncheckedArgument(0).toInt32(&amp;state);
-    RETURN_IF_EXCEPTION(scope, { });
-    auto attachment = state.uncheckedArgument(1).toInt32(&amp;state);
-    RETURN_IF_EXCEPTION(scope, { });
-    auto pname = state.uncheckedArgument(2).toInt32(&amp;state);
-    RETURN_IF_EXCEPTION(scope, { });
-    return toJS(state, *globalObject(), wrapped().getFramebufferAttachmentParameter(target, attachment, pname));
-}
-
-JSValue JSWebGLRenderingContextBase::getParameter(ExecState&amp; state)
-{
-    VM&amp; vm = state.vm();
-    auto scope = DECLARE_THROW_SCOPE(vm);
-
-    if (state.argumentCount() != 1)
-        return throwException(&amp;state, scope, createNotEnoughArgumentsError(&amp;state));
-    
-    auto pname = state.uncheckedArgument(0).toInt32(&amp;state);
-    RETURN_IF_EXCEPTION(scope, { });
-    return toJS(state, *globalObject(), wrapped().getParameter(pname));
-}
-
-JSValue JSWebGLRenderingContextBase::getProgramParameter(ExecState&amp; state)
-{
-    VM&amp; vm = state.vm();
-    auto scope = DECLARE_THROW_SCOPE(vm);
-
-    if (state.argumentCount() != 2)
-        return throwException(&amp;state, scope, createNotEnoughArgumentsError(&amp;state));
-    
-    auto* program = JSWebGLProgram::toWrapped(state.uncheckedArgument(0));
-    if (!program &amp;&amp; !state.uncheckedArgument(0).isUndefinedOrNull())
-        return throwTypeError(&amp;state, scope);
-    auto pname = state.uncheckedArgument(1).toInt32(&amp;state);
-    RETURN_IF_EXCEPTION(scope, { });
-    return toJS(state, *globalObject(), wrapped().getProgramParameter(program, pname));
-}
-
-JSValue JSWebGLRenderingContextBase::getRenderbufferParameter(ExecState&amp; state)
-{
-    return objectParameter(*this, state, &amp;WebGLRenderingContextBase::getRenderbufferParameter);
-}
-
-JSValue JSWebGLRenderingContextBase::getShaderParameter(ExecState&amp; state)
-{
-    VM&amp; vm = state.vm();
-    auto scope = DECLARE_THROW_SCOPE(vm);
-
-    if (state.argumentCount() != 2)
-        return throwException(&amp;state, scope, createNotEnoughArgumentsError(&amp;state));
-    
-    if (!state.uncheckedArgument(0).isUndefinedOrNull() &amp;&amp; !state.uncheckedArgument(0).inherits(JSWebGLShader::info()))
-        return throwTypeError(&amp;state, scope);
-    WebGLShader* shader = JSWebGLShader::toWrapped(state.uncheckedArgument(0));
-    unsigned pname = state.uncheckedArgument(1).toInt32(&amp;state);
-    RETURN_IF_EXCEPTION(scope, { });
-    return toJS(state, *globalObject(), wrapped().getShaderParameter(shader, pname));
-}
-
-JSValue JSWebGLRenderingContextBase::getSupportedExtensions(ExecState&amp; state)
-{
-    WebGLRenderingContextBase&amp; context = wrapped();
-    if (context.isContextLost())
-        return jsNull();
-    MarkedArgumentBuffer list;
-    for (auto&amp; extension : context.getSupportedExtensions())
-        list.append(jsStringWithCache(&amp;state, extension));
-    return constructArray(&amp;state, 0, globalObject(), list);
-}
-
-JSValue JSWebGLRenderingContextBase::getTexParameter(ExecState&amp; state)
-{
-    return objectParameter(*this, state, &amp;WebGLRenderingContextBase::getTexParameter);
-}
-
-JSValue JSWebGLRenderingContextBase::getUniform(ExecState&amp; state)
-{
-    VM&amp; vm = state.vm();
-    auto scope = DECLARE_THROW_SCOPE(vm);
-
-    if (state.argumentCount() != 2)
-        return throwException(&amp;state, scope, createNotEnoughArgumentsError(&amp;state));
-    
-    WebGLProgram* program = JSWebGLProgram::toWrapped(state.uncheckedArgument(0));
-    if (!program &amp;&amp; !state.uncheckedArgument(0).isUndefinedOrNull())
-        return throwTypeError(&amp;state, scope);
-    WebGLUniformLocation* location = JSWebGLUniformLocation::toWrapped(state.uncheckedArgument(1));
-    if (!location &amp;&amp; !state.uncheckedArgument(1).isUndefinedOrNull())
-        return throwTypeError(&amp;state, scope);
-    return toJS(state, *globalObject(), wrapped().getUniform(program, location));
-}
-
-JSValue JSWebGLRenderingContextBase::getVertexAttrib(ExecState&amp; state)
-{
-    return objectParameter(*this, state, &amp;WebGLRenderingContextBase::getVertexAttrib);
-}
-
-template&lt;typename VectorType&gt; bool toNumberVector(ExecState&amp; state, JSValue value, VectorType&amp; vector)
-{
-    VM&amp; vm = state.vm();
-    auto scope = DECLARE_THROW_SCOPE(vm);
-
-    if (!value.isObject())
-        return false;
-
-    auto&amp; object = *asObject(value);
-    int32_t length = object.get(&amp;state, state.vm().propertyNames-&gt;length).toInt32(&amp;state);
-
-    if (!vector.tryReserveCapacity(length))
-        return false;
-
-    for (int32_t i = 0; i &lt; length; ++i) {
-        auto value = object.get(&amp;state, i);
-        RETURN_IF_EXCEPTION(scope, false);
-        vector.uncheckedAppend(value.toNumber(&amp;state));
-        RETURN_IF_EXCEPTION(scope, false);
-    }
-
-    return true;
-}
-
-enum DataFunctionToCall {
-    f_uniform1v, f_uniform2v, f_uniform3v, f_uniform4v,
-    f_vertexAttrib1v, f_vertexAttrib2v, f_vertexAttrib3v, f_vertexAttrib4v
-};
-
-enum DataFunctionMatrixToCall {
-    f_uniformMatrix2fv, f_uniformMatrix3fv, f_uniformMatrix4fv
-};
-
-static inline bool functionForUniform(DataFunctionToCall f)
-{
-    switch (f) {
-    case f_uniform1v:
-    case f_uniform2v:
-    case f_uniform3v:
-    case f_uniform4v:
-        return true;
-    default:
-        return false;
-    }
-}
-
-static JSValue dataFunctionf(DataFunctionToCall f, ExecState&amp; state, WebGLRenderingContextBase&amp; context)
-{
-    VM&amp; vm = state.vm();
-    auto scope = DECLARE_THROW_SCOPE(vm);
-
-    if (state.argumentCount() != 2)
-        return throwException(&amp;state, scope, createNotEnoughArgumentsError(&amp;state));
-    
-    WebGLUniformLocation* location = nullptr;
-    GLuint index = -1;
-
-    if (functionForUniform(f)) {
-        location = JSWebGLUniformLocation::toWrapped(state.uncheckedArgument(0));
-        if (!location &amp;&amp; !state.uncheckedArgument(0).isUndefinedOrNull())
-            return throwTypeError(&amp;state, scope);
-    } else {
-        index = state.uncheckedArgument(0).toInt32(&amp;state);
-        RETURN_IF_EXCEPTION(scope, { });
-    }
-
-    if (auto webGLArray = toUnsharedFloat32Array(state.uncheckedArgument(1))) {
-        switch (f) {
-        case f_uniform1v:
-            context.uniform1fv(location, *webGLArray);
-            break;
-        case f_uniform2v:
-            context.uniform2fv(location, *webGLArray);
-            break;
-        case f_uniform3v:
-            context.uniform3fv(location, *webGLArray);
-            break;
-        case f_uniform4v:
-            context.uniform4fv(location, *webGLArray);
-            break;
-        case f_vertexAttrib1v:
-            context.vertexAttrib1fv(index, *webGLArray);
-            break;
-        case f_vertexAttrib2v:
-            context.vertexAttrib2fv(index, *webGLArray);
-            break;
-        case f_vertexAttrib3v:
-            context.vertexAttrib3fv(index, *webGLArray);
-            break;
-        case f_vertexAttrib4v:
-            context.vertexAttrib4fv(index, *webGLArray);
-            break;
-        }
-        return jsUndefined();
-    }
-
-    Vector&lt;float, 64&gt; array;
-    if (!toNumberVector(state, state.uncheckedArgument(1), array))
-        return throwTypeError(&amp;state, scope);
-
-    switch (f) {
-    case f_uniform1v:
-        context.uniform1fv(location, array.data(), array.size());
-        break;
-    case f_uniform2v:
-        context.uniform2fv(location, array.data(), array.size());
-        break;
-    case f_uniform3v:
-        context.uniform3fv(location, array.data(), array.size());
-        break;
-    case f_uniform4v:
-        context.uniform4fv(location, array.data(), array.size());
-        break;
-    case f_vertexAttrib1v:
-        context.vertexAttrib1fv(index, array.data(), array.size());
-        break;
-    case f_vertexAttrib2v:
-        context.vertexAttrib2fv(index, array.data(), array.size());
-        break;
-    case f_vertexAttrib3v:
-        context.vertexAttrib3fv(index, array.data(), array.size());
-        break;
-    case f_vertexAttrib4v:
-        context.vertexAttrib4fv(index, array.data(), array.size());
-        break;
-    }
-    return jsUndefined();
-}
-
-static JSValue dataFunctioni(DataFunctionToCall f, ExecState&amp; state, WebGLRenderingContextBase&amp; context)
-{
-    VM&amp; vm = state.vm();
-    auto scope = DECLARE_THROW_SCOPE(vm);
-
-    if (state.argumentCount() != 2)
-        return throwException(&amp;state, scope, createNotEnoughArgumentsError(&amp;state));
-
-    auto* location = JSWebGLUniformLocation::toWrapped(state.uncheckedArgument(0));
-    if (!location &amp;&amp; !state.uncheckedArgument(0).isUndefinedOrNull())
-        return throwTypeError(&amp;state, scope);
-
-    if (auto webGLArray = toUnsharedInt32Array(state.uncheckedArgument(1))) {
-        switch (f) {
-        case f_uniform1v:
-            context.uniform1iv(location, *webGLArray);
-            break;
-        case f_uniform2v:
-            context.uniform2iv(location, *webGLArray);
-            break;
-        case f_uniform3v:
-            context.uniform3iv(location, *webGLArray);
-            break;
-        case f_uniform4v:
-            context.uniform4iv(location, *webGLArray);
-            break;
-        default:
-            break;
-        }
-        return jsUndefined();
-    }
-
-    Vector&lt;int, 64&gt; array;
-    if (!toNumberVector(state, state.uncheckedArgument(1), array))
-        return throwTypeError(&amp;state, scope);
-
-    switch (f) {
-    case f_uniform1v:
-        context.uniform1iv(location, array.data(), array.size());
-        break;
-    case f_uniform2v:
-        context.uniform2iv(location, array.data(), array.size());
-        break;
-    case f_uniform3v:
-        context.uniform3iv(location, array.data(), array.size());
-        break;
-    case f_uniform4v:
-        context.uniform4iv(location, array.data(), array.size());
-        break;
-    default:
-        break;
-    }
-    return jsUndefined();
-}
-
-static JSValue dataFunctionMatrix(DataFunctionMatrixToCall f, ExecState&amp; state, WebGLRenderingContextBase&amp; context)
-{
-    VM&amp; vm = state.vm();
-    auto scope = DECLARE_THROW_SCOPE(vm);
-
-    if (state.argumentCount() != 3)
-        return throwException(&amp;state, scope, createNotEnoughArgumentsError(&amp;state));
-
-    auto* location = JSWebGLUniformLocation::toWrapped(state.uncheckedArgument(0));
-    if (!location &amp;&amp; !state.uncheckedArgument(0).isUndefinedOrNull())
-        return throwTypeError(&amp;state, scope);
-
-    bool transpose = state.uncheckedArgument(1).toBoolean(&amp;state);
-    RETURN_IF_EXCEPTION(scope, { });
-
-    if (auto webGLArray = toUnsharedFloat32Array(state.uncheckedArgument(2))) {
-        switch (f) {
-        case f_uniformMatrix2fv:
-            context.uniformMatrix2fv(location, transpose, *webGLArray);
-            break;
-        case f_uniformMatrix3fv:
-            context.uniformMatrix3fv(location, transpose, *webGLArray);
-            break;
-        case f_uniformMatrix4fv:
-            context.uniformMatrix4fv(location, transpose, *webGLArray);
-            break;
-        }
-        return jsUndefined();
-    }
-
-    Vector&lt;float, 64&gt; array;
-    if (!toNumberVector(state, state.uncheckedArgument(2), array))
-        return throwTypeError(&amp;state, scope);
-
-    switch (f) {
-    case f_uniformMatrix2fv:
-        context.uniformMatrix2fv(location, transpose, array.data(), array.size());
-        break;
-    case f_uniformMatrix3fv:
-        context.uniformMatrix3fv(location, transpose, array.data(), array.size());
-        break;
-    case f_uniformMatrix4fv:
-        context.uniformMatrix4fv(location, transpose, array.data(), array.size());
-        break;
-    }
-    return jsUndefined();
-}
-
-JSValue JSWebGLRenderingContextBase::uniform1fv(ExecState&amp; state)
-{
-    return dataFunctionf(f_uniform1v, state, wrapped());
-}
-
-JSValue JSWebGLRenderingContextBase::uniform1iv(ExecState&amp; state)
-{
-    return dataFunctioni(f_uniform1v, state, wrapped());
-}
-
-JSValue JSWebGLRenderingContextBase::uniform2fv(ExecState&amp; state)
-{
-    return dataFunctionf(f_uniform2v, state, wrapped());
-}
-
-JSValue JSWebGLRenderingContextBase::uniform2iv(ExecState&amp; state)
-{
-    return dataFunctioni(f_uniform2v, state, wrapped());
-}
-
-JSValue JSWebGLRenderingContextBase::uniform3fv(ExecState&amp; state)
-{
-    return dataFunctionf(f_uniform3v, state, wrapped());
-}
-
-JSValue JSWebGLRenderingContextBase::uniform3iv(ExecState&amp; state)
-{
-    return dataFunctioni(f_uniform3v, state, wrapped());
-}
-
-JSValue JSWebGLRenderingContextBase::uniform4fv(ExecState&amp; state)
-{
-    return dataFunctionf(f_uniform4v, state, wrapped());
-}
-
-JSValue JSWebGLRenderingContextBase::uniform4iv(ExecState&amp; state)
-{
-    return dataFunctioni(f_uniform4v, state, wrapped());
-}
-
-JSValue JSWebGLRenderingContextBase::uniformMatrix2fv(ExecState&amp; state)
-{
-    return dataFunctionMatrix(f_uniformMatrix2fv, state, wrapped());
-}
-
-JSValue JSWebGLRenderingContextBase::uniformMatrix3fv(ExecState&amp; state)
-{
-    return dataFunctionMatrix(f_uniformMatrix3fv, state, wrapped());
-}
-
-JSValue JSWebGLRenderingContextBase::uniformMatrix4fv(ExecState&amp; state)
-{
-    return dataFunctionMatrix(f_uniformMatrix4fv, state, wrapped());
-}
-
-JSValue JSWebGLRenderingContextBase::vertexAttrib1fv(ExecState&amp; state)
-{
-    return dataFunctionf(f_vertexAttrib1v, state, wrapped());
-}
-
-JSValue JSWebGLRenderingContextBase::vertexAttrib2fv(ExecState&amp; state)
-{
-    return dataFunctionf(f_vertexAttrib2v, state, wrapped());
-}
-
-JSValue JSWebGLRenderingContextBase::vertexAttrib3fv(ExecState&amp; state)
-{
-    return dataFunctionf(f_vertexAttrib3v, state, wrapped());
-}
-
-JSValue JSWebGLRenderingContextBase::vertexAttrib4fv(ExecState&amp; state)
-{
-    return dataFunctionf(f_vertexAttrib4v, state, wrapped());
-}
-
</del><span class="cx"> } // namespace WebCore
</span><span class="cx"> 
</span><span class="cx"> #endif // ENABLE(WEBGL)
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptsCodeGeneratorpm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/scripts/CodeGenerator.pm (210566 => 210567)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/CodeGenerator.pm        2017-01-10 23:45:22 UTC (rev 210566)
+++ trunk/Source/WebCore/bindings/scripts/CodeGenerator.pm        2017-01-11 01:02:34 UTC (rev 210567)
</span><span class="lines">@@ -878,7 +878,6 @@
</span><span class="cx">     return 1 if $type-&gt;isUnion;
</span><span class="cx">     return 1 if $type-&gt;name eq &quot;BufferSource&quot;;
</span><span class="cx">     return 1 if $type-&gt;name eq &quot;EventListener&quot;;
</span><del>-    return 1 if $type-&gt;name eq &quot;IDBKey&quot;;
</del><span class="cx">     return 1 if $type-&gt;name eq &quot;JSON&quot;;
</span><span class="cx">     return 1 if $type-&gt;name eq &quot;Promise&quot;;
</span><span class="cx">     return 1 if $type-&gt;name eq &quot;SerializedScriptValue&quot;;
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptsCodeGeneratorJSpm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm (210566 => 210567)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm        2017-01-10 23:45:22 UTC (rev 210566)
+++ trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm        2017-01-11 01:02:34 UTC (rev 210567)
</span><span class="lines">@@ -5083,8 +5083,12 @@
</span><span class="cx"> 
</span><span class="cx"> sub GetBaseIDLType
</span><span class="cx"> {
</span><del>-    my ($interface, $type) = @_;
</del><ins>+    my ($interface, $type, $context) = @_;
</ins><span class="cx"> 
</span><ins>+    if ($context &amp;&amp; $context-&gt;extendedAttributes-&gt;{OverrideIDLType}) {
+        return $context-&gt;extendedAttributes-&gt;{OverrideIDLType};
+    }
+
</ins><span class="cx">     my %IDLTypes = (
</span><span class="cx">         &quot;any&quot; =&gt; &quot;IDLAny&quot;,
</span><span class="cx">         &quot;boolean&quot; =&gt; &quot;IDLBoolean&quot;,
</span><span class="lines">@@ -5108,7 +5112,6 @@
</span><span class="cx">         # Non-WebIDL extensions
</span><span class="cx">         &quot;Date&quot; =&gt; &quot;IDLDate&quot;,
</span><span class="cx">         &quot;EventListener&quot; =&gt; &quot;IDLEventListener&lt;JSEventListener&gt;&quot;,
</span><del>-        &quot;IDBKey&quot; =&gt; &quot;IDLIDBKey&lt;IDBKey&gt;&quot;,
</del><span class="cx">         &quot;JSON&quot; =&gt; &quot;IDLJSON&quot;,
</span><span class="cx">         &quot;SerializedScriptValue&quot; =&gt; &quot;IDLSerializedScriptValue&lt;SerializedScriptValue&gt;&quot;,
</span><span class="cx">         &quot;XPathNSResolver&quot; =&gt; &quot;IDLXPathNSResolver&lt;XPathNSResolver&gt;&quot;,
</span><span class="lines">@@ -5133,9 +5136,9 @@
</span><span class="cx"> 
</span><span class="cx"> sub GetIDLType
</span><span class="cx"> {
</span><del>-    my ($interface, $type) = @_;
</del><ins>+    my ($interface, $type, $context) = @_;
</ins><span class="cx"> 
</span><del>-    my $baseIDLType = GetBaseIDLType($interface, $type);
</del><ins>+    my $baseIDLType = GetBaseIDLType($interface, $type, $context);
</ins><span class="cx">     return &quot;IDLNullable&lt;&quot; . $baseIDLType . &quot;&gt;&quot; if $type-&gt;isNullable;
</span><span class="cx">     return $baseIDLType;
</span><span class="cx"> }
</span><span class="lines">@@ -5322,8 +5325,19 @@
</span><span class="cx"> 
</span><span class="cx"> sub NativeToJSValueDOMConvertNeedsState
</span><span class="cx"> {
</span><del>-    my ($type) = @_;
-    
</del><ins>+    my ($type, $context) = @_;
+
+    # FIXME: We need a more robost way to specify this requirement so as not
+    # to require specializing each type. Perhaps just requiring all override
+    # types to take both state and the global object would work?
+    if ($context-&gt;extendedAttributes-&gt;{OverrideIDLType}) {
+        my $overrideTypeName = $context-&gt;extendedAttributes-&gt;{OverrideIDLType};
+        return 1 if $overrideTypeName eq &quot;IDLIDBKey&quot;;
+        return 1 if $overrideTypeName eq &quot;IDLWebGLAny&quot;;
+
+        return 0;
+    }
+
</ins><span class="cx">     # FIXME: This should actually check if all the sub-objects of the union need the state.
</span><span class="cx">     return 1 if $type-&gt;isUnion;
</span><span class="cx">     return 1 if $codeGenerator-&gt;IsSequenceOrFrozenArrayType($type);
</span><span class="lines">@@ -5334,7 +5348,6 @@
</span><span class="cx">     return 1 if $codeGenerator-&gt;IsInterfaceType($type);
</span><span class="cx">     return 1 if $codeGenerator-&gt;IsTypedArrayType($type);
</span><span class="cx">     return 1 if $type-&gt;name eq &quot;Date&quot;;
</span><del>-    return 1 if $type-&gt;name eq &quot;IDBKey&quot;;
</del><span class="cx">     return 1 if $type-&gt;name eq &quot;JSON&quot;;
</span><span class="cx">     return 1 if $type-&gt;name eq &quot;SerializedScriptValue&quot;;
</span><span class="cx">     return 1 if $type-&gt;name eq &quot;XPathNSResolver&quot;;
</span><span class="lines">@@ -5344,8 +5357,19 @@
</span><span class="cx"> 
</span><span class="cx"> sub NativeToJSValueDOMConvertNeedsGlobalObject
</span><span class="cx"> {
</span><del>-    my ($type) = @_;
</del><ins>+    my ($type, $context) = @_;
</ins><span class="cx">     
</span><ins>+    # FIXME: We need a more robost way to specify this requirement so as not
+    # to require specializing each type. Perhaps just requiring all override
+    # types to take both state and the global object would work?
+    if ($context-&gt;extendedAttributes-&gt;{OverrideIDLType}) {
+        my $overrideTypeName = $context-&gt;extendedAttributes-&gt;{OverrideIDLType};
+        return 1 if $overrideTypeName eq &quot;IDLIDBKey&quot;;
+        return 1 if $overrideTypeName eq &quot;IDLWebGLAny&quot;;
+
+        return 0;
+    }
+
</ins><span class="cx">     # FIXME: This should actually check if all the sub-objects of the union need the global object.
</span><span class="cx">     return 1 if $type-&gt;isUnion;
</span><span class="cx">     return 1 if $codeGenerator-&gt;IsSequenceOrFrozenArrayType($type);
</span><span class="lines">@@ -5353,7 +5377,6 @@
</span><span class="cx">     return 1 if $codeGenerator-&gt;IsDictionaryType($type);
</span><span class="cx">     return 1 if $codeGenerator-&gt;IsInterfaceType($type);
</span><span class="cx">     return 1 if $codeGenerator-&gt;IsTypedArrayType($type);
</span><del>-    return 1 if $type-&gt;name eq &quot;IDBKey&quot;;
</del><span class="cx">     return 1 if $type-&gt;name eq &quot;SerializedScriptValue&quot;;
</span><span class="cx">     return 1 if $type-&gt;name eq &quot;XPathNSResolver&quot;;
</span><span class="cx"> 
</span><span class="lines">@@ -5410,11 +5433,11 @@
</span><span class="cx"> 
</span><span class="cx">     $value = &quot;BindingSecurity::checkSecurityForNode($stateReference, $value)&quot; if $context-&gt;extendedAttributes-&gt;{CheckSecurityForNode};
</span><span class="cx"> 
</span><del>-    my $IDLType = GetIDLType($interface, $type);
</del><ins>+    my $IDLType = GetIDLType($interface, $type, $context);
</ins><span class="cx"> 
</span><span class="cx">     my @conversionArguments = ();
</span><del>-    push(@conversionArguments, $stateReference) if NativeToJSValueDOMConvertNeedsState($type) || $mayThrowException;
-    push(@conversionArguments, $globalObjectReference) if NativeToJSValueDOMConvertNeedsGlobalObject($type);
</del><ins>+    push(@conversionArguments, $stateReference) if NativeToJSValueDOMConvertNeedsState($type, $context) || $mayThrowException;
+    push(@conversionArguments, $globalObjectReference) if NativeToJSValueDOMConvertNeedsGlobalObject($type, $context);
</ins><span class="cx">     push(@conversionArguments, &quot;throwScope&quot;) if $mayThrowException;
</span><span class="cx">     push(@conversionArguments, $value);
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptsIDLAttributestxt"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/scripts/IDLAttributes.txt (210566 => 210567)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/IDLAttributes.txt        2017-01-10 23:45:22 UTC (rev 210566)
+++ trunk/Source/WebCore/bindings/scripts/IDLAttributes.txt        2017-01-11 01:02:34 UTC (rev 210567)
</span><span class="lines">@@ -99,6 +99,7 @@
</span><span class="cx"> NoInterfaceObject
</span><span class="cx"> NotEnumerable
</span><span class="cx"> OverrideBuiltins
</span><ins>+OverrideIDLType=*
</ins><span class="cx"> PassContext
</span><span class="cx"> PrimaryGlobal
</span><span class="cx"> PrivateIdentifier
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlcanvasWebGL2RenderingContextcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/canvas/WebGL2RenderingContext.cpp (210566 => 210567)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/canvas/WebGL2RenderingContext.cpp        2017-01-10 23:45:22 UTC (rev 210566)
+++ trunk/Source/WebCore/html/canvas/WebGL2RenderingContext.cpp        2017-01-11 01:02:34 UTC (rev 210567)
</span><span class="lines">@@ -1087,8 +1087,11 @@
</span><span class="cx">     return nullptr;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-Vector&lt;String&gt; WebGL2RenderingContext::getSupportedExtensions()
</del><ins>+std::optional&lt;Vector&lt;String&gt;&gt; WebGL2RenderingContext::getSupportedExtensions()
</ins><span class="cx"> {
</span><ins>+    if (isContextLost())
+        return std::nullopt;
+
</ins><span class="cx">     Vector&lt;String&gt; result;
</span><span class="cx">     
</span><span class="cx">     if (m_isPendingPolicyResolution)
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlcanvasWebGL2RenderingContexth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/canvas/WebGL2RenderingContext.h (210566 => 210567)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/canvas/WebGL2RenderingContext.h        2017-01-10 23:45:22 UTC (rev 210566)
+++ trunk/Source/WebCore/html/canvas/WebGL2RenderingContext.h        2017-01-11 01:02:34 UTC (rev 210567)
</span><span class="lines">@@ -173,7 +173,7 @@
</span><span class="cx"> 
</span><span class="cx">     // Extensions
</span><span class="cx">     WebGLExtension* getExtension(const String&amp;) final;
</span><del>-    Vector&lt;String&gt; getSupportedExtensions() final;
</del><ins>+    std::optional&lt;Vector&lt;String&gt;&gt; getSupportedExtensions() final;
</ins><span class="cx">     WebGLAny getParameter(GC3Denum pname) final;
</span><span class="cx"> 
</span><span class="cx">     void renderbufferStorage(GC3Denum target, GC3Denum internalformat, GC3Dsizei width, GC3Dsizei height) final;
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlcanvasWebGL2RenderingContextidl"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/canvas/WebGL2RenderingContext.idl (210566 => 210567)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/canvas/WebGL2RenderingContext.idl        2017-01-10 23:45:22 UTC (rev 210566)
+++ trunk/Source/WebCore/html/canvas/WebGL2RenderingContext.idl        2017-01-11 01:02:34 UTC (rev 210567)
</span><span class="lines">@@ -354,7 +354,7 @@
</span><span class="cx">     /* Framebuffer objects */
</span><span class="cx">     void blitFramebuffer(GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter);
</span><span class="cx">     void framebufferTextureLayer(GLenum target, GLenum attachment, GLuint texture, GLint level, GLint layer);
</span><del>-    [Custom] any getInternalformatParameter(GLenum target, GLenum internalformat, GLenum pname);
</del><ins>+    [OverrideIDLType=IDLWebGLAny] any getInternalformatParameter(GLenum target, GLenum internalformat, GLenum pname);
</ins><span class="cx">     void invalidateFramebuffer(GLenum target, sequence&lt;GLenum&gt; attachments);
</span><span class="cx">     void invalidateSubFramebuffer(GLenum target, sequence&lt;GLenum&gt; attachments, GLint x, GLint y, GLsizei width, GLsizei height);
</span><span class="cx">     void readBuffer(GLenum src);
</span><span class="lines">@@ -418,7 +418,7 @@
</span><span class="cx">     void beginQuery(GLenum target, WebGLQuery? query);
</span><span class="cx">     void endQuery(GLenum target);
</span><span class="cx">     WebGLQuery getQuery(GLenum target, GLenum pname);
</span><del>-    [Custom] any getQueryParameter(WebGLQuery? query, GLenum pname);
</del><ins>+    [OverrideIDLType=IDLWebGLAny] any getQueryParameter(WebGLQuery? query, GLenum pname);
</ins><span class="cx"> 
</span><span class="cx">     /* Sampler Objects */
</span><span class="cx">     WebGLSampler createSampler();
</span><span class="lines">@@ -427,7 +427,7 @@
</span><span class="cx">     void bindSampler(GLuint unit, WebGLSampler? sampler);
</span><span class="cx">     void samplerParameteri(WebGLSampler? sampler, GLenum pname, GLint param);
</span><span class="cx">     void samplerParameterf(WebGLSampler? sampler, GLenum pname, GLfloat param);
</span><del>-    [Custom] any getSamplerParameter(WebGLSampler? sampler, GLenum pname);
</del><ins>+    [OverrideIDLType=IDLWebGLAny] any getSamplerParameter(WebGLSampler? sampler, GLenum pname);
</ins><span class="cx"> 
</span><span class="cx">     /* Sync objects */
</span><span class="cx">     WebGLSync fenceSync(GLenum condition, GLbitfield flags);
</span><span class="lines">@@ -435,7 +435,7 @@
</span><span class="cx">     void deleteSync(WebGLSync? sync);
</span><span class="cx">     GLenum clientWaitSync(WebGLSync? sync, GLbitfield flags, GLuint64 timeout);
</span><span class="cx">     void waitSync(WebGLSync? sync, GLbitfield flags, GLuint64 timeout);
</span><del>-    [Custom] any getSyncParameter(WebGLSync? sync, GLenum pname);
</del><ins>+    [OverrideIDLType=IDLWebGLAny] any getSyncParameter(WebGLSync? sync, GLenum pname);
</ins><span class="cx"> 
</span><span class="cx">     /* Transform Feedback */
</span><span class="cx">     WebGLTransformFeedback createTransformFeedback();
</span><span class="lines">@@ -452,12 +452,12 @@
</span><span class="cx">     /* Uniform Buffer Objects and Transform Feedback Buffers */
</span><span class="cx">     void bindBufferBase(GLenum target, GLuint index, WebGLBuffer? buffer);
</span><span class="cx">     void bindBufferRange(GLenum target, GLuint index, WebGLBuffer? buffer, GLintptr offset, GLsizeiptr size);
</span><del>-    [Custom] any getIndexedParameter(GLenum target, GLuint index);
</del><ins>+    [OverrideIDLType=IDLWebGLAny] any getIndexedParameter(GLenum target, GLuint index);
</ins><span class="cx">     Uint32Array getUniformIndices(WebGLProgram? program, sequence&lt;DOMString&gt; uniformNames);
</span><span class="cx">     Int32Array getActiveUniforms(WebGLProgram? program, Uint32Array? uniformIndices, GLenum pname);
</span><span class="cx">     GLuint getUniformBlockIndex(WebGLProgram? program, DOMString uniformBlockName);
</span><del>-    [Custom] any getActiveUniformBlockParameter(WebGLProgram? program, GLuint uniformBlockIndex, GLenum pname);
-    [Custom] any getActiveUniformBlockName(WebGLProgram? program, GLuint uniformBlockIndex);
</del><ins>+    [OverrideIDLType=IDLWebGLAny] any getActiveUniformBlockParameter(WebGLProgram? program, GLuint uniformBlockIndex, GLenum pname);
+    [OverrideIDLType=IDLWebGLAny] any getActiveUniformBlockName(WebGLProgram? program, GLuint uniformBlockIndex);
</ins><span class="cx">     void uniformBlockBinding(WebGLProgram? program, GLuint uniformBlockIndex, GLuint uniformBlockBinding);
</span><span class="cx"> 
</span><span class="cx">     /* Vertex Array Objects */
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlcanvasWebGLAnycpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/canvas/WebGLAny.cpp (210566 => 210567)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/canvas/WebGLAny.cpp        2017-01-10 23:45:22 UTC (rev 210566)
+++ trunk/Source/WebCore/html/canvas/WebGLAny.cpp        2017-01-11 01:02:34 UTC (rev 210567)
</span><span class="lines">@@ -45,8 +45,8 @@
</span><span class="cx"> 
</span><span class="cx"> using namespace JSC;
</span><span class="cx"> 
</span><del>-// FIXME: This likely can be autogenerated with a bit of work.
-JSValue toJS(ExecState&amp; state, JSDOMGlobalObject&amp; globalObject, const WebGLAny&amp; any)
</del><ins>+// FIXME: This should use the IDLUnion JSConverter.
+JSValue convertToJSValue(ExecState&amp; state, JSDOMGlobalObject&amp; globalObject, const WebGLAny&amp; any)
</ins><span class="cx"> {
</span><span class="cx">     return WTF::switchOn(any,
</span><span class="cx">         [] (std::nullptr_t) {
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlcanvasWebGLAnyh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/canvas/WebGLAny.h (210566 => 210567)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/canvas/WebGLAny.h        2017-01-10 23:45:22 UTC (rev 210566)
+++ trunk/Source/WebCore/html/canvas/WebGLAny.h        2017-01-11 01:02:34 UTC (rev 210567)
</span><span class="lines">@@ -27,21 +27,11 @@
</span><span class="cx"> 
</span><span class="cx"> #if ENABLE(WEBGL)
</span><span class="cx"> 
</span><del>-#include &quot;WebGLBuffer.h&quot;
-#include &quot;WebGLFramebuffer.h&quot;
-#include &quot;WebGLProgram.h&quot;
-#include &quot;WebGLRenderbuffer.h&quot;
-#include &quot;WebGLTexture.h&quot;
-#include &quot;WebGLVertexArrayObjectOES.h&quot;
</del><span class="cx"> #include &lt;runtime/Float32Array.h&gt;
</span><span class="cx"> #include &lt;runtime/Int32Array.h&gt;
</span><span class="cx"> #include &lt;runtime/Uint32Array.h&gt;
</span><span class="cx"> #include &lt;runtime/Uint8Array.h&gt;
</span><span class="cx"> 
</span><del>-#if ENABLE(WEBGL2)
-#include &quot;WebGLVertexArrayObject.h&quot;
-#endif
-
</del><span class="cx"> namespace JSC {
</span><span class="cx"> class ExecState;
</span><span class="cx"> class JSValue;
</span><span class="lines">@@ -50,8 +40,23 @@
</span><span class="cx"> namespace WebCore {
</span><span class="cx"> 
</span><span class="cx"> class JSDOMGlobalObject;
</span><ins>+class WebGLBuffer;
+class WebGLFramebuffer;
+class WebGLProgram;
+class WebGLRenderbuffer;
+class WebGLTexture;
+class WebGLVertexArrayObject;
+class WebGLVertexArrayObjectOES;
</ins><span class="cx"> 
</span><del>-using WebGLAny = Variant&lt;std::nullptr_t, bool, int, unsigned, long long, float, String, Vector&lt;bool&gt;,
</del><ins>+using WebGLAny = Variant&lt;
+    std::nullptr_t,
+    bool,
+    int,
+    unsigned,
+    long long,
+    float,
+    String,
+    Vector&lt;bool&gt;,
</ins><span class="cx">     RefPtr&lt;Float32Array&gt;,
</span><span class="cx">     RefPtr&lt;Int32Array&gt;,
</span><span class="cx">     RefPtr&lt;Uint32Array&gt;,
</span><span class="lines">@@ -67,7 +72,7 @@
</span><span class="cx"> #endif
</span><span class="cx"> &gt;;
</span><span class="cx"> 
</span><del>-JSC::JSValue toJS(JSC::ExecState&amp;, JSDOMGlobalObject&amp;, const WebGLAny&amp;);
</del><ins>+JSC::JSValue convertToJSValue(JSC::ExecState&amp;, JSDOMGlobalObject&amp;, const WebGLAny&amp;);
</ins><span class="cx"> 
</span><span class="cx"> } // namespace WebCore
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlcanvasWebGLRenderingContextcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/canvas/WebGLRenderingContext.cpp (210566 => 210567)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/canvas/WebGLRenderingContext.cpp        2017-01-10 23:45:22 UTC (rev 210566)
+++ trunk/Source/WebCore/html/canvas/WebGLRenderingContext.cpp        2017-01-11 01:02:34 UTC (rev 210567)
</span><span class="lines">@@ -249,8 +249,11 @@
</span><span class="cx">     return nullptr;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-Vector&lt;String&gt; WebGLRenderingContext::getSupportedExtensions()
</del><ins>+std::optional&lt;Vector&lt;String&gt;&gt; WebGLRenderingContext::getSupportedExtensions()
</ins><span class="cx"> {
</span><ins>+    if (isContextLost())
+        return std::nullopt;
+
</ins><span class="cx">     Vector&lt;String&gt; result;
</span><span class="cx">     
</span><span class="cx">     if (m_isPendingPolicyResolution)
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlcanvasWebGLRenderingContexth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/canvas/WebGLRenderingContext.h (210566 => 210567)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/canvas/WebGLRenderingContext.h        2017-01-10 23:45:22 UTC (rev 210566)
+++ trunk/Source/WebCore/html/canvas/WebGLRenderingContext.h        2017-01-11 01:02:34 UTC (rev 210567)
</span><span class="lines">@@ -39,7 +39,7 @@
</span><span class="cx"> 
</span><span class="cx">     WebGLExtension* getExtension(const String&amp;) final;
</span><span class="cx">     WebGLAny getParameter(GC3Denum pname) final;
</span><del>-    Vector&lt;String&gt; getSupportedExtensions() final;
</del><ins>+    std::optional&lt;Vector&lt;String&gt;&gt; getSupportedExtensions() final;
</ins><span class="cx"> 
</span><span class="cx">     WebGLAny getFramebufferAttachmentParameter(GC3Denum target, GC3Denum attachment, GC3Denum pname) final;
</span><span class="cx">     void renderbufferStorage(GC3Denum target, GC3Denum internalformat, GC3Dsizei width, GC3Dsizei height) final;
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlcanvasWebGLRenderingContextBasecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/canvas/WebGLRenderingContextBase.cpp (210566 => 210567)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/canvas/WebGLRenderingContextBase.cpp        2017-01-10 23:45:22 UTC (rev 210566)
+++ trunk/Source/WebCore/html/canvas/WebGLRenderingContextBase.cpp        2017-01-11 01:02:34 UTC (rev 210567)
</span><span class="lines">@@ -2135,22 +2135,22 @@
</span><span class="cx">     return WebGLActiveInfo::create(info.name, info.type, info.size);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-bool WebGLRenderingContextBase::getAttachedShaders(WebGLProgram* program, Vector&lt;RefPtr&lt;WebGLShader&gt;&gt;&amp; shaderObjects)
</del><ins>+std::optional&lt;Vector&lt;RefPtr&lt;WebGLShader&gt;&gt;&gt; WebGLRenderingContextBase::getAttachedShaders(WebGLProgram* program)
</ins><span class="cx"> {
</span><del>-    shaderObjects.clear();
</del><span class="cx">     if (isContextLostOrPending() || !validateWebGLObject(&quot;getAttachedShaders&quot;, program))
</span><del>-        return false;
</del><ins>+        return std::nullopt;
</ins><span class="cx"> 
</span><del>-    const GC3Denum shaderType[] = {
</del><ins>+    const GC3Denum shaderTypes[] = {
</ins><span class="cx">         GraphicsContext3D::VERTEX_SHADER,
</span><span class="cx">         GraphicsContext3D::FRAGMENT_SHADER
</span><span class="cx">     };
</span><del>-    for (unsigned i = 0; i &lt; sizeof(shaderType) / sizeof(GC3Denum); ++i) {
-        WebGLShader* shader = program-&gt;getAttachedShader(shaderType[i]);
</del><ins>+    Vector&lt;RefPtr&lt;WebGLShader&gt;&gt; shaderObjects;
+    for (auto shaderType : shaderTypes) {
+        WebGLShader* shader = program-&gt;getAttachedShader(shaderType);
</ins><span class="cx">         if (shader)
</span><span class="cx">             shaderObjects.append(shader);
</span><span class="cx">     }
</span><del>-    return true;
</del><ins>+    return shaderObjects;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> GC3Dint WebGLRenderingContextBase::getAttribLocation(WebGLProgram* program, const String&amp; name)
</span><span class="lines">@@ -4173,102 +4173,63 @@
</span><span class="cx">     m_context-&gt;uniform1f(location-&gt;location(), x);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void WebGLRenderingContextBase::uniform1fv(const WebGLUniformLocation* location, Float32Array&amp; v)
</del><ins>+void WebGLRenderingContextBase::uniform2f(const WebGLUniformLocation* location, GC3Dfloat x, GC3Dfloat y)
</ins><span class="cx"> {
</span><del>-    if (isContextLostOrPending() || !validateUniformParameters(&quot;uniform1fv&quot;, location, v, 1))
</del><ins>+    if (isContextLostOrPending() || !location)
</ins><span class="cx">         return;
</span><span class="cx"> 
</span><del>-    m_context-&gt;uniform1fv(location-&gt;location(), v.length(), v.data());
-}
-
-void WebGLRenderingContextBase::uniform1fv(const WebGLUniformLocation* location, GC3Dfloat* v, GC3Dsizei size)
-{
-    if (isContextLostOrPending() || !validateUniformParameters(&quot;uniform1fv&quot;, location, v, size, 1))
</del><ins>+    if (location-&gt;program() != m_currentProgram) {
+        synthesizeGLError(GraphicsContext3D::INVALID_OPERATION, &quot;uniform2f&quot;, &quot;location not for current program&quot;);
</ins><span class="cx">         return;
</span><ins>+    }
</ins><span class="cx"> 
</span><del>-    m_context-&gt;uniform1fv(location-&gt;location(), size, v);
</del><ins>+    m_context-&gt;uniform2f(location-&gt;location(), x, y);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-void WebGLRenderingContextBase::uniform1i(const WebGLUniformLocation* location, GC3Dint x)
</del><ins>+void WebGLRenderingContextBase::uniform3f(const WebGLUniformLocation* location, GC3Dfloat x, GC3Dfloat y, GC3Dfloat z)
</ins><span class="cx"> {
</span><span class="cx">     if (isContextLostOrPending() || !location)
</span><span class="cx">         return;
</span><span class="cx"> 
</span><span class="cx">     if (location-&gt;program() != m_currentProgram) {
</span><del>-        synthesizeGLError(GraphicsContext3D::INVALID_OPERATION, &quot;uniform1i&quot;, &quot;location not for current program&quot;);
</del><ins>+        synthesizeGLError(GraphicsContext3D::INVALID_OPERATION, &quot;uniform3f&quot;, &quot;location not for current program&quot;);
</ins><span class="cx">         return;
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    if ((location-&gt;type() == GraphicsContext3D::SAMPLER_2D || location-&gt;type() == GraphicsContext3D::SAMPLER_CUBE) &amp;&amp; x &gt;= (int)m_textureUnits.size()) {
-        synthesizeGLError(GraphicsContext3D::INVALID_VALUE, &quot;uniform1i&quot;, &quot;invalid texture unit&quot;);
-        return;
-    }
-
-    m_context-&gt;uniform1i(location-&gt;location(), x);
</del><ins>+    m_context-&gt;uniform3f(location-&gt;location(), x, y, z);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-void WebGLRenderingContextBase::uniform1iv(const WebGLUniformLocation* location, Int32Array&amp; v)
</del><ins>+void WebGLRenderingContextBase::uniform4f(const WebGLUniformLocation* location, GC3Dfloat x, GC3Dfloat y, GC3Dfloat z, GC3Dfloat w)
</ins><span class="cx"> {
</span><del>-    if (isContextLostOrPending() || !validateUniformParameters(&quot;uniform1iv&quot;, location, v, 1))
</del><ins>+    if (isContextLostOrPending() || !location)
</ins><span class="cx">         return;
</span><span class="cx"> 
</span><del>-    if (location-&gt;type() == GraphicsContext3D::SAMPLER_2D || location-&gt;type() == GraphicsContext3D::SAMPLER_CUBE)
-        for (unsigned i = 0; i &lt; v.length(); ++i) {
-            if (v.data()[i] &gt;= static_cast&lt;int&gt;(m_textureUnits.size())) {
-                LOG(WebGL, &quot;Texture unit size=%zu, v[%d]=%d. Location type = %04X.&quot;, m_textureUnits.size(), i, v.data()[i], location-&gt;type());
-                synthesizeGLError(GraphicsContext3D::INVALID_VALUE, &quot;uniform1iv&quot;, &quot;invalid texture unit&quot;);
-                return;
-            }
-        }
-
-    m_context-&gt;uniform1iv(location-&gt;location(), v.length(), v.data());
-}
-
-void WebGLRenderingContextBase::uniform1iv(const WebGLUniformLocation* location, GC3Dint* v, GC3Dsizei size)
-{
-    if (isContextLostOrPending() || !validateUniformParameters(&quot;uniform1iv&quot;, location, v, size, 1))
</del><ins>+    if (location-&gt;program() != m_currentProgram) {
+        synthesizeGLError(GraphicsContext3D::INVALID_OPERATION, &quot;uniform4f&quot;, &quot;location not for current program&quot;);
</ins><span class="cx">         return;
</span><ins>+    }
</ins><span class="cx"> 
</span><del>-    if (location-&gt;type() == GraphicsContext3D::SAMPLER_2D || location-&gt;type() == GraphicsContext3D::SAMPLER_CUBE)
-        for (unsigned i = 0; i &lt; static_cast&lt;unsigned&gt;(size); ++i) {
-            if (((GC3Dint*)v)[i] &gt;= static_cast&lt;int&gt;(m_textureUnits.size())) {
-                synthesizeGLError(GraphicsContext3D::INVALID_VALUE, &quot;uniform1iv&quot;, &quot;invalid texture unit&quot;);
-                return;
-            }
-        }
-
-    m_context-&gt;uniform1iv(location-&gt;location(), size, v);
</del><ins>+    m_context-&gt;uniform4f(location-&gt;location(), x, y, z, w);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-void WebGLRenderingContextBase::uniform2f(const WebGLUniformLocation* location, GC3Dfloat x, GC3Dfloat y)
</del><ins>+void WebGLRenderingContextBase::uniform1i(const WebGLUniformLocation* location, GC3Dint x)
</ins><span class="cx"> {
</span><span class="cx">     if (isContextLostOrPending() || !location)
</span><span class="cx">         return;
</span><span class="cx"> 
</span><span class="cx">     if (location-&gt;program() != m_currentProgram) {
</span><del>-        synthesizeGLError(GraphicsContext3D::INVALID_OPERATION, &quot;uniform2f&quot;, &quot;location not for current program&quot;);
</del><ins>+        synthesizeGLError(GraphicsContext3D::INVALID_OPERATION, &quot;uniform1i&quot;, &quot;location not for current program&quot;);
</ins><span class="cx">         return;
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    m_context-&gt;uniform2f(location-&gt;location(), x, y);
-}
-
-void WebGLRenderingContextBase::uniform2fv(const WebGLUniformLocation* location, Float32Array&amp; v)
-{
-    if (isContextLostOrPending() || !validateUniformParameters(&quot;uniform2fv&quot;, location, v, 2))
</del><ins>+    if ((location-&gt;type() == GraphicsContext3D::SAMPLER_2D || location-&gt;type() == GraphicsContext3D::SAMPLER_CUBE) &amp;&amp; x &gt;= (int)m_textureUnits.size()) {
+        synthesizeGLError(GraphicsContext3D::INVALID_VALUE, &quot;uniform1i&quot;, &quot;invalid texture unit&quot;);
</ins><span class="cx">         return;
</span><ins>+    }
</ins><span class="cx"> 
</span><del>-    m_context-&gt;uniform2fv(location-&gt;location(), v.length() / 2, v.data());
</del><ins>+    m_context-&gt;uniform1i(location-&gt;location(), x);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-void WebGLRenderingContextBase::uniform2fv(const WebGLUniformLocation* location, GC3Dfloat* v, GC3Dsizei size)
-{
-    if (isContextLostOrPending() || !validateUniformParameters(&quot;uniform2fv&quot;, location, v, size, 2))
-        return;
-
-    m_context-&gt;uniform2fv(location-&gt;location(), size / 2, v);
-}
-
</del><span class="cx"> void WebGLRenderingContextBase::uniform2i(const WebGLUniformLocation* location, GC3Dint x, GC3Dint y)
</span><span class="cx"> {
</span><span class="cx">     if (isContextLostOrPending() || !location)
</span><span class="lines">@@ -4282,124 +4243,103 @@
</span><span class="cx">     m_context-&gt;uniform2i(location-&gt;location(), x, y);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void WebGLRenderingContextBase::uniform2iv(const WebGLUniformLocation* location, Int32Array&amp; v)
</del><ins>+void WebGLRenderingContextBase::uniform3i(const WebGLUniformLocation* location, GC3Dint x, GC3Dint y, GC3Dint z)
</ins><span class="cx"> {
</span><del>-    if (isContextLostOrPending() || !validateUniformParameters(&quot;uniform2iv&quot;, location, v, 2))
</del><ins>+    if (isContextLostOrPending() || !location)
</ins><span class="cx">         return;
</span><span class="cx"> 
</span><del>-    m_context-&gt;uniform2iv(location-&gt;location(), v.length() / 2, v.data());
-}
-
-void WebGLRenderingContextBase::uniform2iv(const WebGLUniformLocation* location, GC3Dint* v, GC3Dsizei size)
-{
-    if (isContextLostOrPending() || !validateUniformParameters(&quot;uniform2iv&quot;, location, v, size, 2))
</del><ins>+    if (location-&gt;program() != m_currentProgram) {
+        synthesizeGLError(GraphicsContext3D::INVALID_OPERATION, &quot;uniform3i&quot;, &quot;location not for current program&quot;);
</ins><span class="cx">         return;
</span><ins>+    }
</ins><span class="cx"> 
</span><del>-    m_context-&gt;uniform2iv(location-&gt;location(), size / 2, v);
</del><ins>+    m_context-&gt;uniform3i(location-&gt;location(), x, y, z);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-void WebGLRenderingContextBase::uniform3f(const WebGLUniformLocation* location, GC3Dfloat x, GC3Dfloat y, GC3Dfloat z)
</del><ins>+void WebGLRenderingContextBase::uniform4i(const WebGLUniformLocation* location, GC3Dint x, GC3Dint y, GC3Dint z, GC3Dint w)
</ins><span class="cx"> {
</span><span class="cx">     if (isContextLostOrPending() || !location)
</span><span class="cx">         return;
</span><span class="cx"> 
</span><span class="cx">     if (location-&gt;program() != m_currentProgram) {
</span><del>-        synthesizeGLError(GraphicsContext3D::INVALID_OPERATION, &quot;uniform3f&quot;, &quot;location not for current program&quot;);
</del><ins>+        synthesizeGLError(GraphicsContext3D::INVALID_OPERATION, &quot;uniform4i&quot;, &quot;location not for current program&quot;);
</ins><span class="cx">         return;
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    m_context-&gt;uniform3f(location-&gt;location(), x, y, z);
</del><ins>+    m_context-&gt;uniform4i(location-&gt;location(), x, y, z, w);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-void WebGLRenderingContextBase::uniform3fv(const WebGLUniformLocation* location, Float32Array&amp; v)
</del><ins>+void WebGLRenderingContextBase::uniform1fv(const WebGLUniformLocation* location, Float32List&amp;&amp; v)
</ins><span class="cx"> {
</span><del>-    if (isContextLostOrPending() || !validateUniformParameters(&quot;uniform3fv&quot;, location, v, 3))
</del><ins>+    if (isContextLostOrPending() || !validateUniformParameters(&quot;uniform1fv&quot;, location, v, 1))
</ins><span class="cx">         return;
</span><span class="cx"> 
</span><del>-    m_context-&gt;uniform3fv(location-&gt;location(), v.length() / 3, v.data());
</del><ins>+    m_context-&gt;uniform1fv(location-&gt;location(), v.length(), v.data());
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-void WebGLRenderingContextBase::uniform3fv(const WebGLUniformLocation* location, GC3Dfloat* v, GC3Dsizei size)
</del><ins>+void WebGLRenderingContextBase::uniform2fv(const WebGLUniformLocation* location, Float32List&amp;&amp; v)
</ins><span class="cx"> {
</span><del>-    if (isContextLostOrPending() || !validateUniformParameters(&quot;uniform3fv&quot;, location, v, size, 3))
</del><ins>+    if (isContextLostOrPending() || !validateUniformParameters(&quot;uniform2fv&quot;, location, v, 2))
</ins><span class="cx">         return;
</span><span class="cx"> 
</span><del>-    m_context-&gt;uniform3fv(location-&gt;location(), size / 3, v);
</del><ins>+    m_context-&gt;uniform2fv(location-&gt;location(), v.length() / 2, v.data());
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-void WebGLRenderingContextBase::uniform3i(const WebGLUniformLocation* location, GC3Dint x, GC3Dint y, GC3Dint z)
</del><ins>+void WebGLRenderingContextBase::uniform3fv(const WebGLUniformLocation* location, Float32List&amp;&amp; v)
</ins><span class="cx"> {
</span><del>-    if (isContextLostOrPending() || !location)
</del><ins>+    if (isContextLostOrPending() || !validateUniformParameters(&quot;uniform3fv&quot;, location, v, 3))
</ins><span class="cx">         return;
</span><span class="cx"> 
</span><del>-    if (location-&gt;program() != m_currentProgram) {
-        synthesizeGLError(GraphicsContext3D::INVALID_OPERATION, &quot;uniform3i&quot;, &quot;location not for current program&quot;);
-        return;
-    }
-
-    m_context-&gt;uniform3i(location-&gt;location(), x, y, z);
</del><ins>+    m_context-&gt;uniform3fv(location-&gt;location(), v.length() / 3, v.data());
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-void WebGLRenderingContextBase::uniform3iv(const WebGLUniformLocation* location, Int32Array&amp; v)
</del><ins>+void WebGLRenderingContextBase::uniform4fv(const WebGLUniformLocation* location, Float32List&amp;&amp; v)
</ins><span class="cx"> {
</span><del>-    if (isContextLostOrPending() || !validateUniformParameters(&quot;uniform3iv&quot;, location, v, 3))
</del><ins>+    if (isContextLostOrPending() || !validateUniformParameters(&quot;uniform4fv&quot;, location, v, 4))
</ins><span class="cx">         return;
</span><span class="cx"> 
</span><del>-    m_context-&gt;uniform3iv(location-&gt;location(), v.length() / 3, v.data());
</del><ins>+    m_context-&gt;uniform4fv(location-&gt;location(), v.length() / 4, v.data());
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-void WebGLRenderingContextBase::uniform3iv(const WebGLUniformLocation* location, GC3Dint* v, GC3Dsizei size)
</del><ins>+void WebGLRenderingContextBase::uniform1iv(const WebGLUniformLocation* location, Int32List&amp;&amp; v)
</ins><span class="cx"> {
</span><del>-    if (isContextLostOrPending() || !validateUniformParameters(&quot;uniform3iv&quot;, location, v, size, 3))
</del><ins>+    if (isContextLostOrPending() || !validateUniformParameters(&quot;uniform1iv&quot;, location, v, 1))
</ins><span class="cx">         return;
</span><span class="cx"> 
</span><del>-    m_context-&gt;uniform3iv(location-&gt;location(), size / 3, v);
-}
</del><ins>+    auto data = v.data();
+    auto length = v.length();
</ins><span class="cx"> 
</span><del>-void WebGLRenderingContextBase::uniform4f(const WebGLUniformLocation* location, GC3Dfloat x, GC3Dfloat y, GC3Dfloat z, GC3Dfloat w)
-{
-    if (isContextLostOrPending() || !location)
-        return;
-
-    if (location-&gt;program() != m_currentProgram) {
-        synthesizeGLError(GraphicsContext3D::INVALID_OPERATION, &quot;uniform4f&quot;, &quot;location not for current program&quot;);
-        return;
</del><ins>+    if (location-&gt;type() == GraphicsContext3D::SAMPLER_2D || location-&gt;type() == GraphicsContext3D::SAMPLER_CUBE) {
+        for (auto i = 0; i &lt; length; ++i) {
+            if (data[i] &gt;= static_cast&lt;int&gt;(m_textureUnits.size())) {
+                LOG(WebGL, &quot;Texture unit size=%zu, v[%d]=%d. Location type = %04X.&quot;, m_textureUnits.size(), i, data[i], location-&gt;type());
+                synthesizeGLError(GraphicsContext3D::INVALID_VALUE, &quot;uniform1iv&quot;, &quot;invalid texture unit&quot;);
+                return;
+            }
+        }
</ins><span class="cx">     }
</span><span class="cx"> 
</span><del>-    m_context-&gt;uniform4f(location-&gt;location(), x, y, z, w);
</del><ins>+    m_context-&gt;uniform1iv(location-&gt;location(), length, data);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-void WebGLRenderingContextBase::uniform4fv(const WebGLUniformLocation* location, Float32Array&amp; v)
</del><ins>+void WebGLRenderingContextBase::uniform2iv(const WebGLUniformLocation* location, Int32List&amp;&amp; v)
</ins><span class="cx"> {
</span><del>-    if (isContextLostOrPending() || !validateUniformParameters(&quot;uniform4fv&quot;, location, v, 4))
</del><ins>+    if (isContextLostOrPending() || !validateUniformParameters(&quot;uniform2iv&quot;, location, v, 2))
</ins><span class="cx">         return;
</span><span class="cx"> 
</span><del>-    m_context-&gt;uniform4fv(location-&gt;location(), v.length() / 4, v.data());
</del><ins>+    m_context-&gt;uniform2iv(location-&gt;location(), v.length() / 2, v.data());
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-void WebGLRenderingContextBase::uniform4fv(const WebGLUniformLocation* location, GC3Dfloat* v, GC3Dsizei size)
</del><ins>+void WebGLRenderingContextBase::uniform3iv(const WebGLUniformLocation* location, Int32List&amp;&amp; v)
</ins><span class="cx"> {
</span><del>-    if (isContextLostOrPending() || !validateUniformParameters(&quot;uniform4fv&quot;, location, v, size, 4))
</del><ins>+    if (isContextLostOrPending() || !validateUniformParameters(&quot;uniform3iv&quot;, location, v, 3))
</ins><span class="cx">         return;
</span><span class="cx"> 
</span><del>-    m_context-&gt;uniform4fv(location-&gt;location(), size / 4, v);
</del><ins>+    m_context-&gt;uniform3iv(location-&gt;location(), v.length() / 3, v.data());
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-void WebGLRenderingContextBase::uniform4i(const WebGLUniformLocation* location, GC3Dint x, GC3Dint y, GC3Dint z, GC3Dint w)
</del><ins>+void WebGLRenderingContextBase::uniform4iv(const WebGLUniformLocation* location, Int32List&amp;&amp; v)
</ins><span class="cx"> {
</span><del>-    if (isContextLostOrPending() || !location)
-        return;
-
-    if (location-&gt;program() != m_currentProgram) {
-        synthesizeGLError(GraphicsContext3D::INVALID_OPERATION, &quot;uniform4i&quot;, &quot;location not for current program&quot;);
-        return;
-    }
-
-    m_context-&gt;uniform4i(location-&gt;location(), x, y, z, w);
-}
-
-void WebGLRenderingContextBase::uniform4iv(const WebGLUniformLocation* location, Int32Array&amp; v)
-{
</del><span class="cx">     if (isContextLostOrPending() || !validateUniformParameters(&quot;uniform4iv&quot;, location, v, 4))
</span><span class="cx">         return;
</span><span class="cx"> 
</span><span class="lines">@@ -4406,56 +4346,27 @@
</span><span class="cx">     m_context-&gt;uniform4iv(location-&gt;location(), v.length() / 4, v.data());
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void WebGLRenderingContextBase::uniform4iv(const WebGLUniformLocation* location, GC3Dint* v, GC3Dsizei size)
</del><ins>+void WebGLRenderingContextBase::uniformMatrix2fv(const WebGLUniformLocation* location, GC3Dboolean transpose, Float32List&amp;&amp; v)
</ins><span class="cx"> {
</span><del>-    if (isContextLostOrPending() || !validateUniformParameters(&quot;uniform4iv&quot;, location, v, size, 4))
-        return;
-
-    m_context-&gt;uniform4iv(location-&gt;location(), size / 4, v);
-}
-
-void WebGLRenderingContextBase::uniformMatrix2fv(const WebGLUniformLocation* location, GC3Dboolean transpose, Float32Array&amp; v)
-{
</del><span class="cx">     if (isContextLostOrPending() || !validateUniformMatrixParameters(&quot;uniformMatrix2fv&quot;, location, transpose, v, 4))
</span><span class="cx">         return;
</span><span class="cx">     m_context-&gt;uniformMatrix2fv(location-&gt;location(), v.length() / 4, transpose, v.data());
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void WebGLRenderingContextBase::uniformMatrix2fv(const WebGLUniformLocation* location, GC3Dboolean transpose, GC3Dfloat* v, GC3Dsizei size)
</del><ins>+void WebGLRenderingContextBase::uniformMatrix3fv(const WebGLUniformLocation* location, GC3Dboolean transpose, Float32List&amp;&amp; v)
</ins><span class="cx"> {
</span><del>-    if (isContextLostOrPending() || !validateUniformMatrixParameters(&quot;uniformMatrix2fv&quot;, location, transpose, v, size, 4))
-        return;
-    m_context-&gt;uniformMatrix2fv(location-&gt;location(), size / 4, transpose, v);
-}
-
-void WebGLRenderingContextBase::uniformMatrix3fv(const WebGLUniformLocation* location, GC3Dboolean transpose, Float32Array&amp; v)
-{
</del><span class="cx">     if (isContextLostOrPending() || !validateUniformMatrixParameters(&quot;uniformMatrix3fv&quot;, location, transpose, v, 9))
</span><span class="cx">         return;
</span><span class="cx">     m_context-&gt;uniformMatrix3fv(location-&gt;location(), v.length() / 9, transpose, v.data());
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void WebGLRenderingContextBase::uniformMatrix3fv(const WebGLUniformLocation* location, GC3Dboolean transpose, GC3Dfloat* v, GC3Dsizei size)
</del><ins>+void WebGLRenderingContextBase::uniformMatrix4fv(const WebGLUniformLocation* location, GC3Dboolean transpose, Float32List&amp;&amp; v)
</ins><span class="cx"> {
</span><del>-    if (isContextLostOrPending() || !validateUniformMatrixParameters(&quot;uniformMatrix3fv&quot;, location, transpose, v, size, 9))
-        return;
-    m_context-&gt;uniformMatrix3fv(location-&gt;location(), size / 9, transpose, v);
-}
-
-void WebGLRenderingContextBase::uniformMatrix4fv(const WebGLUniformLocation* location, GC3Dboolean transpose, Float32Array&amp; v)
-{
</del><span class="cx">     if (isContextLostOrPending() || !validateUniformMatrixParameters(&quot;uniformMatrix4fv&quot;, location, transpose, v, 16))
</span><span class="cx">         return;
</span><span class="cx">     m_context-&gt;uniformMatrix4fv(location-&gt;location(), v.length() / 16, transpose, v.data());
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void WebGLRenderingContextBase::uniformMatrix4fv(const WebGLUniformLocation* location, GC3Dboolean transpose, GC3Dfloat* v, GC3Dsizei size)
-{
-    if (isContextLostOrPending() || !validateUniformMatrixParameters(&quot;uniformMatrix4fv&quot;, location, transpose, v, size, 16))
-        return;
-    m_context-&gt;uniformMatrix4fv(location-&gt;location(), size / 16, transpose, v);
-}
-
</del><span class="cx"> void WebGLRenderingContextBase::useProgram(WebGLProgram* program)
</span><span class="cx"> {
</span><span class="cx">     bool deleted;
</span><span class="lines">@@ -4489,59 +4400,39 @@
</span><span class="cx">     vertexAttribfImpl(&quot;vertexAttrib1f&quot;, index, 1, v0, 0.0f, 0.0f, 1.0f);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void WebGLRenderingContextBase::vertexAttrib1fv(GC3Duint index, Float32Array&amp; v)
-{
-    vertexAttribfvImpl(&quot;vertexAttrib1fv&quot;, index, v, 1);
-}
-
-void WebGLRenderingContextBase::vertexAttrib1fv(GC3Duint index, GC3Dfloat* v, GC3Dsizei size)
-{
-    vertexAttribfvImpl(&quot;vertexAttrib1fv&quot;, index, v, size, 1);
-}
-
</del><span class="cx"> void WebGLRenderingContextBase::vertexAttrib2f(GC3Duint index, GC3Dfloat v0, GC3Dfloat v1)
</span><span class="cx"> {
</span><span class="cx">     vertexAttribfImpl(&quot;vertexAttrib2f&quot;, index, 2, v0, v1, 0.0f, 1.0f);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void WebGLRenderingContextBase::vertexAttrib2fv(GC3Duint index, Float32Array&amp; v)
-{
-    vertexAttribfvImpl(&quot;vertexAttrib2fv&quot;, index, v, 2);
-}
-
-void WebGLRenderingContextBase::vertexAttrib2fv(GC3Duint index, GC3Dfloat* v, GC3Dsizei size)
-{
-    vertexAttribfvImpl(&quot;vertexAttrib2fv&quot;, index, v, size, 2);
-}
-
</del><span class="cx"> void WebGLRenderingContextBase::vertexAttrib3f(GC3Duint index, GC3Dfloat v0, GC3Dfloat v1, GC3Dfloat v2)
</span><span class="cx"> {
</span><span class="cx">     vertexAttribfImpl(&quot;vertexAttrib3f&quot;, index, 3, v0, v1, v2, 1.0f);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void WebGLRenderingContextBase::vertexAttrib3fv(GC3Duint index, Float32Array&amp; v)
</del><ins>+void WebGLRenderingContextBase::vertexAttrib4f(GC3Duint index, GC3Dfloat v0, GC3Dfloat v1, GC3Dfloat v2, GC3Dfloat v3)
</ins><span class="cx"> {
</span><del>-    vertexAttribfvImpl(&quot;vertexAttrib3fv&quot;, index, v, 3);
</del><ins>+    vertexAttribfImpl(&quot;vertexAttrib4f&quot;, index, 4, v0, v1, v2, v3);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-void WebGLRenderingContextBase::vertexAttrib3fv(GC3Duint index, GC3Dfloat* v, GC3Dsizei size)
</del><ins>+void WebGLRenderingContextBase::vertexAttrib1fv(GC3Duint index, Float32List&amp;&amp; v)
</ins><span class="cx"> {
</span><del>-    vertexAttribfvImpl(&quot;vertexAttrib3fv&quot;, index, v, size, 3);
</del><ins>+    vertexAttribfvImpl(&quot;vertexAttrib1fv&quot;, index, WTFMove(v), 1);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-void WebGLRenderingContextBase::vertexAttrib4f(GC3Duint index, GC3Dfloat v0, GC3Dfloat v1, GC3Dfloat v2, GC3Dfloat v3)
</del><ins>+void WebGLRenderingContextBase::vertexAttrib2fv(GC3Duint index, Float32List&amp;&amp; v)
</ins><span class="cx"> {
</span><del>-    vertexAttribfImpl(&quot;vertexAttrib4f&quot;, index, 4, v0, v1, v2, v3);
</del><ins>+    vertexAttribfvImpl(&quot;vertexAttrib2fv&quot;, index, WTFMove(v), 2);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-void WebGLRenderingContextBase::vertexAttrib4fv(GC3Duint index, Float32Array&amp; v)
</del><ins>+void WebGLRenderingContextBase::vertexAttrib3fv(GC3Duint index, Float32List&amp;&amp; v)
</ins><span class="cx"> {
</span><del>-    vertexAttribfvImpl(&quot;vertexAttrib4fv&quot;, index, v, 4);
</del><ins>+    vertexAttribfvImpl(&quot;vertexAttrib3fv&quot;, index, WTFMove(v), 3);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-void WebGLRenderingContextBase::vertexAttrib4fv(GC3Duint index, GC3Dfloat* v, GC3Dsizei size)
</del><ins>+void WebGLRenderingContextBase::vertexAttrib4fv(GC3Duint index, Float32List&amp;&amp; v)
</ins><span class="cx"> {
</span><del>-    vertexAttribfvImpl(&quot;vertexAttrib4fv&quot;, index, v, size, 4);
</del><ins>+    vertexAttribfvImpl(&quot;vertexAttrib4fv&quot;, index, WTFMove(v), 4);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void WebGLRenderingContextBase::vertexAttribPointer(GC3Duint index, GC3Dint size, GC3Denum type, GC3Dboolean normalized, GC3Dsizei stride, long long offset)
</span><span class="lines">@@ -5265,12 +5156,12 @@
</span><span class="cx">     return true;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-bool WebGLRenderingContextBase::validateUniformParameters(const char* functionName, const WebGLUniformLocation* location, Float32Array&amp; v, GC3Dsizei requiredMinSize)
</del><ins>+bool WebGLRenderingContextBase::validateUniformParameters(const char* functionName, const WebGLUniformLocation* location, const Float32List&amp; v, GC3Dsizei requiredMinSize)
</ins><span class="cx"> {
</span><span class="cx">     return validateUniformMatrixParameters(functionName, location, false, v.data(), v.length(), requiredMinSize);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-bool WebGLRenderingContextBase::validateUniformParameters(const char* functionName, const WebGLUniformLocation* location, Int32Array&amp; v, GC3Dsizei requiredMinSize)
</del><ins>+bool WebGLRenderingContextBase::validateUniformParameters(const char* functionName, const WebGLUniformLocation* location, const Int32List&amp; v, GC3Dsizei requiredMinSize)
</ins><span class="cx"> {
</span><span class="cx">     return validateUniformMatrixParameters(functionName, location, false, v.data(), v.length(), requiredMinSize);
</span><span class="cx"> }
</span><span class="lines">@@ -5280,7 +5171,7 @@
</span><span class="cx">     return validateUniformMatrixParameters(functionName, location, false, v, size, requiredMinSize);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-bool WebGLRenderingContextBase::validateUniformMatrixParameters(const char* functionName, const WebGLUniformLocation* location, GC3Dboolean transpose, Float32Array&amp; v, GC3Dsizei requiredMinSize)
</del><ins>+bool WebGLRenderingContextBase::validateUniformMatrixParameters(const char* functionName, const WebGLUniformLocation* location, GC3Dboolean transpose, const Float32List&amp; v, GC3Dsizei requiredMinSize)
</ins><span class="cx"> {
</span><span class="cx">     return validateUniformMatrixParameters(functionName, location, transpose, v.data(), v.length(), requiredMinSize);
</span><span class="cx"> }
</span><span class="lines">@@ -5430,21 +5321,18 @@
</span><span class="cx">     attribValue.value[3] = v3;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void WebGLRenderingContextBase::vertexAttribfvImpl(const char* functionName, GC3Duint index, Float32Array&amp; v, GC3Dsizei expectedSize)
</del><ins>+void WebGLRenderingContextBase::vertexAttribfvImpl(const char* functionName, GC3Duint index, Float32List&amp;&amp; list, GC3Dsizei expectedSize)
</ins><span class="cx"> {
</span><span class="cx">     if (isContextLostOrPending())
</span><span class="cx">         return;
</span><del>-    vertexAttribfvImpl(functionName, index, v.data(), v.length(), expectedSize);
-}
-
-void WebGLRenderingContextBase::vertexAttribfvImpl(const char* functionName, GC3Duint index, GC3Dfloat* v, GC3Dsizei size, GC3Dsizei expectedSize)
-{
-    if (isContextLostOrPending())
-        return;
-    if (!v) {
</del><ins>+    
+    auto data = list.data();
+    if (!data) {
</ins><span class="cx">         synthesizeGLError(GraphicsContext3D::INVALID_VALUE, functionName, &quot;no array&quot;);
</span><span class="cx">         return;
</span><span class="cx">     }
</span><ins>+    
+    int size = list.length();
</ins><span class="cx">     if (size &lt; expectedSize) {
</span><span class="cx">         synthesizeGLError(GraphicsContext3D::INVALID_VALUE, functionName, &quot;invalid size&quot;);
</span><span class="cx">         return;
</span><span class="lines">@@ -5457,16 +5345,16 @@
</span><span class="cx">     if (index || isGLES2Compliant()) {
</span><span class="cx">         switch (expectedSize) {
</span><span class="cx">         case 1:
</span><del>-            m_context-&gt;vertexAttrib1fv(index, v);
</del><ins>+            m_context-&gt;vertexAttrib1fv(index, data);
</ins><span class="cx">             break;
</span><span class="cx">         case 2:
</span><del>-            m_context-&gt;vertexAttrib2fv(index, v);
</del><ins>+            m_context-&gt;vertexAttrib2fv(index, data);
</ins><span class="cx">             break;
</span><span class="cx">         case 3:
</span><del>-            m_context-&gt;vertexAttrib3fv(index, v);
</del><ins>+            m_context-&gt;vertexAttrib3fv(index, data);
</ins><span class="cx">             break;
</span><span class="cx">         case 4:
</span><del>-            m_context-&gt;vertexAttrib4fv(index, v);
</del><ins>+            m_context-&gt;vertexAttrib4fv(index, data);
</ins><span class="cx">             break;
</span><span class="cx">         }
</span><span class="cx">     }
</span><span class="lines">@@ -5473,7 +5361,7 @@
</span><span class="cx">     VertexAttribValue&amp; attribValue = m_vertexAttribValue[index];
</span><span class="cx">     attribValue.initValue();
</span><span class="cx">     for (int ii = 0; ii &lt; expectedSize; ++ii)
</span><del>-        attribValue.value[ii] = v[ii];
</del><ins>+        attribValue.value[ii] = data[ii];
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void WebGLRenderingContextBase::initVertexAttrib0()
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlcanvasWebGLRenderingContextBaseh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/canvas/WebGLRenderingContextBase.h (210566 => 210567)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/canvas/WebGLRenderingContextBase.h        2017-01-10 23:45:22 UTC (rev 210566)
+++ trunk/Source/WebCore/html/canvas/WebGLRenderingContextBase.h        2017-01-11 01:02:34 UTC (rev 210567)
</span><span class="lines">@@ -31,10 +31,19 @@
</span><span class="cx"> #include &quot;ImageBuffer.h&quot;
</span><span class="cx"> #include &quot;Timer.h&quot;
</span><span class="cx"> #include &quot;WebGLAny.h&quot;
</span><ins>+#include &quot;WebGLBuffer.h&quot;
</ins><span class="cx"> #include &quot;WebGLContextAttributes.h&quot;
</span><ins>+#include &quot;WebGLFramebuffer.h&quot;
+#include &quot;WebGLProgram.h&quot;
+#include &quot;WebGLRenderbuffer.h&quot;
</ins><span class="cx"> #include &quot;WebGLTexture.h&quot;
</span><ins>+#include &quot;WebGLVertexArrayObjectOES.h&quot;
</ins><span class="cx"> #include &lt;memory&gt;
</span><span class="cx"> 
</span><ins>+#if ENABLE(WEBGL2)
+#include &quot;WebGLVertexArrayObject.h&quot;
+#endif
+
</ins><span class="cx"> namespace WebCore {
</span><span class="cx"> 
</span><span class="cx"> class ANGLEInstancedArrays;
</span><span class="lines">@@ -55,7 +64,6 @@
</span><span class="cx"> class OESVertexArrayObject;
</span><span class="cx"> class OESElementIndexUint;
</span><span class="cx"> class WebGLActiveInfo;
</span><del>-class WebGLBuffer;
</del><span class="cx"> class WebGLContextGroup;
</span><span class="cx"> class WebGLContextObject;
</span><span class="cx"> class WebGLCompressedTextureATC;
</span><span class="lines">@@ -66,16 +74,12 @@
</span><span class="cx"> class WebGLDepthTexture;
</span><span class="cx"> class WebGLDrawBuffers;
</span><span class="cx"> class WebGLExtension;
</span><del>-class WebGLFramebuffer;
</del><span class="cx"> class WebGLLoseContext;
</span><span class="cx"> class WebGLObject;
</span><del>-class WebGLProgram;
-class WebGLRenderbuffer;
</del><span class="cx"> class WebGLShader;
</span><span class="cx"> class WebGLSharedObject;
</span><span class="cx"> class WebGLShaderPrecisionFormat;
</span><span class="cx"> class WebGLUniformLocation;
</span><del>-class WebGLVertexArrayObjectOES;
</del><span class="cx"> 
</span><span class="cx"> inline void clip1D(GC3Dint start, GC3Dsizei range, GC3Dsizei sourceRange, GC3Dint* clippedStart, GC3Dsizei* clippedRange)
</span><span class="cx"> {
</span><span class="lines">@@ -185,7 +189,7 @@
</span><span class="cx"> 
</span><span class="cx">     RefPtr&lt;WebGLActiveInfo&gt; getActiveAttrib(WebGLProgram*, GC3Duint index);
</span><span class="cx">     RefPtr&lt;WebGLActiveInfo&gt; getActiveUniform(WebGLProgram*, GC3Duint index);
</span><del>-    bool getAttachedShaders(WebGLProgram*, Vector&lt;RefPtr&lt;WebGLShader&gt;&gt;&amp;);
</del><ins>+    std::optional&lt;Vector&lt;RefPtr&lt;WebGLShader&gt;&gt;&gt; getAttachedShaders(WebGLProgram*);
</ins><span class="cx">     GC3Dint getAttribLocation(WebGLProgram*, const String&amp; name);
</span><span class="cx">     WebGLAny getBufferParameter(GC3Denum target, GC3Denum pname);
</span><span class="cx">     std::optional&lt;WebGLContextAttributes&gt; getContextAttributes();
</span><span class="lines">@@ -200,7 +204,7 @@
</span><span class="cx">     String getShaderInfoLog(WebGLShader*);
</span><span class="cx">     RefPtr&lt;WebGLShaderPrecisionFormat&gt; getShaderPrecisionFormat(GC3Denum shaderType, GC3Denum precisionType);
</span><span class="cx">     String getShaderSource(WebGLShader*);
</span><del>-    virtual Vector&lt;String&gt; getSupportedExtensions() = 0;
</del><ins>+    virtual std::optional&lt;Vector&lt;String&gt;&gt; getSupportedExtensions() = 0;
</ins><span class="cx">     WebGLAny getTexParameter(GC3Denum target, GC3Denum pname);
</span><span class="cx">     WebGLAny getUniform(WebGLProgram*, const WebGLUniformLocation*);
</span><span class="cx">     RefPtr&lt;WebGLUniformLocation&gt; getUniformLocation(WebGLProgram*, const String&amp;);
</span><span class="lines">@@ -245,52 +249,76 @@
</span><span class="cx">     void texSubImage2D(GC3Denum target, GC3Dint level, GC3Dint xoffset, GC3Dint yoffset, GC3Dsizei width, GC3Dsizei height, GC3Denum format, GC3Denum type, RefPtr&lt;ArrayBufferView&gt;&amp;&amp;);
</span><span class="cx">     ExceptionOr&lt;void&gt; texSubImage2D(GC3Denum target, GC3Dint level, GC3Dint xoffset, GC3Dint yoffset, GC3Denum format, GC3Denum type, std::optional&lt;TexImageSource&gt;&amp;&amp;);
</span><span class="cx"> 
</span><ins>+    template &lt;class TypedArray, class DataType&gt;
+    class TypedList {
+    public:
+        using VariantType = Variant&lt;RefPtr&lt;TypedArray&gt;, Vector&lt;DataType&gt;&gt;;
+
+        TypedList(VariantType&amp;&amp; variant)
+            : m_variant(WTFMove(variant))
+        {
+        }
+
+        DataType* data() const
+        {
+            return WTF::switchOn(m_variant,
+                [] (const RefPtr&lt;TypedArray&gt;&amp; typedArray) -&gt; DataType* { return typedArray-&gt;data(); },
+                [] (const Vector&lt;DataType&gt;&amp; vector) -&gt; DataType* { return const_cast&lt;Vector&lt;DataType&gt;&amp;&gt;(vector).data(); }
+            );
+        }
+
+        GC3Dsizei length() const
+        {
+            return WTF::switchOn(m_variant,
+                [] (const RefPtr&lt;TypedArray&gt;&amp; typedArray) -&gt; GC3Dsizei { return typedArray-&gt;length(); },
+                [] (const Vector&lt;DataType&gt;&amp; vector) -&gt; GC3Dsizei { return vector.size(); }
+            );
+        }
+
+    private:
+        VariantType m_variant;
+    };
+
+    using Float32List = TypedList&lt;Float32Array, float&gt;;
+    using Int32List = TypedList&lt;Int32Array, int&gt;;
+
</ins><span class="cx">     void uniform1f(const WebGLUniformLocation*, GC3Dfloat x);
</span><del>-    void uniform1fv(const WebGLUniformLocation*, Float32Array&amp; v);
-    void uniform1fv(const WebGLUniformLocation*, GC3Dfloat* v, GC3Dsizei);
</del><ins>+    void uniform2f(const WebGLUniformLocation*, GC3Dfloat x, GC3Dfloat y);
+    void uniform3f(const WebGLUniformLocation*, GC3Dfloat x, GC3Dfloat y, GC3Dfloat z);
+    void uniform4f(const WebGLUniformLocation*, GC3Dfloat x, GC3Dfloat y, GC3Dfloat z, GC3Dfloat w);
+
</ins><span class="cx">     void uniform1i(const WebGLUniformLocation*, GC3Dint x);
</span><del>-    void uniform1iv(const WebGLUniformLocation*, Int32Array&amp; v);
-    void uniform1iv(const WebGLUniformLocation*, GC3Dint* v, GC3Dsizei);
-    void uniform2f(const WebGLUniformLocation*, GC3Dfloat x, GC3Dfloat y);
-    void uniform2fv(const WebGLUniformLocation*, Float32Array&amp; v);
-    void uniform2fv(const WebGLUniformLocation*, GC3Dfloat* v, GC3Dsizei);
</del><span class="cx">     void uniform2i(const WebGLUniformLocation*, GC3Dint x, GC3Dint y);
</span><del>-    void uniform2iv(const WebGLUniformLocation*, Int32Array&amp; v);
-    void uniform2iv(const WebGLUniformLocation*, GC3Dint* v, GC3Dsizei);
-    void uniform3f(const WebGLUniformLocation*, GC3Dfloat x, GC3Dfloat y, GC3Dfloat z);
-    void uniform3fv(const WebGLUniformLocation*, Float32Array&amp; v);
-    void uniform3fv(const WebGLUniformLocation*, GC3Dfloat* v, GC3Dsizei);
</del><span class="cx">     void uniform3i(const WebGLUniformLocation*, GC3Dint x, GC3Dint y, GC3Dint z);
</span><del>-    void uniform3iv(const WebGLUniformLocation*, Int32Array&amp; v);
-    void uniform3iv(const WebGLUniformLocation*, GC3Dint* v, GC3Dsizei);
-    void uniform4f(const WebGLUniformLocation*, GC3Dfloat x, GC3Dfloat y, GC3Dfloat z, GC3Dfloat w);
-    void uniform4fv(const WebGLUniformLocation*, Float32Array&amp; v);
-    void uniform4fv(const WebGLUniformLocation*, GC3Dfloat* v, GC3Dsizei);
</del><span class="cx">     void uniform4i(const WebGLUniformLocation*, GC3Dint x, GC3Dint y, GC3Dint z, GC3Dint w);
</span><del>-    void uniform4iv(const WebGLUniformLocation*, Int32Array&amp; v);
-    void uniform4iv(const WebGLUniformLocation*, GC3Dint* v, GC3Dsizei);
-    void uniformMatrix2fv(const WebGLUniformLocation*, GC3Dboolean transpose, Float32Array&amp; value);
-    void uniformMatrix2fv(const WebGLUniformLocation*, GC3Dboolean transpose, GC3Dfloat* value, GC3Dsizei);
-    void uniformMatrix3fv(const WebGLUniformLocation*, GC3Dboolean transpose, Float32Array&amp; value);
-    void uniformMatrix3fv(const WebGLUniformLocation*, GC3Dboolean transpose, GC3Dfloat* value, GC3Dsizei);
-    void uniformMatrix4fv(const WebGLUniformLocation*, GC3Dboolean transpose, Float32Array&amp; value);
-    void uniformMatrix4fv(const WebGLUniformLocation*, GC3Dboolean transpose, GC3Dfloat* value, GC3Dsizei);
</del><span class="cx"> 
</span><ins>+    void uniform1fv(const WebGLUniformLocation*, Float32List&amp;&amp;);
+    void uniform2fv(const WebGLUniformLocation*, Float32List&amp;&amp;);
+    void uniform3fv(const WebGLUniformLocation*, Float32List&amp;&amp;);
+    void uniform4fv(const WebGLUniformLocation*, Float32List&amp;&amp;);
+
+    void uniform1iv(const WebGLUniformLocation*, Int32List&amp;&amp;);
+    void uniform2iv(const WebGLUniformLocation*, Int32List&amp;&amp;);
+    void uniform3iv(const WebGLUniformLocation*, Int32List&amp;&amp;);
+    void uniform4iv(const WebGLUniformLocation*, Int32List&amp;&amp;);
+
+    void uniformMatrix2fv(const WebGLUniformLocation*, GC3Dboolean transpose, Float32List&amp;&amp;);
+    void uniformMatrix3fv(const WebGLUniformLocation*, GC3Dboolean transpose, Float32List&amp;&amp;);
+    void uniformMatrix4fv(const WebGLUniformLocation*, GC3Dboolean transpose, Float32List&amp;&amp;);
+
</ins><span class="cx">     void useProgram(WebGLProgram*);
</span><span class="cx">     void validateProgram(WebGLProgram*);
</span><span class="cx"> 
</span><span class="cx">     void vertexAttrib1f(GC3Duint index, GC3Dfloat x);
</span><del>-    void vertexAttrib1fv(GC3Duint index, Float32Array&amp; values);
-    void vertexAttrib1fv(GC3Duint index, GC3Dfloat* values, GC3Dsizei size);
</del><span class="cx">     void vertexAttrib2f(GC3Duint index, GC3Dfloat x, GC3Dfloat y);
</span><del>-    void vertexAttrib2fv(GC3Duint index, Float32Array&amp; values);
-    void vertexAttrib2fv(GC3Duint index, GC3Dfloat* values, GC3Dsizei size);
</del><span class="cx">     void vertexAttrib3f(GC3Duint index, GC3Dfloat x, GC3Dfloat y, GC3Dfloat z);
</span><del>-    void vertexAttrib3fv(GC3Duint index, Float32Array&amp; values);
-    void vertexAttrib3fv(GC3Duint index, GC3Dfloat* values, GC3Dsizei size);
</del><span class="cx">     void vertexAttrib4f(GC3Duint index, GC3Dfloat x, GC3Dfloat y, GC3Dfloat z, GC3Dfloat w);
</span><del>-    void vertexAttrib4fv(GC3Duint index, Float32Array&amp; values);
-    void vertexAttrib4fv(GC3Duint index, GC3Dfloat* values, GC3Dsizei size);
</del><ins>+
+    void vertexAttrib1fv(GC3Duint index, Float32List&amp;&amp;);
+    void vertexAttrib2fv(GC3Duint index, Float32List&amp;&amp;);
+    void vertexAttrib3fv(GC3Duint index, Float32List&amp;&amp;);
+    void vertexAttrib4fv(GC3Duint index, Float32List&amp;&amp;);
+
</ins><span class="cx">     void vertexAttribPointer(GC3Duint index, GC3Dint size, GC3Denum type, GC3Dboolean normalized,
</span><span class="cx">         GC3Dsizei stride, long long offset);
</span><span class="cx"> 
</span><span class="lines">@@ -729,10 +757,10 @@
</span><span class="cx">     virtual bool validateCapability(const char* functionName, GC3Denum) = 0;
</span><span class="cx"> 
</span><span class="cx">     // Helper function to validate input parameters for uniform functions.
</span><del>-    bool validateUniformParameters(const char* functionName, const WebGLUniformLocation*, Float32Array&amp;, GC3Dsizei mod);
-    bool validateUniformParameters(const char* functionName, const WebGLUniformLocation*, Int32Array&amp;, GC3Dsizei mod);
</del><ins>+    bool validateUniformParameters(const char* functionName, const WebGLUniformLocation*, const Float32List&amp;, GC3Dsizei mod);
+    bool validateUniformParameters(const char* functionName, const WebGLUniformLocation*, const Int32List&amp;, GC3Dsizei mod);
</ins><span class="cx">     bool validateUniformParameters(const char* functionName, const WebGLUniformLocation*, void*, GC3Dsizei, GC3Dsizei mod);
</span><del>-    bool validateUniformMatrixParameters(const char* functionName, const WebGLUniformLocation*, GC3Dboolean transpose, Float32Array&amp;, GC3Dsizei mod);
</del><ins>+    bool validateUniformMatrixParameters(const char* functionName, const WebGLUniformLocation*, GC3Dboolean transpose, const Float32List&amp;, GC3Dsizei mod);
</ins><span class="cx">     bool validateUniformMatrixParameters(const char* functionName, const WebGLUniformLocation*, GC3Dboolean transpose, void*, GC3Dsizei, GC3Dsizei mod);
</span><span class="cx"> 
</span><span class="cx">     // Helper function to validate parameters for bufferData.
</span><span class="lines">@@ -748,8 +776,7 @@
</span><span class="cx"> 
</span><span class="cx">     // Helper functions for vertexAttribNf{v}.
</span><span class="cx">     void vertexAttribfImpl(const char* functionName, GC3Duint index, GC3Dsizei expectedSize, GC3Dfloat, GC3Dfloat, GC3Dfloat, GC3Dfloat);
</span><del>-    void vertexAttribfvImpl(const char* functionName, GC3Duint index, Float32Array&amp;, GC3Dsizei expectedSize);
-    void vertexAttribfvImpl(const char* functionName, GC3Duint index, GC3Dfloat*, GC3Dsizei, GC3Dsizei expectedSize);
</del><ins>+    void vertexAttribfvImpl(const char* functionName, GC3Duint index, Float32List&amp;&amp;, GC3Dsizei expectedSize);
</ins><span class="cx"> 
</span><span class="cx">     // Helper function for delete* (deleteBuffer, deleteProgram, etc) functions.
</span><span class="cx">     // Return false if caller should return without further processing.
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlcanvasWebGLRenderingContextBaseidl"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/canvas/WebGLRenderingContextBase.idl (210566 => 210567)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/canvas/WebGLRenderingContextBase.idl        2017-01-10 23:45:22 UTC (rev 210566)
+++ trunk/Source/WebCore/html/canvas/WebGLRenderingContextBase.idl        2017-01-11 01:02:34 UTC (rev 210567)
</span><span class="lines">@@ -38,6 +38,8 @@
</span><span class="cx"> typedef unrestricted float GLfloat;
</span><span class="cx"> typedef unrestricted float GLclampf;
</span><span class="cx"> typedef (ArrayBuffer or ArrayBufferView) BufferDataSource;
</span><ins>+typedef (Float32Array or sequence&lt;GLfloat&gt;) Float32List;
+typedef (Int32Array or sequence&lt;GLint&gt;) Int32List;
</ins><span class="cx"> 
</span><span class="cx"> // FIXME: Should allow ImageBitmap too.
</span><span class="cx"> typedef (ImageData or HTMLImageElement or HTMLCanvasElement or HTMLVideoElement) TexImageSource;
</span><span class="lines">@@ -545,25 +547,26 @@
</span><span class="cx">     WebGLActiveInfo getActiveAttrib(WebGLProgram? program, GLuint index);
</span><span class="cx">     WebGLActiveInfo getActiveUniform(WebGLProgram? program, GLuint index);
</span><span class="cx"> 
</span><del>-    [Custom] void getAttachedShaders(WebGLProgram? program);
</del><ins>+    // FIXME: The spec says this should not take a nullable WebGLProgram.
+    sequence&lt;WebGLShader&gt;? getAttachedShaders(WebGLProgram? program);
</ins><span class="cx"> 
</span><span class="cx">     GLint getAttribLocation(WebGLProgram? program, DOMString name);
</span><span class="cx"> 
</span><del>-    [Custom] any getBufferParameter(GLenum target, GLenum pname);
</del><ins>+    [OverrideIDLType=IDLWebGLAny] any getBufferParameter(GLenum target, GLenum pname);
</ins><span class="cx"> 
</span><span class="cx">     WebGLContextAttributes? getContextAttributes();
</span><span class="cx"> 
</span><span class="cx">     GLenum getError();
</span><span class="cx"> 
</span><del>-    // object getExtension(DOMString name);
-    [Custom] any getExtension(DOMString name);
</del><ins>+    sequence&lt;DOMString&gt;? getSupportedExtensions();
+    [Custom] object? getExtension(DOMString name);
</ins><span class="cx"> 
</span><del>-    [Custom] any getFramebufferAttachmentParameter(GLenum target, GLenum attachment, GLenum pname);
-    [Custom] any getParameter(GLenum pname);
-    [Custom] any getProgramParameter(WebGLProgram? program, GLenum pname);
</del><ins>+    [OverrideIDLType=IDLWebGLAny] any getFramebufferAttachmentParameter(GLenum target, GLenum attachment, GLenum pname);
+    [OverrideIDLType=IDLWebGLAny] any getParameter(GLenum pname);
+    [OverrideIDLType=IDLWebGLAny] any getProgramParameter(WebGLProgram? program, GLenum pname);
</ins><span class="cx">     DOMString? getProgramInfoLog(WebGLProgram? program);
</span><del>-    [Custom] any getRenderbufferParameter(GLenum target, GLenum pname);
-    [Custom] any getShaderParameter(WebGLShader? shader, GLenum pname);
</del><ins>+    [OverrideIDLType=IDLWebGLAny] any getRenderbufferParameter(GLenum target, GLenum pname);
+    [OverrideIDLType=IDLWebGLAny] any getShaderParameter(WebGLShader? shader, GLenum pname);
</ins><span class="cx"> 
</span><span class="cx">     DOMString? getShaderInfoLog(WebGLShader? shader);
</span><span class="cx"> 
</span><span class="lines">@@ -571,15 +574,13 @@
</span><span class="cx"> 
</span><span class="cx">     DOMString? getShaderSource(WebGLShader? shader);
</span><span class="cx"> 
</span><del>-    [Custom] sequence&lt;DOMString&gt; getSupportedExtensions();
</del><ins>+    [OverrideIDLType=IDLWebGLAny] any getTexParameter(GLenum target, GLenum pname);
</ins><span class="cx"> 
</span><del>-    [Custom] any getTexParameter(GLenum target, GLenum pname);
</del><ins>+    [OverrideIDLType=IDLWebGLAny] any getUniform(WebGLProgram? program, WebGLUniformLocation? location);
</ins><span class="cx"> 
</span><del>-    [Custom] any getUniform(WebGLProgram? program, WebGLUniformLocation? location);
-
</del><span class="cx">     WebGLUniformLocation getUniformLocation(WebGLProgram? program, DOMString name);
</span><span class="cx"> 
</span><del>-    [Custom] any getVertexAttrib(GLuint index, GLenum pname);
</del><ins>+    [OverrideIDLType=IDLWebGLAny] any getVertexAttrib(GLuint index, GLenum pname);
</ins><span class="cx"> 
</span><span class="cx">     GLsizeiptr getVertexAttribOffset(GLuint index, GLenum pname);
</span><span class="cx"> 
</span><span class="lines">@@ -622,37 +623,42 @@
</span><span class="cx">     [MayThrowException] void texSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLenum format, GLenum type, TexImageSource? source);
</span><span class="cx"> 
</span><span class="cx">     void uniform1f(WebGLUniformLocation? location, GLfloat x);
</span><del>-    [Custom] void uniform1fv(WebGLUniformLocation? location, Float32Array v);
</del><ins>+    void uniform2f(WebGLUniformLocation? location, GLfloat x, GLfloat y);
+    void uniform3f(WebGLUniformLocation? location, GLfloat x, GLfloat y, GLfloat z);
+    void uniform4f(WebGLUniformLocation? location, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
+
</ins><span class="cx">     void uniform1i(WebGLUniformLocation? location, GLint x);
</span><del>-    [Custom] void uniform1iv(WebGLUniformLocation? location, Int32Array v);
-    void uniform2f(WebGLUniformLocation? location, GLfloat x, GLfloat y);
-    [Custom] void uniform2fv(WebGLUniformLocation? location, Float32Array v);
</del><span class="cx">     void uniform2i(WebGLUniformLocation? location, GLint x, GLint y);
</span><del>-    [Custom] void uniform2iv(WebGLUniformLocation? location, Int32Array v);
-    void uniform3f(WebGLUniformLocation? location, GLfloat x, GLfloat y, GLfloat z);
-    [Custom] void uniform3fv(WebGLUniformLocation? location, Float32Array v);
</del><span class="cx">     void uniform3i(WebGLUniformLocation? location, GLint x, GLint y, GLint z);
</span><del>-    [Custom] void uniform3iv(WebGLUniformLocation? location, Int32Array v);
-    void uniform4f(WebGLUniformLocation? location, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
-    [Custom] void uniform4fv(WebGLUniformLocation? location, Float32Array v);
</del><span class="cx">     void uniform4i(WebGLUniformLocation? location, GLint x, GLint y, GLint z, GLint w);
</span><del>-    [Custom] void uniform4iv(WebGLUniformLocation? location, Int32Array v);
</del><span class="cx"> 
</span><del>-    [Custom] void uniformMatrix2fv(WebGLUniformLocation? location, GLboolean transpose, Float32Array array);
-    [Custom] void uniformMatrix3fv(WebGLUniformLocation? location, GLboolean transpose, Float32Array array);
-    [Custom] void uniformMatrix4fv(WebGLUniformLocation? location, GLboolean transpose, Float32Array array);
</del><ins>+    void uniform1fv(WebGLUniformLocation? location, Float32List v);
+    void uniform2fv(WebGLUniformLocation? location, Float32List v);
+    void uniform3fv(WebGLUniformLocation? location, Float32List v);
+    void uniform4fv(WebGLUniformLocation? location, Float32List v);
</ins><span class="cx"> 
</span><ins>+    void uniform1iv(WebGLUniformLocation? location, Int32List v);
+    void uniform2iv(WebGLUniformLocation? location, Int32List v);
+    void uniform3iv(WebGLUniformLocation? location, Int32List v);
+    void uniform4iv(WebGLUniformLocation? location, Int32List v);
+
+    void uniformMatrix2fv(WebGLUniformLocation? location, GLboolean transpose, Float32List array);
+    void uniformMatrix3fv(WebGLUniformLocation? location, GLboolean transpose, Float32List array);
+    void uniformMatrix4fv(WebGLUniformLocation? location, GLboolean transpose, Float32List array);
+
</ins><span class="cx">     void useProgram(WebGLProgram? program);
</span><span class="cx">     void validateProgram(WebGLProgram? program);
</span><span class="cx"> 
</span><del>-    void vertexAttrib1f(GLuint indx, GLfloat x);
-    [Custom] void vertexAttrib1fv(GLuint indx, Float32Array values);
-    void vertexAttrib2f(GLuint indx, GLfloat x, GLfloat y);
-    [Custom] void vertexAttrib2fv(GLuint indx, Float32Array values);
-    void vertexAttrib3f(GLuint indx, GLfloat x, GLfloat y, GLfloat z);
-    [Custom] void vertexAttrib3fv(GLuint indx, Float32Array values);
-    void vertexAttrib4f(GLuint indx, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
-    [Custom] void vertexAttrib4fv(GLuint indx, Float32Array values);
</del><ins>+    void vertexAttrib1f(GLuint index, GLfloat x);
+    void vertexAttrib2f(GLuint index, GLfloat x, GLfloat y);
+    void vertexAttrib3f(GLuint index, GLfloat x, GLfloat y, GLfloat z);
+    void vertexAttrib4f(GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
+
+    void vertexAttrib1fv(GLuint index, Float32List values);
+    void vertexAttrib2fv(GLuint index, Float32List values);
+    void vertexAttrib3fv(GLuint index, Float32List values);
+    void vertexAttrib4fv(GLuint index, Float32List values);
+
</ins><span class="cx">     void vertexAttribPointer(GLuint indx, GLint size, GLenum type, GLboolean normalized, GLsizei stride, GLintptr offset);
</span><span class="cx"> 
</span><span class="cx">     void viewport(GLint x, GLint y, GLsizei width, GLsizei height);
</span></span></pre>
</div>
</div>

</body>
</html>