зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1249489 - covert css to device pixels in scroll/test_zoom.html and test_nsIAccessibleImage.html, r=yzen
This commit is contained in:
Родитель
cfcd886fbe
Коммит
eea0bcec45
|
@ -32,7 +32,8 @@
|
|||
anchor = getAccessible("bottom2");
|
||||
var [x, y] = getPos(anchor);
|
||||
var wnd = getRootAccessible().DOMDocument.defaultView;
|
||||
var scrollToX = docX - wnd.screenX, scrollToY = docY - wnd.screenY;
|
||||
var [screenX, screenY] = CSSToDevicePixels(wnd, wnd.screenX, wnd.screenY);
|
||||
var scrollToX = docX - screenX, scrollToY = docY - screenY;
|
||||
|
||||
anchor.scrollToPoint(COORDTYPE_WINDOW_RELATIVE, scrollToX, scrollToY);
|
||||
testPos(anchor, [x, docY]);
|
||||
|
|
|
@ -16,6 +16,8 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=429659
|
|||
src="role.js"></script>
|
||||
<script type="application/javascript"
|
||||
src="attributes.js"></script>
|
||||
<script type="application/javascript"
|
||||
src="layout.js"></script>
|
||||
|
||||
<script type="application/javascript">
|
||||
function testCoordinates(aID, aAcc, aWidth, aHeight)
|
||||
|
@ -70,10 +72,11 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=429659
|
|||
// "Wrong screen y coordinate for " + aID + "!");
|
||||
}
|
||||
|
||||
var [expected_w, expected_h] = CSSToDevicePixels(window, aWidth, aHeight);
|
||||
var width = {}, height = {};
|
||||
aAcc.getImageSize(width, height);
|
||||
is(width.value, aWidth, "Wrong width for " + aID + "!");
|
||||
is(height.value, aHeight, "wrong height for " + aID + "!");
|
||||
is(width.value, expected_w, "Wrong width for " + aID + "!");
|
||||
is(height.value, expected_h, "wrong height for " + aID + "!");
|
||||
}
|
||||
|
||||
function testThis(aID, aSRC, aWidth, aHeight,
|
||||
|
|
Загрузка…
Ссылка в новой задаче