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

Unified Diff: Source/core/svg/PatternAttributes.h

Issue 112003003: [SVG] SVGLength{,List} migration to new SVG property impl. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: revert aggressive svgAttributeChanged, add NeedsRebaseline Created 6 years, 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/svg/LinearGradientAttributes.h ('k') | Source/core/svg/RadialGradientAttributes.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/svg/PatternAttributes.h
diff --git a/Source/core/svg/PatternAttributes.h b/Source/core/svg/PatternAttributes.h
index 7e4ae7520ca6bd2f27c6cd66065fe9f3e0d2272b..71285c60f3446ba843884969684ad6d25f89e726 100644
--- a/Source/core/svg/PatternAttributes.h
+++ b/Source/core/svg/PatternAttributes.h
@@ -30,10 +30,10 @@ class SVGPatternElement;
struct PatternAttributes {
PatternAttributes()
- : m_x()
- , m_y()
- , m_width()
- , m_height()
+ : m_x(SVGLength::create(LengthModeWidth))
+ , m_y(SVGLength::create(LengthModeHeight))
+ , m_width(SVGLength::create(LengthModeWidth))
+ , m_height(SVGLength::create(LengthModeHeight))
, m_viewBox()
, m_preserveAspectRatio()
, m_patternUnits(SVGUnitTypes::SVG_UNIT_TYPE_OBJECTBOUNDINGBOX)
@@ -52,10 +52,10 @@ struct PatternAttributes {
{
}
- SVGLength x() const { return m_x; }
- SVGLength y() const { return m_y; }
- SVGLength width() const { return m_width; }
- SVGLength height() const { return m_height; }
+ SVGLength* x() const { return m_x.get(); }
+ SVGLength* y() const { return m_y.get(); }
+ SVGLength* width() const { return m_width.get(); }
+ SVGLength* height() const { return m_height.get(); }
FloatRect viewBox() const { return m_viewBox; }
SVGPreserveAspectRatio preserveAspectRatio() const { return m_preserveAspectRatio; }
SVGUnitTypes::SVGUnitType patternUnits() const { return m_patternUnits; }
@@ -63,25 +63,25 @@ struct PatternAttributes {
AffineTransform patternTransform() const { return m_patternTransform; }
const SVGPatternElement* patternContentElement() const { return m_patternContentElement; }
- void setX(const SVGLength& value)
+ void setX(PassRefPtr<SVGLength> value)
{
m_x = value;
m_xSet = true;
}
- void setY(const SVGLength& value)
+ void setY(PassRefPtr<SVGLength> value)
{
m_y = value;
m_ySet = true;
}
- void setWidth(const SVGLength& value)
+ void setWidth(PassRefPtr<SVGLength> value)
{
m_width = value;
m_widthSet = true;
}
- void setHeight(const SVGLength& value)
+ void setHeight(PassRefPtr<SVGLength> value)
{
m_height = value;
m_heightSet = true;
@@ -136,10 +136,10 @@ struct PatternAttributes {
private:
// Properties
- SVGLength m_x;
- SVGLength m_y;
- SVGLength m_width;
- SVGLength m_height;
+ RefPtr<SVGLength> m_x;
+ RefPtr<SVGLength> m_y;
+ RefPtr<SVGLength> m_width;
+ RefPtr<SVGLength> m_height;
FloatRect m_viewBox;
SVGPreserveAspectRatio m_preserveAspectRatio;
SVGUnitTypes::SVGUnitType m_patternUnits;
« no previous file with comments | « Source/core/svg/LinearGradientAttributes.h ('k') | Source/core/svg/RadialGradientAttributes.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698