Index: Source/core/svg/PatternAttributes.h |
diff --git a/Source/core/svg/PatternAttributes.h b/Source/core/svg/PatternAttributes.h |
index f7378e4905661486cef1eb5c7d11a11140863880..0735ecc140a4bdf16e7e645f7a50e2af6595077d 100644 |
--- a/Source/core/svg/PatternAttributes.h |
+++ b/Source/core/svg/PatternAttributes.h |
@@ -22,13 +22,16 @@ |
#include "core/svg/SVGLength.h" |
#include "core/svg/SVGPreserveAspectRatio.h" |
+#include "platform/heap/Handle.h" |
#include "platform/transforms/AffineTransform.h" |
namespace blink { |
class SVGPatternElement; |
-struct PatternAttributes { |
+struct PatternAttributes final { |
haraken
2014/11/11 05:22:46
struct => class
sof
2014/11/12 13:45:07
Done.
|
+ DISALLOW_ALLOCATION(); |
+public: |
PatternAttributes() |
: m_x(SVGLength::create(LengthModeWidth)) |
, m_y(SVGLength::create(LengthModeHeight)) |
@@ -63,25 +66,25 @@ struct PatternAttributes { |
AffineTransform patternTransform() const { return m_patternTransform; } |
const SVGPatternElement* patternContentElement() const { return m_patternContentElement; } |
- void setX(PassRefPtr<SVGLength> value) |
+ void setX(PassRefPtrWillBeRawPtr<SVGLength> value) |
{ |
m_x = value; |
m_xSet = true; |
} |
- void setY(PassRefPtr<SVGLength> value) |
+ void setY(PassRefPtrWillBeRawPtr<SVGLength> value) |
{ |
m_y = value; |
m_ySet = true; |
} |
- void setWidth(PassRefPtr<SVGLength> value) |
+ void setWidth(PassRefPtrWillBeRawPtr<SVGLength> value) |
{ |
m_width = value; |
m_widthSet = true; |
} |
- void setHeight(PassRefPtr<SVGLength> value) |
+ void setHeight(PassRefPtrWillBeRawPtr<SVGLength> value) |
{ |
m_height = value; |
m_heightSet = true; |
@@ -93,7 +96,7 @@ struct PatternAttributes { |
m_viewBoxSet = true; |
} |
- void setPreserveAspectRatio(PassRefPtr<SVGPreserveAspectRatio> value) |
+ void setPreserveAspectRatio(PassRefPtrWillBeRawPtr<SVGPreserveAspectRatio> value) |
{ |
m_preserveAspectRatio = value; |
m_preserveAspectRatioSet = true; |
@@ -134,14 +137,23 @@ struct PatternAttributes { |
bool hasPatternTransform() const { return m_patternTransformSet; } |
bool hasPatternContentElement() const { return m_patternContentElementSet; } |
+ void trace(Visitor* visitor) |
+ { |
+ visitor->trace(m_x); |
+ visitor->trace(m_y); |
+ visitor->trace(m_width); |
+ visitor->trace(m_height); |
+ visitor->trace(m_preserveAspectRatio); |
+ } |
+ |
private: |
// Properties |
- RefPtr<SVGLength> m_x; |
- RefPtr<SVGLength> m_y; |
- RefPtr<SVGLength> m_width; |
- RefPtr<SVGLength> m_height; |
+ RefPtrWillBeMember<SVGLength> m_x; |
+ RefPtrWillBeMember<SVGLength> m_y; |
+ RefPtrWillBeMember<SVGLength> m_width; |
+ RefPtrWillBeMember<SVGLength> m_height; |
FloatRect m_viewBox; |
- RefPtr<SVGPreserveAspectRatio> m_preserveAspectRatio; |
+ RefPtrWillBeMember<SVGPreserveAspectRatio> m_preserveAspectRatio; |
SVGUnitTypes::SVGUnitType m_patternUnits; |
SVGUnitTypes::SVGUnitType m_patternContentUnits; |
AffineTransform m_patternTransform; |
@@ -162,4 +174,4 @@ private: |
} // namespace blink |
-#endif |
+#endif // PatternAttributes_h |