OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) Research In Motion Limited 2010-2011. All rights reserved. | 2 * Copyright (C) Research In Motion Limited 2010-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 14 matching lines...) Expand all Loading... |
25 #include "wtf/HashMap.h" | 25 #include "wtf/HashMap.h" |
26 #include "wtf/MathExtras.h" | 26 #include "wtf/MathExtras.h" |
27 #include "wtf/Noncopyable.h" | 27 #include "wtf/Noncopyable.h" |
28 #include "wtf/Vector.h" | 28 #include "wtf/Vector.h" |
29 | 29 |
30 namespace blink { | 30 namespace blink { |
31 | 31 |
32 class LayoutSVGInlineText; | 32 class LayoutSVGInlineText; |
33 | 33 |
34 struct SVGCharacterData { | 34 struct SVGCharacterData { |
35 ALLOW_ONLY_INLINE_ALLOCATION(); | 35 DISALLOW_NEW_EXCEPT_PLACEMENT_NEW(); |
36 SVGCharacterData(); | 36 SVGCharacterData(); |
37 | 37 |
38 float x; | 38 float x; |
39 float y; | 39 float y; |
40 float dx; | 40 float dx; |
41 float dy; | 41 float dy; |
42 float rotate; | 42 float rotate; |
43 }; | 43 }; |
44 | 44 |
45 typedef HashMap<unsigned, SVGCharacterData> SVGCharacterDataMap; | 45 typedef HashMap<unsigned, SVGCharacterData> SVGCharacterDataMap; |
46 | 46 |
47 class SVGTextLayoutAttributes { | 47 class SVGTextLayoutAttributes { |
48 DISALLOW_ALLOCATION(); | 48 DISALLOW_NEW(); |
49 WTF_MAKE_NONCOPYABLE(SVGTextLayoutAttributes); | 49 WTF_MAKE_NONCOPYABLE(SVGTextLayoutAttributes); |
50 public: | 50 public: |
51 SVGTextLayoutAttributes(LayoutSVGInlineText*); | 51 SVGTextLayoutAttributes(LayoutSVGInlineText*); |
52 | 52 |
53 void clear(); | 53 void clear(); |
54 static float emptyValue() { return std::numeric_limits<float>::quiet_NaN();
} | 54 static float emptyValue() { return std::numeric_limits<float>::quiet_NaN();
} |
55 static bool isEmptyValue(float value) { return std::isnan(value); } | 55 static bool isEmptyValue(float value) { return std::isnan(value); } |
56 | 56 |
57 LayoutSVGInlineText* context() const { return m_context; } | 57 LayoutSVGInlineText* context() const { return m_context; } |
58 | 58 |
(...skipping 14 matching lines...) Expand all Loading... |
73 , y(SVGTextLayoutAttributes::emptyValue()) | 73 , y(SVGTextLayoutAttributes::emptyValue()) |
74 , dx(SVGTextLayoutAttributes::emptyValue()) | 74 , dx(SVGTextLayoutAttributes::emptyValue()) |
75 , dy(SVGTextLayoutAttributes::emptyValue()) | 75 , dy(SVGTextLayoutAttributes::emptyValue()) |
76 , rotate(SVGTextLayoutAttributes::emptyValue()) | 76 , rotate(SVGTextLayoutAttributes::emptyValue()) |
77 { | 77 { |
78 } | 78 } |
79 | 79 |
80 } // namespace blink | 80 } // namespace blink |
81 | 81 |
82 #endif | 82 #endif |
OLD | NEW |