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

Side by Side Diff: Source/core/svg/SVGLengthContext.h

Issue 1073803002: SVG doesn't recognize ch units. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebased Created 5 years, 8 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
« no previous file with comments | « Source/core/svg/SVGLength.cpp ('k') | Source/core/svg/SVGLengthContext.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « Source/core/svg/SVGLength.cpp ('k') | Source/core/svg/SVGLengthContext.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698