| Index: chrome/browser/resources/print_preview/print_preview_utils.js
|
| diff --git a/chrome/browser/resources/print_preview/print_preview_utils.js b/chrome/browser/resources/print_preview/print_preview_utils.js
|
| index 90ecd1603accb153b7e25bd4c5b976d097cdc0e0..f1257086d50ee2b3e0f693481b944db45ac91816 100644
|
| --- a/chrome/browser/resources/print_preview/print_preview_utils.js
|
| +++ b/chrome/browser/resources/print_preview/print_preview_utils.js
|
| @@ -206,6 +206,7 @@ function randomInteger(endPointA, endPointB) {
|
|
|
| // Number of points per inch.
|
| POINTS_PER_INCH = 72;
|
| +POINTS_PER_MILLIMETER = 2.83464567;
|
|
|
| /**
|
| * Converts |value| from inches to points.
|
| @@ -224,3 +225,21 @@ function convertInchesToPoints(value) {
|
| function convertPointsToInches(value) {
|
| return value / POINTS_PER_INCH;
|
| }
|
| +
|
| +/**
|
| + * Converts |value| from centimeters to points.
|
| + * @param {number} value The number in centimeters.
|
| + * @return {number} |value| in points.
|
| + */
|
| +function convertMillimetersToPoints(value) {
|
| + return value * POINTS_PER_MILLIMETER;
|
| +}
|
| +
|
| +/**
|
| + * Converts |value| from points to centimeters..
|
| + * @param {number} value The number in points.
|
| + * @return {number} |value| in centimeters.
|
| + */
|
| +function convertPointsToMillimeters(value) {
|
| + return value / POINTS_PER_MILLIMETER;
|
| +}
|
|
|