[Pkg-javascript-commits] [dojo] 14/29: Fix scrollIntoView() regressions on IE8 in quirks/RTL mode.

David Prévot taffit at moszumanska.debian.org
Thu Mar 24 04:28:34 UTC 2016


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

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

commit 033f82428fd482154d1ece3d41f05311c7a77559
Author: Bill Keese <bill at dojotoolkit.org>
Date:   Mon Oct 5 17:51:14 2015 +0900

    Fix scrollIntoView() regressions on IE8 in quirks/RTL mode.
    
    Fixes #18726 on 1.8 branch.  Refs #18124.
    
    (cherry picked from commit 6ddef724689b5b81af979b96632fed6029324709)
---
 tests/window/test_scroll.html |  9 +++++----
 window.js                     | 10 ++++++----
 2 files changed, 11 insertions(+), 8 deletions(-)

diff --git a/tests/window/test_scroll.html b/tests/window/test_scroll.html
index 0ffcf6b..05d040b 100644
--- a/tests/window/test_scroll.html
+++ b/tests/window/test_scroll.html
@@ -253,10 +253,11 @@
 					'tooBig',
 					'htmlPadding' ],
 				function(test){
-					// 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"] :
+					// IE9+ doesn'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, skip those tests.
+					// Also disabling quirks and loose tests on Edge, since it doesn't support document modes at all,
+					// and those tests get failures.
+					var modes = (has("trident") >= 5 || has("edge")) ? ["_strict"] :
 							["_strict", "_quirks", "_loose_rtl", "_quirks_rtl" ];
 					array.forEach(modes,
 						function(mode){
diff --git a/window.js b/window.js
index 36d9e49f..89cf58d 100644
--- a/window.js
+++ b/window.js
@@ -167,9 +167,11 @@ define(["./_base/lang", "./sniff", "./_base/window", "./dom", "./dom-geometry",
 
 					if(el == scrollRoot){
 						elPos.w = rootWidth; elPos.h = rootHeight;
-						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; }
+						if(scrollRoot == html && (isIE || has("trident")) && rtl){
+							elPos.x += scrollRoot.offsetWidth-elPos.w;// IE workaround where scrollbar causes negative x
+						}
+						elPos.x = 0;
+						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 +212,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 || has("trident"))){ s = -s; }
+						if(rtl && ((isIE == 8 && !backCompat) || has("trident") >= 5)){ 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