| 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 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 50 LengthModeOther | 50 LengthModeOther |
| 51 }; | 51 }; |
| 52 | 52 |
| 53 class SVGLengthContext { | 53 class SVGLengthContext { |
| 54 public: | 54 public: |
| 55 explicit SVGLengthContext(const SVGElement*); | 55 explicit SVGLengthContext(const SVGElement*); |
| 56 | 56 |
| 57 template<typename T> | 57 template<typename T> |
| 58 static FloatRect resolveRectangle(const T* context, SVGUnitTypes::SVGUnitTyp
e type, const FloatRect& viewport) | 58 static FloatRect resolveRectangle(const T* context, SVGUnitTypes::SVGUnitTyp
e type, const FloatRect& viewport) |
| 59 { | 59 { |
| 60 return SVGLengthContext::resolveRectangle(context, type, viewport, conte
xt->x(), context->y(), context->width(), context->height()); | 60 return SVGLengthContext::resolveRectangle(context, type, viewport, conte
xt->xCurrentValue(), context->yCurrentValue(), context->widthCurrentValue(), con
text->heightCurrentValue()); |
| 61 } | 61 } |
| 62 | 62 |
| 63 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 FloatRect resolveRectangle(const SVGElement*, SVGUnitTypes::SVGUnitTy
pe, const FloatRect& viewport, const SVGLength& x, const SVGLength& y, const SVG
Length& width, const SVGLength& height); |
| 64 static FloatPoint resolvePoint(const SVGElement*, SVGUnitTypes::SVGUnitType,
const SVGLength& x, const SVGLength& y); | 64 static FloatPoint resolvePoint(const SVGElement*, SVGUnitTypes::SVGUnitType,
const SVGLength& x, const SVGLength& y); |
| 65 static float resolveLength(const SVGElement*, SVGUnitTypes::SVGUnitType, con
st SVGLength&); | 65 static float resolveLength(const SVGElement*, SVGUnitTypes::SVGUnitType, con
st SVGLength&); |
| 66 | 66 |
| 67 float convertValueToUserUnits(float, SVGLengthMode, SVGLengthType fromUnit,
ExceptionCode&) const; | 67 float convertValueToUserUnits(float, SVGLengthMode, SVGLengthType fromUnit,
ExceptionCode&) const; |
| 68 float convertValueFromUserUnits(float, SVGLengthMode, SVGLengthType toUnit,
ExceptionCode&) const; | 68 float convertValueFromUserUnits(float, SVGLengthMode, SVGLengthType toUnit,
ExceptionCode&) const; |
| 69 | 69 |
| 70 bool determineViewport(float& width, float& height) const; | 70 bool determineViewport(float& width, float& height) const; |
| (...skipping 10 matching lines...) Expand all Loading... |
| 81 float convertValueFromUserUnitsToEXS(float value, ExceptionCode&) const; | 81 float convertValueFromUserUnitsToEXS(float value, ExceptionCode&) const; |
| 82 float convertValueFromEXSToUserUnits(float value, ExceptionCode&) const; | 82 float convertValueFromEXSToUserUnits(float value, ExceptionCode&) const; |
| 83 | 83 |
| 84 const SVGElement* m_context; | 84 const SVGElement* m_context; |
| 85 FloatRect m_overridenViewport; | 85 FloatRect m_overridenViewport; |
| 86 }; | 86 }; |
| 87 | 87 |
| 88 } // namespace WebCore | 88 } // namespace WebCore |
| 89 | 89 |
| 90 #endif // SVGLengthContext_h | 90 #endif // SVGLengthContext_h |
| OLD | NEW |