var isQuirks = document.compatMode == "BackCompat"; function runScrollingTest(resultNode){ // reposition the absolute-positioned tag to the top/left of the static control // element and check to make sure each has the same offsetLeft/Top if(!("dojo" in window)){ var doc = frameElement.ownerDocument; var win = doc.parentWindow || doc.defaultView; dojo = win.dojo; } var isLtr = dojo.hitch(dojo, "withGlobal")(window, "_isBodyLtr", dojo, []); var root = isQuirks? document.body : document.documentElement; var control = document.getElementById("control"); var clientWidth = document.getElementById("clientWidth"); var abs1 = document.getElementById("abs1"); window.scrollTo(0, 0); // start with standarized placement setTimeout(function(){ var cw = dojo.hitch(dojo, "withGlobal")(window, "position", dojo, [clientWidth, false]); if(cw.x != 0){ scrollBy(cw.x, 0); // scroll width:100% control element fully into view } var p = dojo.hitch(dojo, "withGlobal")(window, "position", dojo, [control, true]); abs1.style.left = p.x + "px"; abs1.style.top = p.y + "px"; setTimeout(function(){ cw = dojo.hitch(dojo, "withGlobal")(window, "position", dojo, [clientWidth, false]); if(cw.x >= 0 || (cw.x < 0 && Math.round(root.clientWidth - cw.w - cw.x) == 0)){ if(abs1.offsetLeft == control.offsetLeft){ if(abs1.offsetTop == control.offsetTop){ resultNode.testResult = "EQUAL"; }else{ resultNode.testResult = "abs1.offsetTop="+abs1.offsetTop + " control.offsetTop="+control.offsetTop; } }else{ resultNode.testResult = "abs1.offsetLeft="+abs1.offsetLeft + " control.offsetLeft="+control.offsetLeft; } }else{ resultNode.testResult = "100% width element start/size=" + cw.x+'/'+cw.w + " frame client left/width="+root.clientLeft+'/'+root.clientWidth; } if(resultNode.resultReady){ resultNode.resultReady(); } }, 100); }, 100); } function genScrollingTestNodes(hScroll, vScroll, large){ document.write( '