| Index: Source/core/css/CSSBasicShapes.h
|
| diff --git a/Source/core/css/CSSBasicShapes.h b/Source/core/css/CSSBasicShapes.h
|
| index c100a58a53bef6d4871a79ec3f9cb21cd21bbc2f..cd924b6bfb6c011f5ace687be9f2b96adeca92da 100644
|
| --- a/Source/core/css/CSSBasicShapes.h
|
| +++ b/Source/core/css/CSSBasicShapes.h
|
| @@ -52,8 +52,8 @@ public:
|
| virtual String cssText() const = 0;
|
| virtual bool equals(const CSSBasicShape&) const = 0;
|
|
|
| - NullableCSSValue referenceBox() const { return m_referenceBox; }
|
| - void setReferenceBox(CSSPrimitiveValue referenceBox) { m_referenceBox = referenceBox; }
|
| + const NullableCSSValue& referenceBox() const { return m_referenceBox; }
|
| + void setReferenceBox(const CSSPrimitiveValue& referenceBox) { m_referenceBox = referenceBox; }
|
|
|
| bool isEllipse() const { return type() == CSSBasicShapeEllipseType; }
|
| bool isPolygon() const { return type() == CSSBasicShapePolygonType; }
|
| @@ -74,13 +74,13 @@ public:
|
| virtual String cssText() const override;
|
| virtual bool equals(const CSSBasicShape&) const override;
|
|
|
| - NullableCSSValue centerX() const { return m_centerX; }
|
| - NullableCSSValue centerY() const { return m_centerY; }
|
| - NullableCSSValue radius() const { return m_radius; }
|
| + const NullableCSSValue& centerX() const { return m_centerX; }
|
| + const NullableCSSValue& centerY() const { return m_centerY; }
|
| + const NullableCSSValue& radius() const { return m_radius; }
|
|
|
| - void setCenterX(CSSPrimitiveValue centerX) { m_centerX = centerX; }
|
| - void setCenterY(CSSPrimitiveValue centerY) { m_centerY = centerY; }
|
| - void setRadius(CSSPrimitiveValue radius) { m_radius = radius; }
|
| + void setCenterX(const CSSPrimitiveValue& centerX) { m_centerX = centerX; }
|
| + void setCenterY(const CSSPrimitiveValue& centerY) { m_centerY = centerY; }
|
| + void setRadius(const CSSPrimitiveValue& radius) { m_radius = radius; }
|
|
|
| DECLARE_VIRTUAL_TRACE();
|
|
|
| @@ -101,15 +101,15 @@ public:
|
| virtual String cssText() const override;
|
| virtual bool equals(const CSSBasicShape&) const override;
|
|
|
| - NullableCSSValue centerX() const { return m_centerX; }
|
| - NullableCSSValue centerY() const { return m_centerY; }
|
| - NullableCSSValue radiusX() const { return m_radiusX; }
|
| - NullableCSSValue radiusY() const { return m_radiusY; }
|
| + const NullableCSSValue& centerX() const { return m_centerX; }
|
| + const NullableCSSValue& centerY() const { return m_centerY; }
|
| + const NullableCSSValue& radiusX() const { return m_radiusX; }
|
| + const NullableCSSValue& radiusY() const { return m_radiusY; }
|
|
|
| - void setCenterX(CSSPrimitiveValue centerX) { m_centerX = centerX; }
|
| - void setCenterY(CSSPrimitiveValue centerY) { m_centerY = centerY; }
|
| - void setRadiusX(CSSPrimitiveValue radiusX) { m_radiusX = radiusX; }
|
| - void setRadiusY(CSSPrimitiveValue radiusY) { m_radiusY = radiusY; }
|
| + void setCenterX(const CSSPrimitiveValue& centerX) { m_centerX = centerX; }
|
| + void setCenterY(const CSSPrimitiveValue& centerY) { m_centerY = centerY; }
|
| + void setRadiusX(const CSSPrimitiveValue& radiusX) { m_radiusX = radiusX; }
|
| + void setRadiusY(const CSSPrimitiveValue& radiusY) { m_radiusY = radiusY; }
|
|
|
| DECLARE_VIRTUAL_TRACE();
|
|
|
| @@ -128,14 +128,14 @@ class CSSBasicShapePolygon final : public CSSBasicShape {
|
| public:
|
| static PassRefPtrWillBeRawPtr<CSSBasicShapePolygon> create() { return adoptRefWillBeNoop(new CSSBasicShapePolygon); }
|
|
|
| - void appendPoint(CSSPrimitiveValue x, CSSPrimitiveValue y)
|
| + void appendPoint(const CSSPrimitiveValue& x, const CSSPrimitiveValue& y)
|
| {
|
| m_values.append(x);
|
| m_values.append(y);
|
| }
|
|
|
| - CSSPrimitiveValue getXAt(unsigned i) const { return toCSSPrimitiveValue(m_values.at(i * 2)); }
|
| - CSSPrimitiveValue getYAt(unsigned i) const { return toCSSPrimitiveValue(m_values.at(i * 2 + 1)); }
|
| + const CSSPrimitiveValue& getXAt(unsigned i) const { return toCSSPrimitiveValue(m_values.at(i * 2)); }
|
| + const CSSPrimitiveValue& getYAt(unsigned i) const { return toCSSPrimitiveValue(m_values.at(i * 2 + 1)); }
|
| const WillBeHeapVector<CSSValue>& values() const { return m_values; }
|
|
|
| void setWindRule(WindRule w) { m_windRule = w; }
|
| @@ -162,22 +162,22 @@ class CSSBasicShapeInset final : public CSSBasicShape {
|
| public:
|
| static PassRefPtrWillBeRawPtr<CSSBasicShapeInset> create() { return adoptRefWillBeNoop(new CSSBasicShapeInset); }
|
|
|
| - CSSPrimitiveValue top() const { return toCSSPrimitiveValue(*m_top); }
|
| - CSSPrimitiveValue right() const { return toCSSPrimitiveValue(*m_right); }
|
| - CSSPrimitiveValue bottom() const { return toCSSPrimitiveValue(*m_bottom); }
|
| - CSSPrimitiveValue left() const { return toCSSPrimitiveValue(*m_left); }
|
| + const CSSPrimitiveValue& top() const { return toCSSPrimitiveValue(*m_top); }
|
| + const CSSPrimitiveValue& right() const { return toCSSPrimitiveValue(*m_right); }
|
| + const CSSPrimitiveValue& bottom() const { return toCSSPrimitiveValue(*m_bottom); }
|
| + const CSSPrimitiveValue& left() const { return toCSSPrimitiveValue(*m_left); }
|
|
|
| - NullableCSSValue topLeftRadius() const { return m_topLeftRadius; }
|
| - NullableCSSValue topRightRadius() const { return m_topRightRadius; }
|
| - NullableCSSValue bottomRightRadius() const { return m_bottomRightRadius; }
|
| - NullableCSSValue bottomLeftRadius() const { return m_bottomLeftRadius; }
|
| + const NullableCSSValue& topLeftRadius() const { return m_topLeftRadius; }
|
| + const NullableCSSValue& topRightRadius() const { return m_topRightRadius; }
|
| + const NullableCSSValue& bottomRightRadius() const { return m_bottomRightRadius; }
|
| + const NullableCSSValue& bottomLeftRadius() const { return m_bottomLeftRadius; }
|
|
|
| - void setTop(CSSPrimitiveValue top) { m_top = top; }
|
| - void setRight(CSSPrimitiveValue right) { m_right = right; }
|
| - void setBottom(CSSPrimitiveValue bottom) { m_bottom = bottom; }
|
| - void setLeft(CSSPrimitiveValue left) { m_left = left; }
|
| + void setTop(const CSSPrimitiveValue& top) { m_top = top; }
|
| + void setRight(const CSSPrimitiveValue& right) { m_right = right; }
|
| + void setBottom(const CSSPrimitiveValue& bottom) { m_bottom = bottom; }
|
| + void setLeft(const CSSPrimitiveValue& left) { m_left = left; }
|
|
|
| - void updateShapeSize4Values(CSSPrimitiveValue top, CSSPrimitiveValue right, CSSPrimitiveValue bottom, CSSPrimitiveValue left)
|
| + void updateShapeSize4Values(const CSSPrimitiveValue& top, const CSSPrimitiveValue& right, const CSSPrimitiveValue& bottom, const CSSPrimitiveValue& left)
|
| {
|
| setTop(top);
|
| setRight(right);
|
| @@ -185,26 +185,26 @@ public:
|
| setLeft(left);
|
| }
|
|
|
| - void updateShapeSize1Value(CSSPrimitiveValue value1)
|
| + void updateShapeSize1Value(const CSSPrimitiveValue& value1)
|
| {
|
| updateShapeSize4Values(value1, value1, value1, value1);
|
| }
|
|
|
| - void updateShapeSize2Values(CSSPrimitiveValue value1, CSSPrimitiveValue value2)
|
| + void updateShapeSize2Values(const CSSPrimitiveValue& value1, const CSSPrimitiveValue& value2)
|
| {
|
| updateShapeSize4Values(value1, value2, value1, value2);
|
| }
|
|
|
| - void updateShapeSize3Values(CSSPrimitiveValue value1, CSSPrimitiveValue value2, CSSPrimitiveValue value3)
|
| + void updateShapeSize3Values(const CSSPrimitiveValue& value1, const CSSPrimitiveValue& value2, const CSSPrimitiveValue& value3)
|
| {
|
| updateShapeSize4Values(value1, value2, value3, value2);
|
| }
|
|
|
|
|
| - void setTopLeftRadius(CSSPrimitiveValue radius) { m_topLeftRadius = radius; }
|
| - void setTopRightRadius(CSSPrimitiveValue radius) { m_topRightRadius = radius; }
|
| - void setBottomRightRadius(CSSPrimitiveValue radius) { m_bottomRightRadius = radius; }
|
| - void setBottomLeftRadius(CSSPrimitiveValue radius) { m_bottomLeftRadius = radius; }
|
| + void setTopLeftRadius(const CSSPrimitiveValue& radius) { m_topLeftRadius = radius; }
|
| + void setTopRightRadius(const CSSPrimitiveValue& radius) { m_topRightRadius = radius; }
|
| + void setBottomRightRadius(const CSSPrimitiveValue& radius) { m_bottomRightRadius = radius; }
|
| + void setBottomLeftRadius(const CSSPrimitiveValue& radius) { m_bottomLeftRadius = radius; }
|
|
|
| virtual String cssText() const override;
|
| virtual bool equals(const CSSBasicShape&) const override;
|
|
|