2006-10-05 Eric Seidel <eric@eseidel.com>
authoreseidel <eseidel@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 5 Oct 2006 13:52:39 +0000 (13:52 +0000)
committereseidel <eseidel@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 5 Oct 2006 13:52:39 +0000 (13:52 +0000)
        Reviewed by mjs.

        More incremental KCanvas cleanup and optimization.
        Added SVGRenderStyle::hasFill() and hasStroke() removed more KSVGPainterFactory methods.
        Optimized dash array usage to not malloc.
        Also removed un-needed KSVGRenderingStyle includes.

        * kcanvas/KCanvasTreeDebug.cpp:
        (WebCore::operator<<):
        * kcanvas/RenderPath.cpp:
        (WebCore::RenderPath::nodeAtPoint):
        * kcanvas/device/quartz/KCanvasItemQuartz.mm:
        (WebCore::RenderPath::strokeBBox):
        * kcanvas/device/quartz/KRenderingPaintServerGradientQuartz.mm:
        (WebCore::KRenderingPaintServerGradientQuartz::setup):
        (WebCore::KRenderingPaintServerGradientQuartz::renderPath):
        (WebCore::KRenderingPaintServerGradientQuartz::teardown):
        * kcanvas/device/quartz/KRenderingPaintServerQuartz.mm:
        (WebCore::KRenderingPaintServerSolidQuartz::setup):
        (WebCore::KRenderingPaintServerSolidQuartz::renderPath):
        (WebCore::KRenderingPaintServerPatternQuartz::setup):
        (WebCore::KRenderingPaintServerPatternQuartz::renderPath):
        * kcanvas/device/quartz/QuartzSupport.mm:
        (WebCore::applyStrokeStyleToContext):
        * ksvg2/css/SVGRenderStyle.h:
        (WebCore::SVGRenderStyle::hasStroke):
        (WebCore::SVGRenderStyle::hasFill):
        * ksvg2/misc/KCanvasRenderingStyle.cpp:
        (WebCore::KSVGPainterFactory::fillPaintServer):
        (WebCore::KSVGPainterFactory::strokePaintServer):
        * ksvg2/misc/KCanvasRenderingStyle.h:

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

26 files changed:
WebCore/ChangeLog
WebCore/kcanvas/KCanvasTreeDebug.cpp
WebCore/kcanvas/RenderPath.cpp
WebCore/kcanvas/RenderSVGContainer.cpp
WebCore/kcanvas/RenderSVGContainer.h
WebCore/kcanvas/RenderSVGImage.cpp
WebCore/kcanvas/device/KRenderingStrokePainter.h
WebCore/kcanvas/device/quartz/KCanvasItemQuartz.mm
WebCore/kcanvas/device/quartz/KRenderingPaintServerGradientQuartz.mm
WebCore/kcanvas/device/quartz/KRenderingPaintServerQuartz.mm
WebCore/kcanvas/device/quartz/QuartzSupport.mm
WebCore/ksvg2/css/SVGRenderStyle.h
WebCore/ksvg2/misc/KCanvasRenderingStyle.cpp
WebCore/ksvg2/misc/KCanvasRenderingStyle.h
WebCore/ksvg2/misc/SVGImageLoader.cpp
WebCore/ksvg2/svg/SVGFEImageElement.cpp
WebCore/ksvg2/svg/SVGFilterElement.cpp
WebCore/ksvg2/svg/SVGImageElement.cpp
WebCore/ksvg2/svg/SVGLength.cpp
WebCore/ksvg2/svg/SVGPatternElement.cpp
WebCore/ksvg2/svg/SVGRectElement.cpp
WebCore/ksvg2/svg/SVGSVGElement.cpp
WebCore/ksvg2/svg/SVGStyledElement.cpp
WebCore/ksvg2/svg/SVGStyledElement.h
WebCore/ksvg2/svg/SVGTextElement.cpp
WebCore/ksvg2/svg/SVGUseElement.cpp

