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

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

Issue 339793004: Prepare SVGLengthContext for oilpan (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 6 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 | « no previous file | no next file » | 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 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 LengthTypePC 43 LengthTypePC
44 }; 44 };
45 45
46 enum SVGLengthMode { 46 enum SVGLengthMode {
47 LengthModeWidth = 0, 47 LengthModeWidth = 0,
48 LengthModeHeight, 48 LengthModeHeight,
49 LengthModeOther 49 LengthModeOther
50 }; 50 };
51 51
52 class SVGLengthContext { 52 class SVGLengthContext {
53 STACK_ALLOCATED();
53 public: 54 public:
54 explicit SVGLengthContext(const SVGElement*); 55 explicit SVGLengthContext(const SVGElement*);
55 56
56 template<typename T> 57 template<typename T>
57 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)
58 { 59 {
59 return SVGLengthContext::resolveRectangle(context, type, viewport, conte xt->x()->currentValue(), context->y()->currentValue(), context->width()->current Value(), context->height()->currentValue()); 60 return SVGLengthContext::resolveRectangle(context, type, viewport, conte xt->x()->currentValue(), context->y()->currentValue(), context->width()->current Value(), context->height()->currentValue());
60 } 61 }
61 62
62 static FloatRect resolveRectangle(const SVGElement*, SVGUnitTypes::SVGUnitTy pe, const FloatRect& viewport, PassRefPtr<SVGLength> x, PassRefPtr<SVGLength> y, PassRefPtr<SVGLength> width, PassRefPtr<SVGLength> height); 63 static FloatRect resolveRectangle(const SVGElement*, SVGUnitTypes::SVGUnitTy pe, const FloatRect& viewport, PassRefPtr<SVGLength> x, PassRefPtr<SVGLength> y, PassRefPtr<SVGLength> width, PassRefPtr<SVGLength> height);
(...skipping 10 matching lines...) Expand all
73 74
74 float convertValueFromUserUnitsToPercentage(float value, SVGLengthMode, Exce ptionState&) const; 75 float convertValueFromUserUnitsToPercentage(float value, SVGLengthMode, Exce ptionState&) const;
75 float convertValueFromPercentageToUserUnits(float value, SVGLengthMode, Exce ptionState&) const; 76 float convertValueFromPercentageToUserUnits(float value, SVGLengthMode, Exce ptionState&) const;
76 77
77 float convertValueFromUserUnitsToEMS(float value, ExceptionState&) const; 78 float convertValueFromUserUnitsToEMS(float value, ExceptionState&) const;
78 float convertValueFromEMSToUserUnits(float value, ExceptionState&) const; 79 float convertValueFromEMSToUserUnits(float value, ExceptionState&) const;
79 80
80 float convertValueFromUserUnitsToEXS(float value, ExceptionState&) const; 81 float convertValueFromUserUnitsToEXS(float value, ExceptionState&) const;
81 float convertValueFromEXSToUserUnits(float value, ExceptionState&) const; 82 float convertValueFromEXSToUserUnits(float value, ExceptionState&) const;
82 83
83 const SVGElement* m_context; 84 RawPtrWillBeMember<const SVGElement> m_context;
84 FloatRect m_overridenViewport; 85 FloatRect m_overridenViewport;
85 }; 86 };
86 87
87 } // namespace WebCore 88 } // namespace WebCore
88 89
89 #endif // SVGLengthContext_h 90 #endif // SVGLengthContext_h
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698