[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc

zimmermann at webkit.org zimmermann at webkit.org
Wed Dec 22 14:29:01 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit ea2750eefc193f9714d359d8cf21cb76795ae1e3
Author: zimmermann at webkit.org <zimmermann at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Mon Oct 11 17:27:30 2010 +0000

    2010-10-11  Nikolas Zimmermann  <nzimmermann at rim.com>
    
            Reviewed by Andreas Kling.
    
            Kill Path::debugString()
            https://bugs.webkit.org/show_bug.cgi?id=47493
    
            Remove the obsolete Path::debugString() method. DRT now dumps paths in a platform independant way.
    
            * platform/graphics/Path.h:
            * platform/graphics/cairo/PathCairo.cpp:
            * platform/graphics/cg/PathCG.cpp:
            * platform/graphics/haiku/PathHaiku.cpp:
            * platform/graphics/openvg/PathOpenVG.cpp:
            * platform/graphics/qt/PathQt.cpp:
            * platform/graphics/skia/PathSkia.cpp:
            * platform/graphics/wince/PathWinCE.cpp:
            * platform/graphics/wince/PlatformPathWinCE.cpp:
            * platform/graphics/wince/PlatformPathWinCE.h:
            * platform/graphics/wx/PathWx.cpp:
            * svg/SVGGlyphElement.h:
            (WebCore::SVGGlyphIdentifier::operator==):
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@69505 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 02e7595..995dc24 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,26 @@
+2010-10-11  Nikolas Zimmermann  <nzimmermann at rim.com>
+
+        Reviewed by Andreas Kling.
+
+        Kill Path::debugString()
+        https://bugs.webkit.org/show_bug.cgi?id=47493
+
+        Remove the obsolete Path::debugString() method. DRT now dumps paths in a platform independant way.
+
+        * platform/graphics/Path.h:
+        * platform/graphics/cairo/PathCairo.cpp:
+        * platform/graphics/cg/PathCG.cpp:
+        * platform/graphics/haiku/PathHaiku.cpp:
+        * platform/graphics/openvg/PathOpenVG.cpp:
+        * platform/graphics/qt/PathQt.cpp:
+        * platform/graphics/skia/PathSkia.cpp:
+        * platform/graphics/wince/PathWinCE.cpp:
+        * platform/graphics/wince/PlatformPathWinCE.cpp:
+        * platform/graphics/wince/PlatformPathWinCE.h:
+        * platform/graphics/wx/PathWx.cpp:
+        * svg/SVGGlyphElement.h:
+        (WebCore::SVGGlyphIdentifier::operator==):
+
 2010-10-11  Martin Robinson  <mrobinson at igalia.com>
 
         Reviewed by Xan Lopez.
diff --git a/WebCore/platform/graphics/Path.h b/WebCore/platform/graphics/Path.h
index 43ba889..8260a38 100644
--- a/WebCore/platform/graphics/Path.h
+++ b/WebCore/platform/graphics/Path.h
@@ -140,8 +140,6 @@ namespace WebCore {
 
         void translate(const FloatSize&);
 
-        String debugString() const;
-
         PlatformPathPtr platformPath() const { return m_path; }
 
         static Path createRoundedRectangle(const FloatRect&, const FloatSize& roundingRadii);
diff --git a/WebCore/platform/graphics/cairo/PathCairo.cpp b/WebCore/platform/graphics/cairo/PathCairo.cpp
index 776bceb..d5045be 100644
--- a/WebCore/platform/graphics/cairo/PathCairo.cpp
+++ b/WebCore/platform/graphics/cairo/PathCairo.cpp
@@ -337,40 +337,4 @@ void Path::transform(const AffineTransform& trans)
     cairo_transform(cr, &c_matrix);
 }
 
-String Path::debugString() const
-{
-    if (isEmpty())
-        return String();
-
-    String pathString;
-    OwnPtr<cairo_path_t> path(cairo_copy_path(platformPath()->context()));
-    cairo_path_data_t* data;
-
-    for (int i = 0; i < path->num_data; i += path->data[i].header.length) {
-        data = &path->data[i];
-        switch (data->header.type) {
-        case CAIRO_PATH_MOVE_TO:
-            if (i < (path->num_data - path->data[i].header.length))
-                pathString += String::format("M%.2f,%.2f ",
-                                      data[1].point.x, data[1].point.y);
-            break;
-        case CAIRO_PATH_LINE_TO:
-            pathString += String::format("L%.2f,%.2f ",
-                                      data[1].point.x, data[1].point.y);
-            break;
-        case CAIRO_PATH_CURVE_TO:
-            pathString += String::format("C%.2f,%.2f,%.2f,%.2f,%.2f,%.2f ",
-                                      data[1].point.x, data[1].point.y,
-                                      data[2].point.x, data[2].point.y,
-                                      data[3].point.x, data[3].point.y);
-            break;
-        case CAIRO_PATH_CLOSE_PATH:
-            pathString += "Z ";
-            break;
-        }
-    }
-
-    return pathString.simplifyWhiteSpace();
-}
-
 } // namespace WebCore
