Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(207)

Side by Side Diff: third_party/WebKit/Source/core/css/CSSHelper.h

Issue 2958233002: [CSS Typed OM] Implement CSSUnit::to for fixed length types (Closed)
Patch Set: Use new constants Created 3 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * Copyright (C) 2009 Apple Inc. All rights reserved. 3 * Copyright (C) 2009 Apple Inc. All rights reserved.
4 * 4 *
5 * This library is free software; you can redistribute it and/or 5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Library General Public 6 * modify it under the terms of the GNU Library General Public
7 * License as published by the Free Software Foundation; either 7 * License as published by the Free Software Foundation; either
8 * version 2 of the License, or (at your option) any later version. 8 * version 2 of the License, or (at your option) any later version.
9 * 9 *
10 * This library is distributed in the hope that it will be useful, 10 * This library is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * Library General Public License for more details. 13 * Library General Public License for more details.
14 * 14 *
15 * You should have received a copy of the GNU Library General Public License 15 * You should have received a copy of the GNU Library General Public License
16 * along with this library; see the file COPYING.LIB. If not, write to 16 * along with this library; see the file COPYING.LIB. If not, write to
17 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 17 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
18 * Boston, MA 02110-1301, USA. 18 * Boston, MA 02110-1301, USA.
19 * 19 *
20 */ 20 */
21 21
22 #ifndef CSSHelper_h 22 #ifndef CSSHelper_h
23 #define CSSHelper_h 23 #define CSSHelper_h
24 24
25 #include "platform/wtf/Forward.h" 25 #include "platform/wtf/Forward.h"
26 26
27 namespace blink { 27 namespace blink {
28 28
29 const double kMillimetersPerCentimeter = 10;
30 const double kCentimetersPerInch = 2.54;
31 const double kMillimetersPerInch = 25.4;
32 const double kPointsPerInch = 72;
33 const double kPicasPerInch = 6;
34
29 // These conversions are defined in css-values 35 // These conversions are defined in css-values
30 const double kCssPixelsPerInch = 96; 36 const double kCssPixelsPerInch = 96;
31 const double kCssPixelsPerCentimeter = kCssPixelsPerInch / 2.54; // 2.54 cm/in 37 const double kCssPixelsPerCentimeter = kCssPixelsPerInch / kCentimetersPerInch;
32 const double kCssPixelsPerMillimeter = kCssPixelsPerCentimeter / 10; 38 const double kCssPixelsPerMillimeter =
33 const double kCssPixelsPerPoint = kCssPixelsPerInch / 72; 39 kCssPixelsPerCentimeter / kMillimetersPerCentimeter;
34 const double kCssPixelsPerPica = kCssPixelsPerInch / 6; 40 const double kCssPixelsPerPoint = kCssPixelsPerInch / kPointsPerInch;
41 const double kCssPixelsPerPica = kCssPixelsPerInch / kPicasPerInch;
35 42
36 } // namespace blink 43 } // namespace blink
37 44
38 #endif // CSSHelper_h 45 #endif // CSSHelper_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698