<!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>[212674] branches/safari-603-branch</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/212674">212674</a></dd>
<dt>Author</dt> <dd>matthew_hanson@apple.com</dd>
<dt>Date</dt> <dd>2017-02-20 13:48:36 -0800 (Mon, 20 Feb 2017)</dd>
</dl>

<h3>Log Message</h3>
<pre>Merge <a href="http://trac.webkit.org/projects/webkit/changeset/212650">r212650</a>. rdar://problem/30604254</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#branchessafari603branchLayoutTestsChangeLog">branches/safari-603-branch/LayoutTests/ChangeLog</a></li>
<li><a href="#branchessafari603branchLayoutTestsplatformgtkTestExpectations">branches/safari-603-branch/LayoutTests/platform/gtk/TestExpectations</a></li>
<li><a href="#branchessafari603branchLayoutTestsplatformwinTestExpectations">branches/safari-603-branch/LayoutTests/platform/win/TestExpectations</a></li>
<li><a href="#branchessafari603branchSourceWebCoreChangeLog">branches/safari-603-branch/Source/WebCore/ChangeLog</a></li>
<li><a href="#branchessafari603branchSourceWebCoredomEventNamesh">branches/safari-603-branch/Source/WebCore/dom/EventNames.h</a></li>
<li><a href="#branchessafari603branchSourceWebCorehtmlcanvasWebGLRenderingContextBasecpp">branches/safari-603-branch/Source/WebCore/html/canvas/WebGLRenderingContextBase.cpp</a></li>
<li><a href="#branchessafari603branchSourceWebCorehtmlcanvasWebGLRenderingContextBaseh">branches/safari-603-branch/Source/WebCore/html/canvas/WebGLRenderingContextBase.h</a></li>
<li><a href="#branchessafari603branchSourceWebCorehtmlcanvasWebGLRenderingContextBaseidl">branches/safari-603-branch/Source/WebCore/html/canvas/WebGLRenderingContextBase.idl</a></li>
<li><a href="#branchessafari603branchSourceWebCoreplatformgraphicsGraphicsContext3Dcpp">branches/safari-603-branch/Source/WebCore/platform/graphics/GraphicsContext3D.cpp</a></li>
<li><a href="#branchessafari603branchSourceWebCoreplatformgraphicsGraphicsContext3Dh">branches/safari-603-branch/Source/WebCore/platform/graphics/GraphicsContext3D.h</a></li>
<li><a href="#branchessafari603branchSourceWebCoreplatformgraphicsmacGraphicsContext3DMacmm">branches/safari-603-branch/Source/WebCore/platform/graphics/mac/GraphicsContext3DMac.mm</a></li>
<li><a href="#branchessafari603branchSourceWebCoreplatformgraphicsopenglGraphicsContext3DOpenGLCommoncpp">branches/safari-603-branch/Source/WebCore/platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp</a></li>
<li><a href="#branchessafari603branchSourceWebCoretestingInternalscpp">branches/safari-603-branch/Source/WebCore/testing/Internals.cpp</a></li>
<li><a href="#branchessafari603branchSourceWebCoretestingInternalsh">branches/safari-603-branch/Source/WebCore/testing/Internals.h</a></li>
<li><a href="#branchessafari603branchSourceWebCoretestingInternalsidl">branches/safari-603-branch/Source/WebCore/testing/Internals.idl</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li><a href="#branchessafari603branchLayoutTestsfastcanvaswebglwebglcontextchangedeventexpectedtxt">branches/safari-603-branch/LayoutTests/fast/canvas/webgl/webglcontextchangedevent-expected.txt</a></li>
<li><a href="#branchessafari603branchLayoutTestsfastcanvaswebglwebglcontextchangedeventhtml">branches/safari-603-branch/LayoutTests/fast/canvas/webgl/webglcontextchangedevent.html</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="branchessafari603branchLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: branches/safari-603-branch/LayoutTests/ChangeLog (212673 => 212674)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-603-branch/LayoutTests/ChangeLog        2017-02-20 21:48:30 UTC (rev 212673)
+++ branches/safari-603-branch/LayoutTests/ChangeLog        2017-02-20 21:48:36 UTC (rev 212674)
</span><span class="lines">@@ -1,5 +1,21 @@
</span><span class="cx"> 2017-02-20  Matthew Hanson  &lt;matthew_hanson@apple.com&gt;
</span><span class="cx"> 
</span><ins>+        Merge r212650. rdar://problem/30604254
+
+    2017-02-20  Jon Lee  &lt;jonlee@apple.com&gt;
+
+            Unreviewed, rolling out r212639.
+
+            Have a fix for the linker error on iOS.
+
+            Reverted changeset:
+
+            &quot;Unreviewed, rolling out r212637.&quot;
+            https://bugs.webkit.org/show_bug.cgi?id=168595
+            http://trac.webkit.org/changeset/212639
+
+2017-02-20  Matthew Hanson  &lt;matthew_hanson@apple.com&gt;
+
</ins><span class="cx">         Merge r212633. rdar://problem/30592266
</span><span class="cx"> 
</span><span class="cx">     2017-02-19  Dean Jackson  &lt;dino@apple.com&gt;
</span></span></pre></div>
<a id="branchessafari603branchLayoutTestsfastcanvaswebglwebglcontextchangedeventexpectedtxt"></a>
<div class="addfile"><h4>Added: branches/safari-603-branch/LayoutTests/fast/canvas/webgl/webglcontextchangedevent-expected.txt (0 => 212674)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-603-branch/LayoutTests/fast/canvas/webgl/webglcontextchangedevent-expected.txt                                (rev 0)
+++ branches/safari-603-branch/LayoutTests/fast/canvas/webgl/webglcontextchangedevent-expected.txt        2017-02-20 21:48:36 UTC (rev 212674)
</span><span class="lines">@@ -0,0 +1,8 @@
</span><ins>+  
+We should see three changed events.
+
+Saw webglcontextchanged event.
+
+Saw webglcontextchanged event.
+
+Saw webglcontextchanged event.
</ins></span></pre></div>
<a id="branchessafari603branchLayoutTestsfastcanvaswebglwebglcontextchangedeventhtml"></a>
<div class="addfile"><h4>Added: branches/safari-603-branch/LayoutTests/fast/canvas/webgl/webglcontextchangedevent.html (0 => 212674)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-603-branch/LayoutTests/fast/canvas/webgl/webglcontextchangedevent.html                                (rev 0)
+++ branches/safari-603-branch/LayoutTests/fast/canvas/webgl/webglcontextchangedevent.html        2017-02-20 21:48:36 UTC (rev 212674)
</span><span class="lines">@@ -0,0 +1,50 @@
</span><ins>+&lt;script&gt;
+if (window.testRunner) {
+    testRunner.dumpAsText();
+    testRunner.waitUntilDone();
+}
+
+function log(msg)
+{
+    let p = document.createElement(&quot;p&quot;);
+    p.textContent = msg;
+    document.body.appendChild(p);
+}
+
+function runTest()
+{
+    if (!window.internals) {
+        log(&quot;This test must run inside DRT/WKTR.&quot;);
+        return;
+    }
+
+    log(&quot;We should see three changed events.&quot;);
+
+    let changedEventsSeen = 0;
+
+    let handleChangedEvent = (event) =&gt; {
+        log(&quot;Saw webglcontextchanged event.&quot;);
+        changedEventsSeen++;
+        if (changedEventsSeen == 3)
+            testRunner.notifyDone();
+    }
+
+    document.querySelectorAll(&quot;canvas&quot;).forEach((c) =&gt;
+    {
+        c.addEventListener(&quot;webglcontextchanged&quot;, handleChangedEvent, false);
+        let gl = c.getContext(&quot;webgl&quot;);
+        gl.clearColor(1, 0, 0, 1);
+        gl.clear(gl.COLOR_BUFFER_BIT);
+    });
+
+    let gl = document.querySelector(&quot;canvas&quot;).getContext(&quot;webgl&quot;);
+    window.internals.simulateWebGLContextChanged(gl);
+}
+
+
+window.addEventListener(&quot;load&quot;, runTest, false);
+&lt;/script&gt;
+
+&lt;canvas&gt;&lt;/canvas&gt;
+&lt;canvas&gt;&lt;/canvas&gt;
+&lt;canvas&gt;&lt;/canvas&gt;
</ins></span></pre></div>
<a id="branchessafari603branchLayoutTestsplatformgtkTestExpectations"></a>
<div class="modfile"><h4>Modified: branches/safari-603-branch/LayoutTests/platform/gtk/TestExpectations (212673 => 212674)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-603-branch/LayoutTests/platform/gtk/TestExpectations        2017-02-20 21:48:30 UTC (rev 212673)
+++ branches/safari-603-branch/LayoutTests/platform/gtk/TestExpectations        2017-02-20 21:48:36 UTC (rev 212674)
</span><span class="lines">@@ -633,6 +633,9 @@
</span><span class="cx"> # This requires a specific font on Mac
</span><span class="cx"> fast/text/hidpi-text-selection-gap-between-words.html [ Skip ]
</span><span class="cx"> 
</span><ins>+# webglcontextchanged event not supported
+fast/canvas/webgl/webglcontextchangedevent.html [ Skip ]
+
</ins><span class="cx"> # Test requires hardcoded font names, which I do not have for this port.
</span><span class="cx"> fast/text/han-generic-font-families.html [ WontFix ]
</span><span class="cx"> fast/text/hangul-generic-font-families.html [ WontFix ]
</span></span></pre></div>
<a id="branchessafari603branchLayoutTestsplatformwinTestExpectations"></a>
<div class="modfile"><h4>Modified: branches/safari-603-branch/LayoutTests/platform/win/TestExpectations (212673 => 212674)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-603-branch/LayoutTests/platform/win/TestExpectations        2017-02-20 21:48:30 UTC (rev 212673)
+++ branches/safari-603-branch/LayoutTests/platform/win/TestExpectations        2017-02-20 21:48:36 UTC (rev 212674)
</span><span class="lines">@@ -3770,3 +3770,6 @@
</span><span class="cx"> 
</span><span class="cx"> # WebCrypto tests are failing.
</span><span class="cx"> webkit.org/b/165090 imported/w3c/WebCryptoAPI [ Skip ]
</span><ins>+
+# webglcontextchanged event not supported
+fast/canvas/webgl/webglcontextchangedevent.html [ Skip ]
</ins></span></pre></div>
<a id="branchessafari603branchSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: branches/safari-603-branch/Source/WebCore/ChangeLog (212673 => 212674)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-603-branch/Source/WebCore/ChangeLog        2017-02-20 21:48:30 UTC (rev 212673)
+++ branches/safari-603-branch/Source/WebCore/ChangeLog        2017-02-20 21:48:36 UTC (rev 212674)
</span><span class="lines">@@ -1,5 +1,21 @@
</span><span class="cx"> 2017-02-20  Matthew Hanson  &lt;matthew_hanson@apple.com&gt;
</span><span class="cx"> 
</span><ins>+        Merge r212650. rdar://problem/30604254
+
+    2017-02-20  Jon Lee  &lt;jonlee@apple.com&gt;
+
+            Unreviewed, rolling out r212639.
+
+            Have a fix for the linker error on iOS.
+
+            Reverted changeset:
+
+            &quot;Unreviewed, rolling out r212637.&quot;
+            https://bugs.webkit.org/show_bug.cgi?id=168595
+            http://trac.webkit.org/changeset/212639
+
+2017-02-20  Matthew Hanson  &lt;matthew_hanson@apple.com&gt;
+
</ins><span class="cx">         Merge r212633. rdar://problem/30592266
</span><span class="cx"> 
</span><span class="cx">     2017-02-19  Dean Jackson  &lt;dino@apple.com&gt;
</span></span></pre></div>
<a id="branchessafari603branchSourceWebCoredomEventNamesh"></a>
<div class="modfile"><h4>Modified: branches/safari-603-branch/Source/WebCore/dom/EventNames.h (212673 => 212674)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-603-branch/Source/WebCore/dom/EventNames.h        2017-02-20 21:48:30 UTC (rev 212673)
+++ branches/safari-603-branch/Source/WebCore/dom/EventNames.h        2017-02-20 21:48:36 UTC (rev 212674)
</span><span class="lines">@@ -241,6 +241,7 @@
</span><span class="cx">     macro(volumechange) \
</span><span class="cx">     macro(waiting) \
</span><span class="cx">     macro(waitingforkey) \
</span><ins>+    macro(webglcontextchanged) \
</ins><span class="cx">     macro(webglcontextcreationerror) \
</span><span class="cx">     macro(webglcontextlost) \
</span><span class="cx">     macro(webglcontextrestored) \
</span></span></pre></div>
<a id="branchessafari603branchSourceWebCorehtmlcanvasWebGLRenderingContextBasecpp"></a>
<div class="modfile"><h4>Modified: branches/safari-603-branch/Source/WebCore/html/canvas/WebGLRenderingContextBase.cpp (212673 => 212674)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-603-branch/Source/WebCore/html/canvas/WebGLRenderingContextBase.cpp        2017-02-20 21:48:30 UTC (rev 212673)
+++ branches/safari-603-branch/Source/WebCore/html/canvas/WebGLRenderingContextBase.cpp        2017-02-20 21:48:36 UTC (rev 212674)
</span><span class="lines">@@ -5771,6 +5771,17 @@
</span><span class="cx">     canvas().dispatchEvent(WebGLContextEvent::create(eventNames().webglcontextrestoredEvent, false, true, emptyString()));
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+void WebGLRenderingContextBase::dispatchContextChangedEvent()
+{
+    canvas().dispatchEvent(WebGLContextEvent::create(eventNames().webglcontextchangedEvent, false, true, emptyString()));
+}
+
+void WebGLRenderingContextBase::simulateContextChanged()
+{
+    if (m_context)
+        m_context-&gt;simulateContextChanged();
+}
+
</ins><span class="cx"> String WebGLRenderingContextBase::ensureNotNull(const String&amp; text) const
</span><span class="cx"> {
</span><span class="cx">     if (text.isNull())
</span></span></pre></div>
<a id="branchessafari603branchSourceWebCorehtmlcanvasWebGLRenderingContextBaseh"></a>
<div class="modfile"><h4>Modified: branches/safari-603-branch/Source/WebCore/html/canvas/WebGLRenderingContextBase.h (212673 => 212674)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-603-branch/Source/WebCore/html/canvas/WebGLRenderingContextBase.h        2017-02-20 21:48:30 UTC (rev 212673)
+++ branches/safari-603-branch/Source/WebCore/html/canvas/WebGLRenderingContextBase.h        2017-02-20 21:48:36 UTC (rev 212674)
</span><span class="lines">@@ -314,6 +314,8 @@
</span><span class="cx">     void recycleContext();
</span><span class="cx">     void forceRestoreContext();
</span><span class="cx">     void loseContextImpl(LostContextMode);
</span><ins>+    void dispatchContextChangedEvent();
+    WEBCORE_EXPORT void simulateContextChanged();
</ins><span class="cx"> 
</span><span class="cx">     GraphicsContext3D* graphicsContext3D() const { return m_context.get(); }
</span><span class="cx">     WebGLContextGroup* contextGroup() const { return m_contextGroup.get(); }
</span></span></pre></div>
<a id="branchessafari603branchSourceWebCorehtmlcanvasWebGLRenderingContextBaseidl"></a>
<div class="modfile"><h4>Modified: branches/safari-603-branch/Source/WebCore/html/canvas/WebGLRenderingContextBase.idl (212673 => 212674)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-603-branch/Source/WebCore/html/canvas/WebGLRenderingContextBase.idl        2017-02-20 21:48:30 UTC (rev 212673)
+++ branches/safari-603-branch/Source/WebCore/html/canvas/WebGLRenderingContextBase.idl        2017-02-20 21:48:36 UTC (rev 212674)
</span><span class="lines">@@ -49,6 +49,7 @@
</span><span class="cx">     DoNotCheckConstants,
</span><span class="cx">     JSCustomMarkFunction,
</span><span class="cx">     NoInterfaceObject,
</span><ins>+    ExportMacro=WEBCORE_EXPORT,
</ins><span class="cx"> ] interface WebGLRenderingContextBase {
</span><span class="cx"> 
</span><span class="cx">     // back-reference to the canvas
</span></span></pre></div>
<a id="branchessafari603branchSourceWebCoreplatformgraphicsGraphicsContext3Dcpp"></a>
<div class="modfile"><h4>Modified: branches/safari-603-branch/Source/WebCore/platform/graphics/GraphicsContext3D.cpp (212673 => 212674)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-603-branch/Source/WebCore/platform/graphics/GraphicsContext3D.cpp        2017-02-20 21:48:30 UTC (rev 212673)
+++ branches/safari-603-branch/Source/WebCore/platform/graphics/GraphicsContext3D.cpp        2017-02-20 21:48:36 UTC (rev 212674)
</span><span class="lines">@@ -659,6 +659,10 @@
</span><span class="cx"> void GraphicsContext3D::setContextVisibility(bool)
</span><span class="cx"> {
</span><span class="cx"> }
</span><ins>+
+void GraphicsContext3D::simulateContextChanged()
+{
+}
</ins><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="cx"> } // namespace WebCore
</span></span></pre></div>
<a id="branchessafari603branchSourceWebCoreplatformgraphicsGraphicsContext3Dh"></a>
<div class="modfile"><h4>Modified: branches/safari-603-branch/Source/WebCore/platform/graphics/GraphicsContext3D.h (212673 => 212674)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-603-branch/Source/WebCore/platform/graphics/GraphicsContext3D.h        2017-02-20 21:48:30 UTC (rev 212673)
+++ branches/safari-603-branch/Source/WebCore/platform/graphics/GraphicsContext3D.h        2017-02-20 21:48:36 UTC (rev 212674)
</span><span class="lines">@@ -1130,6 +1130,9 @@
</span><span class="cx">     void forceContextLost();
</span><span class="cx">     void recycleContext();
</span><span class="cx"> 
</span><ins>+    void dispatchContextChangedNotification();
+    void simulateContextChanged();
+
</ins><span class="cx">     void paintRenderingResultsToCanvas(ImageBuffer*);
</span><span class="cx">     RefPtr&lt;ImageData&gt; paintRenderingResultsToImageData();
</span><span class="cx">     bool paintCompositedResultsToCanvas(ImageBuffer*);
</span><span class="lines">@@ -1422,7 +1425,8 @@
</span><span class="cx"> 
</span><span class="cx">     friend class GraphicsContext3DPrivate;
</span><span class="cx">     std::unique_ptr&lt;GraphicsContext3DPrivate&gt; m_private;
</span><del>-    
</del><ins>+
+    // FIXME: Layering violation.
</ins><span class="cx">     WebGLRenderingContextBase* m_webglContext;
</span><span class="cx"> 
</span><span class="cx">     bool m_isForWebGL2 { false };
</span></span></pre></div>
<a id="branchessafari603branchSourceWebCoreplatformgraphicsmacGraphicsContext3DMacmm"></a>
<div class="modfile"><h4>Modified: branches/safari-603-branch/Source/WebCore/platform/graphics/mac/GraphicsContext3DMac.mm (212673 => 212674)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-603-branch/Source/WebCore/platform/graphics/mac/GraphicsContext3DMac.mm        2017-02-20 21:48:30 UTC (rev 212673)
+++ branches/safari-603-branch/Source/WebCore/platform/graphics/mac/GraphicsContext3DMac.mm        2017-02-20 21:48:36 UTC (rev 212674)
</span><span class="lines">@@ -189,8 +189,10 @@
</span><span class="cx"> void GraphicsContext3DManager::updateAllContexts()
</span><span class="cx"> {
</span><span class="cx"> #if PLATFORM(MAC)
</span><del>-    for (auto* context : m_contexts)
</del><ins>+    for (auto* context : m_contexts) {
</ins><span class="cx">         context-&gt;updateCGLContext();
</span><ins>+        context-&gt;dispatchContextChangedNotification();
+    }
</ins><span class="cx"> #endif
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -720,6 +722,11 @@
</span><span class="cx"> {
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+void GraphicsContext3D::simulateContextChanged()
+{
+    manager().updateAllContexts();
</ins><span class="cx"> }
</span><span class="cx"> 
</span><ins>+}
+
</ins><span class="cx"> #endif // ENABLE(GRAPHICS_CONTEXT_3D)
</span></span></pre></div>
<a id="branchessafari603branchSourceWebCoreplatformgraphicsopenglGraphicsContext3DOpenGLCommoncpp"></a>
<div class="modfile"><h4>Modified: branches/safari-603-branch/Source/WebCore/platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp (212673 => 212674)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-603-branch/Source/WebCore/platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp        2017-02-20 21:48:30 UTC (rev 212673)
+++ branches/safari-603-branch/Source/WebCore/platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp        2017-02-20 21:48:36 UTC (rev 212674)
</span><span class="lines">@@ -1889,6 +1889,14 @@
</span><span class="cx"> #endif
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+void GraphicsContext3D::dispatchContextChangedNotification()
+{
+#if ENABLE(WEBGL)
+    if (m_webglContext)
+        m_webglContext-&gt;dispatchContextChangedEvent();
+#endif
+}
+
</ins><span class="cx"> void GraphicsContext3D::texImage2DDirect(GC3Denum target, GC3Dint level, GC3Denum internalformat, GC3Dsizei width, GC3Dsizei height, GC3Dint border, GC3Denum format, GC3Denum type, const void* pixels)
</span><span class="cx"> {
</span><span class="cx">     makeContextCurrent();
</span></span></pre></div>
<a id="branchessafari603branchSourceWebCoretestingInternalscpp"></a>
<div class="modfile"><h4>Modified: branches/safari-603-branch/Source/WebCore/testing/Internals.cpp (212673 => 212674)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-603-branch/Source/WebCore/testing/Internals.cpp        2017-02-20 21:48:30 UTC (rev 212673)
+++ branches/safari-603-branch/Source/WebCore/testing/Internals.cpp        2017-02-20 21:48:36 UTC (rev 212674)
</span><span class="lines">@@ -133,6 +133,7 @@
</span><span class="cx"> #include &quot;UserMediaController.h&quot;
</span><span class="cx"> #include &quot;ViewportArguments.h&quot;
</span><span class="cx"> #include &quot;WebCoreJSClientData.h&quot;
</span><ins>+#include &quot;WebGLRenderingContextBase.h&quot;
</ins><span class="cx"> #include &quot;WorkerThread.h&quot;
</span><span class="cx"> #include &quot;WritingDirection.h&quot;
</span><span class="cx"> #include &quot;XMLHttpRequest.h&quot;
</span><span class="lines">@@ -3687,4 +3688,12 @@
</span><span class="cx">         document.page()-&gt;setAsRunningUserScripts();
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+#if ENABLE(WEBGL)
+void Internals::simulateWebGLContextChanged(WebGLRenderingContextBase&amp; context)
+{
+    context.simulateContextChanged();
+}
+#endif
+
+
</ins><span class="cx"> } // namespace WebCore
</span></span></pre></div>
<a id="branchessafari603branchSourceWebCoretestingInternalsh"></a>
<div class="modfile"><h4>Modified: branches/safari-603-branch/Source/WebCore/testing/Internals.h (212673 => 212674)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-603-branch/Source/WebCore/testing/Internals.h        2017-02-20 21:48:30 UTC (rev 212673)
+++ branches/safari-603-branch/Source/WebCore/testing/Internals.h        2017-02-20 21:48:36 UTC (rev 212674)
</span><span class="lines">@@ -71,6 +71,7 @@
</span><span class="cx"> class StyleSheet;
</span><span class="cx"> class TimeRanges;
</span><span class="cx"> class TypeConversions;
</span><ins>+class WebGLRenderingContextBase;
</ins><span class="cx"> class XMLHttpRequest;
</span><span class="cx"> 
</span><span class="cx"> class Internals final : public RefCounted&lt;Internals&gt;, private ContextDestructionObserver {
</span><span class="lines">@@ -534,6 +535,10 @@
</span><span class="cx"> 
</span><span class="cx">     void setAsRunningUserScripts(Document&amp;);
</span><span class="cx"> 
</span><ins>+#if ENABLE(WEBGL)
+    void simulateWebGLContextChanged(WebGLRenderingContextBase&amp;);
+#endif
+
</ins><span class="cx"> private:
</span><span class="cx">     explicit Internals(Document&amp;);
</span><span class="cx">     Document* contextDocument() const;
</span></span></pre></div>
<a id="branchessafari603branchSourceWebCoretestingInternalsidl"></a>
<div class="modfile"><h4>Modified: branches/safari-603-branch/Source/WebCore/testing/Internals.idl (212673 => 212674)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-603-branch/Source/WebCore/testing/Internals.idl        2017-02-20 21:48:30 UTC (rev 212673)
+++ branches/safari-603-branch/Source/WebCore/testing/Internals.idl        2017-02-20 21:48:36 UTC (rev 212674)
</span><span class="lines">@@ -508,4 +508,6 @@
</span><span class="cx">     [CallWith=Document] void setAsRunningUserScripts();
</span><span class="cx"> 
</span><span class="cx">     void disableTileSizeUpdateDelay();
</span><ins>+
+    [Conditional=WEBGL] void simulateWebGLContextChanged(WebGLRenderingContextBase context);
</ins><span class="cx"> };
</span></span></pre>
</div>
</div>

</body>
</html>