diff --git a/WebCore/platform/graphics/cg/PathCG.cpp b/WebCore/platform/graphics/cg/PathCG.cpp
index 90d4b8a..b47ed02 100644
--- a/WebCore/platform/graphics/cg/PathCG.cpp
+++ b/WebCore/platform/graphics/cg/PathCG.cpp
@@ -254,61 +254,9 @@ FloatPoint Path::currentPoint() const
     return CGPathGetCurrentPoint(m_path);
 }
 
-static void CGPathToCFStringApplierFunction(void* info, const CGPathElement *element)
-{
-    CFMutableStringRef string = static_cast<CFMutableStringRef>(info);
-
-    CGPoint* points = element->points;
-    switch (element->type) {
-    case kCGPathElementMoveToPoint:
-        CFStringAppendFormat(string, 0, CFSTR("M%.2f,%.2f "), points[0].x, points[0].y);
-        break;
-    case kCGPathElementAddLineToPoint:
-        CFStringAppendFormat(string, 0, CFSTR("L%.2f,%.2f "), points[0].x, points[0].y);
-        break;
-    case kCGPathElementAddQuadCurveToPoint:
-        CFStringAppendFormat(string, 0, CFSTR("Q%.2f,%.2f,%.2f,%.2f "),
-                points[0].x, points[0].y, points[1].x, points[1].y);
-        break;
-    case kCGPathElementAddCurveToPoint:
-        CFStringAppendFormat(string, 0, CFSTR("C%.2f,%.2f,%.2f,%.2f,%.2f,%.2f "),
-                points[0].x, points[0].y, points[1].x, points[1].y,
-                points[2].x, points[2].y);
-        break;
-    case kCGPathElementCloseSubpath:
-        CFStringAppendFormat(string, 0, CFSTR("Z "));
-        break;
-    }
-}
-
-static CFStringRef CFStringFromCGPath(CGPathRef path)
-{
-    if (!path)
-        return 0;
-
-    CFMutableStringRef string = CFStringCreateMutable(NULL, 0);
-    CGPathApply(path, string, CGPathToCFStringApplierFunction);
-    CFStringTrimWhitespace(string);
-
-
-    return string;
-}
-
-
 #pragma mark -
 #pragma mark Path Management
 
-String Path::debugString() const
-{
-    String result;
-    if (!isEmpty()) {
-        CFStringRef pathString = CFStringFromCGPath(m_path);
-        result = String(pathString);
-        CFRelease(pathString);
-    }
-    return result;
-}
-
 struct PathApplierInfo {
     void* info;
     PathApplierFunction function;
diff --git a/WebCore/platform/graphics/haiku/PathHaiku.cpp b/WebCore/platform/graphics/haiku/PathHaiku.cpp
index c5b8c98..5377e10 100644
--- a/WebCore/platform/graphics/haiku/PathHaiku.cpp
+++ b/WebCore/platform/graphics/haiku/PathHaiku.cpp
@@ -144,12 +144,6 @@ bool Path::isEmpty() const
     return !m_path->Frame().IsValid();
 }
 
