Unreviewed, rolling out r173175.
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 2 Sep 2014 16:47:11 +0000 (16:47 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 2 Sep 2014 16:47:11 +0000 (16:47 +0000)
https://bugs.webkit.org/show_bug.cgi?id=136454

it broke debug builds (Requested by jessieberlin on #webkit).

Reverted changeset:

"Introduce CSS_BASIC_TYPE_CASTS, and use it"
https://bugs.webkit.org/show_bug.cgi?id=136403
http://trac.webkit.org/changeset/173175

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@173177 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebCore/ChangeLog
Source/WebCore/css/BasicShapeFunctions.cpp
Source/WebCore/css/CSSBasicShapes.cpp
Source/WebCore/css/CSSBasicShapes.h

index 2045413..1fc9d95 100644 (file)
@@ -1,3 +1,16 @@
+2014-09-02  Commit Queue  <commit-queue@webkit.org>
+
+        Unreviewed, rolling out r173175.
+        https://bugs.webkit.org/show_bug.cgi?id=136454
+
+        it broke debug builds (Requested by jessieberlin on #webkit).
+
+        Reverted changeset:
+
+        "Introduce CSS_BASIC_TYPE_CASTS, and use it"
+        https://bugs.webkit.org/show_bug.cgi?id=136403
+        http://trac.webkit.org/changeset/173175
+
 2014-09-02  Alex Christensen  <achristensen@webkit.org>
 
         More use of WEBCORE_EXPORT.
index 019de9f..d529d4b 100644 (file)
@@ -205,7 +205,7 @@ PassRefPtr<BasicShape> basicShapeForValue(const CSSToLengthConversionData& conve
 
     switch (basicShapeValue->type()) {
     case CSSBasicShape::CSSBasicShapeCircleType: {
-        const CSSBasicShapeCircle* circleValue = toCSSBasicShapeCircle(basicShapeValue);
+        const CSSBasicShapeCircle* circleValue = static_cast<const CSSBasicShapeCircle *>(basicShapeValue);
         RefPtr<BasicShapeCircle> circle = BasicShapeCircle::create();
 
         circle->setCenterX(convertToCenterCoordinate(conversionData, circleValue->centerX()));
@@ -216,7 +216,7 @@ PassRefPtr<BasicShape> basicShapeForValue(const CSSToLengthConversionData& conve
         break;
     }
     case CSSBasicShape::CSSBasicShapeEllipseType: {
-        const CSSBasicShapeEllipse* ellipseValue = toCSSBasicShapeEllipse(basicShapeValue);
+        const CSSBasicShapeEllipse* ellipseValue = static_cast<const CSSBasicShapeEllipse *>(basicShapeValue);
         RefPtr<BasicShapeEllipse> ellipse = BasicShapeEllipse::create();
 
         ellipse->setCenterX(convertToCenterCoordinate(conversionData, ellipseValue->centerX()));
@@ -229,7 +229,7 @@ PassRefPtr<BasicShape> basicShapeForValue(const CSSToLengthConversionData& conve
         break;
     }
     case CSSBasicShape::CSSBasicShapePolygonType: {
-        const CSSBasicShapePolygon* polygonValue = toCSSBasicShapePolygon(basicShapeValue);
+        const CSSBasicShapePolygon* polygonValue = static_cast<const CSSBasicShapePolygon *>(basicShapeValue);
         RefPtr<BasicShapePolygon> polygon = BasicShapePolygon::create();
 
         polygon->setWindRule(polygonValue->windRule());
@@ -241,7 +241,7 @@ PassRefPtr<BasicShape> basicShapeForValue(const CSSToLengthConversionData& conve
         break;
     }
     case CSSBasicShape::CSSBasicShapeInsetType: {
-        const CSSBasicShapeInset* rectValue = toCSSBasicShapeInset(basicShapeValue);
+        const CSSBasicShapeInset* rectValue = static_cast<const CSSBasicShapeInset* >(basicShapeValue);
         RefPtr<BasicShapeInset> rect = BasicShapeInset::create();
 
         rect->setTop(convertToLength(conversionData, rectValue->top()));
index 615c0f5..18f16ee 100644 (file)
@@ -128,7 +128,7 @@ bool CSSBasicShapeCircle::equals(const CSSBasicShape& shape) const
     if (shape.type() != CSSBasicShapeCircleType)
         return false;
 
-    const CSSBasicShapeCircle& other = toCSSBasicShapeCircle(shape);
+    const CSSBasicShapeCircle& other = static_cast<const CSSBasicShapeCircle&>(shape);
     return compareCSSValuePtr(m_centerX, other.m_centerX)
         && compareCSSValuePtr(m_centerY, other.m_centerY)
         && compareCSSValuePtr(m_radius, other.m_radius)
@@ -201,7 +201,7 @@ bool CSSBasicShapeEllipse::equals(const CSSBasicShape& shape) const
     if (shape.type() != CSSBasicShapeEllipseType)
         return false;
 
-    const CSSBasicShapeEllipse& other = toCSSBasicShapeEllipse(shape);
+    const CSSBasicShapeEllipse& other = static_cast<const CSSBasicShapeEllipse&>(shape);
     return compareCSSValuePtr(m_centerX, other.m_centerX)
         && compareCSSValuePtr(m_centerY, other.m_centerY)
         && compareCSSValuePtr(m_radiusX, other.m_radiusX)
@@ -272,7 +272,7 @@ bool CSSBasicShapePolygon::equals(const CSSBasicShape& shape) const
     if (shape.type() != CSSBasicShapePolygonType)
         return false;
 
-    const CSSBasicShapePolygon& rhs = toCSSBasicShapePolygon(shape);
+    const CSSBasicShapePolygon& rhs = static_cast<const CSSBasicShapePolygon&>(shape);
     return compareCSSValuePtr(m_referenceBox, rhs.m_referenceBox)
         && compareCSSValueVector<CSSPrimitiveValue>(m_values, rhs.m_values);
 }
@@ -407,7 +407,7 @@ bool CSSBasicShapeInset::equals(const CSSBasicShape& shape) const
     if (shape.type() != CSSBasicShapeInsetType)
         return false;
 
-    const CSSBasicShapeInset& other = toCSSBasicShapeInset(shape);
+    const CSSBasicShapeInset& other = static_cast<const CSSBasicShapeInset&>(shape);
     return compareCSSValuePtr(m_top, other.m_top)
         && compareCSSValuePtr(m_right, other.m_right)
         && compareCSSValuePtr(m_bottom, other.m_bottom)
index a86b35e..fff2044 100644 (file)
@@ -62,9 +62,6 @@ protected:
     RefPtr<CSSPrimitiveValue> m_referenceBox;
 };
 
-#define CSS_BASIC_TYPE_CASTS(ToValueTypeName, predicate) \
-    TYPE_CASTS_BASE(ToValueTypeName, CSSBasicShape, basicShape, basicShape->type() == predicate, basicShape.type() == predicate) 
-
 class CSSBasicShapeInset : public CSSBasicShape {
 public:
     static PassRefPtr<CSSBasicShapeInset> create() { return adoptRef(new CSSBasicShapeInset); }
@@ -130,8 +127,6 @@ private:
     RefPtr<CSSPrimitiveValue> m_bottomLeftRadius;
 };
 
-CSS_BASIC_TYPE_CASTS(CSSBasicShapeInset, CSSBasicShapeInsetType)
-
 class CSSBasicShapeCircle : public CSSBasicShape {
 public:
     static PassRefPtr<CSSBasicShapeCircle> create() { return adoptRef(new CSSBasicShapeCircle); }
@@ -156,8 +151,6 @@ private:
     RefPtr<CSSPrimitiveValue> m_radius;
 };
 
-CSS_BASIC_TYPE_CASTS(CSSBasicShapeCircle, CSSBasicShapeCircleType)
-
 class CSSBasicShapeEllipse : public CSSBasicShape {
 public:
     static PassRefPtr<CSSBasicShapeEllipse> create() { return adoptRef(new CSSBasicShapeEllipse); }
@@ -185,8 +178,6 @@ private:
     RefPtr<CSSPrimitiveValue> m_radiusY;
 };
 
-CSS_BASIC_TYPE_CASTS(CSSBasicShapeEllipse, CSSBasicShapeEllipseType)
-
 class CSSBasicShapePolygon : public CSSBasicShape {
 public:
     static PassRefPtr<CSSBasicShapePolygon> create() { return adoptRef(new CSSBasicShapePolygon); }
@@ -218,8 +209,6 @@ private:
     WindRule m_windRule;
 };
 
-CSS_BASIC_TYPE_CASTS(CSSBasicShapePolygon, CSSBasicShapePolygonType)
-
 } // namespace WebCore
 
 #endif // CSSBasicShapes_h