backout of changeset b0dc837c20fa and 73350927f5f1 due to test failures

This commit is contained in:
Shawn Wilsher 2008-11-03 18:55:15 -05:00
parent 775d1a6a09
commit 3769265c5f
3 changed files with 21 additions and 24 deletions

View File

@ -78,8 +78,8 @@ addLoadEvent(function() {
submitForm(++pendingLoads);
submitForm(++pendingLoads);
submitForm(++pendingLoads);
submitFormMouse(++pendingLoads);
submitFormMouse(++pendingLoads);
/* submitFormMouse(++pendingLoads);
submitFormMouse(++pendingLoads);*/
}, 0);
});

View File

@ -211,18 +211,15 @@ function synthesizeMouse(aTarget, aOffsetX, aOffsetY, aEvent, aWindow)
var modifiers = _parseModifiers(aEvent);
var rect = aTarget.getBoundingClientRect();
// Need to round, since rect could have non-integer coordinates, and sadly
// our event code can't deal with fractional pixel click coords.
var left = Math.round(rect.left + aOffsetX);
var top = Math.round(rect.top + aOffsetY);
var left = rect.left;
var top = rect.top;
if (aEvent.type) {
utils.sendMouseEvent(aEvent.type, left, top, button, clickCount, modifiers);
utils.sendMouseEvent(aEvent.type, left + aOffsetX, top + aOffsetY, button, clickCount, modifiers);
}
else {
utils.sendMouseEvent("mousedown", left, top, button, clickCount, modifiers);
utils.sendMouseEvent("mouseup", left, top, button, clickCount, modifiers);
utils.sendMouseEvent("mousedown", left + aOffsetX, top + aOffsetY, button, clickCount, modifiers);
utils.sendMouseEvent("mouseup", left + aOffsetX, top + aOffsetY, button, clickCount, modifiers);
}
}
}

View File

@ -44,9 +44,9 @@ function checkCoords(event)
var rect = gButton.getBoundingClientRect();
var popupstyle = window.getComputedStyle(gButton, "");
is(event.clientX, Math.round(rect.left + mod),
is(event.clientX, Math.floor(rect.left) + mod,
"step " + (gTestIndex + 1) + " clientX");
is(event.clientY, Math.round(rect.top + mod),
is(event.clientY, Math.floor(rect.top) + mod,
"step " + (gTestIndex + 1) + " clientY");
ok(event.screenX > 0, "step " + (gTestIndex + 1) + " screenX");
ok(event.screenY > 0, "step " + (gTestIndex + 1) + " screenY");
@ -97,11 +97,11 @@ var popupTests = [
var rect = document.getElementById("thetooltip").getBoundingClientRect();
var popupstyle = window.getComputedStyle(document.getElementById("thetooltip"), "");
is(Math.round(rect.left),
Math.round(buttonrect.left + parseFloat(popupstyle.marginLeft) + 6),
is(Math.floor(rect.left), Math.floor(buttonrect.left) +
parseInt(popupstyle.marginLeft) + 6,
testname + " top position of tooltip");
is(Math.round(rect.top),
Math.round(buttonrect.top + parseFloat(popupstyle.marginTop) + 6),
is(Math.floor(rect.top), Math.floor(buttonrect.top) +
parseInt(popupstyle.marginTop) + 6,
testname + " top position of tooltip");
var labelrect = document.getElementById("label").getBoundingClientRect();
@ -139,11 +139,11 @@ var popupTests = [
var popupstyle = window.getComputedStyle(document.getElementById("thetooltip"), "");
var buttonstyle = window.getComputedStyle(document.getElementById("withtooltip"), "");
is(Math.round(rect.left),
Math.round(buttonrect.left + parseFloat(popupstyle.marginLeft) + 4),
is(Math.floor(rect.left), Math.floor(buttonrect.left) +
parseInt(popupstyle.marginLeft) + 4,
testname + " top position of tooltip");
is(Math.round(rect.top),
Math.round(buttonrect.top + parseFloat(popupstyle.marginTop) + 4),
is(Math.floor(rect.top), Math.floor(buttonrect.top) +
parseInt(popupstyle.marginTop) + 4,
testname + " top position of tooltip");
var labelrect = document.getElementById("label").getBoundingClientRect();
@ -182,11 +182,11 @@ var popupTests = [
var popupstyle = window.getComputedStyle(document.getElementById("thetooltip"), "");
var buttonstyle = window.getComputedStyle(document.getElementById("withtooltip"), "");
is(Math.round(rect.left),
Math.round(buttonrect.left + parseFloat(popupstyle.marginLeft) + 6),
is(Math.floor(rect.left), Math.floor(buttonrect.left) +
parseInt(popupstyle.marginLeft) + 6,
testname + " top position of tooltip");
is(Math.round(rect.top),
Math.round(buttonrect.top + parseFloat(popupstyle.marginTop) + 6),
is(Math.floor(rect.top), Math.floor(buttonrect.top) +
parseInt(popupstyle.marginTop) + 6,
testname + " top position of tooltip");
var labelrect = document.getElementById("label").getBoundingClientRect();