[Pkg-javascript-commits] [dojo] 08/149: Fix IE11 test_scroll failures. Trident is more like IE9+ than we would have guessed.

David Prévot taffit at moszumanska.debian.org
Sat Feb 27 03:13:41 UTC 2016


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

taffit pushed a commit to branch master
in repository dojo.

commit a832214a342b6e03ad4a9b1669fae71c7938c44b
Author: mahays0 <mahays0 at gmail.com>
Date:   Thu Jun 19 12:02:05 2014 -0400

    Fix IE11 test_scroll failures.
    Trident is more like IE9+ than we would have guessed.
    
    Also disabling quirks and loose tests for IE9+.
    On IE9+, an <iframe> will always run with the doctype of the main
    document, regardless of what URL is loaded into the iframe.
    
    Fixes #18124, refs #17311.
---
 tests/window/test_scroll.html | 9 +++++++--
 window.js                     | 8 ++++----
 2 files changed, 11 insertions(+), 6 deletions(-)

diff --git a/tests/window/test_scroll.html b/tests/window/test_scroll.html
index 4abd814..0ffcf6b 100644
--- a/tests/window/test_scroll.html
+++ b/tests/window/test_scroll.html
@@ -239,7 +239,7 @@
 					doh.f(domAttr.has(body,'_parent'));
 				}
 			]);
-                        array.forEach([	'8249',
+			array.forEach([	'8249',
 					'8284',
 					'absContent',
 					'fixedNode',
@@ -253,7 +253,12 @@
 					'tooBig',
 					'htmlPadding' ],
 				function(test){
-                        		array.forEach([	"_strict", "_quirks", "_loose_rtl", "_quirks_rtl" ],
+					// IE9+ don't support quirks (or loose?) mode <iframe>'s inside a strict document (or vice-versa).
+					// The <iframe> loads but it's actually running in strict mode.
+					// Therefore, it's pointless to run those tests
+					var modes = (has("ie") >= 9 || has("trident")) ? ["_strict"] :
+							["_strict", "_quirks", "_loose_rtl", "_quirks_rtl" ];
+					array.forEach(modes,
 						function(mode){
 							var	id = test+mode,
 								n, maxWidth, maxHeight, nodeWidth, nodeHeight, rAfterScroll, vAfterScroll, rBeforeScroll, vBeforeScroll;
diff --git a/window.js b/window.js
index 92583fe..36d9e49f 100644
--- a/window.js
+++ b/window.js
@@ -167,9 +167,9 @@ define(["./_base/lang", "./sniff", "./_base/window", "./dom", "./dom-geometry",
 
 					if(el == scrollRoot){
 						elPos.w = rootWidth; elPos.h = rootHeight;
-						if(scrollRoot == html && isIE && rtl){ elPos.x += scrollRoot.offsetWidth-elPos.w; } // IE workaround where scrollbar causes negative x
-						if(elPos.x < 0 || !isIE || isIE >= 9){ elPos.x = 0; } // older IE can have values > 0
-						if(elPos.y < 0 || !isIE || isIE >= 9){ elPos.y = 0; }
+						if(scrollRoot == html && (isIE || has("trident")) && rtl){ elPos.x += scrollRoot.offsetWidth-elPos.w; } // IE workaround where scrollbar causes negative x
+						if(elPos.x < 0 || !isIE || isIE >= 9 || has("trident")){ elPos.x = 0; } // older IE can have values > 0
+						if(elPos.y < 0 || !isIE || isIE >= 9 || has("trident")){ elPos.y = 0; }
 					}else{
 						var pb = geom.getPadBorderExtents(el);
 						elPos.w -= pb.w; elPos.h -= pb.h; elPos.x += pb.l; elPos.y += pb.t;
@@ -210,7 +210,7 @@ define(["./_base/lang", "./sniff", "./_base/window", "./dom", "./dom-geometry",
 					var s, old;
 					if(r * l > 0 && (!!el.scrollLeft || el == scrollRoot || el.scrollWidth > el.offsetHeight)){
 						s = Math[l < 0? "max" : "min"](l, r);
-						if(rtl && ((isIE == 8 && !backCompat) || isIE >= 9)){ s = -s; }
+						if(rtl && ((isIE == 8 && !backCompat) || isIE >= 9 || has("trident"))){ s = -s; }
 						old = el.scrollLeft;
 						scrollElementBy(el, s, 0);
 						s = el.scrollLeft - old;

-- 
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