-String Path::debugString() const
-{
-    notImplemented();
-    return String();
-}
-
 void Path::apply(void* info, PathApplierFunction function) const
 {
     notImplemented();
diff --git a/WebCore/platform/graphics/openvg/PathOpenVG.cpp b/WebCore/platform/graphics/openvg/PathOpenVG.cpp
index e74ea57..39a4b06 100644
--- a/WebCore/platform/graphics/openvg/PathOpenVG.cpp
+++ b/WebCore/platform/graphics/openvg/PathOpenVG.cpp
@@ -436,18 +436,6 @@ bool Path::hasCurrentPoint() const
     return vgGetParameteri(m_path->vgPath(), VG_PATH_NUM_SEGMENTS) > 0;
 }
 
-String Path::debugString() const
-{
-    String debugString = "";
-
-    // OpenVG provides no means to retrieve path segment information.
-    // This is a bit unfortunate, we might need to store the segments in
-    // memory if we want to implement this function properly.
-    notImplemented();
-
-    return debugString;
-}
-
 void Path::apply(void* info, PathApplierFunction function) const
 {
     // OpenVG provides no means to retrieve path segment information.
diff --git a/WebCore/platform/graphics/qt/PathQt.cpp b/WebCore/platform/graphics/qt/PathQt.cpp
index 1c441d5..508ba6a 100644
--- a/WebCore/platform/graphics/qt/PathQt.cpp
+++ b/WebCore/platform/graphics/qt/PathQt.cpp
@@ -357,41 +357,6 @@ FloatPoint Path::currentPoint() const
     return m_path.currentPosition();
 }
 
-String Path::debugString() const
-{
-    QString ret;
-    for (int i = 0; i < m_path.elementCount(); ++i) {
-        const QPainterPath::Element &cur = m_path.elementAt(i);
-
-        switch (cur.type) {
-            case QPainterPath::MoveToElement:
-                ret += QString(QLatin1String("M%1,%2 ")).arg(cur.x, 0, 'f', 2).arg(cur.y, 0, 'f', 2);
-                break;
-            case QPainterPath::LineToElement:
-                ret += QString(QLatin1String("L%1,%2 ")).arg(cur.x, 0, 'f', 2).arg(cur.y, 0, 'f', 2);
-                break;
-            case QPainterPath::CurveToElement:
-            {
-                const QPainterPath::Element &c1 = m_path.elementAt(i + 1);
-                const QPainterPath::Element &c2 = m_path.elementAt(i + 2);
-
-                Q_ASSERT(c1.type == QPainterPath::CurveToDataElement);
-                Q_ASSERT(c2.type == QPainterPath::CurveToDataElement);
-
-                ret += QString(QLatin1String("C%1,%2,%3,%4,%5,%6 ")).arg(cur.x, 0, 'f', 2).arg(cur.y, 0, 'f', 2).arg(c1.x, 0, 'f', 2)
-                                                                    .arg(c1.y, 0, 'f', 2).arg(c2.x, 0, 'f', 2).arg(c2.y, 0, 'f', 2);
-                i += 2;
-                break;
-            }
-            case QPainterPath::CurveToDataElement:
-                Q_ASSERT(false);
-                break;
-        }
-    }
-
-    return ret.trimmed();
-}
-
 void Path::apply(void* info, PathApplierFunction function) const
 {
     PathElement pelement;
diff --git a/WebCore/platform/graphics/skia/PathSkia.cpp b/WebCore/platform/graphics/skia/PathSkia.cpp
index 12241f8..89323c4 100644
--- a/WebCore/platform/graphics/skia/PathSkia.cpp
+++ b/WebCore/platform/graphics/skia/PathSkia.cpp
@@ -227,62 +227,6 @@ void Path::transform(const AffineTransform& xform)
     m_path->transform(xform);
 }
 
