diff options
author | gman@google.com <gman@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-07-07 19:25:23 +0000 |
---|---|---|
committer | gman@google.com <gman@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-07-07 19:25:23 +0000 |
commit | 36be54667a4b5624e19abf70394089bc08ace740 (patch) | |
tree | 4ebaed23fcad77e3848210e0f9c36ea99bc9b300 /o3d/samples | |
parent | 76e0bcbae8eaa591f914dbe94f1d658876fb1c23 (diff) | |
download | chromium_src-36be54667a4b5624e19abf70394089bc08ace740.zip chromium_src-36be54667a4b5624e19abf70394089bc08ace740.tar.gz chromium_src-36be54667a4b5624e19abf70394089bc08ace740.tar.bz2 |
Fix for shader-test.html and IE
Issue #1) creating HTML by string is fast in all browsers.
Creating HTML by DOM methods is extremely slow in IE. 100-300x slower.
http://www.quirksmode.org/dom/innerhtml.html
Issue #2) There's a bug in IE related to <select> tags.
http://support.microsoft.com/kb/276228
Review URL: http://codereview.chromium.org/155154
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@20059 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'o3d/samples')
-rw-r--r-- | o3d/samples/shader-test.html | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/o3d/samples/shader-test.html b/o3d/samples/shader-test.html index 812d067..3e231f3 100644 --- a/o3d/samples/shader-test.html +++ b/o3d/samples/shader-test.html @@ -317,7 +317,8 @@ function initStep2(clientElements) { g_currentTimeParam = paramObject.createParam('timeParam','ParamFloat'); // Load effects and fill out options. - options = '' + options = '<select id="shaderSelect" name="shaderSelect"' + + ' onChange="changeShader()">' for(var s = 0; s < g_shaders.length; s++) { g_effects[s] = g_pack.createObject('Effect'); var shaderString = 'shaders/' + g_shaders[s].file + '.shader'; @@ -325,7 +326,8 @@ function initStep2(clientElements) { options += '<option value="' + s + '"' + (s == 0 ? ' selected' : '') + '>' + g_shaders[s].name + '</option>'; } - document.getElementById('shaderSelect').innerHTML = options; + options += '</select>'; + document.getElementById('shaderDiv').innerHTML = options; var rampWidth = 64; var texture = g_pack.createTexture2D( @@ -406,7 +408,6 @@ This example is useful for testing a shader or checking a scene. Clicking on the <div id="o3d" style="width: 100%; height: 80%;"></div> <!-- End of O3D plugin --> <p> -<select id='shaderSelect' name='shaderSelect' onChange='changeShader()'> -</select> +<div id='shaderDiv'></div> </body> </html> |