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

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

Issue 897313004: Fold up the SVGLengthContext::convertValueFrom* helpers (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 10 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 | Annotate | Revision Log
« 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 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
62 static FloatRect resolveRectangle(const SVGElement*, SVGUnitTypes::SVGUnitTy pe, const FloatRect& viewport, PassRefPtrWillBeRawPtr<SVGLength> x, PassRefPtrWi llBeRawPtr<SVGLength> y, PassRefPtrWillBeRawPtr<SVGLength> width, PassRefPtrWill BeRawPtr<SVGLength> height); 62 static FloatRect resolveRectangle(const SVGElement*, SVGUnitTypes::SVGUnitTy pe, const FloatRect& viewport, PassRefPtrWillBeRawPtr<SVGLength> x, PassRefPtrWi llBeRawPtr<SVGLength> y, PassRefPtrWillBeRawPtr<SVGLength> width, PassRefPtrWill BeRawPtr<SVGLength> height);
63 static FloatPoint resolvePoint(const SVGElement*, SVGUnitTypes::SVGUnitType, PassRefPtrWillBeRawPtr<SVGLength> x, PassRefPtrWillBeRawPtr<SVGLength> y); 63 static FloatPoint resolvePoint(const SVGElement*, SVGUnitTypes::SVGUnitType, PassRefPtrWillBeRawPtr<SVGLength> x, PassRefPtrWillBeRawPtr<SVGLength> y);
64 static float resolveLength(const SVGElement*, SVGUnitTypes::SVGUnitType, Pas sRefPtrWillBeRawPtr<SVGLength>); 64 static float resolveLength(const SVGElement*, SVGUnitTypes::SVGUnitType, Pas sRefPtrWillBeRawPtr<SVGLength>);
65 65
66 float convertValueToUserUnits(float, SVGLengthMode, SVGLengthType fromUnit) const; 66 float convertValueToUserUnits(float, SVGLengthMode, SVGLengthType fromUnit) const;
67 float convertValueFromUserUnits(float, SVGLengthMode, SVGLengthType toUnit) const; 67 float convertValueFromUserUnits(float, SVGLengthMode, SVGLengthType toUnit) const;
68 68
69 bool determineViewport(FloatSize&) const; 69 bool determineViewport(FloatSize&) const;
70 70
71 private: 71 private:
72 static float convertValueFromUserUnitsToPercentage(float value, SVGLengthMod e, const FloatSize&);
73 static float convertValueFromPercentageToUserUnits(float value, SVGLengthMod e, const FloatSize&);
74 static float convertValueFromPercentageToUserUnits(const SVGLength& value, c onst FloatSize& viewportSize);
75
76 float convertValueFromUserUnitsToEMS(float value) const; 72 float convertValueFromUserUnitsToEMS(float value) const;
77 float convertValueFromEMSToUserUnits(float value) const; 73 float convertValueFromEMSToUserUnits(float value) const;
78 74
79 float convertValueFromUserUnitsToEXS(float value) const; 75 float convertValueFromUserUnitsToEXS(float value) const;
80 float convertValueFromEXSToUserUnits(float value) const; 76 float convertValueFromEXSToUserUnits(float value) const;
81 77
82 RawPtrWillBeMember<const SVGElement> m_context; 78 RawPtrWillBeMember<const SVGElement> m_context;
83 }; 79 };
84 80
85 } // namespace blink 81 } // namespace blink
86 82
87 #endif // SVGLengthContext_h 83 #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