[Pkg-javascript-commits] [dojo] 13/16: Fix dojo.getComputedStyle code path for IE9; fixes #14103 on 1.5 branch !strict

David Prévot taffit at moszumanska.debian.org
Thu Aug 21 17:39:04 UTC 2014


This is an automated email from the git hooks/post-receive script.

taffit pushed a commit to annotated tag 1.5.3
in repository dojo.

commit 3e66f1a7eb67fe261b4f91a9ef136bd1407d5e1b
Author: Kenneth G. Franqueiro <kenneth.franqueiro at gmail.com>
Date:   Thu Nov 24 18:01:57 2011 +0000

    Fix dojo.getComputedStyle code path for IE9; fixes #14103 on 1.5 branch !strict
    
    git-svn-id: http://svn.dojotoolkit.org/src/branches/1.5/dojo@27118 560b804f-0ae3-0310-86f3-f6aa0a117693
---
 _base/html.js         | 2 +-
 tests/_base/html.html | 9 +++++++++
 2 files changed, 10 insertions(+), 1 deletion(-)

diff --git a/_base/html.js b/_base/html.js
index 53665ac..a051512 100644
--- a/_base/html.js
+++ b/_base/html.js
@@ -391,7 +391,7 @@ if(dojo.isIE || dojo.isOpera){
 			return s || {};
 		};
 	//>>excludeStart("webkitMobile", kwArgs.webkitMobile);
-	}else if(d.isIE){
+	}else if(d.isIE && (d.isIE < 9 || d.isQuirks)){
 		gcs = function(node){
 			// IE (as of 7) doesn't expose Element like sane browsers
 			return node.nodeType == 1 /* ELEMENT_NODE*/ ? node.currentStyle : {};
diff --git a/tests/_base/html.html b/tests/_base/html.html
index 04e6285..219eb66 100644
--- a/tests/_base/html.html
+++ b/tests/_base/html.html
@@ -562,6 +562,10 @@
 						function testIframeDestroy10095(t){
 							var iframeWin = dojo.byId('10095_iframe').win;
 							doh.t(!iframeWin.document.getElementById('10095_textbox'), "reloaded iframe element destroyed");
+						},
+						function testGCSsvg(t){
+							var s = dojo.getComputedStyle(dojo.byId("rect1"));
+							doh.t(typeof s != "undefined", "dojo.getComputedStyle succeeded on an svg shape");
 						}
 					]
 				);
@@ -792,6 +796,11 @@
 			<label id="label-no-for">label with no for </label><input type="text" id="label-test-input">
 			<label id="label-with-for" for="input-with-label">label with for </label><input type="text" id="input-with-label">
 		</div>
+
+		<!-- SVG element to test dojo.getComputedStyle on IE9 (#14103) -->
+		<svg id="surface" xmlns="http://www.w3.org/2000/svg" width="100px" height="100px">
+			<rect id="rect1" fill="rgb(255, 0, 0)" x="0" y="0" width="80" height="60" ry="0" rx="0" fill-rule="evenodd"/>
+		</svg>
 	</body>
 </html>
 

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/dojo.git



More information about the Pkg-javascript-commits mailing list