index 60c585e65b6f5fe415d7ad54e618f05bde0e0c86..f5a4b0a7208f02a8e03460d33ffcaec063e0ed37 100644 (file)
@@ -1,3 +1,37 @@
+2006-10-05  Eric Seidel  <eric@eseidel.com>
+
+        Reviewed by mjs.
+
+        More incremental KCanvas cleanup and optimization.
+        Added SVGRenderStyle::hasFill() and hasStroke() removed more KSVGPainterFactory methods.
+        Optimized dash array usage to not malloc.
+        Also removed un-needed KSVGRenderingStyle includes.
+
+        * kcanvas/KCanvasTreeDebug.cpp:
+        (WebCore::operator<<):
+        * kcanvas/RenderPath.cpp:
+        (WebCore::RenderPath::nodeAtPoint):
+        * kcanvas/device/quartz/KCanvasItemQuartz.mm:
+        (WebCore::RenderPath::strokeBBox):
+        * kcanvas/device/quartz/KRenderingPaintServerGradientQuartz.mm:
+        (WebCore::KRenderingPaintServerGradientQuartz::setup):
+        (WebCore::KRenderingPaintServerGradientQuartz::renderPath):
+        (WebCore::KRenderingPaintServerGradientQuartz::teardown):
+        * kcanvas/device/quartz/KRenderingPaintServerQuartz.mm:
+        (WebCore::KRenderingPaintServerSolidQuartz::setup):
+        (WebCore::KRenderingPaintServerSolidQuartz::renderPath):
+        (WebCore::KRenderingPaintServerPatternQuartz::setup):
+        (WebCore::KRenderingPaintServerPatternQuartz::renderPath):
+        * kcanvas/device/quartz/QuartzSupport.mm:
+        (WebCore::applyStrokeStyleToContext):
+        * ksvg2/css/SVGRenderStyle.h:
+        (WebCore::SVGRenderStyle::hasStroke):
+        (WebCore::SVGRenderStyle::hasFill):
+        * ksvg2/misc/KCanvasRenderingStyle.cpp:
+        (WebCore::KSVGPainterFactory::fillPaintServer):
+        (WebCore::KSVGPainterFactory::strokePaintServer):
+        * ksvg2/misc/KCanvasRenderingStyle.h:
+
 2006-10-05  Maciej Stachowiak  <mjs@apple.com>
 
         Reviewed by Adam.
