[Pkg-javascript-commits] [dojo] 11/87: Fix dojo.getComputedStyle code path for IE9; fixes #14103 on 1.7 branch

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


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

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

commit 79c85242ff7a1315067f8e47c17d373d8f8ab4af
Author: Kenneth G. Franqueiro <kenneth.franqueiro at gmail.com>
Date:   Thu Nov 24 17:43:40 2011 +0000

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

diff --git a/dom-style.js b/dom-style.js
index f05b01c..3ceec84 100644
--- a/dom-style.js
+++ b/dom-style.js
@@ -165,7 +165,7 @@ define(["./_base/sniff", "./dom"], function(has, dom){
 			return s || {};
 		};
 	//>>excludeStart("webkitMobile", kwArgs.webkitMobile);
-	}else if(has("ie")){
+	}else if(has("ie") && (has("ie") < 9 || has("quirks"))){
 		getComputedStyle = 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 30fb9fd..b26906b 100644
--- a/tests/_base/html.html
+++ b/tests/_base/html.html
@@ -586,6 +586,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");
 						}
 					]
 				);
@@ -849,5 +853,10 @@
 		</div>
 
 		<div id="iframeContainer"></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