Roll out r36719 and attempted build fixes r36121 and r36722 due to massive build...
authormrowe@apple.com <mrowe@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 21 Sep 2008 01:29:08 +0000 (01:29 +0000)
committermrowe@apple.com <mrowe@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 21 Sep 2008 01:29:08 +0000 (01:29 +0000)
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@36725 268f45cc-cd09-0410-ab3c-d52691b4dbfc

13 files changed:
WebCore/ChangeLog
WebCore/GNUmakefile.am
WebCore/WebCore.vcproj/WebCore.vcproj
WebCore/WebCore.xcodeproj/project.pbxproj
WebCore/platform/graphics/DashArray.h [deleted file]
WebCore/platform/graphics/GraphicsContext.h
WebCore/platform/graphics/cairo/GraphicsContextCairo.cpp
WebCore/platform/graphics/cg/GraphicsContextCG.cpp
WebCore/platform/graphics/qt/GraphicsContextQt.cpp
WebCore/svg/graphics/SVGPaintServer.cpp
WebCore/svg/graphics/SVGPaintServer.h
WebCore/svg/graphics/cg/CgSupport.cpp
WebCore/svg/graphics/cg/CgSupport.h

index f056c91..45fecf5 100644 (file)
@@ -9,33 +9,6 @@
         (WebCore::SVGInlineTextBoxQueryWalker::chunkPortionCallback): Changed to
         not include the first character in the extraCharsAvailable count.
 
-2008-09-20  Dan Bernstein  <mitz@apple.com>
-
-        - Mac build fix
-
-        * WebCore.xcodeproj/project.pbxproj: Made DashArray.h a private header.
-
-2008-09-20  Dirk Schulze  <vbs85@gmx.de>
-
-        Reviewed by eseidel.  Landed by eseidel.
-
-        Moved DashArray to the GraphicsContext.
-
-        * GNUmakefile.am:
-        * platform/graphics/DashArray.h: Added.
-        * platform/graphics/GraphicsContext.h:
-        * platform/graphics/cairo/GraphicsContextCairo.cpp:
-        (WebCore::GraphicsContext::setLineDash):
-        * platform/graphics/cg/GraphicsContextCG.cpp:
-        (WebCore::GraphicsContext::setLineDash):
-        * platform/graphics/qt/GraphicsContextQt.cpp:
-        (WebCore::GraphicsContext::setLineDash):
-        * svg/graphics/SVGPaintServer.cpp:
-        (WebCore::applyStrokeStyleToContext):
-        * svg/graphics/SVGPaintServer.h:
-        * svg/graphics/cg/CgSupport.cpp:
-        * svg/graphics/cg/CgSupport.h:
-
 2008-09-20  Kevin Ollivier  <kevino@theolliviers.com>
 
         Reviewed by Dan Bernstein.
index 50d24d8..45d85ee 100644 (file)
@@ -1566,7 +1566,6 @@ webcore_sources += \
        WebCore/platform/graphics/BitmapImage.h \
        WebCore/platform/graphics/Color.cpp \
        WebCore/platform/graphics/Color.h \
-       WebCore/platform/graphics/DashArray.h \
        WebCore/platform/graphics/FloatPoint.cpp \
        WebCore/platform/graphics/FloatPoint.h \
        WebCore/platform/graphics/FloatPoint3D.cpp \
index 1483e3e..56c1cae 100644 (file)
                                        >\r
                                </File>\r
                                <File\r
-                                       RelativePath="..\platform\graphics\DashArray.h"\r
-                                       >\r
-                               </File>\r
-                               <File\r
                                        RelativePath="..\platform\graphics\FloatPoint.cpp"\r
                                        >\r
                                </File>\r