index f03a954530a2ab52d351790b2d91adfa1010ba61..23acaef44909f173bd56aa93be64f7e27367ae2b 100644 (file)
@@ -172,7 +172,8 @@ static void writeIndent(TextStream& ts, int indent)
 static TextStream& operator<<(TextStream& ts, const KCDashArray &a)
 {
     ts << "{";
-    for (KCDashArray::ConstIterator it = a.begin(); it != a.end(); ++it) {
+    KCDashArray::const_iterator end = a.end();
+    for (KCDashArray::const_iterator it = a.begin(); it != end; ++it) {
         if (it != a.begin())
             ts << ", ";
         ts << *it;
index 2d680f13b02b2dea3f97dc9d5e1bc5dfccf76a55..23856a84d13b39e55b1079e6a1f77aba2849f43f 100644 (file)
@@ -295,8 +295,8 @@ bool RenderPath::nodeAtPoint(NodeInfo& info, int _x, int _y, int _tx, int _ty, H
     bool isVisible = (style()->visibility() == VISIBLE);
     if (isVisible || !hitRules.requireVisible) {
         FloatPoint hitPoint(_x,_y);
-        if ((hitRules.canHitStroke && (KSVGPainterFactory::isStroked(style()) || !hitRules.requireStroke) && strokeContains(hitPoint, hitRules.requireStroke))
-            || (hitRules.canHitFill && (KSVGPainterFactory::isFilled(style()) || !hitRules.requireFill) && fillContains(hitPoint, hitRules.requireFill))) {
+        if ((hitRules.canHitStroke && (style()->svgStyle()->hasStroke() || !hitRules.requireStroke) && strokeContains(hitPoint, hitRules.requireStroke))
+            || (hitRules.canHitFill && (style()->svgStyle()->hasFill() || !hitRules.requireFill) && fillContains(hitPoint, hitRules.requireFill))) {
             setInnerNode(info);
             return true;
         }
index 068fe893952ca95e31873f50e0e84d9672d6d9e2..9b04316be8488395133348cb07b3ac0592994cdb 100644 (file)
@@ -26,7 +26,6 @@
 
 #include "KCanvasClipper.h"
 #include "KCanvasMasker.h"
-#include "KCanvasRenderingStyle.h"
 #include "KRenderingDevice.h"
 #include "SVGStyledElement.h"
 #include "GraphicsContext.h"
index ca04d634caecb1b073f38a1c675436f923f281dd..a122dc8586ee87d2ba67f1ab37164e28ee6d2563 100644 (file)
@@ -42,7 +42,6 @@ enum KCAlign {
     ALIGN_XMAXYMAX = 9
 };
 
-class KCanvasRenderingStyle;
 class SVGElement;
 
 class RenderSVGContainer : public RenderContainer
index 9ccb75dd6b7c79ea6317b04ad0627cbc9bb5d81c..a6827379404f188ecae729a535117a0862adcc02 100644 (file)
@@ -28,7 +28,6 @@
 #include "GraphicsContext.h"
 #include "KCanvasClipper.h"
 #include "KCanvasMasker.h"
-#include "KCanvasRenderingStyle.h"
 #include "KRenderingDevice.h"
 #include "SVGLength.h"
 #include "SVGPreserveAspectRatio.h"
index 7fdaf0113d090b5c16b507f13b0b442d5453f2eb..1c53d26da3e246e1a6b12e57eaf49c26d440dbee 100644 (file)
@@ -27,7 +27,6 @@
 #include "KCanvasRenderingStyle.h"
 
 namespace WebCore {
-class KCanvasRenderingStyle;
 class KRenderingPaintServer;
 class KRenderingDeviceContext;
 class KRenderingStrokePainter
index 64daab69c402f4896606b3a5bf2e025d0b130ef3..e6ad90ae9526fa347b7b12eefe27d27ea5db7e3d 100644 (file)
 
 #import <wtf/Assertions.h>
 
-#import "kcanvas/RenderPath.h"
-#import "KCanvasRenderingStyle.h"
-#import "KRenderingFillPainter.h"
-#import "KRenderingStrokePainter.h"
-
-#import "KRenderingDeviceQuartz.h"
 #import "KCanvasFilterQuartz.h"
-#import "KCanvasResourcesQuartz.h"
 #import "KCanvasMaskerQuartz.h"
+#import "KCanvasResourcesQuartz.h"
+#import "KRenderingDeviceQuartz.h"
+#import "KRenderingFillPainter.h"
+#import "KRenderingStrokePainter.h"
 #import "QuartzSupport.h"
-
+#import "RenderPath.h"
 #import "SVGRenderStyle.h"
 #import "SVGStyledElement.h"
-#import "KCanvasRenderingStyle.h"
-
 
 namespace WebCore {
 
 FloatRect RenderPath::strokeBBox() const
 {
-    if (KSVGPainterFactory::isStroked(style())) {
+    if (style()->svgStyle()->hasStroke()) {
         KRenderingStrokePainter strokePainter = KSVGPainterFactory::strokePainter(style(), this);
         return strokeBoundingBox(path(), strokePainter);
     }
index 09713af0367943e25c33edf53ce936881a73b78d..f047e4c178f1516be96d91e6a07c581436cc757a 100644 (file)
 #include "config.h"
 #ifdef SVG_SUPPORT
 #import "KRenderingPaintServerQuartz.h"
-#import "QuartzSupport.h"
-
-#import "RenderObject.h"
 
-#import "KCanvasRenderingStyle.h"
-#import "KRenderingPaintServer.h"
+#import "KCanvasImage.h"
+#import "KCanvasResourcesQuartz.h"
+#import "KRenderingDeviceQuartz.h"
 #import "KRenderingFillPainter.h"
+#import "KRenderingPaintServer.h"
 #import "KRenderingStrokePainter.h"
-#import "KRenderingDeviceQuartz.h"
-
-#import "KCanvasResourcesQuartz.h"
-#import "KCanvasImage.h"
+#import "QuartzSupport.h"
+#import "RenderObject.h"
 
 #import <wtf/Assertions.h>
 
@@ -241,13 +238,13 @@ bool KRenderingPaintServerGradientQuartz::setup(const KRenderingPaintServerGradi
     CGContextSaveGState(context);
     CGContextSetAlpha(context, renderStyle->opacity());
     
-    if ((type & APPLY_TO_FILL) && KSVGPainterFactory::isFilled(renderStyle)) {
+    if ((type & APPLY_TO_FILL) && renderStyle->svgStyle()->hasFill()) {
         CGContextSaveGState(context);
         if (server->isPaintingText())
             CGContextSetTextDrawingMode(context, kCGTextClip);
     }
 
-    if ((type & APPLY_TO_STROKE) && KSVGPainterFactory::isStroked(renderStyle)) {
+    if ((type & APPLY_TO_STROKE) && renderStyle->svgStyle()->hasStroke()) {
         CGContextSaveGState(context);
         applyStrokeStyleToContext(context, renderStyle, renderObject); // FIXME: this seems like the wrong place for this.
         if (server->isPaintingText()) {
@@ -276,9 +273,9 @@ void KRenderingPaintServerGradientQuartz::renderPath(const KRenderingPaintServer
     CGRect objectBBox;
     if (server->boundingBoxMode())
         objectBBox = CGContextGetPathBoundingBox(context);
-    if ((type & APPLY_TO_FILL) && KSVGPainterFactory::isFilled(renderStyle))
+    if ((type & APPLY_TO_FILL) && renderStyle->svgStyle()->hasFill())
         KRenderingPaintServerQuartzHelper::clipToFillPath(context, path);
-    if ((type & APPLY_TO_STROKE) && KSVGPainterFactory::isStroked(renderStyle))
+    if ((type & APPLY_TO_STROKE) && renderStyle->svgStyle()->hasStroke())
         KRenderingPaintServerQuartzHelper::clipToStrokePath(context, path);
     // make the gradient fit in the bbox if necessary.
     if (server->boundingBoxMode()) { // no support for bounding boxes around text yet!
@@ -303,14 +300,14 @@ void KRenderingPaintServerGradientQuartz::teardown(const KRenderingPaintServerGr
     RenderStyle* renderStyle = renderObject->style();
     ASSERT(context != NULL);
     
-    if ((type & APPLY_TO_FILL) && KSVGPainterFactory::isFilled(renderStyle)) {
+    if ((type & APPLY_TO_FILL) && renderStyle->svgStyle()->hasFill()) {
         // workaround for filling the entire screen with the shading in the case that no text was intersected with the clip
         if (!server->isPaintingText() || (renderObject->width() > 0 && renderObject->height() > 0))
             CGContextDrawShading(context, shading);
         CGContextRestoreGState(context);
     }
     
-    if ((type & APPLY_TO_STROKE) && KSVGPainterFactory::isStroked(renderStyle)) {
+    if ((type & APPLY_TO_STROKE) && renderStyle->svgStyle()->hasStroke()) {
         if (server->isPaintingText()) {
             int width  = 2048;
             int height = 2048; // FIXME??? SEE ABOVE
index 076219eadd651f49e271bd203918fd323fcbf318..f0332a3ff0e197f99abc35ebf74d601c3a3ee7c4 100644 (file)
@@ -88,7 +88,7 @@ bool KRenderingPaintServerSolidQuartz::setup(KRenderingDeviceContext* renderingC
     
     static CGColorSpaceRef deviceRGBColorSpace = CGColorSpaceCreateDeviceRGB(); // This should be shared from GraphicsContext, or some other central location
 
-    if ((type & APPLY_TO_FILL) && KSVGPainterFactory::isFilled(renderStyle)) {
+    if ((type & APPLY_TO_FILL) && renderStyle->svgStyle()->hasFill()) {
         CGFloat colorComponents[4];
         color().getRGBA(colorComponents[0], colorComponents[1], colorComponents[2], colorComponents[3]);
         ASSERT(!color().hasAlpha());
@@ -101,7 +101,7 @@ bool KRenderingPaintServerSolidQuartz::setup(KRenderingDeviceContext* renderingC
         }
     }
 
-    if ((type & APPLY_TO_STROKE) && KSVGPainterFactory::isStroked(renderStyle)) {
+    if ((type & APPLY_TO_STROKE) && renderStyle->svgStyle()->hasStroke()) {
         CGFloat colorComponents[4];
         color().getRGBA(colorComponents[0], colorComponents[1], colorComponents[2], colorComponents[3]);
         ASSERT(!color().hasAlpha());
@@ -123,9 +123,9 @@ void KRenderingPaintServerSolidQuartz::renderPath(KRenderingDeviceContext* rende
     RenderStyle* renderStyle = renderPath->style();
     KRenderingDeviceContextQuartz* quartzContext = static_cast<KRenderingDeviceContextQuartz*>(renderingContext);
     CGContextRef context = quartzContext->cgContext();    
-    if ((type & APPLY_TO_FILL) && KSVGPainterFactory::isFilled(renderStyle))
+    if ((type & APPLY_TO_FILL) && renderStyle->svgStyle()->hasFill())
         KRenderingPaintServerQuartzHelper::fillPath(context, renderPath);
-    if ((type & APPLY_TO_STROKE) && KSVGPainterFactory::isStroked(renderStyle))
+    if ((type & APPLY_TO_STROKE) && renderStyle->svgStyle()->hasStroke())
         KRenderingPaintServerQuartzHelper::strokePath(context, renderPath);
 }
 
@@ -190,7 +190,7 @@ bool KRenderingPaintServerPatternQuartz::setup(KRenderingDeviceContext* renderin
 
     m_patternSpace = CGColorSpaceCreatePattern(NULL);
 
-    if ((type & APPLY_TO_FILL) && KSVGPainterFactory::isFilled(renderStyle)) {
+    if ((type & APPLY_TO_FILL) && renderStyle->svgStyle()->hasFill()) {
         CGContextSetFillColorSpace(context, m_patternSpace);
         CGContextSetFillPattern(context, m_pattern, &alpha);
         if (isPaintingText()) {
@@ -199,7 +199,7 @@ bool KRenderingPaintServerPatternQuartz::setup(KRenderingDeviceContext* renderin
         }
     }
     
-    if ((type & APPLY_TO_STROKE) && KSVGPainterFactory::isStroked(renderStyle)) {
+    if ((type & APPLY_TO_STROKE) && renderStyle->svgStyle()->hasStroke()) {
         CGContextSetStrokeColorSpace(context, m_patternSpace);
         CGContextSetStrokePattern(context, m_pattern, &alpha);
         applyStrokeStyleToContext(context, renderStyle, renderObject);
@@ -219,10 +219,10 @@ void KRenderingPaintServerPatternQuartz::renderPath(KRenderingDeviceContext* ren
     KRenderingDeviceContextQuartz* quartzContext = static_cast<KRenderingDeviceContextQuartz*>(renderingContext);
     CGContextRef context = quartzContext->cgContext();
 
-    if ((type & APPLY_TO_FILL) && KSVGPainterFactory::isFilled(renderStyle))
+    if ((type & APPLY_TO_FILL) && renderStyle->svgStyle()->hasFill())
         KRenderingPaintServerQuartzHelper::fillPath(context, renderPath);
     
-    if ((type & APPLY_TO_STROKE) && KSVGPainterFactory::isStroked(renderStyle))
+    if ((type & APPLY_TO_STROKE) && renderStyle->svgStyle()->hasStroke())
         KRenderingPaintServerQuartzHelper::strokePath(context, renderPath);
 }
 
index f9e4f05a4de567694592e82de79a1c18bcbd7ef0..6fb26b27d9b8843a34a42d5ebfa7d344e3549602 100644 (file)
@@ -56,7 +56,6 @@ CGAffineTransform CGAffineTransformMakeMapBetweenRects(CGRect source, CGRect des
 
 void applyStrokeStyleToContext(CGContextRef context, const KRenderingStrokePainter& strokePainter)
 {
-
     /* Shouldn't all these be in the stroke painter? */
     CGContextSetLineWidth(context, strokePainter.strokeWidth());
 
@@ -68,15 +67,8 @@ void applyStrokeStyleToContext(CGContextRef context, const KRenderingStrokePaint
 
     CGContextSetMiterLimit(context, strokePainter.strokeMiterLimit());
 
-    KCDashArray dashes = strokePainter.dashArray();
-    if (dashes.count()) {
-        size_t dashCount = dashes.count();
-        CGFloat *lengths = (CGFloat *)malloc(dashCount * sizeof(CGFloat));
-        for (unsigned x = 0; x < dashCount; x++)
-            lengths[x] = dashes[x];
-        CGContextSetLineDash(context, strokePainter.dashOffset(), lengths, dashes.count());
-        free(lengths);
-    }
+    const KCDashArray& dashes = strokePainter.dashArray();
+    CGContextSetLineDash(context, strokePainter.dashOffset(), dashes.data(), dashes.size());
 }
 
 void applyStrokeStyleToContext(CGContextRef context, RenderStyle* renderStyle, const RenderObject* renderObject)
index 1bc9f11dcc9499b23c4bf918c3460b161c0c78f4..f73110b74969716bd97559186b01dc2327daf753 100644 (file)
@@ -114,7 +114,11 @@ namespace WebCore {
 
         RS_DEFINE_ATTRIBUTE_DATAREF_WITH_INITIAL(String, misc, filter, Filter, filter, String())
         RS_DEFINE_ATTRIBUTE_DATAREF_WITH_INITIAL(float, misc, floodOpacity, FloodOpacity, floodOpacity, 1.0)
-        RS_DEFINE_ATTRIBUTE_DATAREF_WITH_INITIAL(Color, misc, floodColor, FloodColor, floodColor, Color(0, 0, 0))    
+        RS_DEFINE_ATTRIBUTE_DATAREF_WITH_INITIAL(Color, misc, floodColor, FloodColor, floodColor, Color(0, 0, 0))
+        
+        // convenience
+        bool hasStroke() const { return (strokePaint()->paintType() != SVGPaint::SVG_PAINTTYPE_NONE); }
+        bool hasFill() const { return (fillPaint()->paintType() != SVGPaint::SVG_PAINTTYPE_NONE); }
 
     protected:
         // inherit
index 0a0f8e5305283c215ed3a491e4ca7dccc29e07b1..c3dea65cc7c05defdc94411027160c6e407b4bae 100644 (file)
@@ -48,16 +48,9 @@ static KRenderingPaintServerSolid* sharedSolidPaintServer()
     return _sharedSolidPaintServer;
 }
 
-bool KSVGPainterFactory::isFilled(const RenderStyle* style)
-{
-    if (style->svgStyle()->fillPaint()->paintType() == SVGPaint::SVG_PAINTTYPE_NONE)
-        return false;
-    return true;
-}
-
 KRenderingPaintServer* KSVGPainterFactory::fillPaintServer(const RenderStyle* style, const RenderObject* item)
 {
-    if (!isFilled(style))
+    if (!style->svgStyle()->hasFill())
         return 0;
 
     SVGPaint* fill = style->svgStyle()->fillPaint();
@@ -83,17 +76,9 @@ KRenderingPaintServer* KSVGPainterFactory::fillPaintServer(const RenderStyle* st
     return fillPaintServer;
 }
 
-
-bool KSVGPainterFactory::isStroked(const RenderStyle* style)
-{
-    if (style->svgStyle()->strokePaint()->paintType() == SVGPaint::SVG_PAINTTYPE_NONE)
-        return false;
-    return true;
-}
-
 KRenderingPaintServer* KSVGPainterFactory::strokePaintServer(const RenderStyle* style, const RenderObject* item)
 {
-    if (!isStroked(style))
+    if (!style->svgStyle()->hasStroke())
         return 0;
 
     SVGPaint* stroke = style->svgStyle()->strokePaint();
index d294aa8b5d857243a79c9e137d03fd04ec3bf2d5..28de42f5ff95aa50939cd5119d3e4e81c90db30e 100644 (file)
     Boston, MA 02111-1307, USA.
 */
 
-#ifndef KSVG_KCanvasRenderingStyle_H
-#define KSVG_KCanvasRenderingStyle_H
+#ifndef KCanvasRenderingStyle_H
+#define KCanvasRenderingStyle_H
 #ifdef SVG_SUPPORT
 
-#include "DeprecatedValueList.h"
+#include <wtf/Vector.h>
 
 namespace WebCore {
 
@@ -43,7 +43,11 @@ enum KCJoinStyle {
 };
 
 // Special types
-typedef DeprecatedValueList<float> KCDashArray;
+#if PLATFORM(CG)
+typedef Vector<CGFloat> KCDashArray;
+#else
+typedef Vector<float> KCDashArray;
+#endif
 
     class CSSValue;
     class KRenderingFillPainter;
@@ -57,10 +61,7 @@ typedef DeprecatedValueList<float> KCDashArray;
         static KRenderingFillPainter fillPainter(const RenderStyle*, const RenderObject*);
         static KRenderingStrokePainter strokePainter(const RenderStyle*, const RenderObject*);
 
-        static bool isStroked(const RenderStyle*);
         static KRenderingPaintServer* strokePaintServer(const RenderStyle*, const RenderObject*);
-
-        static bool isFilled(const RenderStyle*);
         static KRenderingPaintServer* fillPaintServer(const RenderStyle*, const RenderObject*);
 
         static double cssPrimitiveToLength(const RenderObject*, CSSValue*, double defaultValue = 0.0);
@@ -69,6 +70,6 @@ typedef DeprecatedValueList<float> KCDashArray;
 } // namespace WebCore
 
 #endif // SVG_SUPPORT
-#endif // KSVG_KCanvasRenderingStyle_H
+#endif // KCanvasRenderingStyle_H
 
 // vim:ts=4:noet
index a47e572fa6dc735ee9fd8538b9b462feca79d736..78c7e8945b663af893a817b15e80f53d5ea0cf25 100644 (file)
@@ -30,7 +30,6 @@
 #include "SVGImageElement.h"
 #include "SVGLength.h"
 #include "SVGMatrix.h"
-#include "KCanvasRenderingStyle.h"
 
 #include "RenderImage.h"
 
index 5d3e93471fdd96bc7a0669348c032e8d2fc8b5f9..20cbb467965150a9a6f222ba1e4640973c602d47 100644 (file)
 #include "CachedImage.h"
 #include "DocLoader.h"
 #include "Document.h"
-#include "KCanvasRenderingStyle.h"
-#include "KCanvasRenderingStyle.h"
-#include "SVGLength.h"
-#include "SVGPreserveAspectRatio.h"
+#include "KCanvasImage.h"
+#include "KRenderingDevice.h"
+#include "KRenderingFillPainter.h"
 #include "SVGHelper.h"
+#include "SVGLength.h"
 #include "SVGNames.h"
-#include <kcanvas/KCanvasImage.h>
-#include <kcanvas/device/KRenderingDevice.h>
-#include <kcanvas/device/KRenderingFillPainter.h>
+#include "SVGPreserveAspectRatio.h"
 
 namespace WebCore {
 
index 86d370d171a03564e9f8b3b5c4613b4c44771f33..037485ffc0361eebd1bc40beb10df625f18824fe 100644 (file)
@@ -32,7 +32,6 @@
 #include "SVGFilterElement.h"
 #include "SVGFilterPrimitiveStandardAttributes.h"
 #include "SVGLength.h"
-#include "KCanvasRenderingStyle.h"
 
 namespace WebCore {
 
index 56eab82ba0f4af647409e071d743636f6d0e610b..a8bfc2cab1d332ac39afae1ecc83c2168c3a3fad 100644 (file)
@@ -27,7 +27,6 @@
 
 #include "Attr.h"
 #include "CSSPropertyNames.h"
-#include "KCanvasRenderingStyle.h"
 #include "RenderSVGImage.h"
 #include "SVGLength.h"
 #include "SVGPreserveAspectRatio.h"
 #include "SVGNames.h"
 #include "SVGSVGElement.h"
 #include "XLinkNames.h"
-#include <kcanvas/RenderSVGContainer.h>
-#include <kcanvas/KCanvasImage.h>
+#include "RenderSVGContainer.h"
+#include "KCanvasImage.h"
 #include <wtf/Assertions.h>
 
-using namespace WebCore;
+namespace WebCore {
 
-SVGImageElement::SVGImageElement(const QualifiedName& tagName, Document *doc)
+SVGImageElement::SVGImageElement(const QualifiedName& tagName, Documentdoc)
     : SVGStyledTransformableElement(tagName, doc)
     , SVGTests()
     , SVGLangSpace()
@@ -115,6 +114,8 @@ void SVGImageElement::attach()
         imageObj->setCachedImage(m_imageLoader.image());
 }
 
+}
+
 // vim:ts=4:noet
 #endif // SVG_SUPPORT
 
index 7365a238a128003bf65228aaad2dfef77a11893a..2b292235e31e132b0177ccb57021280dfa404625 100644 (file)
 
 #include "config.h"
 #ifdef SVG_SUPPORT
-#include "IntRect.h"
-
-#include <kcanvas/RenderPath.h>
-#include "KCanvasRenderingStyle.h"
-
-#include "ksvg.h"
-#include "svgpathparser.h"
 #include "SVGLength.h"
+
+#include "IntRect.h"
+#include "RenderPath.h"
 #include "SVGElement.h"
-#include "SVGSVGElement.h"
 #include "SVGLength.h"
+#include "SVGSVGElement.h"
+#include "ksvg.h"
+#include "svgpathparser.h"
 
 #include <math.h>
 
index 6b8d0c5ba8a3238511145794b194e2d233aa40df..374a5ce9bcc669f14df33d1494c4c96d848a76c3 100644 (file)
@@ -29,7 +29,6 @@
 #include "GraphicsContext.h"
 #include "RenderSVGContainer.h"
 #include "KCanvasImage.h"
-#include "KCanvasRenderingStyle.h"
 #include "KRenderingDevice.h"
 #include "KRenderingPaintServerPattern.h"
 #include "SVGLength.h"
index 9b78ffc90a5a904b2924b6e37fe5fd24be4884b5..a62dffa53f5412e146b4790e85dbca01e925aa47 100644 (file)
 
 #include "config.h"
 #ifdef SVG_SUPPORT
-#include "Attr.h"
+#include "SVGRectElement.h"
 
-#include "SVGNames.h"
+#include "Attr.h"
+#include "KRenderingDevice.h"
+#include "KRenderingFillPainter.h"
+#include "KRenderingPaintServerSolid.h"
 #include "SVGHelper.h"
-#include "SVGRectElement.h"
 #include "SVGLength.h"
-
-#include "KCanvasRenderingStyle.h"
-#include <kcanvas/device/KRenderingDevice.h>
-#include <kcanvas/device/KRenderingFillPainter.h>
-#include <kcanvas/device/KRenderingPaintServerSolid.h>
+#include "SVGNames.h"
 
 namespace WebCore {
 
index 28e7b85c6784dd37f459b39f09c5a15b8a367ce4..3ff9da2af850e5fbe7049ee01dab11ace18907a8 100644 (file)
@@ -29,7 +29,6 @@
 #include "EventListener.h"
 #include "EventNames.h"
 #include "HTMLNames.h"
-#include "KCanvasRenderingStyle.h"
 #include "KSVGTimeScheduler.h"
 #include "SVGAngle.h"
 #include "SVGLength.h"
index 4300bf7ddfe45bfe22a6e93fa6f3114dac477efe..95507313d0e9612d11a2a170a4777f153c09828e 100644 (file)
@@ -27,7 +27,6 @@
 #include "Attr.h"
 #include "HTMLNames.h"
 #include "Document.h"
-#include "KCanvasRenderingStyle.h"
 #include "KRenderingDevice.h"
 #include "PlatformString.h"
 #include "RenderView.h"
index 5fb25f53869604a85c2cb21efab631a0bfa63741..aa59b80c4c24f971fe6b56a7ccbf47a0b6f58f5a 100644 (file)
@@ -33,7 +33,6 @@
 namespace WebCore {
 
     class CSSStyleDeclaration;
-    class KCanvasRenderingStyle;
     class KCanvasResource;
     class KRenderingDevice;
     class RenderPath;
index 2e4309be09aea54a7659f2517f0cff36b3ad62c2..c538cb15315ab4c5be787c6e59c995b7cf989236 100644 (file)
 #ifdef SVG_SUPPORT
 #include "SVGTextElement.h"
 
-#include "KCanvasRenderingStyle.h"
 #include "SVGLengthList.h"
 #include "SVGTransformList.h"
 #include "SVGMatrix.h"
 #include "SVGRenderStyle.h"
 #include "SVGTSpanElement.h"
 #include "RenderStyle.h"
-#include <kcanvas/RenderSVGText.h>
+#include "RenderSVGText.h"
 #include "FloatRect.h"
 
 namespace WebCore {
index 7041ed34c228146c3b25f8b0ccae47a9838c7382..82824de28c8ea94f869a3b0ce80241f7a3c81015 100644 (file)
@@ -26,8 +26,6 @@
 
 #include "Attr.h"
 #include "Document.h"
-#include "KCanvasRenderingStyle.h"
-#include "KCanvasRenderingStyle.h"
 #include "SVGLength.h"
 #include "SVGPreserveAspectRatio.h"
 #include "SVGGElement.h"
 #include "SVGSVGElement.h"
 #include "SVGSymbolElement.h"
 #include "ksvg.h"
-#include <kcanvas/RenderSVGContainer.h>
-#include <kcanvas/device/KRenderingDevice.h>
+#include "RenderSVGContainer.h"
+#include "KRenderingDevice.h"
 
-using namespace WebCore;
+namespace WebCore {
 
-SVGUseElement::SVGUseElement(const QualifiedName& tagName, Document *doc)
+SVGUseElement::SVGUseElement(const QualifiedName& tagName, Documentdoc)
     : SVGStyledTransformableElement(tagName, doc)
     , SVGTests()
     , SVGLangSpace()
@@ -161,6 +159,8 @@ RenderObject* SVGUseElement::createRenderer(RenderArena* arena, RenderStyle*)
     return new (arena) RenderSVGContainer(this);
 }
 
+}
+
 // vim:ts=4:noet
 #endif // SVG_SUPPORT