<!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>[209549] 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/209549">209549</a></dd>
<dt>Author</dt> <dd>weinig@apple.com</dd>
<dt>Date</dt> <dd>2016-12-08 11:09:35 -0800 (Thu, 08 Dec 2016)</dd>
</dl>
<h3>Log Message</h3>
<pre>[WebIDL] WebGLContextAttributes should be a dictionary
https://bugs.webkit.org/show_bug.cgi?id=165572
Reviewed by Dean Jackson.
Source/WebCore:
* CMakeLists.txt:
* WebCore.xcodeproj/project.pbxproj:
Remove unused files.
* bindings/js/JSHTMLCanvasElementCustom.cpp:
(WebCore::JSHTMLCanvasElement::getContext):
(WebCore::attributesFor3DContext): Deleted.
Re-work getContext to use JSDOMConvert and use the WebGLContextAttributes dictionary.
* bindings/scripts/CodeGeneratorJS.pm:
(NativeToJSValueDOMConvertNeedsState):
(NativeToJSValueDOMConvertNeedsGlobalObject):
Add missing inclusion of dictionaries.
* html/HTMLCanvasElement.cpp:
(WebCore::maxActivePixelMemory):
(WebCore::HTMLCanvasElement::getContext):
(WebCore::HTMLCanvasElement::is2dType):
(WebCore::HTMLCanvasElement::getContext2d):
(WebCore::shouldEnableWebGL):
(WebCore::HTMLCanvasElement::is3dType):
(WebCore::HTMLCanvasElement::getContextWebGL):
* html/HTMLCanvasElement.h:
Refactor context creation of 2d and WebGL contexts into their own functions. Make the
WebGL one take a WebGLContextAttributes struct.
* html/HTMLCanvasElement.idl:
No functionality change. Make IDL match the latest spec.
* html/canvas/CanvasContextAttributes.cpp: Removed.
* html/canvas/CanvasContextAttributes.h: Removed.
Remove unneeded base class.
* html/canvas/WebGLContextAttributes.cpp: Removed.
* html/canvas/WebGLContextAttributes.h:
Instead of a class, we can use a type alias of GraphicsContext3D::Attributes for
WebGLContextAttributes.
* html/canvas/WebGLContextAttributes.idl:
Convert to a dictionary.
* html/canvas/WebGL2RenderingContext.cpp:
* html/canvas/WebGL2RenderingContext.h:
* html/canvas/WebGLRenderingContextBase.cpp:
(WebCore::WebGLRenderingContextBase::create):
(WebCore::WebGLRenderingContextBase::WebGLRenderingContextBase):
(WebCore::WebGLRenderingContextBase::clearIfComposited):
(WebCore::WebGLRenderingContextBase::getContextAttributes):
(WebCore::WebGLRenderingContextBase::applyStencilTest):
* html/canvas/WebGLRenderingContextBase.h:
Update to WebGLContextAttributes by value, since it is a simple struct now. Update getContextAttributes
to return a std::optional<WebGLContextAttributes>.
* html/canvas/WebGLRenderingContextBase.idl:
Make getContextAttributes return a nullable WebGLContextAttributes, as per spec.
* platform/graphics/GraphicsContext3D.h:
Sort attributes into categories, one that match WebGLContextAttributes, and the remainder.
LayoutTests:
* fast/canvas/webgl/context-creation-attributes-expected.txt:
Update test results.</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsChangeLog">trunk/LayoutTests/ChangeLog</a></li>
<li><a href="#trunkLayoutTestsfastcanvaswebglcontextcreationattributesexpectedtxt">trunk/LayoutTests/fast/canvas/webgl/context-creation-attributes-expected.txt</a></li>
<li><a href="#trunkSourceWebCoreCMakeListstxt">trunk/Source/WebCore/CMakeLists.txt</a></li>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreWebCorexcodeprojprojectpbxproj">trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj</a></li>
<li><a href="#trunkSourceWebCorebindingsjsJSHTMLCanvasElementCustomcpp">trunk/Source/WebCore/bindings/js/JSHTMLCanvasElementCustom.cpp</a></li>
<li><a href="#trunkSourceWebCorebindingsscriptsCodeGeneratorJSpm">trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm</a></li>
<li><a href="#trunkSourceWebCorebindingsscriptstestJSJSTestObjcpp">trunk/Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp</a></li>
<li><a href="#trunkSourceWebCorebindingsscriptstestTestObjidl">trunk/Source/WebCore/bindings/scripts/test/TestObj.idl</a></li>
<li><a href="#trunkSourceWebCorehtmlHTMLCanvasElementcpp">trunk/Source/WebCore/html/HTMLCanvasElement.cpp</a></li>
<li><a href="#trunkSourceWebCorehtmlHTMLCanvasElementh">trunk/Source/WebCore/html/HTMLCanvasElement.h</a></li>
<li><a href="#trunkSourceWebCorehtmlHTMLCanvasElementidl">trunk/Source/WebCore/html/HTMLCanvasElement.idl</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="#trunkSourceWebCorehtmlcanvasWebGLContextAttributesh">trunk/Source/WebCore/html/canvas/WebGLContextAttributes.h</a></li>
<li><a href="#trunkSourceWebCorehtmlcanvasWebGLContextAttributesidl">trunk/Source/WebCore/html/canvas/WebGLContextAttributes.idl</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>
<li><a href="#trunkSourceWebCoreplatformgraphicsGraphicsContext3Dh">trunk/Source/WebCore/platform/graphics/GraphicsContext3D.h</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicscairoGraphicsContext3DCairocpp">trunk/Source/WebCore/platform/graphics/cairo/GraphicsContext3DCairo.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicseflGraphicsContext3DEflcpp">trunk/Source/WebCore/platform/graphics/efl/GraphicsContext3DEfl.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicsgstreamerMediaPlayerPrivateGStreamerBasecpp">trunk/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicsmacGraphicsContext3DMacmm">trunk/Source/WebCore/platform/graphics/mac/GraphicsContext3DMac.mm</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicsopenglGraphicsContext3DOpenGLCommoncpp">trunk/Source/WebCore/platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicswinGraphicsContext3DWincpp">trunk/Source/WebCore/platform/graphics/win/GraphicsContext3DWin.cpp</a></li>
</ul>
<h3>Added Paths</h3>
<ul>
<li><a href="#trunkSourceWebCoreplatformgraphicsGraphicsContext3DAttributesh">trunk/Source/WebCore/platform/graphics/GraphicsContext3DAttributes.h</a></li>
</ul>
<h3>Removed Paths</h3>
<ul>
<li><a href="#trunkSourceWebCorehtmlcanvasCanvasContextAttributescpp">trunk/Source/WebCore/html/canvas/CanvasContextAttributes.cpp</a></li>
<li><a href="#trunkSourceWebCorehtmlcanvasCanvasContextAttributesh">trunk/Source/WebCore/html/canvas/CanvasContextAttributes.h</a></li>
<li><a href="#trunkSourceWebCorehtmlcanvasWebGLContextAttributescpp">trunk/Source/WebCore/html/canvas/WebGLContextAttributes.cpp</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ChangeLog (209548 => 209549)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ChangeLog        2016-12-08 18:57:34 UTC (rev 209548)
+++ trunk/LayoutTests/ChangeLog        2016-12-08 19:09:35 UTC (rev 209549)
</span><span class="lines">@@ -1,3 +1,40 @@
</span><ins>+2016-12-08 Sam Weinig <sam@webkit.org>
+
+ [WebIDL] WebGLContextAttributes should be a dictionary
+ https://bugs.webkit.org/show_bug.cgi?id=165572
+
+ Reviewed by Dean Jackson.
+
+ * fast/canvas/webgl/context-creation-attributes-expected.txt:
+ Update test results.
+
+2016-12-05 Sam Weinig <sam@webkit.org>
+
+ [WebIDL] Add support for converting dictionaries to JS
+ https://bugs.webkit.org/show_bug.cgi?id=165367
+
+ Reviewed by Darin Adler and Alex Christensen.
+
+ * crypto/subtle/rsa-oaep-generate-key-expected.txt:
+ * crypto/subtle/rsa-oaep-generate-key.html:
+ * crypto/subtle/rsaes-pkcs1-v1_5-generate-key-expected.txt:
+ * crypto/subtle/rsaes-pkcs1-v1_5-generate-key-extractable-expected.txt:
+ * crypto/subtle/rsaes-pkcs1-v1_5-generate-key-extractable.html:
+ * crypto/subtle/rsaes-pkcs1-v1_5-generate-key.html:
+ * crypto/subtle/rsassa-pkcs1-v1_5-generate-key-expected.txt:
+ * crypto/subtle/rsassa-pkcs1-v1_5-generate-key.html:
+ * crypto/webkitSubtle/rsa-oaep-generate-non-extractable-key-expected.txt:
+ * crypto/webkitSubtle/rsa-oaep-generate-non-extractable-key.html:
+ * crypto/webkitSubtle/rsa-oaep-key-manipulation-expected.txt:
+ * crypto/webkitSubtle/rsa-oaep-key-manipulation.html:
+ * crypto/webkitSubtle/rsassa-pkcs1-v1_5-generate-key-expected.txt:
+ * crypto/webkitSubtle/rsassa-pkcs1-v1_5-generate-key-with-leading-zeroes-in-exponent-expected.txt:
+ * crypto/webkitSubtle/rsassa-pkcs1-v1_5-generate-key-with-leading-zeroes-in-exponent.html:
+ * crypto/webkitSubtle/rsassa-pkcs1-v1_5-generate-key.html:
+ * crypto/workers/subtle/resources/rsa-generate-key.js:
+ * crypto/workers/subtle/rsa-generate-key-expected.txt:
+ Update tests and expected results to show that CryptoKeyPair is now a vanilla object, not a platform object.
+
</ins><span class="cx"> 2016-12-08 Dave Hyatt <hyatt@apple.com>
</span><span class="cx">
</span><span class="cx"> [CSS Parser] Unskip/remove more tests
</span></span></pre></div>
<a id="trunkLayoutTestsfastcanvaswebglcontextcreationattributesexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/canvas/webgl/context-creation-attributes-expected.txt (209548 => 209549)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/canvas/webgl/context-creation-attributes-expected.txt        2016-12-08 18:57:34 UTC (rev 209548)
+++ trunk/LayoutTests/fast/canvas/webgl/context-creation-attributes-expected.txt        2016-12-08 19:09:35 UTC (rev 209549)
</span><span class="lines">@@ -1,6 +1,6 @@
</span><span class="cx"> Note that some of the values tested here might not be supported, and thus should return the default values.
</span><span class="cx">
</span><del>-{"alpha":true,"depth":true,"stencil":false,"antialias":true,"premultipliedAlpha":true,"preserveDrawingBuffer":false,"preferLowPowerToHighPerformance":false,"failIfMajorPerformanceCaveat":false}
-{"alpha":true,"depth":true,"stencil":true,"antialias":true,"premultipliedAlpha":true,"preserveDrawingBuffer":false,"preferLowPowerToHighPerformance":false,"failIfMajorPerformanceCaveat":false}
-{"alpha":true,"depth":true,"stencil":false,"antialias":true,"premultipliedAlpha":true,"preserveDrawingBuffer":false,"preferLowPowerToHighPerformance":true,"failIfMajorPerformanceCaveat":false}
-{"alpha":true,"depth":true,"stencil":false,"antialias":true,"premultipliedAlpha":true,"preserveDrawingBuffer":false,"preferLowPowerToHighPerformance":false,"failIfMajorPerformanceCaveat":false}
</del><ins>+{"alpha":true,"antialias":true,"depth":true,"failIfMajorPerformanceCaveat":false,"preferLowPowerToHighPerformance":false,"premultipliedAlpha":true,"preserveDrawingBuffer":false,"stencil":false}
+{"alpha":true,"antialias":true,"depth":true,"failIfMajorPerformanceCaveat":false,"preferLowPowerToHighPerformance":false,"premultipliedAlpha":true,"preserveDrawingBuffer":false,"stencil":true}
+{"alpha":true,"antialias":true,"depth":true,"failIfMajorPerformanceCaveat":false,"preferLowPowerToHighPerformance":true,"premultipliedAlpha":true,"preserveDrawingBuffer":false,"stencil":false}
+{"alpha":true,"antialias":true,"depth":true,"failIfMajorPerformanceCaveat":true,"preferLowPowerToHighPerformance":false,"premultipliedAlpha":true,"preserveDrawingBuffer":false,"stencil":false}
</ins></span></pre></div>
<a id="trunkSourceWebCoreCMakeListstxt"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/CMakeLists.txt (209548 => 209549)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/CMakeLists.txt        2016-12-08 18:57:34 UTC (rev 209548)
+++ trunk/Source/WebCore/CMakeLists.txt        2016-12-08 19:09:35 UTC (rev 209549)
</span><span class="lines">@@ -1783,7 +1783,6 @@
</span><span class="cx"> html/WeekInputType.cpp
</span><span class="cx">
</span><span class="cx"> html/canvas/ANGLEInstancedArrays.cpp
</span><del>- html/canvas/CanvasContextAttributes.cpp
</del><span class="cx"> html/canvas/CanvasGradient.cpp
</span><span class="cx"> html/canvas/CanvasPath.cpp
</span><span class="cx"> html/canvas/CanvasPattern.cpp
</span><span class="lines">@@ -1809,7 +1808,6 @@
</span><span class="cx"> html/canvas/WebGLCompressedTextureATC.cpp
</span><span class="cx"> html/canvas/WebGLCompressedTexturePVRTC.cpp
</span><span class="cx"> html/canvas/WebGLCompressedTextureS3TC.cpp
</span><del>- html/canvas/WebGLContextAttributes.cpp
</del><span class="cx"> html/canvas/WebGLContextEvent.cpp
</span><span class="cx"> html/canvas/WebGLContextGroup.cpp
</span><span class="cx"> html/canvas/WebGLContextObject.cpp
</span><span class="lines">@@ -3104,7 +3102,6 @@
</span><span class="cx"> html/canvas/WebGLCompressedTextureATC.cpp
</span><span class="cx"> html/canvas/WebGLCompressedTexturePVRTC.cpp
</span><span class="cx"> html/canvas/WebGLCompressedTextureS3TC.cpp
</span><del>- html/canvas/WebGLContextAttributes.cpp
</del><span class="cx"> html/canvas/WebGLContextEvent.cpp
</span><span class="cx"> html/canvas/WebGLContextGroup.cpp
</span><span class="cx"> html/canvas/WebGLContextObject.cpp
</span></span></pre></div>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (209548 => 209549)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2016-12-08 18:57:34 UTC (rev 209548)
+++ trunk/Source/WebCore/ChangeLog        2016-12-08 19:09:35 UTC (rev 209549)
</span><span class="lines">@@ -1,3 +1,69 @@
</span><ins>+2016-12-07 Sam Weinig <sam@webkit.org>
+
+ [WebIDL] WebGLContextAttributes should be a dictionary
+ https://bugs.webkit.org/show_bug.cgi?id=165572
+
+ Reviewed by Dean Jackson.
+
+ * CMakeLists.txt:
+ * WebCore.xcodeproj/project.pbxproj:
+ Remove unused files.
+
+ * bindings/js/JSHTMLCanvasElementCustom.cpp:
+ (WebCore::JSHTMLCanvasElement::getContext):
+ (WebCore::attributesFor3DContext): Deleted.
+ Re-work getContext to use JSDOMConvert and use the WebGLContextAttributes dictionary.
+
+ * bindings/scripts/CodeGeneratorJS.pm:
+ (NativeToJSValueDOMConvertNeedsState):
+ (NativeToJSValueDOMConvertNeedsGlobalObject):
+ Add missing inclusion of dictionaries.
+
+ * html/HTMLCanvasElement.cpp:
+ (WebCore::maxActivePixelMemory):
+ (WebCore::HTMLCanvasElement::getContext):
+ (WebCore::HTMLCanvasElement::is2dType):
+ (WebCore::HTMLCanvasElement::getContext2d):
+ (WebCore::shouldEnableWebGL):
+ (WebCore::HTMLCanvasElement::is3dType):
+ (WebCore::HTMLCanvasElement::getContextWebGL):
+ * html/HTMLCanvasElement.h:
+ Refactor context creation of 2d and WebGL contexts into their own functions. Make the
+ WebGL one take a WebGLContextAttributes struct.
+
+ * html/HTMLCanvasElement.idl:
+ No functionality change. Make IDL match the latest spec.
+
+ * html/canvas/CanvasContextAttributes.cpp: Removed.
+ * html/canvas/CanvasContextAttributes.h: Removed.
+ Remove unneeded base class.
+
+ * html/canvas/WebGLContextAttributes.cpp: Removed.
+ * html/canvas/WebGLContextAttributes.h:
+ Instead of a class, we can use a type alias of GraphicsContext3D::Attributes for
+ WebGLContextAttributes.
+
+ * html/canvas/WebGLContextAttributes.idl:
+ Convert to a dictionary.
+
+ * html/canvas/WebGL2RenderingContext.cpp:
+ * html/canvas/WebGL2RenderingContext.h:
+ * html/canvas/WebGLRenderingContextBase.cpp:
+ (WebCore::WebGLRenderingContextBase::create):
+ (WebCore::WebGLRenderingContextBase::WebGLRenderingContextBase):
+ (WebCore::WebGLRenderingContextBase::clearIfComposited):
+ (WebCore::WebGLRenderingContextBase::getContextAttributes):
+ (WebCore::WebGLRenderingContextBase::applyStencilTest):
+ * html/canvas/WebGLRenderingContextBase.h:
+ Update to WebGLContextAttributes by value, since it is a simple struct now. Update getContextAttributes
+ to return a std::optional<WebGLContextAttributes>.
+
+ * html/canvas/WebGLRenderingContextBase.idl:
+ Make getContextAttributes return a nullable WebGLContextAttributes, as per spec.
+
+ * platform/graphics/GraphicsContext3D.h:
+ Sort attributes into categories, one that match WebGLContextAttributes, and the remainder.
+
</ins><span class="cx"> 2016-12-08 Zalan Bujtas <zalan@apple.com>
</span><span class="cx">
</span><span class="cx"> Do not create multicolumn context for certain type of renderers.
</span></span></pre></div>
<a id="trunkSourceWebCoreWebCorexcodeprojprojectpbxproj"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj (209548 => 209549)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj        2016-12-08 18:57:34 UTC (rev 209548)
+++ trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj        2016-12-08 19:09:35 UTC (rev 209549)
</span><span class="lines">@@ -2655,10 +2655,7 @@
</span><span class="cx">                 6E47E66110B7944B00B186C8 /* WebGLGetInfo.h in Headers */ = {isa = PBXBuildFile; fileRef = 6E47E65F10B7944B00B186C8 /* WebGLGetInfo.h */; };
</span><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><del>-                6E4E91AC10F7FB3100A2779C /* CanvasContextAttributes.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 6E4E91A710F7FB3100A2779C /* CanvasContextAttributes.cpp */; };
-                6E4E91AD10F7FB3100A2779C /* CanvasContextAttributes.h in Headers */ = {isa = PBXBuildFile; fileRef = 6E4E91A810F7FB3100A2779C /* CanvasContextAttributes.h */; };
-                6E4E91AE10F7FB3100A2779C /* WebGLContextAttributes.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 6E4E91A910F7FB3100A2779C /* WebGLContextAttributes.cpp */; };
-                6E4E91AF10F7FB3100A2779C /* WebGLContextAttributes.h in Headers */ = {isa = PBXBuildFile; fileRef = 6E4E91AA10F7FB3100A2779C /* WebGLContextAttributes.h */; };
</del><ins>+                6E4E91AF10F7FB3100A2779C /* WebGLContextAttributes.h in Headers */ = {isa = PBXBuildFile; fileRef = 6E4E91AA10F7FB3100A2779C /* WebGLContextAttributes.h */; settings = {ATTRIBUTES = (Private, ); }; };
</ins><span class="cx">                 6E67D2A61280E8A4008758F7 /* Extensions3DOpenGL.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 6E67D2A41280E8A4008758F7 /* Extensions3DOpenGL.cpp */; };
</span><span class="cx">                 6E67D2A71280E8A4008758F7 /* Extensions3DOpenGL.h in Headers */ = {isa = PBXBuildFile; fileRef = 6E67D2A51280E8A4008758F7 /* Extensions3DOpenGL.h */; };
</span><span class="cx">                 6E67D2A91280E8BD008758F7 /* Extensions3D.h in Headers */ = {isa = PBXBuildFile; fileRef = 6E67D2A81280E8BD008758F7 /* Extensions3D.h */; };
</span><span class="lines">@@ -2843,6 +2840,7 @@
</span><span class="cx">                 7C1E97281A9F9834007BF0FB /* AutoFillButtonElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 7C1E97261A9F9834007BF0FB /* AutoFillButtonElement.h */; };
</span><span class="cx">                 7C2BDD3D17C7F98C0038FF15 /* JSDOMGlobalObjectTask.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7C2BDD3B17C7F98B0038FF15 /* JSDOMGlobalObjectTask.cpp */; };
</span><span class="cx">                 7C2BDD3E17C7F98C0038FF15 /* JSDOMGlobalObjectTask.h in Headers */ = {isa = PBXBuildFile; fileRef = 7C2BDD3C17C7F98B0038FF15 /* JSDOMGlobalObjectTask.h */; };
</span><ins>+                7C330A021DF8FAC600D3395C /* GraphicsContext3DAttributes.h in Headers */ = {isa = PBXBuildFile; fileRef = 7C330A011DF8FAC600D3395C /* GraphicsContext3DAttributes.h */; settings = {ATTRIBUTES = (Private, ); }; };
</ins><span class="cx">                 7C33F3621B4A050400502CAF /* JSDocumentFragmentCustom.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7C33F3601B4A050400502CAF /* JSDocumentFragmentCustom.cpp */; };
</span><span class="cx">                 7C39C3641DDA864C00FEFB29 /* SVGLengthListValues.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7C39C3621DDA864900FEFB29 /* SVGLengthListValues.cpp */; };
</span><span class="cx">                 7C39C3651DDA865200FEFB29 /* SVGLengthListValues.h in Headers */ = {isa = PBXBuildFile; fileRef = 7C39C3631DDA864900FEFB29 /* SVGLengthListValues.h */; };
</span><span class="lines">@@ -9952,9 +9950,6 @@
</span><span class="cx">                 6E47E65F10B7944B00B186C8 /* WebGLGetInfo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebGLGetInfo.h; sourceTree = "<group>"; };
</span><span class="cx">                 6E4ABCD2138EA0B70071D291 /* JSHTMLUnknownElement.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSHTMLUnknownElement.cpp; sourceTree = "<group>"; };
</span><span class="cx">                 6E4ABCD3138EA0B70071D291 /* JSHTMLUnknownElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSHTMLUnknownElement.h; sourceTree = "<group>"; };
</span><del>-                6E4E91A710F7FB3100A2779C /* CanvasContextAttributes.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CanvasContextAttributes.cpp; sourceTree = "<group>"; };
-                6E4E91A810F7FB3100A2779C /* CanvasContextAttributes.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CanvasContextAttributes.h; sourceTree = "<group>"; };
-                6E4E91A910F7FB3100A2779C /* WebGLContextAttributes.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WebGLContextAttributes.cpp; sourceTree = "<group>"; };
</del><span class="cx">                 6E4E91AA10F7FB3100A2779C /* WebGLContextAttributes.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebGLContextAttributes.h; sourceTree = "<group>"; };
</span><span class="cx">                 6E4E91AB10F7FB3100A2779C /* WebGLContextAttributes.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = WebGLContextAttributes.idl; sourceTree = "<group>"; };
</span><span class="cx">                 6E67D2A41280E8A4008758F7 /* Extensions3DOpenGL.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Extensions3DOpenGL.cpp; sourceTree = "<group>"; };
</span><span class="lines">@@ -10318,6 +10313,7 @@
</span><span class="cx">                 7C1E97261A9F9834007BF0FB /* AutoFillButtonElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AutoFillButtonElement.h; sourceTree = "<group>"; };
</span><span class="cx">                 7C2BDD3B17C7F98B0038FF15 /* JSDOMGlobalObjectTask.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSDOMGlobalObjectTask.cpp; sourceTree = "<group>"; };
</span><span class="cx">                 7C2BDD3C17C7F98B0038FF15 /* JSDOMGlobalObjectTask.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSDOMGlobalObjectTask.h; sourceTree = "<group>"; };
</span><ins>+                7C330A011DF8FAC600D3395C /* GraphicsContext3DAttributes.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GraphicsContext3DAttributes.h; sourceTree = "<group>"; };
</ins><span class="cx">                 7C33F3601B4A050400502CAF /* JSDocumentFragmentCustom.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSDocumentFragmentCustom.cpp; sourceTree = "<group>"; };
</span><span class="cx">                 7C39C3621DDA864900FEFB29 /* SVGLengthListValues.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SVGLengthListValues.cpp; sourceTree = "<group>"; };
</span><span class="cx">                 7C39C3631DDA864900FEFB29 /* SVGLengthListValues.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGLengthListValues.h; sourceTree = "<group>"; };
</span><span class="lines">@@ -16769,8 +16765,6 @@
</span><span class="cx">                                 31A795C11888B72400382F90 /* ANGLEInstancedArrays.cpp */,
</span><span class="cx">                                 31A795C21888B72400382F90 /* ANGLEInstancedArrays.h */,
</span><span class="cx">                                 31A795C31888B72400382F90 /* ANGLEInstancedArrays.idl */,
</span><del>-                                6E4E91A710F7FB3100A2779C /* CanvasContextAttributes.cpp */,
-                                6E4E91A810F7FB3100A2779C /* CanvasContextAttributes.h */,
</del><span class="cx">                                 49484FB3102CF23C00187DD3 /* CanvasGradient.cpp */,
</span><span class="cx">                                 49484FB4102CF23C00187DD3 /* CanvasGradient.h */,
</span><span class="cx">                                 49484FB5102CF23C00187DD3 /* CanvasGradient.idl */,
</span><span class="lines">@@ -16845,7 +16839,6 @@
</span><span class="cx">                                 6E3FAE8C14733FDB00E42306 /* WebGLCompressedTextureS3TC.cpp */,
</span><span class="cx">                                 6E3FAE8D14733FDB00E42306 /* WebGLCompressedTextureS3TC.h */,
</span><span class="cx">                                 6E3FAE9014733FEA00E42306 /* WebGLCompressedTextureS3TC.idl */,
</span><del>-                                6E4E91A910F7FB3100A2779C /* WebGLContextAttributes.cpp */,
</del><span class="cx">                                 6E4E91AA10F7FB3100A2779C /* WebGLContextAttributes.h */,
</span><span class="cx">                                 6E4E91AB10F7FB3100A2779C /* WebGLContextAttributes.idl */,
</span><span class="cx">                                 93F6F1EA127F70B10055CB06 /* WebGLContextEvent.cpp */,
</span><span class="lines">@@ -21614,6 +21607,7 @@
</span><span class="cx">                                 B2A015930AF6CD53006BCE0E /* GraphicsContext.h */,
</span><span class="cx">                                 6E21C6BF1126338500A7BE02 /* GraphicsContext3D.cpp */,
</span><span class="cx">                                 49C7B9FB1042D3650009D447 /* GraphicsContext3D.h */,
</span><ins>+                                7C330A011DF8FAC600D3395C /* GraphicsContext3DAttributes.h */,
</ins><span class="cx">                                 0F580B090F12A2690051D689 /* GraphicsLayer.cpp */,
</span><span class="cx">                                 0F580B0A0F12A2690051D689 /* GraphicsLayer.h */,
</span><span class="cx">                                 0F580B0B0F12A2690051D689 /* GraphicsLayerClient.h */,
</span><span class="lines">@@ -25012,7 +25006,6 @@
</span><span class="cx">                                 E43AF8E71AC5B7EC00CA717E /* CacheValidation.h in Headers */,
</span><span class="cx">                                 49AE2D97134EE5F90072920A /* CalculationValue.h in Headers */,
</span><span class="cx">                                 B1D5ECB5134B58DA0087C78F /* CallbackFunction.h in Headers */,
</span><del>-                                6E4E91AD10F7FB3100A2779C /* CanvasContextAttributes.h in Headers */,
</del><span class="cx">                                 49484FC2102CF23C00187DD3 /* CanvasGradient.h in Headers */,
</span><span class="cx">                                 4671E0661D67A59600C6B497 /* CanvasPath.h in Headers */,
</span><span class="cx">                                 49484FC5102CF23C00187DD3 /* CanvasPattern.h in Headers */,
</span><span class="lines">@@ -27876,6 +27869,7 @@
</span><span class="cx">                                 BC22747B0E8366E200E7F975 /* SVGRenderStyleDefs.h in Headers */,
</span><span class="cx">                                 436708F212D9CA4B00044234 /* SVGRenderSupport.h in Headers */,
</span><span class="cx">                                 436708F412D9CA4B00044234 /* SVGRenderTreeAsText.h in Headers */,
</span><ins>+                                7C330A021DF8FAC600D3395C /* GraphicsContext3DAttributes.h in Headers */,
</ins><span class="cx">                                 436708F612D9CA4B00044234 /* SVGResources.h in Headers */,
</span><span class="cx">                                 436708F812D9CA4B00044234 /* SVGResourcesCache.h in Headers */,
</span><span class="cx">                                 436708FA12D9CA4B00044234 /* SVGResourcesCycleSolver.h in Headers */,
</span><span class="lines">@@ -28409,7 +28403,7 @@
</span><span class="cx">                                 37A1EAA3142699BC0087F425 /* Check For Inappropriate Objective-C Class Names */,
</span><span class="cx">                                 5DF50887116F3077005202AB /* Check For Inappropriate Files In Framework */,
</span><span class="cx">                                 71D6AA381DA4E69400B23969 /* Copy modern media controls code and assets */,
</span><del>-                                51D394771DF2486700ABE875 /* Copy internal scripts */,
</del><ins>+                                51D394771DF2486700ABE875 /* Copy Internal Scripts */,
</ins><span class="cx">                         );
</span><span class="cx">                         buildRules = (
</span><span class="cx">                         );
</span><span class="lines">@@ -28866,7 +28860,6 @@
</span><span class="cx">                                 E43AF8E61AC5B7E800CA717E /* CacheValidation.cpp in Sources */,
</span><span class="cx">                                 49AE2D96134EE5F90072920A /* CalculationValue.cpp in Sources */,
</span><span class="cx">                                 B1827493134CA4C100B98C2D /* CallbackFunction.cpp in Sources */,
</span><del>-                                6E4E91AC10F7FB3100A2779C /* CanvasContextAttributes.cpp in Sources */,
</del><span class="cx">                                 49484FC1102CF23C00187DD3 /* CanvasGradient.cpp in Sources */,
</span><span class="cx">                                 4671E0651D67A59600C6B497 /* CanvasPath.cpp in Sources */,
</span><span class="cx">                                 49484FC4102CF23C00187DD3 /* CanvasPattern.cpp in Sources */,
</span><span class="lines">@@ -31682,7 +31675,6 @@
</span><span class="cx">                                 7E66E23316D6EB6C00F7E7FF /* WebGLCompressedTextureATC.cpp in Sources */,
</span><span class="cx">                                 7E66E23317E6EB6C00F7E7FF /* WebGLCompressedTexturePVRTC.cpp in Sources */,
</span><span class="cx">                                 6E3FAE8E14733FDB00E42306 /* WebGLCompressedTextureS3TC.cpp in Sources */,
</span><del>-                                6E4E91AE10F7FB3100A2779C /* WebGLContextAttributes.cpp in Sources */,
</del><span class="cx">                                 93F6F1ED127F70B10055CB06 /* WebGLContextEvent.cpp in Sources */,
</span><span class="cx">                                 01D3CF8214BD0A3000FE9970 /* WebGLContextGroup.cpp in Sources */,
</span><span class="cx">                                 01D3CF8414BD0A3000FE9970 /* WebGLContextObject.cpp in Sources */,
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsjsJSHTMLCanvasElementCustomcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/js/JSHTMLCanvasElementCustom.cpp (209548 => 209549)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/JSHTMLCanvasElementCustom.cpp        2016-12-08 18:57:34 UTC (rev 209548)
+++ trunk/Source/WebCore/bindings/js/JSHTMLCanvasElementCustom.cpp        2016-12-08 19:09:35 UTC (rev 209549)
</span><span class="lines">@@ -27,7 +27,6 @@
</span><span class="cx"> #include "config.h"
</span><span class="cx"> #include "JSHTMLCanvasElement.h"
</span><span class="cx">
</span><del>-#include "CanvasContextAttributes.h"
</del><span class="cx"> #include "HTMLCanvasElement.h"
</span><span class="cx"> #include "JSCanvasRenderingContext2D.h"
</span><span class="cx"> #include <bindings/ScriptObject.h>
</span><span class="lines">@@ -34,9 +33,8 @@
</span><span class="cx"> #include <wtf/GetPtr.h>
</span><span class="cx">
</span><span class="cx"> #if ENABLE(WEBGL)
</span><del>-#include "JSDictionary.h"
</del><ins>+#include "JSWebGLContextAttributes.h"
</ins><span class="cx"> #include "JSWebGLRenderingContextBase.h"
</span><del>-#include "WebGLContextAttributes.h"
</del><span class="cx"> #endif
</span><span class="cx">
</span><span class="cx"> using namespace JSC;
</span><span class="lines">@@ -43,63 +41,30 @@
</span><span class="cx">
</span><span class="cx"> namespace WebCore {
</span><span class="cx">
</span><del>-#if ENABLE(WEBGL)
-
-static RefPtr<CanvasContextAttributes> attributesFor3DContext(ExecState& state, ThrowScope& scope)
-{
- JSValue initializerValue = state.argument(1);
- if (initializerValue.isUndefinedOrNull())
- return nullptr;
-
- JSObject* initializerObject = initializerValue.toObject(&state);
- ASSERT_UNUSED(scope, !scope.exception());
- JSDictionary dictionary(&state, initializerObject);
-
- GraphicsContext3D::Attributes graphicsAttrs;
-
- dictionary.tryGetProperty("alpha", graphicsAttrs.alpha);
- dictionary.tryGetProperty("depth", graphicsAttrs.depth);
- dictionary.tryGetProperty("stencil", graphicsAttrs.stencil);
- dictionary.tryGetProperty("antialias", graphicsAttrs.antialias);
- dictionary.tryGetProperty("premultipliedAlpha", graphicsAttrs.premultipliedAlpha);
- dictionary.tryGetProperty("preserveDrawingBuffer", graphicsAttrs.preserveDrawingBuffer);
- dictionary.tryGetProperty("preferLowPowerToHighPerformance", graphicsAttrs.preferLowPowerToHighPerformance);
-
- return WebGLContextAttributes::create(graphicsAttrs);
-}
-
-#endif
-
</del><span class="cx"> JSValue JSHTMLCanvasElement::getContext(ExecState& state)
</span><span class="cx"> {
</span><del>- VM& vm = state.vm();
</del><ins>+ auto& vm = state.vm();
</ins><span class="cx"> auto scope = DECLARE_THROW_SCOPE(vm);
</span><span class="cx">
</span><span class="cx"> if (UNLIKELY(state.argumentCount() < 1))
</span><span class="cx"> return throwException(&state, scope, createNotEnoughArgumentsError(&state));
</span><span class="cx">
</span><del>- HTMLCanvasElement& canvas = wrapped();
- const String& contextId = state.uncheckedArgument(0).toWTFString(&state);
-
- RefPtr<CanvasContextAttributes> attributes;
</del><ins>+ auto contextId = convert<IDLDOMString>(state, state.uncheckedArgument(0), StringConversionConfiguration::Normal);
+ RETURN_IF_EXCEPTION(scope, JSValue());
</ins><span class="cx">
</span><ins>+ if (HTMLCanvasElement::is2dType(contextId))
+ return toJS<IDLNullable<IDLInterface<CanvasRenderingContext2D>>>(state, *globalObject(), static_cast<CanvasRenderingContext2D*>(wrapped().getContext2d(contextId)));
+
</ins><span class="cx"> #if ENABLE(WEBGL)
</span><span class="cx"> if (HTMLCanvasElement::is3dType(contextId)) {
</span><del>- attributes = attributesFor3DContext(state, scope);
</del><ins>+ auto attributes = convert<IDLDictionary<WebGLContextAttributes>>(state, state.argument(1));
</ins><span class="cx"> RETURN_IF_EXCEPTION(scope, JSValue());
</span><ins>+
+ return toJS<IDLNullable<IDLInterface<WebGLRenderingContextBase>>>(state, *globalObject(), static_cast<WebGLRenderingContextBase*>(wrapped().getContextWebGL(contextId, WTFMove(attributes))));
</ins><span class="cx"> }
</span><span class="cx"> #endif
</span><del>-
- auto* context = canvas.getContext(contextId, attributes.get());
- if (!context)
- return jsNull();
</del><span class="cx">
</span><del>-#if ENABLE(WEBGL)
- if (is<WebGLRenderingContextBase>(*context))
- return toJS(&state, globalObject(), downcast<WebGLRenderingContextBase>(*context));
-#endif
-
- return toJS(&state, globalObject(), downcast<CanvasRenderingContext2D>(*context));
</del><ins>+ return jsNull();
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> JSValue JSHTMLCanvasElement::toDataURL(ExecState& state)
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptsCodeGeneratorJSpm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm (209548 => 209549)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm        2016-12-08 18:57:34 UTC (rev 209548)
+++ trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm        2016-12-08 19:09:35 UTC (rev 209549)
</span><span class="lines">@@ -5335,6 +5335,7 @@
</span><span class="cx"> return 1 if $codeGenerator->IsRecordType($type);
</span><span class="cx"> return 1 if $codeGenerator->IsStringType($type);
</span><span class="cx"> return 1 if $codeGenerator->IsEnumType($type);
</span><ins>+ return 1 if $codeGenerator->IsDictionaryType($type);
</ins><span class="cx"> return 1 if $codeGenerator->IsInterfaceType($type);
</span><span class="cx"> return 1 if $codeGenerator->IsTypedArrayType($type);
</span><span class="cx"> return 1 if $type->name eq "Date";
</span><span class="lines">@@ -5352,6 +5353,7 @@
</span><span class="cx"> return 1 if $type->isUnion;
</span><span class="cx"> return 1 if $codeGenerator->IsSequenceOrFrozenArrayType($type);
</span><span class="cx"> return 1 if $codeGenerator->IsRecordType($type);
</span><ins>+ return 1 if $codeGenerator->IsDictionaryType($type);
</ins><span class="cx"> return 1 if $codeGenerator->IsInterfaceType($type);
</span><span class="cx"> return 1 if $codeGenerator->IsTypedArrayType($type);
</span><span class="cx"> return 1 if $type->name eq "SerializedScriptValue";
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptstestJSJSTestObjcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp (209548 => 209549)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp        2016-12-08 18:57:34 UTC (rev 209548)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp        2016-12-08 19:09:35 UTC (rev 209549)
</span><span class="lines">@@ -1268,6 +1268,10 @@
</span><span class="cx"> bool setJSTestObjStringObjRecordAttr(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
</span><span class="cx"> JSC::EncodedJSValue jsTestObjStringNullableObjRecordAttr(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
</span><span class="cx"> bool setJSTestObjStringNullableObjRecordAttr(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
</span><ins>+JSC::EncodedJSValue jsTestObjDictionaryAttr(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
+bool setJSTestObjDictionaryAttr(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
+JSC::EncodedJSValue jsTestObjNullableDictionaryAttr(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
+bool setJSTestObjNullableDictionaryAttr(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
</ins><span class="cx"> JSC::EncodedJSValue jsTestObjImplementationEnumAttr(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
</span><span class="cx"> bool setJSTestObjImplementationEnumAttr(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
</span><span class="cx"> JSC::EncodedJSValue jsTestObjXMLObjAttr(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
</span><span class="lines">@@ -1600,6 +1604,8 @@
</span><span class="cx"> { "usvstringLongRecordAttr", CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjUsvstringLongRecordAttr), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSTestObjUsvstringLongRecordAttr) } },
</span><span class="cx"> { "stringObjRecordAttr", CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjStringObjRecordAttr), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSTestObjStringObjRecordAttr) } },
</span><span class="cx"> { "stringNullableObjRecordAttr", CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjStringNullableObjRecordAttr), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSTestObjStringNullableObjRecordAttr) } },
</span><ins>+ { "dictionaryAttr", CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjDictionaryAttr), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSTestObjDictionaryAttr) } },
+ { "nullableDictionaryAttr", CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjNullableDictionaryAttr), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSTestObjNullableDictionaryAttr) } },
</ins><span class="cx"> { "implementationEnumAttr", CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjImplementationEnumAttr), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSTestObjImplementationEnumAttr) } },
</span><span class="cx"> { "XMLObjAttr", CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjXMLObjAttr), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSTestObjXMLObjAttr) } },
</span><span class="cx"> { "create", CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjCreate), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSTestObjCreate) } },
</span><span class="lines">@@ -2465,6 +2471,38 @@
</span><span class="cx"> return result;
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+static inline JSValue jsTestObjDictionaryAttrGetter(ExecState&, JSTestObj&, ThrowScope& throwScope);
+
+EncodedJSValue jsTestObjDictionaryAttr(ExecState* state, EncodedJSValue thisValue, PropertyName)
+{
+ return BindingCaller<JSTestObj>::attribute<jsTestObjDictionaryAttrGetter>(state, thisValue, "dictionaryAttr");
+}
+
+static inline JSValue jsTestObjDictionaryAttrGetter(ExecState& state, JSTestObj& thisObject, ThrowScope& throwScope)
+{
+ UNUSED_PARAM(throwScope);
+ UNUSED_PARAM(state);
+ auto& impl = thisObject.wrapped();
+ JSValue result = toJS<IDLDictionary<TestObj::Dictionary>>(state, *thisObject.globalObject(), impl.dictionaryAttr());
+ return result;
+}
+
+static inline JSValue jsTestObjNullableDictionaryAttrGetter(ExecState&, JSTestObj&, ThrowScope& throwScope);
+
+EncodedJSValue jsTestObjNullableDictionaryAttr(ExecState* state, EncodedJSValue thisValue, PropertyName)
+{
+ return BindingCaller<JSTestObj>::attribute<jsTestObjNullableDictionaryAttrGetter>(state, thisValue, "nullableDictionaryAttr");
+}
+
+static inline JSValue jsTestObjNullableDictionaryAttrGetter(ExecState& state, JSTestObj& thisObject, ThrowScope& throwScope)
+{
+ UNUSED_PARAM(throwScope);
+ UNUSED_PARAM(state);
+ auto& impl = thisObject.wrapped();
+ JSValue result = toJS<IDLNullable<IDLDictionary<TestObj::Dictionary>>>(state, *thisObject.globalObject(), impl.nullableDictionaryAttr());
+ return result;
+}
+
</ins><span class="cx"> static inline JSValue jsTestObjImplementationEnumAttrGetter(ExecState&, JSTestObj&, ThrowScope& throwScope);
</span><span class="cx">
</span><span class="cx"> EncodedJSValue jsTestObjImplementationEnumAttr(ExecState* state, EncodedJSValue thisValue, PropertyName)
</span><span class="lines">@@ -4011,6 +4049,44 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx">
</span><ins>+static inline bool setJSTestObjDictionaryAttrFunction(ExecState&, JSTestObj&, JSValue, ThrowScope&);
+
+bool setJSTestObjDictionaryAttr(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue)
+{
+ return BindingCaller<JSTestObj>::setAttribute<setJSTestObjDictionaryAttrFunction>(state, thisValue, encodedValue, "dictionaryAttr");
+}
+
+static inline bool setJSTestObjDictionaryAttrFunction(ExecState& state, JSTestObj& thisObject, JSValue value, ThrowScope& throwScope)
+{
+ UNUSED_PARAM(state);
+ UNUSED_PARAM(throwScope);
+ auto& impl = thisObject.wrapped();
+ auto nativeValue = convert<IDLDictionary<TestObj::Dictionary>>(state, value);
+ RETURN_IF_EXCEPTION(throwScope, false);
+ impl.setDictionaryAttr(WTFMove(nativeValue));
+ return true;
+}
+
+
+static inline bool setJSTestObjNullableDictionaryAttrFunction(ExecState&, JSTestObj&, JSValue, ThrowScope&);
+
+bool setJSTestObjNullableDictionaryAttr(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue)
+{
+ return BindingCaller<JSTestObj>::setAttribute<setJSTestObjNullableDictionaryAttrFunction>(state, thisValue, encodedValue, "nullableDictionaryAttr");
+}
+
+static inline bool setJSTestObjNullableDictionaryAttrFunction(ExecState& state, JSTestObj& thisObject, JSValue value, ThrowScope& throwScope)
+{
+ UNUSED_PARAM(state);
+ UNUSED_PARAM(throwScope);
+ auto& impl = thisObject.wrapped();
+ auto nativeValue = convert<IDLNullable<IDLDictionary<TestObj::Dictionary>>>(state, value);
+ RETURN_IF_EXCEPTION(throwScope, false);
+ impl.setNullableDictionaryAttr(WTFMove(nativeValue));
+ return true;
+}
+
+
</ins><span class="cx"> static inline bool setJSTestObjImplementationEnumAttrFunction(ExecState&, JSTestObj&, JSValue, ThrowScope&);
</span><span class="cx">
</span><span class="cx"> bool setJSTestObjImplementationEnumAttr(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue)
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptstestTestObjidl"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/scripts/test/TestObj.idl (209548 => 209549)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/test/TestObj.idl        2016-12-08 18:57:34 UTC (rev 209548)
+++ trunk/Source/WebCore/bindings/scripts/test/TestObj.idl        2016-12-08 19:09:35 UTC (rev 209549)
</span><span class="lines">@@ -82,6 +82,8 @@
</span><span class="cx"> attribute record<ByteString, long> usvstringLongRecordAttr;
</span><span class="cx"> attribute record<DOMString, TestObj> stringObjRecordAttr;
</span><span class="cx"> attribute record<DOMString, TestObj?> stringNullableObjRecordAttr;
</span><ins>+ attribute TestDictionary dictionaryAttr;
+ attribute TestDictionary? nullableDictionaryAttr;
</ins><span class="cx">
</span><span class="cx"> attribute TestEnumTypeWithAlternateImplementationName implementationEnumAttr;
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlHTMLCanvasElementcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/HTMLCanvasElement.cpp (209548 => 209549)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/HTMLCanvasElement.cpp        2016-12-08 18:57:34 UTC (rev 209548)
+++ trunk/Source/WebCore/html/HTMLCanvasElement.cpp        2016-12-08 19:09:35 UTC (rev 209549)
</span><span class="lines">@@ -170,7 +170,73 @@
</span><span class="cx"> setAttributeWithoutSynchronization(widthAttr, AtomicString::number(limitToOnlyHTMLNonNegative(value, defaultWidth)));
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+static inline size_t maxActivePixelMemory()
+{
+ static size_t maxPixelMemory;
+ static std::once_flag onceFlag;
+ std::call_once(onceFlag, [] {
+ maxPixelMemory = std::max(ramSize() / 4, 2151 * MB);
+ });
+ return maxPixelMemory;
+}
+
+CanvasRenderingContext* HTMLCanvasElement::getContext(const String& type)
+{
+ if (HTMLCanvasElement::is2dType(type))
+ return getContext2d(type);
+
</ins><span class="cx"> #if ENABLE(WEBGL)
</span><ins>+ if (HTMLCanvasElement::is3dType(type))
+ return getContextWebGL(type);
+#endif
+
+ return nullptr;
+}
+
+bool HTMLCanvasElement::is2dType(const String& type)
+{
+ return type == "2d";
+}
+
+CanvasRenderingContext* HTMLCanvasElement::getContext2d(const String& type)
+{
+ ASSERT_UNUSED(HTMLCanvasElement::is2dType(type), type);
+
+ if (m_context && !m_context->is2d())
+ return nullptr;
+ if (!m_context) {
+ bool usesDashboardCompatibilityMode = false;
+#if ENABLE(DASHBOARD_SUPPORT)
+ if (Settings* settings = document().settings())
+ usesDashboardCompatibilityMode = settings->usesDashboardBackwardCompatibilityMode();
+#endif
+
+ // Make sure we don't use more pixel memory than the system can support.
+ size_t requestedPixelMemory = 4 * width() * height();
+ if (activePixelMemory + requestedPixelMemory > maxActivePixelMemory()) {
+ StringBuilder stringBuilder;
+ stringBuilder.appendLiteral("Total canvas memory use exceeds the maximum limit (");
+ stringBuilder.appendNumber(maxActivePixelMemory() / 1024 / 1024);
+ stringBuilder.appendLiteral(" MB).");
+ document().addConsoleMessage(MessageSource::JS, MessageLevel::Warning, stringBuilder.toString());
+ return nullptr;
+ }
+
+ m_context = std::make_unique<CanvasRenderingContext2D>(*this, document().inQuirksMode(), usesDashboardCompatibilityMode);
+
+ downcast<CanvasRenderingContext2D>(*m_context).setUsesDisplayListDrawing(m_usesDisplayListDrawing);
+ downcast<CanvasRenderingContext2D>(*m_context).setTracksDisplayListReplay(m_tracksDisplayListReplay);
+
+#if USE(IOSURFACE_CANVAS_BACKING_STORE) || ENABLE(ACCELERATED_2D_CANVAS)
+ // Need to make sure a RenderLayer and compositing layer get created for the Canvas
+ invalidateStyleAndLayerComposition();
+#endif
+ }
+
+ return m_context.get();
+}
+
+#if ENABLE(WEBGL)
</ins><span class="cx"> static bool requiresAcceleratedCompositingForWebGL()
</span><span class="cx"> {
</span><span class="cx"> #if PLATFORM(GTK) || PLATFORM(EFL)
</span><span class="lines">@@ -193,91 +259,38 @@
</span><span class="cx">
</span><span class="cx"> return settings->acceleratedCompositingEnabled();
</span><span class="cx"> }
</span><del>-#endif
</del><span class="cx">
</span><del>-static inline size_t maxActivePixelMemory()
</del><ins>+bool HTMLCanvasElement::is3dType(const String& type)
</ins><span class="cx"> {
</span><del>- static size_t maxPixelMemory;
- static std::once_flag onceFlag;
- std::call_once(onceFlag, [] {
- maxPixelMemory = std::max(ramSize() / 4, 2151 * MB);
- });
- return maxPixelMemory;
</del><ins>+ // Retain support for the legacy "webkit-3d" name.
+ return type == "webgl" || type == "experimental-webgl"
+#if ENABLE(WEBGL2)
+ || type == "webgl2"
+#endif
+ || type == "webkit-3d";
</ins><span class="cx"> }
</span><span class="cx">
</span><del>-CanvasRenderingContext* HTMLCanvasElement::getContext(const String& type, CanvasContextAttributes* attrs)
</del><ins>+CanvasRenderingContext* HTMLCanvasElement::getContextWebGL(const String& type, WebGLContextAttributes&& attrs)
</ins><span class="cx"> {
</span><del>- if (is2dType(type)) {
- if (m_context && !m_context->is2d())
- return nullptr;
- if (!m_context) {
- bool usesDashboardCompatibilityMode = false;
-#if ENABLE(DASHBOARD_SUPPORT)
- if (Settings* settings = document().settings())
- usesDashboardCompatibilityMode = settings->usesDashboardBackwardCompatibilityMode();
-#endif
</del><ins>+ ASSERT(HTMLCanvasElement::is3dType(type));
</ins><span class="cx">
</span><del>- // Make sure we don't use more pixel memory than the system can support.
- size_t requestedPixelMemory = 4 * width() * height();
- if (activePixelMemory + requestedPixelMemory > maxActivePixelMemory()) {
- StringBuilder stringBuilder;
- stringBuilder.appendLiteral("Total canvas memory use exceeds the maximum limit (");
- stringBuilder.appendNumber(maxActivePixelMemory() / 1024 / 1024);
- stringBuilder.appendLiteral(" MB).");
- document().addConsoleMessage(MessageSource::JS, MessageLevel::Warning, stringBuilder.toString());
- return nullptr;
- }
</del><ins>+ if (!shouldEnableWebGL(document().settings()))
+ return nullptr;
</ins><span class="cx">
</span><del>- m_context = std::make_unique<CanvasRenderingContext2D>(*this, document().inQuirksMode(), usesDashboardCompatibilityMode);
</del><ins>+ if (m_context && !m_context->is3d())
+ return nullptr;
</ins><span class="cx">
</span><del>- downcast<CanvasRenderingContext2D>(*m_context).setUsesDisplayListDrawing(m_usesDisplayListDrawing);
- downcast<CanvasRenderingContext2D>(*m_context).setTracksDisplayListReplay(m_tracksDisplayListReplay);
-
-#if USE(IOSURFACE_CANVAS_BACKING_STORE) || ENABLE(ACCELERATED_2D_CANVAS)
</del><ins>+ if (!m_context) {
+ m_context = WebGLRenderingContextBase::create(*this, attrs, type);
+ if (m_context) {
</ins><span class="cx"> // Need to make sure a RenderLayer and compositing layer get created for the Canvas
</span><span class="cx"> invalidateStyleAndLayerComposition();
</span><del>-#endif
</del><span class="cx"> }
</span><del>- return m_context.get();
</del><span class="cx"> }
</span><del>-#if ENABLE(WEBGL)
- if (shouldEnableWebGL(document().settings())) {
</del><span class="cx">
</span><del>- if (is3dType(type)) {
- if (m_context && !m_context->is3d())
- return nullptr;
- if (!m_context) {
- m_context = WebGLRenderingContextBase::create(*this, static_cast<WebGLContextAttributes*>(attrs), type);
- if (m_context) {
- // Need to make sure a RenderLayer and compositing layer get created for the Canvas
- invalidateStyleAndLayerComposition();
- }
- }
- return m_context.get();
- }
- }
-#else
- UNUSED_PARAM(attrs);
-#endif
- return nullptr;
</del><ins>+ return m_context.get();
</ins><span class="cx"> }
</span><del>-
-bool HTMLCanvasElement::is2dType(const String& type)
-{
- return type == "2d";
-}
-
-#if ENABLE(WEBGL)
-bool HTMLCanvasElement::is3dType(const String& type)
-{
- // Retain support for the legacy "webkit-3d" name.
- return type == "webgl" || type == "experimental-webgl"
-#if ENABLE(WEBGL2)
- || type == "webgl2"
</del><span class="cx"> #endif
</span><del>- || type == "webkit-3d";
-}
-#endif
</del><span class="cx">
</span><span class="cx"> void HTMLCanvasElement::didDraw(const FloatRect& rect)
</span><span class="cx"> {
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlHTMLCanvasElementh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/HTMLCanvasElement.h (209548 => 209549)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/HTMLCanvasElement.h        2016-12-08 18:57:34 UTC (rev 209548)
+++ trunk/Source/WebCore/html/HTMLCanvasElement.h        2016-12-08 19:09:35 UTC (rev 209549)
</span><span class="lines">@@ -33,9 +33,12 @@
</span><span class="cx"> #include <memory>
</span><span class="cx"> #include <wtf/Forward.h>
</span><span class="cx">
</span><ins>+#if ENABLE(WEBGL)
+#include "WebGLContextAttributes.h"
+#endif
+
</ins><span class="cx"> namespace WebCore {
</span><span class="cx">
</span><del>-class CanvasContextAttributes;
</del><span class="cx"> class CanvasRenderingContext;
</span><span class="cx"> class GraphicsContext;
</span><span class="cx"> class GraphicsContextStateSaver;
</span><span class="lines">@@ -85,10 +88,14 @@
</span><span class="cx"> reset();
</span><span class="cx"> }
</span><span class="cx">
</span><del>- CanvasRenderingContext* getContext(const String&, CanvasContextAttributes* = nullptr);
</del><ins>+ CanvasRenderingContext* getContext(const String&);
+
</ins><span class="cx"> static bool is2dType(const String&);
</span><ins>+ CanvasRenderingContext* getContext2d(const String&);
+
</ins><span class="cx"> #if ENABLE(WEBGL)
</span><span class="cx"> static bool is3dType(const String&);
</span><ins>+ CanvasRenderingContext* getContextWebGL(const String&, WebGLContextAttributes&& = { });
</ins><span class="cx"> #endif
</span><span class="cx">
</span><span class="cx"> static String toEncodingMimeType(const String& mimeType);
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlHTMLCanvasElementidl"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/HTMLCanvasElement.idl (209548 => 209549)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/HTMLCanvasElement.idl        2016-12-08 18:57:34 UTC (rev 209548)
+++ trunk/Source/WebCore/html/HTMLCanvasElement.idl        2016-12-08 19:09:35 UTC (rev 209549)
</span><span class="lines">@@ -24,6 +24,8 @@
</span><span class="cx"> * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
</span><span class="cx"> */
</span><span class="cx">
</span><ins>+typedef (CanvasRenderingContext2D or WebGLRenderingContextBase) RenderingContext;
+
</ins><span class="cx"> [
</span><span class="cx"> JSGenerateToNativeObject,
</span><span class="cx"> ReportExtraMemoryCost,
</span><span class="lines">@@ -32,8 +34,7 @@
</span><span class="cx"> attribute unsigned long width;
</span><span class="cx"> attribute unsigned long height;
</span><span class="cx">
</span><ins>+ [Custom] RenderingContext? getContext(DOMString contextId, any... arguments);
+
</ins><span class="cx"> [Custom, MayThrowException] DOMString toDataURL(optional DOMString? type);
</span><del>-
- // The custom binding is needed to handle context creation attributes.
- [Custom] any getContext(DOMString contextId, any... arguments);
</del><span class="cx"> };
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlcanvasCanvasContextAttributescpp"></a>
<div class="delfile"><h4>Deleted: trunk/Source/WebCore/html/canvas/CanvasContextAttributes.cpp (209548 => 209549)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/canvas/CanvasContextAttributes.cpp        2016-12-08 18:57:34 UTC (rev 209548)
+++ trunk/Source/WebCore/html/canvas/CanvasContextAttributes.cpp        2016-12-08 19:09:35 UTC (rev 209549)
</span><span class="lines">@@ -1,41 +0,0 @@
</span><del>-/*
- * Copyright (c) 2010, Google Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above
- * copyright notice, this list of conditions and the following disclaimer
- * in the documentation and/or other materials provided with the
- * distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "config.h"
-
-#include "CanvasContextAttributes.h"
-
-namespace WebCore {
-
-CanvasContextAttributes::CanvasContextAttributes()
-{
-}
-
-CanvasContextAttributes::~CanvasContextAttributes()
-{
-}
-
-} // namespace WebCore
</del></span></pre></div>
<a id="trunkSourceWebCorehtmlcanvasCanvasContextAttributesh"></a>
<div class="delfile"><h4>Deleted: trunk/Source/WebCore/html/canvas/CanvasContextAttributes.h (209548 => 209549)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/canvas/CanvasContextAttributes.h        2016-12-08 18:57:34 UTC (rev 209548)
+++ trunk/Source/WebCore/html/canvas/CanvasContextAttributes.h        2016-12-08 19:09:35 UTC (rev 209549)
</span><span class="lines">@@ -1,45 +0,0 @@
</span><del>-/*
- * Copyright (c) 2010, Google Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above
- * copyright notice, this list of conditions and the following disclaimer
- * in the documentation and/or other materials provided with the
- * distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#pragma once
-
-#include <wtf/RefCounted.h>
-
-namespace WebCore {
-
-// A base class for any attributes that are needed which would affect
-// the creation of the Canvas's rendering context. Currently only the
-// WebGLRenderingContext uses this mechanism.
-
-class CanvasContextAttributes : public RefCounted<CanvasContextAttributes> {
-public:
- virtual ~CanvasContextAttributes();
-
-protected:
- CanvasContextAttributes();
-};
-
-} // namespace WebCore
</del></span></pre></div>
<a id="trunkSourceWebCorehtmlcanvasWebGL2RenderingContextcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/canvas/WebGL2RenderingContext.cpp (209548 => 209549)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/canvas/WebGL2RenderingContext.cpp        2016-12-08 18:57:34 UTC (rev 209548)
+++ trunk/Source/WebCore/html/canvas/WebGL2RenderingContext.cpp        2016-12-08 19:09:35 UTC (rev 209549)
</span><span class="lines">@@ -44,7 +44,6 @@
</span><span class="cx"> #include "WebGLCompressedTextureATC.h"
</span><span class="cx"> #include "WebGLCompressedTexturePVRTC.h"
</span><span class="cx"> #include "WebGLCompressedTextureS3TC.h"
</span><del>-#include "WebGLContextAttributes.h"
</del><span class="cx"> #include "WebGLDebugRendererInfo.h"
</span><span class="cx"> #include "WebGLDebugShaders.h"
</span><span class="cx"> #include "WebGLDepthTexture.h"
</span><span class="lines">@@ -59,12 +58,12 @@
</span><span class="cx">
</span><span class="cx"> namespace WebCore {
</span><span class="cx">
</span><del>-WebGL2RenderingContext::WebGL2RenderingContext(HTMLCanvasElement& passedCanvas, GraphicsContext3D::Attributes attributes)
</del><ins>+WebGL2RenderingContext::WebGL2RenderingContext(HTMLCanvasElement& passedCanvas, GraphicsContext3DAttributes attributes)
</ins><span class="cx"> : WebGLRenderingContextBase(passedCanvas, attributes)
</span><span class="cx"> {
</span><span class="cx"> }
</span><span class="cx">
</span><del>-WebGL2RenderingContext::WebGL2RenderingContext(HTMLCanvasElement& passedCanvas, RefPtr<GraphicsContext3D>&& context, GraphicsContext3D::Attributes attributes)
</del><ins>+WebGL2RenderingContext::WebGL2RenderingContext(HTMLCanvasElement& passedCanvas, RefPtr<GraphicsContext3D>&& context, GraphicsContext3DAttributes attributes)
</ins><span class="cx"> : WebGLRenderingContextBase(passedCanvas, WTFMove(context), attributes)
</span><span class="cx"> {
</span><span class="cx"> initializeShaderExtensions();
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlcanvasWebGL2RenderingContexth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/canvas/WebGL2RenderingContext.h (209548 => 209549)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/canvas/WebGL2RenderingContext.h        2016-12-08 18:57:34 UTC (rev 209548)
+++ trunk/Source/WebCore/html/canvas/WebGL2RenderingContext.h        2016-12-08 19:09:35 UTC (rev 209549)
</span><span class="lines">@@ -40,8 +40,8 @@
</span><span class="cx">
</span><span class="cx"> class WebGL2RenderingContext final : public WebGLRenderingContextBase {
</span><span class="cx"> public:
</span><del>- WebGL2RenderingContext(HTMLCanvasElement&, GraphicsContext3D::Attributes);
- WebGL2RenderingContext(HTMLCanvasElement&, RefPtr<GraphicsContext3D>&&, GraphicsContext3D::Attributes);
</del><ins>+ WebGL2RenderingContext(HTMLCanvasElement&, WebGLContextAttributes);
+ WebGL2RenderingContext(HTMLCanvasElement&, RefPtr<GraphicsContext3D>&&, WebGLContextAttributes);
</ins><span class="cx">
</span><span class="cx"> /* Buffer objects */
</span><span class="cx"> using WebGLRenderingContextBase::bufferData;
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlcanvasWebGLContextAttributescpp"></a>
<div class="delfile"><h4>Deleted: trunk/Source/WebCore/html/canvas/WebGLContextAttributes.cpp (209548 => 209549)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/canvas/WebGLContextAttributes.cpp        2016-12-08 18:57:34 UTC (rev 209548)
+++ trunk/Source/WebCore/html/canvas/WebGLContextAttributes.cpp        2016-12-08 19:09:35 UTC (rev 209549)
</span><span class="lines">@@ -1,147 +0,0 @@
</span><del>-/*
- * Copyright (c) 2010, Google Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above
- * copyright notice, this list of conditions and the following disclaimer
- * in the documentation and/or other materials provided with the
- * distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "config.h"
-
-#if ENABLE(WEBGL)
-
-#include "WebGLContextAttributes.h"
-
-namespace WebCore {
-
-Ref<WebGLContextAttributes> WebGLContextAttributes::create()
-{
- return adoptRef(*new WebGLContextAttributes());
-}
-
-Ref<WebGLContextAttributes> WebGLContextAttributes::create(GraphicsContext3D::Attributes attributes)
-{
- return adoptRef(*new WebGLContextAttributes(attributes));
-}
-
-WebGLContextAttributes::WebGLContextAttributes()
- : CanvasContextAttributes()
-{
-}
-
-WebGLContextAttributes::WebGLContextAttributes(GraphicsContext3D::Attributes attributes)
- : CanvasContextAttributes()
- , m_attrs(attributes)
-{
-}
-
-WebGLContextAttributes::~WebGLContextAttributes()
-{
-}
-
-bool WebGLContextAttributes::alpha() const
-{
- return m_attrs.alpha;
-}
-
-void WebGLContextAttributes::setAlpha(bool alpha)
-{
- m_attrs.alpha = alpha;
-}
-
-bool WebGLContextAttributes::depth() const
-{
- return m_attrs.depth;
-}
-
-void WebGLContextAttributes::setDepth(bool depth)
-{
- m_attrs.depth = depth;
-}
-
-bool WebGLContextAttributes::stencil() const
-{
- return m_attrs.stencil;
-}
-
-void WebGLContextAttributes::setStencil(bool stencil)
-{
- m_attrs.stencil = stencil;
-}
-
-bool WebGLContextAttributes::antialias() const
-{
- return m_attrs.antialias;
-}
-
-void WebGLContextAttributes::setAntialias(bool antialias)
-{
- m_attrs.antialias = antialias;
-}
-
-bool WebGLContextAttributes::premultipliedAlpha() const
-{
- return m_attrs.premultipliedAlpha;
-}
-
-void WebGLContextAttributes::setPremultipliedAlpha(bool premultipliedAlpha)
-{
- m_attrs.premultipliedAlpha = premultipliedAlpha;
-}
-
-bool WebGLContextAttributes::preserveDrawingBuffer() const
-{
- return m_attrs.preserveDrawingBuffer;
-}
-
-void WebGLContextAttributes::setPreserveDrawingBuffer(bool preserveDrawingBuffer)
-{
- m_attrs.preserveDrawingBuffer = preserveDrawingBuffer;
-}
-
-bool WebGLContextAttributes::preferLowPowerToHighPerformance() const
-{
- return m_attrs.preferLowPowerToHighPerformance;
-}
-
-void WebGLContextAttributes::setPreferLowPowerToHighPerformance(bool preferLowPower)
-{
- m_attrs.preferLowPowerToHighPerformance = preferLowPower;
-}
-
-bool WebGLContextAttributes::failIfMajorPerformanceCaveat() const
-{
- return m_attrs.failIfMajorPerformanceCaveat;
-}
-
-void WebGLContextAttributes::setFailIfMajorPerformanceCaveat(bool fail)
-{
- m_attrs.failIfMajorPerformanceCaveat = fail;
-}
-
-GraphicsContext3D::Attributes WebGLContextAttributes::attributes() const
-{
- return m_attrs;
-}
-
-} // namespace WebCore
-
-#endif // ENABLE(WEBGL)
</del></span></pre></div>
<a id="trunkSourceWebCorehtmlcanvasWebGLContextAttributesh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/canvas/WebGLContextAttributes.h (209548 => 209549)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/canvas/WebGLContextAttributes.h        2016-12-08 18:57:34 UTC (rev 209548)
+++ trunk/Source/WebCore/html/canvas/WebGLContextAttributes.h        2016-12-08 19:09:35 UTC (rev 209549)
</span><span class="lines">@@ -1,5 +1,6 @@
</span><span class="cx"> /*
</span><span class="cx"> * Copyright (c) 2010, Google Inc. All rights reserved.
</span><ins>+ * Copyright (c) 2016 Apple Inc. All rights reserved.
</ins><span class="cx"> *
</span><span class="cx"> * Redistribution and use in source and binary forms, with or without
</span><span class="cx"> * modification, are permitted provided that the following conditions are
</span><span class="lines">@@ -26,68 +27,10 @@
</span><span class="cx">
</span><span class="cx"> #pragma once
</span><span class="cx">
</span><del>-#include "CanvasContextAttributes.h"
-#include "GraphicsContext3D.h"
</del><ins>+#include "GraphicsContext3DAttributes.h"
</ins><span class="cx">
</span><span class="cx"> namespace WebCore {
</span><span class="cx">
</span><del>-class WebGLContextAttributes final : public CanvasContextAttributes {
- public:
- virtual ~WebGLContextAttributes();
</del><ins>+using WebGLContextAttributes = GraphicsContext3DAttributes;
</ins><span class="cx">
</span><del>- // Create a new attributes object
- static Ref<WebGLContextAttributes> create();
-
- // Create a new attributes object initialized with preexisting attributes
- static Ref<WebGLContextAttributes> create(GraphicsContext3D::Attributes);
-
- // Whether or not the drawing buffer has an alpha channel. Default is true.
- bool alpha() const;
- void setAlpha(bool alpha);
-
- // Whether or not the drawing buffer has a depth buffer. Default is true.
- bool depth() const;
- void setDepth(bool depth);
-
- // Whether or not the drawing buffer has a stencil buffer. Default is true.
- bool stencil() const;
- void setStencil(bool stencil);
-
- // Whether or not the drawing buffer is antialiased. Default is true.
- bool antialias() const;
- void setAntialias(bool antialias);
-
- // Whether or not to treat the values in the drawing buffer as
- // though their alpha channel has already been multiplied into the
- // color channels. Default is true.
- bool premultipliedAlpha() const;
- void setPremultipliedAlpha(bool premultipliedAlpha);
-
- // Whether or not to preserve the drawing buffer after presentation to the
- // screen. Default is false.
- bool preserveDrawingBuffer() const;
- void setPreserveDrawingBuffer(bool);
-
- // Whether or not to attempt to use a lower-power GPU if it is available.
- // Default is false.
- bool preferLowPowerToHighPerformance() const;
- void setPreferLowPowerToHighPerformance(bool);
-
- // Whether or not to immediately fail if a performant GPU is not available.
- // Default is false.
- bool failIfMajorPerformanceCaveat() const;
- void setFailIfMajorPerformanceCaveat(bool);
-
- // Fetches a copy of the attributes stored in this object in a
- // form that can be used to initialize a GraphicsContext3D.
- GraphicsContext3D::Attributes attributes() const;
-
- protected:
- WebGLContextAttributes();
- WebGLContextAttributes(GraphicsContext3D::Attributes attributes);
-
- private:
- GraphicsContext3D::Attributes m_attrs;
-};
-
</del><span class="cx"> } // namespace WebCore
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlcanvasWebGLContextAttributesidl"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/canvas/WebGLContextAttributes.idl (209548 => 209549)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/canvas/WebGLContextAttributes.idl        2016-12-08 18:57:34 UTC (rev 209548)
+++ trunk/Source/WebCore/html/canvas/WebGLContextAttributes.idl        2016-12-08 19:09:35 UTC (rev 209549)
</span><span class="lines">@@ -24,16 +24,18 @@
</span><span class="cx"> * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
</span><span class="cx"> */
</span><span class="cx">
</span><ins>+typedef boolean GLboolean;
+
</ins><span class="cx"> [
</span><del>- NoInterfaceObject,
</del><span class="cx"> Conditional=WEBGL,
</span><del>-] interface WebGLContextAttributes {
- attribute boolean alpha;
- attribute boolean depth;
- attribute boolean stencil;
- attribute boolean antialias;
- attribute boolean premultipliedAlpha;
- attribute boolean preserveDrawingBuffer;
- attribute boolean preferLowPowerToHighPerformance;
- attribute boolean failIfMajorPerformanceCaveat;
</del><ins>+ JSGenerateToJSObject
+] dictionary WebGLContextAttributes {
+ GLboolean alpha = true;
+ GLboolean depth = true;
+ GLboolean stencil = false;
+ GLboolean antialias = true;
+ GLboolean premultipliedAlpha = true;
+ GLboolean preserveDrawingBuffer = false;
+ GLboolean preferLowPowerToHighPerformance = false;
+ GLboolean failIfMajorPerformanceCaveat = false;
</ins><span class="cx"> };
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlcanvasWebGLRenderingContextcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/canvas/WebGLRenderingContext.cpp (209548 => 209549)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/canvas/WebGLRenderingContext.cpp        2016-12-08 18:57:34 UTC (rev 209548)
+++ trunk/Source/WebCore/html/canvas/WebGLRenderingContext.cpp        2016-12-08 19:09:35 UTC (rev 209549)
</span><span class="lines">@@ -65,13 +65,13 @@
</span><span class="cx">
</span><span class="cx"> namespace WebCore {
</span><span class="cx">
</span><del>-WebGLRenderingContext::WebGLRenderingContext(HTMLCanvasElement& passedCanvas, GraphicsContext3D::Attributes attributes)
</del><ins>+WebGLRenderingContext::WebGLRenderingContext(HTMLCanvasElement& passedCanvas, GraphicsContext3DAttributes attributes)
</ins><span class="cx"> : WebGLRenderingContextBase(passedCanvas, attributes)
</span><span class="cx"> {
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> WebGLRenderingContext::WebGLRenderingContext(HTMLCanvasElement& passedCanvas, PassRefPtr<GraphicsContext3D> context,
</span><del>- GraphicsContext3D::Attributes attributes) : WebGLRenderingContextBase(passedCanvas, context, attributes)
</del><ins>+ GraphicsContext3DAttributes attributes) : WebGLRenderingContextBase(passedCanvas, context, attributes)
</ins><span class="cx"> {
</span><span class="cx"> initializeVertexArrayObjects();
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlcanvasWebGLRenderingContexth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/canvas/WebGLRenderingContext.h (209548 => 209549)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/canvas/WebGLRenderingContext.h        2016-12-08 18:57:34 UTC (rev 209548)
+++ trunk/Source/WebCore/html/canvas/WebGLRenderingContext.h        2016-12-08 19:09:35 UTC (rev 209549)
</span><span class="lines">@@ -31,8 +31,8 @@
</span><span class="cx">
</span><span class="cx"> class WebGLRenderingContext final : public WebGLRenderingContextBase {
</span><span class="cx"> public:
</span><del>- WebGLRenderingContext(HTMLCanvasElement&, GraphicsContext3D::Attributes);
- WebGLRenderingContext(HTMLCanvasElement&, PassRefPtr<GraphicsContext3D>, GraphicsContext3D::Attributes);
</del><ins>+ WebGLRenderingContext(HTMLCanvasElement&, GraphicsContext3DAttributes);
+ WebGLRenderingContext(HTMLCanvasElement&, PassRefPtr<GraphicsContext3D>, GraphicsContext3DAttributes);
</ins><span class="cx">
</span><span class="cx"> private:
</span><span class="cx"> bool isWebGL1() const final { return true; }
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlcanvasWebGLRenderingContextBasecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/canvas/WebGLRenderingContextBase.cpp (209548 => 209549)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/canvas/WebGLRenderingContextBase.cpp        2016-12-08 18:57:34 UTC (rev 209548)
+++ trunk/Source/WebCore/html/canvas/WebGLRenderingContextBase.cpp        2016-12-08 19:09:35 UTC (rev 209549)
</span><span class="lines">@@ -348,7 +348,7 @@
</span><span class="cx"> WebGLRenderingContextBase* m_context;
</span><span class="cx"> };
</span><span class="cx">
</span><del>-std::unique_ptr<WebGLRenderingContextBase> WebGLRenderingContextBase::create(HTMLCanvasElement& canvas, WebGLContextAttributes* attrs, const String& type)
</del><ins>+std::unique_ptr<WebGLRenderingContextBase> WebGLRenderingContextBase::create(HTMLCanvasElement& canvas, WebGLContextAttributes& attributes, const String& type)
</ins><span class="cx"> {
</span><span class="cx"> #if ENABLE(WEBGL2)
</span><span class="cx"> if (type == "webgl2" && !RuntimeEnabledFeatures::sharedFeatures().webGL2Enabled())
</span><span class="lines">@@ -388,8 +388,6 @@
</span><span class="cx"> }
</span><span class="cx"> }
</span><span class="cx">
</span><del>- GraphicsContext3D::Attributes attributes = attrs ? attrs->attributes() : GraphicsContext3D::Attributes();
-
</del><span class="cx"> if (attributes.antialias) {
</span><span class="cx"> if (!frame->settings().openGLMultisamplingEnabled())
</span><span class="cx"> attributes.antialias = false;
</span><span class="lines">@@ -453,7 +451,7 @@
</span><span class="cx"> return renderingContext;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-WebGLRenderingContextBase::WebGLRenderingContextBase(HTMLCanvasElement& passedCanvas, GraphicsContext3D::Attributes attributes)
</del><ins>+WebGLRenderingContextBase::WebGLRenderingContextBase(HTMLCanvasElement& passedCanvas, WebGLContextAttributes attributes)
</ins><span class="cx"> : CanvasRenderingContext(passedCanvas)
</span><span class="cx"> , ActiveDOMObject(&passedCanvas.document())
</span><span class="cx"> , m_context(nullptr)
</span><span class="lines">@@ -471,7 +469,7 @@
</span><span class="cx"> {
</span><span class="cx"> }
</span><span class="cx">
</span><del>-WebGLRenderingContextBase::WebGLRenderingContextBase(HTMLCanvasElement& passedCanvas, RefPtr<GraphicsContext3D>&& context, GraphicsContext3D::Attributes attributes)
</del><ins>+WebGLRenderingContextBase::WebGLRenderingContextBase(HTMLCanvasElement& passedCanvas, RefPtr<GraphicsContext3D>&& context, WebGLContextAttributes attributes)
</ins><span class="cx"> : CanvasRenderingContext(passedCanvas)
</span><span class="cx"> , ActiveDOMObject(&passedCanvas.document())
</span><span class="cx"> , m_context(WTFMove(context))
</span><span class="lines">@@ -667,7 +665,8 @@
</span><span class="cx"> || m_attributes.preserveDrawingBuffer || (mask && m_framebufferBinding))
</span><span class="cx"> return false;
</span><span class="cx">
</span><del>- RefPtr<WebGLContextAttributes> contextAttributes = getContextAttributes();
</del><ins>+ auto contextAttributes = getContextAttributes();
+ ASSERT(contextAttributes);
</ins><span class="cx">
</span><span class="cx"> // Determine if it's possible to combine the clear the user asked for and this clear.
</span><span class="cx"> bool combinedClear = mask && !m_scissorEnabled;
</span><span class="lines">@@ -682,13 +681,13 @@
</span><span class="cx"> m_context->clearColor(0, 0, 0, 0);
</span><span class="cx"> m_context->colorMask(true, true, true, true);
</span><span class="cx"> GC3Dbitfield clearMask = GraphicsContext3D::COLOR_BUFFER_BIT;
</span><del>- if (contextAttributes->depth()) {
</del><ins>+ if (contextAttributes->depth) {
</ins><span class="cx"> if (!combinedClear || !m_depthMask || !(mask & GraphicsContext3D::DEPTH_BUFFER_BIT))
</span><span class="cx"> m_context->clearDepth(1.0f);
</span><span class="cx"> clearMask |= GraphicsContext3D::DEPTH_BUFFER_BIT;
</span><span class="cx"> m_context->depthMask(true);
</span><span class="cx"> }
</span><del>- if (contextAttributes->stencil()) {
</del><ins>+ if (contextAttributes->stencil) {
</ins><span class="cx"> if (combinedClear && (mask & GraphicsContext3D::STENCIL_BUFFER_BIT))
</span><span class="cx"> m_context->clearStencil(m_clearStencil & m_stencilMask);
</span><span class="cx"> else
</span><span class="lines">@@ -2223,21 +2222,20 @@
</span><span class="cx"> return WebGLGetInfo(static_cast<unsigned int>(value));
</span><span class="cx"> }
</span><span class="cx">
</span><del>-RefPtr<WebGLContextAttributes> WebGLRenderingContextBase::getContextAttributes()
</del><ins>+std::optional<WebGLContextAttributes> WebGLRenderingContextBase::getContextAttributes()
</ins><span class="cx"> {
</span><span class="cx"> if (isContextLostOrPending())
</span><del>- return nullptr;
- // We always need to return a new WebGLContextAttributes object to
- // prevent the user from mutating any cached version.
</del><ins>+ return std::nullopt;
</ins><span class="cx">
</span><span class="cx"> // Also, we need to enforce requested values of "false" for depth
</span><span class="cx"> // and stencil, regardless of the properties of the underlying
</span><span class="cx"> // GraphicsContext3D.
</span><del>- auto attributes = WebGLContextAttributes::create(m_context->getContextAttributes());
</del><ins>+
+ auto attributes = m_context->getContextAttributes();
</ins><span class="cx"> if (!m_attributes.depth)
</span><del>- attributes->setDepth(false);
</del><ins>+ attributes.depth = false;
</ins><span class="cx"> if (!m_attributes.stencil)
</span><del>- attributes->setStencil(false);
</del><ins>+ attributes.stencil = false;
</ins><span class="cx"> return WTFMove(attributes);
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -5787,11 +5785,11 @@
</span><span class="cx"> if (m_framebufferBinding)
</span><span class="cx"> haveStencilBuffer = m_framebufferBinding->hasStencilBuffer();
</span><span class="cx"> else {
</span><del>- RefPtr<WebGLContextAttributes> attributes = getContextAttributes();
- haveStencilBuffer = attributes->stencil();
</del><ins>+ auto attributes = getContextAttributes();
+ ASSERT(attributes);
+ haveStencilBuffer = attributes->stencil;
</ins><span class="cx"> }
</span><del>- enableOrDisable(GraphicsContext3D::STENCIL_TEST,
- m_stencilEnabled && haveStencilBuffer);
</del><ins>+ enableOrDisable(GraphicsContext3D::STENCIL_TEST, m_stencilEnabled && haveStencilBuffer);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void WebGLRenderingContextBase::enableOrDisable(GC3Denum capability, bool enable)
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlcanvasWebGLRenderingContextBaseh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/canvas/WebGLRenderingContextBase.h (209548 => 209549)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/canvas/WebGLRenderingContextBase.h        2016-12-08 18:57:34 UTC (rev 209548)
+++ trunk/Source/WebCore/html/canvas/WebGLRenderingContextBase.h        2016-12-08 19:09:35 UTC (rev 209549)
</span><span class="lines">@@ -30,6 +30,7 @@
</span><span class="cx"> #include "GraphicsContext3D.h"
</span><span class="cx"> #include "ImageBuffer.h"
</span><span class="cx"> #include "Timer.h"
</span><ins>+#include "WebGLContextAttributes.h"
</ins><span class="cx"> #include "WebGLGetInfo.h"
</span><span class="cx"> #include "WebGLObject.h"
</span><span class="cx"> #include "WebGLTexture.h"
</span><span class="lines">@@ -64,7 +65,6 @@
</span><span class="cx"> class WebGLCompressedTextureATC;
</span><span class="cx"> class WebGLCompressedTexturePVRTC;
</span><span class="cx"> class WebGLCompressedTextureS3TC;
</span><del>-class WebGLContextAttributes;
</del><span class="cx"> class WebGLDebugRendererInfo;
</span><span class="cx"> class WebGLDebugShaders;
</span><span class="cx"> class WebGLDepthTexture;
</span><span class="lines">@@ -108,7 +108,7 @@
</span><span class="cx">
</span><span class="cx"> class WebGLRenderingContextBase : public CanvasRenderingContext, public ActiveDOMObject {
</span><span class="cx"> public:
</span><del>- static std::unique_ptr<WebGLRenderingContextBase> create(HTMLCanvasElement&, WebGLContextAttributes*, const String&);
</del><ins>+ static std::unique_ptr<WebGLRenderingContextBase> create(HTMLCanvasElement&, WebGLContextAttributes&, const String&);
</ins><span class="cx"> virtual ~WebGLRenderingContextBase();
</span><span class="cx">
</span><span class="cx"> #if PLATFORM(WIN)
</span><span class="lines">@@ -192,7 +192,7 @@
</span><span class="cx"> bool getAttachedShaders(WebGLProgram*, Vector<RefPtr<WebGLShader>>&);
</span><span class="cx"> GC3Dint getAttribLocation(WebGLProgram*, const String& name);
</span><span class="cx"> WebGLGetInfo getBufferParameter(GC3Denum target, GC3Denum pname);
</span><del>- RefPtr<WebGLContextAttributes> getContextAttributes();
</del><ins>+ std::optional<WebGLContextAttributes> getContextAttributes();
</ins><span class="cx"> GC3Denum getError();
</span><span class="cx"> virtual WebGLExtension* getExtension(const String& name) = 0;
</span><span class="cx"> virtual WebGLGetInfo getFramebufferAttachmentParameter(GC3Denum target, GC3Denum attachment, GC3Denum pname) = 0;
</span><span class="lines">@@ -334,8 +334,8 @@
</span><span class="cx"> void vertexAttribDivisor(GC3Duint index, GC3Duint divisor);
</span><span class="cx">
</span><span class="cx"> protected:
</span><del>- WebGLRenderingContextBase(HTMLCanvasElement&, GraphicsContext3D::Attributes);
- WebGLRenderingContextBase(HTMLCanvasElement&, RefPtr<GraphicsContext3D>&&, GraphicsContext3D::Attributes);
</del><ins>+ WebGLRenderingContextBase(HTMLCanvasElement&, WebGLContextAttributes);
+ WebGLRenderingContextBase(HTMLCanvasElement&, RefPtr<GraphicsContext3D>&&, WebGLContextAttributes);
</ins><span class="cx">
</span><span class="cx"> friend class WebGLDrawBuffers;
</span><span class="cx"> friend class WebGLFramebuffer;
</span><span class="lines">@@ -515,7 +515,7 @@
</span><span class="cx"> GC3Denum m_unpackColorspaceConversion;
</span><span class="cx"> bool m_contextLost;
</span><span class="cx"> LostContextMode m_contextLostMode;
</span><del>- GraphicsContext3D::Attributes m_attributes;
</del><ins>+ WebGLContextAttributes m_attributes;
</ins><span class="cx">
</span><span class="cx"> bool m_layerCleared;
</span><span class="cx"> GC3Dfloat m_clearColor[4];
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlcanvasWebGLRenderingContextBaseidl"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/canvas/WebGLRenderingContextBase.idl (209548 => 209549)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/canvas/WebGLRenderingContextBase.idl        2016-12-08 18:57:34 UTC (rev 209548)
+++ trunk/Source/WebCore/html/canvas/WebGLRenderingContextBase.idl        2016-12-08 19:09:35 UTC (rev 209549)
</span><span class="lines">@@ -551,7 +551,7 @@
</span><span class="cx">
</span><span class="cx"> [Custom] any getBufferParameter(GLenum target, GLenum pname);
</span><span class="cx">
</span><del>- WebGLContextAttributes getContextAttributes();
</del><ins>+ WebGLContextAttributes? getContextAttributes();
</ins><span class="cx">
</span><span class="cx"> GLenum getError();
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicsGraphicsContext3Dh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/GraphicsContext3D.h (209548 => 209549)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/GraphicsContext3D.h        2016-12-08 18:57:34 UTC (rev 209548)
+++ trunk/Source/WebCore/platform/graphics/GraphicsContext3D.h        2016-12-08 19:09:35 UTC (rev 209549)
</span><span class="lines">@@ -23,10 +23,10 @@
</span><span class="cx"> * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
</span><span class="cx"> */
</span><span class="cx">
</span><del>-#ifndef GraphicsContext3D_h
-#define GraphicsContext3D_h
</del><ins>+#pragma once
</ins><span class="cx">
</span><span class="cx"> #include "ANGLEWebKitBridge.h"
</span><ins>+#include "GraphicsContext3DAttributes.h"
</ins><span class="cx"> #include "GraphicsTypes3D.h"
</span><span class="cx"> #include "Image.h"
</span><span class="cx"> #include "IntRect.h"
</span><span class="lines">@@ -718,23 +718,6 @@
</span><span class="cx"> MAP_READ_BIT = 0x0001
</span><span class="cx"> };
</span><span class="cx">
</span><del>- // Context creation attributes.
- struct Attributes {
- bool alpha { true };
- bool depth { true };
- bool stencil { false };
- bool antialias { true };
- bool premultipliedAlpha { true };
- bool preserveDrawingBuffer { false };
- bool noExtensions { false };
- bool shareResources { true };
- bool preferLowPowerToHighPerformance { false };
- bool forceSoftwareRenderer { false };
- bool failIfMajorPerformanceCaveat { false };
- bool useGLES3 { false };
- float devicePixelRatio { 1 };
- };
-
</del><span class="cx"> enum RenderStyle {
</span><span class="cx"> RenderOffscreen,
</span><span class="cx"> RenderDirectlyToHostWindow,
</span><span class="lines">@@ -756,7 +739,7 @@
</span><span class="cx"> void setContextLostCallback(std::unique_ptr<ContextLostCallback>);
</span><span class="cx"> void setErrorMessageCallback(std::unique_ptr<ErrorMessageCallback>);
</span><span class="cx">
</span><del>- static RefPtr<GraphicsContext3D> create(Attributes, HostWindow*, RenderStyle = RenderOffscreen);
</del><ins>+ static RefPtr<GraphicsContext3D> create(GraphicsContext3DAttributes, HostWindow*, RenderStyle = RenderOffscreen);
</ins><span class="cx"> static PassRefPtr<GraphicsContext3D> createForCurrentGLContext();
</span><span class="cx"> ~GraphicsContext3D();
</span><span class="cx">
</span><span class="lines">@@ -1026,7 +1009,7 @@
</span><span class="cx"> GC3Dint getAttribLocation(Platform3DObject, const String& name);
</span><span class="cx"> void getBooleanv(GC3Denum pname, GC3Dboolean* value);
</span><span class="cx"> void getBufferParameteriv(GC3Denum target, GC3Denum pname, GC3Dint* value);
</span><del>- Attributes getContextAttributes();
</del><ins>+ GraphicsContext3DAttributes getContextAttributes();
</ins><span class="cx"> GC3Denum getError();
</span><span class="cx"> void getFloatv(GC3Denum pname, GC3Dfloat* value);
</span><span class="cx"> void getFramebufferAttachmentParameteriv(GC3Denum target, GC3Denum attachment, GC3Denum pname, GC3Dint* value);
</span><span class="lines">@@ -1272,7 +1255,7 @@
</span><span class="cx"> };
</span><span class="cx">
</span><span class="cx"> private:
</span><del>- GraphicsContext3D(Attributes, HostWindow*, RenderStyle = RenderOffscreen);
</del><ins>+ GraphicsContext3D(GraphicsContext3DAttributes, HostWindow*, RenderStyle = RenderOffscreen);
</ins><span class="cx"> static int GPUCheckCounter;
</span><span class="cx">
</span><span class="cx"> // Helper for packImageData/extractImageData/extractTextureData which implement packing of pixel
</span><span class="lines">@@ -1390,7 +1373,7 @@
</span><span class="cx"> #endif
</span><span class="cx"> friend class Extensions3DOpenGLCommon;
</span><span class="cx">
</span><del>- Attributes m_attrs;
</del><ins>+ GraphicsContext3DAttributes m_attrs;
</ins><span class="cx"> RenderStyle m_renderStyle;
</span><span class="cx"> Vector<Vector<float>> m_vertexArray;
</span><span class="cx">
</span><span class="lines">@@ -1444,5 +1427,3 @@
</span><span class="cx"> };
</span><span class="cx">
</span><span class="cx"> } // namespace WebCore
</span><del>-
-#endif // GraphicsContext3D_h
</del></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicsGraphicsContext3DAttributesh"></a>
<div class="addfile"><h4>Added: trunk/Source/WebCore/platform/graphics/GraphicsContext3DAttributes.h (0 => 209549)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/GraphicsContext3DAttributes.h         (rev 0)
+++ trunk/Source/WebCore/platform/graphics/GraphicsContext3DAttributes.h        2016-12-08 19:09:35 UTC (rev 209549)
</span><span class="lines">@@ -0,0 +1,49 @@
</span><ins>+/*
+ * Copyright (C) 2016 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#pragma once
+
+namespace WebCore {
+
+struct GraphicsContext3DAttributes {
+ // WebGLContextAttributes
+ bool alpha { true };
+ bool depth { true };
+ bool stencil { false };
+ bool antialias { true };
+ bool premultipliedAlpha { true };
+ bool preserveDrawingBuffer { false };
+ bool preferLowPowerToHighPerformance { false };
+ bool failIfMajorPerformanceCaveat { false };
+
+ // Additional attributes.
+ bool forceSoftwareRenderer { false };
+ bool shareResources { true };
+ bool useGLES3 { false };
+ bool noExtensions { false };
+ float devicePixelRatio { 1 };
+};
+
+}
</ins></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicscairoGraphicsContext3DCairocpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/cairo/GraphicsContext3DCairo.cpp (209548 => 209549)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/cairo/GraphicsContext3DCairo.cpp        2016-12-08 18:57:34 UTC (rev 209548)
+++ trunk/Source/WebCore/platform/graphics/cairo/GraphicsContext3DCairo.cpp        2016-12-08 19:09:35 UTC (rev 209549)
</span><span class="lines">@@ -56,7 +56,7 @@
</span><span class="cx">
</span><span class="cx"> namespace WebCore {
</span><span class="cx">
</span><del>-RefPtr<GraphicsContext3D> GraphicsContext3D::create(GraphicsContext3D::Attributes attributes, HostWindow* hostWindow, GraphicsContext3D::RenderStyle renderStyle)
</del><ins>+RefPtr<GraphicsContext3D> GraphicsContext3D::create(GraphicsContext3DAttributes attributes, HostWindow* hostWindow, GraphicsContext3D::RenderStyle renderStyle)
</ins><span class="cx"> {
</span><span class="cx"> // This implementation doesn't currently support rendering directly to the HostWindow.
</span><span class="cx"> if (renderStyle == RenderDirectlyToHostWindow)
</span><span class="lines">@@ -76,7 +76,7 @@
</span><span class="cx"> return adoptRef(new GraphicsContext3D(attributes, hostWindow, renderStyle));
</span><span class="cx"> }
</span><span class="cx">
</span><del>-GraphicsContext3D::GraphicsContext3D(GraphicsContext3D::Attributes attributes, HostWindow*, GraphicsContext3D::RenderStyle renderStyle)
</del><ins>+GraphicsContext3D::GraphicsContext3D(GraphicsContext3DAttributes attributes, HostWindow*, GraphicsContext3D::RenderStyle renderStyle)
</ins><span class="cx"> : m_currentWidth(0)
</span><span class="cx"> , m_currentHeight(0)
</span><span class="cx"> , m_attrs(attributes)
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicseflGraphicsContext3DEflcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/efl/GraphicsContext3DEfl.cpp (209548 => 209549)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/efl/GraphicsContext3DEfl.cpp        2016-12-08 18:57:34 UTC (rev 209548)
+++ trunk/Source/WebCore/platform/graphics/efl/GraphicsContext3DEfl.cpp        2016-12-08 19:09:35 UTC (rev 209549)
</span><span class="lines">@@ -30,13 +30,13 @@
</span><span class="cx">
</span><span class="cx"> namespace WebCore {
</span><span class="cx">
</span><del>-RefPtr<GraphicsContext3D> GraphicsContext3D::create(GraphicsContext3D::Attributes attrs, HostWindow* hostWindow, RenderStyle renderStyle)
</del><ins>+RefPtr<GraphicsContext3D> GraphicsContext3D::create(GraphicsContext3DAttributes attrs, HostWindow* hostWindow, RenderStyle renderStyle)
</ins><span class="cx"> {
</span><span class="cx"> RefPtr<GraphicsContext3D> context = adoptRef(new GraphicsContext3D(attrs, hostWindow, renderStyle));
</span><span class="cx"> return context->m_private ? context : nullptr;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-GraphicsContext3D::GraphicsContext3D(GraphicsContext3D::Attributes attrs, HostWindow* hostWindow, GraphicsContext3D::RenderStyle renderStyle)
</del><ins>+GraphicsContext3D::GraphicsContext3D(GraphicsContext3DAttributes attrs, HostWindow* hostWindow, GraphicsContext3D::RenderStyle renderStyle)
</ins><span class="cx"> : m_currentWidth(0)
</span><span class="cx"> , m_currentHeight(0)
</span><span class="cx"> , m_compiler(isGLES2Compliant() ? SH_ESSL_OUTPUT : SH_GLSL_COMPATIBILITY_OUTPUT)
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicsgstreamerMediaPlayerPrivateGStreamerBasecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp (209548 => 209549)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp        2016-12-08 18:57:34 UTC (rev 209548)
+++ trunk/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp        2016-12-08 19:09:35 UTC (rev 209549)
</span><span class="lines">@@ -601,7 +601,7 @@
</span><span class="cx"> std::unique_ptr<TextureMapperPlatformLayerBuffer> buffer = m_platformLayerProxy->getAvailableBuffer(size, GraphicsContext3D::DONT_CARE);
</span><span class="cx"> if (UNLIKELY(!buffer)) {
</span><span class="cx"> if (UNLIKELY(!m_context3D))
</span><del>- m_context3D = GraphicsContext3D::create(GraphicsContext3D::Attributes(), nullptr, GraphicsContext3D::RenderToCurrentGLContext);
</del><ins>+ m_context3D = GraphicsContext3D::create(GraphicsContext3DAttributes(), nullptr, GraphicsContext3D::RenderToCurrentGLContext);
</ins><span class="cx">
</span><span class="cx"> RefPtr<BitmapTexture> texture = adoptRef(new BitmapTextureGL(m_context3D));
</span><span class="cx"> texture->reset(size, GST_VIDEO_INFO_HAS_ALPHA(&videoInfo) ? BitmapTexture::SupportsAlpha : BitmapTexture::NoFlag);
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicsmacGraphicsContext3DMacmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/mac/GraphicsContext3DMac.mm (209548 => 209549)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/mac/GraphicsContext3DMac.mm        2016-12-08 18:57:34 UTC (rev 209548)
+++ trunk/Source/WebCore/platform/graphics/mac/GraphicsContext3DMac.mm        2016-12-08 19:09:35 UTC (rev 209549)
</span><span class="lines">@@ -127,7 +127,7 @@
</span><span class="cx"> }
</span><span class="cx"> #endif // !PLATFORM(IOS)
</span><span class="cx">
</span><del>-RefPtr<GraphicsContext3D> GraphicsContext3D::create(GraphicsContext3D::Attributes attrs, HostWindow* hostWindow, GraphicsContext3D::RenderStyle renderStyle)
</del><ins>+RefPtr<GraphicsContext3D> GraphicsContext3D::create(GraphicsContext3DAttributes attrs, HostWindow* hostWindow, GraphicsContext3D::RenderStyle renderStyle)
</ins><span class="cx"> {
</span><span class="cx"> // This implementation doesn't currently support rendering directly to the HostWindow.
</span><span class="cx"> if (renderStyle == RenderDirectlyToHostWindow)
</span><span class="lines">@@ -153,7 +153,7 @@
</span><span class="cx"> return context;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-GraphicsContext3D::GraphicsContext3D(GraphicsContext3D::Attributes attrs, HostWindow* hostWindow, GraphicsContext3D::RenderStyle renderStyle)
</del><ins>+GraphicsContext3D::GraphicsContext3D(GraphicsContext3DAttributes attrs, HostWindow* hostWindow, GraphicsContext3D::RenderStyle renderStyle)
</ins><span class="cx"> : m_currentWidth(0)
</span><span class="cx"> , m_currentHeight(0)
</span><span class="cx"> , m_contextObj(0)
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicsopenglGraphicsContext3DOpenGLCommoncpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp (209548 => 209549)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp        2016-12-08 18:57:34 UTC (rev 209548)
+++ trunk/Source/WebCore/platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp        2016-12-08 19:09:35 UTC (rev 209549)
</span><span class="lines">@@ -132,7 +132,7 @@
</span><span class="cx">
</span><span class="cx"> PassRefPtr<GraphicsContext3D> GraphicsContext3D::createForCurrentGLContext()
</span><span class="cx"> {
</span><del>- auto context = adoptRef(*new GraphicsContext3D(Attributes(), 0, GraphicsContext3D::RenderToCurrentGLContext));
</del><ins>+ auto context = adoptRef(*new GraphicsContext3D({ }, 0, GraphicsContext3D::RenderToCurrentGLContext));
</ins><span class="cx"> if (!context->m_private)
</span><span class="cx"> return nullptr;
</span><span class="cx"> return WTFMove(context);
</span><span class="lines">@@ -1007,7 +1007,7 @@
</span><span class="cx"> return ::glGetAttribLocation(program, mappedName.utf8().data());
</span><span class="cx"> }
</span><span class="cx">
</span><del>-GraphicsContext3D::Attributes GraphicsContext3D::getContextAttributes()
</del><ins>+GraphicsContext3DAttributes GraphicsContext3D::getContextAttributes()
</ins><span class="cx"> {
</span><span class="cx"> return m_attrs;
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicswinGraphicsContext3DWincpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/win/GraphicsContext3DWin.cpp (209548 => 209549)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/win/GraphicsContext3DWin.cpp        2016-12-08 18:57:34 UTC (rev 209548)
+++ trunk/Source/WebCore/platform/graphics/win/GraphicsContext3DWin.cpp        2016-12-08 19:09:35 UTC (rev 209549)
</span><span class="lines">@@ -45,7 +45,7 @@
</span><span class="cx">
</span><span class="cx"> namespace WebCore {
</span><span class="cx">
</span><del>-RefPtr<GraphicsContext3D> GraphicsContext3D::create(GraphicsContext3D::Attributes attributes, HostWindow* hostWindow, GraphicsContext3D::RenderStyle renderStyle)
</del><ins>+RefPtr<GraphicsContext3D> GraphicsContext3D::create(GraphicsContext3DAttributes attributes, HostWindow* hostWindow, GraphicsContext3D::RenderStyle renderStyle)
</ins><span class="cx"> {
</span><span class="cx"> // This implementation doesn't currently support rendering directly to the HostWindow.
</span><span class="cx"> if (renderStyle == RenderDirectlyToHostWindow)
</span><span class="lines">@@ -65,7 +65,7 @@
</span><span class="cx"> return adoptRef(new GraphicsContext3D(attributes, hostWindow, renderStyle));
</span><span class="cx"> }
</span><span class="cx">
</span><del>-GraphicsContext3D::GraphicsContext3D(GraphicsContext3D::Attributes attributes, HostWindow*, GraphicsContext3D::RenderStyle renderStyle)
</del><ins>+GraphicsContext3D::GraphicsContext3D(GraphicsContext3DAttributes attributes, HostWindow*, GraphicsContext3D::RenderStyle renderStyle)
</ins><span class="cx"> : m_currentWidth(0)
</span><span class="cx"> , m_currentHeight(0)
</span><span class="cx"> , m_compiler(isGLES2Compliant() ? SH_ESSL_OUTPUT : SH_GLSL_COMPATIBILITY_OUTPUT)
</span></span></pre>
</div>
</div>
</body>
</html>