index 90e6f40..c7d7a7c 100644 (file)
                A8C4A80D09D563270003AC8D /* Attr.h in Headers */ = {isa = PBXBuildFile; fileRef = A8C4A7FB09D563270003AC8D /* Attr.h */; settings = {ATTRIBUTES = (Private, ); }; };
                A8C4A80E09D563270003AC8D /* Attr.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A8C4A7FC09D563270003AC8D /* Attr.cpp */; };
                A8C4A84C09D5649D0003AC8D /* MappedAttributeEntry.h in Headers */ = {isa = PBXBuildFile; fileRef = A8C4A84B09D5649D0003AC8D /* MappedAttributeEntry.h */; settings = {ATTRIBUTES = (Private, ); }; };
-               A8CB41030E85B8A50032C4F0 /* DashArray.h in Headers */ = {isa = PBXBuildFile; fileRef = A8CB41020E85B8A50032C4F0 /* DashArray.h */; settings = {ATTRIBUTES = (Private, ); }; };
                A8CFF04D0A154F09000A4234 /* FixedTableLayout.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A8CFF0480A154F09000A4234 /* FixedTableLayout.cpp */; };
                A8CFF04E0A154F09000A4234 /* AutoTableLayout.h in Headers */ = {isa = PBXBuildFile; fileRef = A8CFF0490A154F09000A4234 /* AutoTableLayout.h */; };
                A8CFF04F0A154F09000A4234 /* FixedTableLayout.h in Headers */ = {isa = PBXBuildFile; fileRef = A8CFF04A0A154F09000A4234 /* FixedTableLayout.h */; };
                A8C4A7FB09D563270003AC8D /* Attr.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = Attr.h; sourceTree = "<group>"; };
                A8C4A7FC09D563270003AC8D /* Attr.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = Attr.cpp; sourceTree = "<group>"; };
                A8C4A84B09D5649D0003AC8D /* MappedAttributeEntry.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = MappedAttributeEntry.h; sourceTree = "<group>"; };
-               A8CB41020E85B8A50032C4F0 /* DashArray.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DashArray.h; sourceTree = "<group>"; };
                A8CFF0480A154F09000A4234 /* FixedTableLayout.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = FixedTableLayout.cpp; sourceTree = "<group>"; };
                A8CFF0490A154F09000A4234 /* AutoTableLayout.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = AutoTableLayout.h; sourceTree = "<group>"; };
                A8CFF04A0A154F09000A4234 /* FixedTableLayout.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = FixedTableLayout.h; sourceTree = "<group>"; };
                                A89943260B42338700D7C802 /* BitmapImage.h */,
                                B27535380B053814002CE64F /* Color.cpp */,
                                B27535390B053814002CE64F /* Color.h */,
-                               A8CB41020E85B8A50032C4F0 /* DashArray.h */,
                                B275353A0B053814002CE64F /* FloatPoint.cpp */,
                                B275353B0B053814002CE64F /* FloatPoint.h */,
                                B2E27C9D0B0F2B0900F17C7B /* FloatPoint3D.cpp */,
                                BC22747B0E8366E200E7F975 /* SVGRenderStyleDefs.h in Headers */,
                                B2F34FE60E82F81400F627CD /* DNS.h in Headers */,
                                089582560E857A7E00F82C83 /* ImageLoader.h in Headers */,
-                               A8CB41030E85B8A50032C4F0 /* DashArray.h in Headers */,
                        );
                        runOnlyForDeploymentPostprocessing = 0;
                };
diff --git a/WebCore/platform/graphics/DashArray.h b/WebCore/platform/graphics/DashArray.h
deleted file mode 100644 (file)
index 46b84a4..0000000
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
- * Copyright (C) 2008 Dirk Schulze <vbs85@gmx.de>
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE COMPUTER, INC. OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
- * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
- */
-
-#ifndef DashArray_h
-#define DashArray_h
-
-#include <wtf/Vector.h>
-
-#if PLATFORM(CG)
-typedef Vector<CGFloat> DashArray;
-#elif PLATFORM(CAIRO)
-typedef Vector<double> DashArray;
-#else
-typedef Vector<float> DashArray;
-#endif
-
-#endif // DashArray_h
index dc94ace..2d7c828 100644 (file)
@@ -26,7 +26,6 @@
 #ifndef GraphicsContext_h
 #define GraphicsContext_h
 
