зеркало из https://github.com/mozilla/gecko-dev.git
Bug 573953. Ensure that zoom factors are chosen in reftests so appunits-per-dev-pixel is an integer. r=dbaron
This commit is contained in:
Родитель
7516587cb2
Коммит
0587a61cc8
|
@ -1224,7 +1224,8 @@ nsThebesDeviceContext::SetPixelScale(float aScale)
|
|||
void
|
||||
nsThebesDeviceContext::UpdateScaledAppUnits()
|
||||
{
|
||||
mAppUnitsPerDevPixel = PR_MAX(1, PRInt32(float(mAppUnitsPerDevNotScaledPixel) / mPixelScale));
|
||||
mAppUnitsPerDevPixel =
|
||||
PR_MAX(1, NSToIntRound(float(mAppUnitsPerDevNotScaledPixel) / mPixelScale));
|
||||
}
|
||||
|
||||
#if defined(XP_WIN) || defined(XP_OS2)
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<!DOCTYPE HTML>
|
||||
<html reftest-zoom="1.1">
|
||||
<html reftest-zoom="1.2">
|
||||
<head>
|
||||
<style>
|
||||
div { margin:1em; }
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<!DOCTYPE HTML>
|
||||
<html reftest-zoom="1.7">
|
||||
<html reftest-zoom="1.8">
|
||||
<head>
|
||||
<style>
|
||||
div { margin:1em; }
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<!DOCTYPE HTML>
|
||||
<html reftest-zoom="0.67">
|
||||
<html reftest-zoom="0.6666666">
|
||||
<head>
|
||||
<style>
|
||||
div { margin:1em; }
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
This file is identical to background-common-usage-pixel.html except the
|
||||
zoom factor.
|
||||
-->
|
||||
<html reftest-zoom="1.3">
|
||||
<html reftest-zoom="1.304348">
|
||||
<head>
|
||||
<title>Testcases: -moz-image-rect() [bug 113577]</title>
|
||||
<style>
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
This file is identical to background-common-usage-pixel.html except the
|
||||
zoom factor.
|
||||
-->
|
||||
<html reftest-zoom="1.3">
|
||||
<html reftest-zoom="1.304348">
|
||||
<head>
|
||||
<title>Testcases: -moz-image-rect() [bug 113577]</title>
|
||||
<style>
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
This file is identical to background-common-usage-pixel.html except the
|
||||
zoom factor.
|
||||
-->
|
||||
<html reftest-zoom="1.3">
|
||||
<html reftest-zoom="1.304348">
|
||||
<head>
|
||||
<title>Testcases: -moz-image-rect() [bug 113577]</title>
|
||||
<style>
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
This file is identical to background-common-usage-pixel.html except the
|
||||
zoom factor.
|
||||
-->
|
||||
<html reftest-zoom="1.3">
|
||||
<html reftest-zoom="1.304348">
|
||||
<head>
|
||||
<title>Testcases: -moz-image-rect() [bug 113577]</title>
|
||||
<style>
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
This file is identical to background-common-usage-pixel.html except the
|
||||
zoom factor.
|
||||
-->
|
||||
<html reftest-zoom="1.3">
|
||||
<html reftest-zoom="1.304348">
|
||||
<head>
|
||||
<title>Testcases: -moz-image-rect() [bug 113577]</title>
|
||||
<style>
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
This file is identical to background-common-usage-pixel.html except the
|
||||
zoom factor.
|
||||
-->
|
||||
<html reftest-zoom="1.3">
|
||||
<html reftest-zoom="1.304348">
|
||||
<head>
|
||||
<title>Testcases: -moz-image-rect() [bug 113577]</title>
|
||||
<style>
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
This file is identical to background-common-usage-pixel.html except the
|
||||
zoom factor.
|
||||
-->
|
||||
<html reftest-zoom="1.3">
|
||||
<html reftest-zoom="1.304348">
|
||||
<head>
|
||||
<title>Testcases: -moz-image-rect() [bug 113577]</title>
|
||||
<style>
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
This file is identical to background-common-usage-pixel.html except the
|
||||
zoom factor.
|
||||
-->
|
||||
<html reftest-zoom="1.3">
|
||||
<html reftest-zoom="1.304348">
|
||||
<head>
|
||||
<title>Testcases: -moz-image-rect() [bug 113577]</title>
|
||||
<style>
|
||||
|
|
|
@ -351,6 +351,17 @@ function doTest() {
|
|||
}
|
||||
document.addEventListener("MozReftestInvalidate", doTest, false);
|
||||
|
||||
Zoom Tests
|
||||
==========
|
||||
|
||||
When the root element of a test has a "reftest-zoom" attribute, that zoom
|
||||
factor is applied when rendering the test. The reftest document will be
|
||||
800 device pixels wide by 1000 device pixels high. The reftest harness assumes
|
||||
that the CSS pixel dimensions are 800/zoom and 1000/zoom. For best results
|
||||
therefore, choose zoom factors that do not require rounding when we calculate
|
||||
the number of appunits per device pixel; i.e. the zoom factor should divide 60,
|
||||
so 60/zoom is an integer.
|
||||
|
||||
Printing Tests
|
||||
==============
|
||||
Now that the patch for bug 374050 has landed
|
||||
|
|
Загрузка…
Ссылка в новой задаче