-String Path::debugString() const
-{
-    String result;
-
-    SkPath::Iter iter(*m_path, false);
-    SkPoint pts[4];
-
-    int numPoints = m_path->getPoints(0, 0);
-    SkPath::Verb verb;
-
-    do {
-        verb = iter.next(pts);
-        switch (verb) {
-        case SkPath::kMove_Verb:
-            result += String::format("M%.2f,%.2f ", pts[0].fX, pts[0].fY);
-            numPoints -= 1;
-            break;
-        case SkPath::kLine_Verb:
-          if (!iter.isCloseLine()) {
-                result += String::format("L%.2f,%.2f ", pts[1].fX, pts[1].fY); 
-                numPoints -= 1;
-            }
-            break;
-        case SkPath::kQuad_Verb:
-            result += String::format("Q%.2f,%.2f,%.2f,%.2f ",
-                pts[1].fX, pts[1].fY,
-                pts[2].fX, pts[2].fY);
-            numPoints -= 2;
-            break;
-        case SkPath::kCubic_Verb:
-            result += String::format("C%.2f,%.2f,%.2f,%.2f,%.2f,%.2f ",
-                pts[1].fX, pts[1].fY,
-                pts[2].fX, pts[2].fY,
-                pts[3].fX, pts[3].fY);
-            numPoints -= 3;
-            break;
-        case SkPath::kClose_Verb:
-            result += "Z ";
-            break;
-        case SkPath::kDone_Verb:
-            break;
-        }
-    } while (verb != SkPath::kDone_Verb);
-
-    // If you have a path that ends with an M, Skia will not iterate the
-    // trailing M. That's nice of it, but Apple's paths output the trailing M
-    // and we want out layout dumps to look like theirs
-    if (numPoints) {
-        ASSERT(numPoints==1);
-        m_path->getLastPt(pts);
-        result += String::format("M%.2f,%.2f ", pts[0].fX, pts[0].fY);
-    }
-
-    return result.stripWhiteSpace();
-}
-
 // Computes the bounding box for the stroke and style currently selected into
 // the given bounding box. This also takes into account the stroke width.
 static FloatRect boundingBoxForCurrentStroke(const GraphicsContext* context)
diff --git a/WebCore/platform/graphics/wince/PathWinCE.cpp b/WebCore/platform/graphics/wince/PathWinCE.cpp
index 4f0195c..fa4c8fb 100644
--- a/WebCore/platform/graphics/wince/PathWinCE.cpp
+++ b/WebCore/platform/graphics/wince/PathWinCE.cpp
@@ -123,11 +123,6 @@ bool Path::isEmpty() const
     return m_path->isEmpty();
 }
 
-String Path::debugString() const
-{
-    return m_path->debugString();
-}
-
 void Path::apply(void* info, PathApplierFunction function) const
 {
     m_path->apply(info, function);
diff --git a/WebCore/platform/graphics/wince/PlatformPathWinCE.cpp b/WebCore/platform/graphics/wince/PlatformPathWinCE.cpp
index 80e01a9..8534f89 100644
--- a/WebCore/platform/graphics/wince/PlatformPathWinCE.cpp
+++ b/WebCore/platform/graphics/wince/PlatformPathWinCE.cpp
@@ -754,43 +754,6 @@ void PlatformPath::addEllipse(const FloatRect& r)
     addEllipse(r.location() + radius, radius.width(), radius.height(), 0, 0, true);
 }
 
