OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) Research In Motion Limited 2011. All rights reserved. | 2 * Copyright (C) Research In Motion Limited 2011. All rights reserved. |
3 * | 3 * |
4 * This library is free software; you can redistribute it and/or | 4 * This library is free software; you can redistribute it and/or |
5 * modify it under the terms of the GNU Library General Public | 5 * modify it under the terms of the GNU Library General Public |
6 * License as published by the Free Software Foundation; either | 6 * License as published by the Free Software Foundation; either |
7 * version 2 of the License, or (at your option) any later version. | 7 * version 2 of the License, or (at your option) any later version. |
8 * | 8 * |
9 * This library is distributed in the hope that it will be useful, | 9 * This library is distributed in the hope that it will be useful, |
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
(...skipping 25 matching lines...) Expand all Loading... |
36 LengthTypeNumber, | 36 LengthTypeNumber, |
37 LengthTypePercentage, | 37 LengthTypePercentage, |
38 LengthTypeEMS, | 38 LengthTypeEMS, |
39 LengthTypeEXS, | 39 LengthTypeEXS, |
40 LengthTypePX, | 40 LengthTypePX, |
41 LengthTypeCM, | 41 LengthTypeCM, |
42 LengthTypeMM, | 42 LengthTypeMM, |
43 LengthTypeIN, | 43 LengthTypeIN, |
44 LengthTypePT, | 44 LengthTypePT, |
45 LengthTypePC, | 45 LengthTypePC, |
46 LengthTypeREMS | 46 LengthTypeREMS, |
| 47 LengthTypeCHS |
47 }; | 48 }; |
48 | 49 |
49 enum class SVGLengthMode { | 50 enum class SVGLengthMode { |
50 Width, | 51 Width, |
51 Height, | 52 Height, |
52 Other | 53 Other |
53 }; | 54 }; |
54 | 55 |
55 class SVGLengthContext { | 56 class SVGLengthContext { |
56 STACK_ALLOCATED(); | 57 STACK_ALLOCATED(); |
(...skipping 19 matching lines...) Expand all Loading... |
76 | 77 |
77 bool determineViewport(FloatSize&) const; | 78 bool determineViewport(FloatSize&) const; |
78 | 79 |
79 private: | 80 private: |
80 float valueForLength(const Length&, float zoom, SVGLengthMode) const; | 81 float valueForLength(const Length&, float zoom, SVGLengthMode) const; |
81 static float valueForLength(const Length&, float zoom, float dimension); | 82 static float valueForLength(const Length&, float zoom, float dimension); |
82 | 83 |
83 float convertValueFromUserUnitsToEXS(float value) const; | 84 float convertValueFromUserUnitsToEXS(float value) const; |
84 float convertValueFromEXSToUserUnits(float value) const; | 85 float convertValueFromEXSToUserUnits(float value) const; |
85 | 86 |
| 87 float convertValueFromUserUnitsToCHS(float value) const; |
| 88 float convertValueFromCHSToUserUnits(float value) const; |
| 89 |
86 RawPtrWillBeMember<const SVGElement> m_context; | 90 RawPtrWillBeMember<const SVGElement> m_context; |
87 }; | 91 }; |
88 | 92 |
89 } // namespace blink | 93 } // namespace blink |
90 | 94 |
91 #endif // SVGLengthContext_h | 95 #endif // SVGLengthContext_h |
OLD | NEW |