Loading dom/tests/mochitest/general/test_offsets.js +2 −7 Original line number Diff line number Diff line Loading @@ -32,11 +32,6 @@ function toNearestAppunit(v) return Math.round(v*60)/60; } function floorToNearestAppunit(v) { return Math.floor(toNearestAppunit(v)); } function isEqualAppunits(a, b, msg) { is(toNearestAppunit(a), toNearestAppunit(b), msg); Loading Loading @@ -67,11 +62,11 @@ function testElement(element) var scrollWidth, scrollHeight, clientWidth, clientHeight; if (element.id == "scrollbox") { var lastchild = $("lastline"); scrollWidth = floorToNearestAppunit(lastchild.getBoundingClientRect().width + paddingLeft + paddingRight); scrollWidth = lastchild.getBoundingClientRect().width + paddingLeft + paddingRight; var top = element.firstChild.getBoundingClientRect().top; var bottom = element.lastChild.getBoundingClientRect().bottom; var contentsHeight = bottom - top; scrollHeight = floorToNearestAppunit(contentsHeight + paddingTop + paddingBottom); scrollHeight = contentsHeight + paddingTop + paddingBottom; clientWidth = paddingLeft + width + paddingRight - scrollbarWidth; clientHeight = paddingTop + height + paddingBottom - scrollbarHeight; } Loading Loading
dom/tests/mochitest/general/test_offsets.js +2 −7 Original line number Diff line number Diff line Loading @@ -32,11 +32,6 @@ function toNearestAppunit(v) return Math.round(v*60)/60; } function floorToNearestAppunit(v) { return Math.floor(toNearestAppunit(v)); } function isEqualAppunits(a, b, msg) { is(toNearestAppunit(a), toNearestAppunit(b), msg); Loading Loading @@ -67,11 +62,11 @@ function testElement(element) var scrollWidth, scrollHeight, clientWidth, clientHeight; if (element.id == "scrollbox") { var lastchild = $("lastline"); scrollWidth = floorToNearestAppunit(lastchild.getBoundingClientRect().width + paddingLeft + paddingRight); scrollWidth = lastchild.getBoundingClientRect().width + paddingLeft + paddingRight; var top = element.firstChild.getBoundingClientRect().top; var bottom = element.lastChild.getBoundingClientRect().bottom; var contentsHeight = bottom - top; scrollHeight = floorToNearestAppunit(contentsHeight + paddingTop + paddingBottom); scrollHeight = contentsHeight + paddingTop + paddingBottom; clientWidth = paddingLeft + width + paddingRight - scrollbarWidth; clientHeight = paddingTop + height + paddingBottom - scrollbarHeight; } Loading