-String PlatformPath::debugString() const
-{
-    String ret;
-    for (PlatformPathElements::const_iterator i(m_elements.begin()); i != m_elements.end(); ++i) {
-        switch (i->platformType()) {
-        case PlatformPathElement::PathMoveTo:
-        case PlatformPathElement::PathLineTo:
-            ret += String::format("M %f %f\n", i->pointAt(0).m_x, i->pointAt(0).m_y);
-            break;
-        case PlatformPathElement::PathArcTo:
-            ret += String::format("A %f %f %f %f %f %f %c\n"
-                , i->arcTo().m_end.m_x, i->arcTo().m_end.m_y
-                , i->arcTo().m_center.m_x, i->arcTo().m_center.m_y
-                , i->arcTo().m_radius.m_x, i->arcTo().m_radius.m_y
-                , i->arcTo().m_clockwise? 'Y' : 'N');
-            break;
-        case PlatformPathElement::PathQuadCurveTo:
-            ret += String::format("Q %f %f %f %f\n"
-                , i->pointAt(0).m_x, i->pointAt(0).m_y
-                , i->pointAt(1).m_x, i->pointAt(1).m_y);
-            break;
-        case PlatformPathElement::PathBezierCurveTo:
-            ret += String::format("B %f %f %f %f %f %f\n"
-                , i->pointAt(0).m_x, i->pointAt(0).m_y
-                , i->pointAt(1).m_x, i->pointAt(1).m_y
-                , i->pointAt(2).m_x, i->pointAt(2).m_y);
-            break;
-        default:
-            ASSERT(i->platformType() == PlatformPathElement::PathCloseSubpath);
-            ret += "S\n";
-            break;
-        }
-    }
-
-    return ret;
-}
-
 void PlatformPath::apply(void* info, PathApplierFunction function) const
 {
     PathElement pelement;
diff --git a/WebCore/platform/graphics/wince/PlatformPathWinCE.h b/WebCore/platform/graphics/wince/PlatformPathWinCE.h
index 3414b04..4c86fc3 100644
--- a/WebCore/platform/graphics/wince/PlatformPathWinCE.h
+++ b/WebCore/platform/graphics/wince/PlatformPathWinCE.h
@@ -164,7 +164,6 @@ namespace WebCore {
         void addEllipse(const FloatPoint& p, float a, float b, float sar, float ear, bool anticlockwise);
         void addRect(const FloatRect& r);
         void addEllipse(const FloatRect& r);
-        String debugString() const;
         void apply(void* info, PathApplierFunction function) const;
 
     private:
diff --git a/WebCore/platform/graphics/wx/PathWx.cpp b/WebCore/platform/graphics/wx/PathWx.cpp
index 3006e27..f5355f2 100644
--- a/WebCore/platform/graphics/wx/PathWx.cpp
+++ b/WebCore/platform/graphics/wx/PathWx.cpp
@@ -117,12 +117,6 @@ bool Path::strokeContains(StrokeStyleApplier*, const FloatPoint&) const
     return false;
 }
 
-String Path::debugString() const
-{
-    notImplemented();
-    return String();
-}
-
 Path& Path::operator=(const Path& path)
 { 
     *m_path = *path.platformPath();
diff --git a/WebCore/svg/SVGGlyphElement.h b/WebCore/svg/SVGGlyphElement.h
index a7dd570..7dc7430 100644
--- a/WebCore/svg/SVGGlyphElement.h
+++ b/WebCore/svg/SVGGlyphElement.h
@@ -72,16 +72,15 @@ namespace WebCore {
 
         bool operator==(const SVGGlyphIdentifier& other) const
         {
-            return isValid == other.isValid &&
-                   orientation == other.orientation &&
-                   arabicForm == other.arabicForm &&
-                   glyphName == other.glyphName &&
-                   horizontalAdvanceX == other.horizontalAdvanceX &&
-                   verticalOriginX == other.verticalOriginX &&
-                   verticalOriginY == other.verticalOriginY &&
-                   verticalAdvanceY == other.verticalAdvanceY &&
-                   pathData.debugString() == other.pathData.debugString() &&
-                   languages == other.languages;
+            return isValid == other.isValid
+                && orientation == other.orientation
+                && arabicForm == other.arabicForm
+                && glyphName == other.glyphName
+                && horizontalAdvanceX == other.horizontalAdvanceX
+                && verticalOriginX == other.verticalOriginX
+                && verticalOriginY == other.verticalOriginY
+                && verticalAdvanceY == other.verticalAdvanceY
+                && languages == other.languages;
         }
 
         bool isValid : 1;

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list