-#include "DashArray.h"
 #include "FloatRect.h"
 #include "Image.h"
 #include "IntRect.h"
@@ -232,7 +231,6 @@ namespace WebCore {
         IntRect focusRingBoundingRect();
 
         void setLineCap(LineCap);
-        void setLineDash(const DashArray&, float dashOffset);
         void setLineJoin(LineJoin);
         void setMiterLimit(float);
 
index 89ad096..b04b0fb 100644 (file)
@@ -807,11 +807,6 @@ void GraphicsContext::setLineCap(LineCap lineCap)
     cairo_set_line_cap(m_data->cr, cairoCap);
 }
 
-void GraphicsContext::setLineDash(const DashArray& dashes, float dashOffset)
-{
-    cairo_set_dash(m_data->cr, dashes.data(), dashes.size(), dashOffset);
-}
-
 void GraphicsContext::setLineJoin(LineJoin lineJoin)
 {
     if (paintingDisabled())
index 980a7cf..428ae04 100644 (file)
@@ -718,11 +718,6 @@ void GraphicsContext::setLineCap(LineCap cap)
     }
 }
 
-void GraphicsContext::setLineDash(const DashArray& dashes, float dashOffset)
-{
-    CGContextSetLineDash(platformContext(), dashOffset, dashes.data(), dashes.size());
-}
-
 void GraphicsContext::setLineJoin(LineJoin join)
 {
     if (paintingDisabled())
@@ -739,7 +734,7 @@ void GraphicsContext::setLineJoin(LineJoin join)
             break;
     }
 }
-
 void GraphicsContext::beginPath()
 {
     CGContextBeginPath(platformContext());
index 4d42e25..e3ac13e 100644 (file)
 #endif
 
 #include "AffineTransform.h"
+#include "Path.h"
+#include "Pattern.h"
 #include "Color.h"
-#include "Font.h"
 #include "GraphicsContext.h"
 #include "GraphicsContextPrivate.h"
 #include "ImageBuffer.h"
-#include "Path.h"
-#include "Pattern.h"
+#include "Font.h"
 #include "Pen.h"
 #include "NotImplemented.h"
 
-#include <QDebug>
+#include <QStack>
 #include <QPainter>
-#include <QPaintDevice>
-#include <QPaintEngine>
+#include <QPolygonF>
 #include <QPainterPath>
+#include <QPaintDevice>
 #include <QPixmap>
-#include <QPolygonF>
-#include <QStack>
-#include <QVector>
+#include <QPaintEngine>
+#include <QDebug>
 
 #ifndef M_PI
 #define M_PI 3.14159265358979323846
@@ -785,26 +784,6 @@ void GraphicsContext::setLineCap(LineCap lc)
     p->setPen(nPen);
 }
 
