| 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 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 59 return SVGLengthContext::resolveRectangle(context, type, viewport, conte
xt->xCurrentValue(), context->yCurrentValue(), context->widthCurrentValue(), con
text->heightCurrentValue()); | 59 return SVGLengthContext::resolveRectangle(context, type, viewport, conte
xt->xCurrentValue(), context->yCurrentValue(), context->widthCurrentValue(), con
text->heightCurrentValue()); |
| 60 } | 60 } |
| 61 | 61 |
| 62 static FloatRect resolveRectangle(const SVGElement*, SVGUnitTypes::SVGUnitTy
pe, const FloatRect& viewport, const SVGLength& x, const SVGLength& y, const SVG
Length& width, const SVGLength& height); | 62 static FloatRect resolveRectangle(const SVGElement*, SVGUnitTypes::SVGUnitTy
pe, const FloatRect& viewport, const SVGLength& x, const SVGLength& y, const SVG
Length& width, const SVGLength& height); |
| 63 static FloatPoint resolvePoint(const SVGElement*, SVGUnitTypes::SVGUnitType,
const SVGLength& x, const SVGLength& y); | 63 static FloatPoint resolvePoint(const SVGElement*, SVGUnitTypes::SVGUnitType,
const SVGLength& x, const SVGLength& y); |
| 64 static float resolveLength(const SVGElement*, SVGUnitTypes::SVGUnitType, con
st SVGLength&); | 64 static float resolveLength(const SVGElement*, SVGUnitTypes::SVGUnitType, con
st SVGLength&); |
| 65 | 65 |
| 66 float convertValueToUserUnits(float, SVGLengthMode, SVGLengthType fromUnit,
ExceptionState&) const; | 66 float convertValueToUserUnits(float, SVGLengthMode, SVGLengthType fromUnit,
ExceptionState&) const; |
| 67 float convertValueFromUserUnits(float, SVGLengthMode, SVGLengthType toUnit,
ExceptionState&) const; | 67 float convertValueFromUserUnits(float, SVGLengthMode, SVGLengthType toUnit,
ExceptionState&) const; |
| 68 | 68 |
| 69 bool determineViewport(float& width, float& height) const; | 69 bool determineViewport(FloatSize&) const; |
| 70 | 70 |
| 71 private: | 71 private: |
| 72 SVGLengthContext(const SVGElement*, const FloatRect& viewport); | 72 SVGLengthContext(const SVGElement*, const FloatRect& viewport); |
| 73 | 73 |
| 74 float convertValueFromUserUnitsToPercentage(float value, SVGLengthMode, Exce
ptionState&) const; | 74 float convertValueFromUserUnitsToPercentage(float value, SVGLengthMode, Exce
ptionState&) const; |
| 75 float convertValueFromPercentageToUserUnits(float value, SVGLengthMode, Exce
ptionState&) const; | 75 float convertValueFromPercentageToUserUnits(float value, SVGLengthMode, Exce
ptionState&) const; |
| 76 | 76 |
| 77 float convertValueFromUserUnitsToEMS(float value, ExceptionState&) const; | 77 float convertValueFromUserUnitsToEMS(float value, ExceptionState&) const; |
| 78 float convertValueFromEMSToUserUnits(float value, ExceptionState&) const; | 78 float convertValueFromEMSToUserUnits(float value, ExceptionState&) const; |
| 79 | 79 |
| 80 float convertValueFromUserUnitsToEXS(float value, ExceptionState&) const; | 80 float convertValueFromUserUnitsToEXS(float value, ExceptionState&) const; |
| 81 float convertValueFromEXSToUserUnits(float value, ExceptionState&) const; | 81 float convertValueFromEXSToUserUnits(float value, ExceptionState&) const; |
| 82 | 82 |
| 83 const SVGElement* m_context; | 83 const SVGElement* m_context; |
| 84 FloatRect m_overridenViewport; | 84 FloatRect m_overridenViewport; |
| 85 }; | 85 }; |
| 86 | 86 |
| 87 } // namespace WebCore | 87 } // namespace WebCore |
| 88 | 88 |
| 89 #endif // SVGLengthContext_h | 89 #endif // SVGLengthContext_h |
| OLD | NEW |