зеркало из https://github.com/mozilla/gecko-dev.git
Bug 677878 - Round untransformed rects outwards. r=roc
This commit is contained in:
Родитель
53e1d1d80a
Коммит
9e21b178aa
|
@ -2791,10 +2791,7 @@ PRBool nsDisplayTransform::UntransformRect(const nsRect &aUntransformedBounds,
|
|||
/* We want to untransform the matrix, so invert the transformation first! */
|
||||
result = matrix.Inverse().ProjectRectBounds(result);
|
||||
|
||||
*aOutRect = nsRect(NSFloatPixelsToAppUnits(float(result.x), factor),
|
||||
NSFloatPixelsToAppUnits(float(result.y), factor),
|
||||
NSFloatPixelsToAppUnits(float(result.width), factor),
|
||||
NSFloatPixelsToAppUnits(float(result.height), factor));
|
||||
*aOutRect = nsLayoutUtils::RoundGfxRectToAppRect(result, factor);
|
||||
|
||||
return PR_TRUE;
|
||||
}
|
||||
|
|
|
@ -153,6 +153,7 @@ _TEST_FILES = \
|
|||
test_bug559499.html \
|
||||
test_bug582181-1.html \
|
||||
test_bug582181-2.html \
|
||||
test_bug677878.html \
|
||||
test_flush_on_paint.html \
|
||||
test_mozPaintCount.html \
|
||||
test_scroll_selection_into_view.html \
|
||||
|
|
|
@ -0,0 +1,51 @@
|
|||
<!DOCTYPE HTML>
|
||||
<html>
|
||||
<!--
|
||||
https://bugzilla.mozilla.org/show_bug.cgi?id=677878
|
||||
-->
|
||||
<head>
|
||||
<title>Test for Bug 677878</title>
|
||||
<script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
|
||||
<script type="text/javascript" src="/tests/SimpleTest/EventUtils.js"></script>
|
||||
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
|
||||
|
||||
<style>
|
||||
#test1 {
|
||||
background: green;
|
||||
height: 100px;
|
||||
width: 100px;
|
||||
-moz-transform: scale(20, 20);
|
||||
-moz-transform-origin: 0 0%;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=677878">Mozilla Bug 677878</a>
|
||||
<div id="content">
|
||||
<div id="test1">
|
||||
<div id="test2" onclick="testFinish();">
|
||||
test
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<pre id="test">
|
||||
<script type="application/javascript">
|
||||
SimpleTest.waitForExplicitFinish();
|
||||
runtests();
|
||||
|
||||
function runtests() {
|
||||
function doClick() {
|
||||
document.getElementById("test2").addEventListener("mousedown", testFinish, true);
|
||||
synthesizeMouseAtCenter(document.getElementById("test2"), { type: "mousedown" })
|
||||
}
|
||||
setTimeout(doClick, 300);
|
||||
}
|
||||
|
||||
function testFinish(event){
|
||||
ok(true, "We can still interact with the item after it is transformed");
|
||||
SimpleTest.finish();
|
||||
}
|
||||
</script>
|
||||
</pre>
|
||||
</body>
|
||||
</html>
|
Загрузка…
Ссылка в новой задаче