-void GraphicsContext::setLineDash(const DashArray& dashes, float dashOffset)
-{
-    QPainter* p = m_data->p();
-    QPen pen = p->pen();
-    unsigned dashLength = dashes.size();
-    if (dashLength) {
-        QVector<qreal> pattern;
-        unsigned count = dashLength;
-        if (dashLength % 2)
-            count *= 2;
-
-        for (unsigned i = 0; i < count; i++)
-            pattern.append(dashes[i % dashLength] / narrowPrecisionToFloat(pen.widthF()));
-
-        pen.setDashPattern(pattern);
-        pen.setDashOffset(dashOffset);
-    }
-    p->setPen(pen);
-}
-
 void GraphicsContext::setLineJoin(LineJoin lj)
 {
     if (paintingDisabled())
index 0240532..3dcfbbf 100644 (file)
@@ -29,7 +29,6 @@
 #if ENABLE(SVG)
 #include "SVGPaintServer.h"
 
-#include "GraphicsContext.h"
 #include "RenderObject.h"
 #include "RenderStyle.h"
 #include "SVGPaintServerSolid.h"
@@ -145,19 +144,6 @@ SVGPaintServer* SVGPaintServer::strokePaintServer(const RenderStyle* style, cons
     return strokePaintServer;
 }
 
-void applyStrokeStyleToContext(GraphicsContext* context, RenderStyle* style, const RenderObject* object)
-{
-    context->setStrokeThickness(SVGRenderStyle::cssPrimitiveToLength(object, style->svgStyle()->strokeWidth(), 1.0f));
-    context->setLineCap(style->svgStyle()->capStyle());
-    context->setLineJoin(style->svgStyle()->joinStyle());
-    if (style->svgStyle()->joinStyle() == MiterJoin)
-        context->setMiterLimit(style->svgStyle()->strokeMiterLimit());
-
-    const DashArray& dashes = dashArrayFromRenderingStyle(object->style());
-    float dashOffset = SVGRenderStyle::cssPrimitiveToLength(object, style->svgStyle()->strokeDashOffset(), 0.0f);
-    context->setLineDash(dashes, dashOffset);
-}
-
 DashArray dashArrayFromRenderingStyle(const RenderStyle* style)
 {
     DashArray array;
index 5904432..a74d62c 100644 (file)
@@ -28,7 +28,6 @@
 
 #if ENABLE(SVG)
 
-#include "DashArray.h"
 #include "SVGResource.h"
 
 #if PLATFORM(CG)
@@ -42,6 +41,12 @@ class QPen;
 QT_END_NAMESPACE
 #endif
 
+#if PLATFORM(CG)
+    typedef Vector<CGFloat> DashArray;
+#else
+    typedef Vector<float> DashArray;
+#endif
+
 namespace WebCore {
 
     enum SVGPaintServerType {
@@ -102,7 +107,6 @@ namespace WebCore {
 
     SVGPaintServer* getPaintServerById(Document*, const AtomicString&);
 
-    void applyStrokeStyleToContext(GraphicsContext*, RenderStyle*, const RenderObject*);
     DashArray dashArrayFromRenderingStyle(const RenderStyle* style);
 } // namespace WebCore
 
index 3632bb5..0dc305f 100644 (file)
@@ -48,6 +48,20 @@ CGAffineTransform CGAffineTransformMakeMapBetweenRects(CGRect source, CGRect des
     return transform;
 }
 
+void applyStrokeStyleToContext(GraphicsContext* context, RenderStyle* style, const RenderObject* object)
+{
+    context->setStrokeThickness(SVGRenderStyle::cssPrimitiveToLength(object, style->svgStyle()->strokeWidth(), 1.0f));
+    context->setLineCap(style->svgStyle()->capStyle());
+    context->setLineJoin(style->svgStyle()->joinStyle());
+    context->setMiterLimit(style->svgStyle()->strokeMiterLimit());
+
+    // FIXME: DashArray support could easily be moved into GraphicsContext, and this function then made x-platform
+    const DashArray& dashes = dashArrayFromRenderingStyle(style);
+    float dashOffset = SVGRenderStyle::cssPrimitiveToLength(object, style->svgStyle()->strokeDashOffset(), 0.0f);
+
+    CGContextSetLineDash(context->platformContext(), dashOffset, dashes.data(), dashes.size());
+}
+
 CGContextRef scratchContext()
 {
     static CGContextRef scratch = 0;
index b03a646..454e5b9 100644 (file)
@@ -43,6 +43,8 @@ class GraphicsContext;
 
 CGAffineTransform CGAffineTransformMakeMapBetweenRects(CGRect source, CGRect dest);
 
+void applyStrokeStyleToContext(GraphicsContext*, RenderStyle*, const RenderObject*);
+
 CGContextRef scratchContext();
 FloatRect strokeBoundingBox(const Path& path, RenderStyle*, const RenderObject*);