Title: [222770] trunk/Tools
Revision
222770
Author
[email protected]
Date
2017-10-02 23:36:56 -0700 (Mon, 02 Oct 2017)

Log Message

Make WSL demo compatible with Microsoft Edge
https://bugs.webkit.org/show_bug.cgi?id=177643

Reviewed by Saam Barati.

This patch does two things. The first is it migrates a loop over ParentNode.children to a legacy style loop
because Microsoft Edge throws an exception when trying to use a for...of loop with it. This patch also hides
the compilation behind a setTimeout(0) so there is some indication that something is happening during a
compile.

* Tools/WebGPUShadingLanguageRI/index.html:

Modified Paths

Diff

Modified: trunk/Tools/ChangeLog (222769 => 222770)


--- trunk/Tools/ChangeLog	2017-10-03 05:31:19 UTC (rev 222769)
+++ trunk/Tools/ChangeLog	2017-10-03 06:36:56 UTC (rev 222770)
@@ -1,3 +1,18 @@
+2017-10-02  Myles C. Maxfield  <[email protected]>
+
+        Make WSL demo compatible with Microsoft Edge
+        https://bugs.webkit.org/show_bug.cgi?id=177643
+
+        Reviewed by Saam Barati.
+
+        This patch does two things. The first is it migrates a loop over ParentNode.children to a legacy style loop
+        because Microsoft Edge throws an exception when trying to use a for...of loop with it. This patch also hides
+        the compilation behind a setTimeout(0) so there is some indication that something is happening during a
+        compile.
+
+
+        * Tools/WebGPUShadingLanguageRI/index.html:
+
 2017-10-02  Joanmarie Diggs  <[email protected]>
 
         AX: [ATK] The value of aria-level is not exposed on non-heading roles

Modified: trunk/Tools/WebGPUShadingLanguageRI/index.html (222769 => 222770)


--- trunk/Tools/WebGPUShadingLanguageRI/index.html	2017-10-03 05:31:19 UTC (rev 222769)
+++ trunk/Tools/WebGPUShadingLanguageRI/index.html	2017-10-03 06:36:56 UTC (rev 222770)
@@ -189,6 +189,7 @@
 }`;
 
 let shaderSourceTextarea;
+let compileButton;
 let localStorage;
 let compileLogElement;
 let vertexShaderSelect;
@@ -209,7 +210,8 @@
 
 window.addEventListener("load", function() {
     shaderSourceTextarea = document.getElementById("ShaderSource");
-    document.getElementById("CompileButton").addEventListener("click", compilePresentShaderSource);
+    compileButton = document.getElementById("CompileButton");
+    compileButton.addEventListener("click", compilePresentShaderSource);
     compileLogElement = document.getElementById("CompileLog");
     vertexShaderSelect = document.getElementById("VertexShaderSelect");
     fragmentShaderSelect = document.getElementById("FragmentShaderSelect");
@@ -230,7 +232,7 @@
     if (!shaderSource)
         shaderSource = defaultShaderSource;
     shaderSourceTextarea.value = shaderSource;
-    compilePresentShaderSource();
+    window.setTimeout(compilePresentShaderSource, 0);
 });
 
 function clearDataTable()
@@ -269,7 +271,13 @@
 }
 
 function compilePresentShaderSource() {
-    compileLogElement.textContent = "";
+    compileLogElement.textContent = "Compiling...";
+    compileButton.disabled = true;
+    window.setTimeout(doCompilePresentShaderSource, 0);
+}
+
+function doCompilePresentShaderSource() {
+    compileButton.disabled = false;
     let start = new Date().getTime();
     let result;
     try {
@@ -385,7 +393,8 @@
     let func = inlinedVertexShader;
 
     let index = 0;
-    for (let childElement of dataTable.children) {
+    for (let i = 0; i < dataTable.children.length; ++i) {
+        let childElement = dataTable.children[i];
         if (!(childElement instanceof HTMLTableRowElement))
             continue;
         let value = childElement.children[1].firstChild.value;
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to