Reviewed by Maciej.
authorrwlbuis <rwlbuis@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 26 Nov 2006 13:09:00 +0000 (13:09 +0000)
committerrwlbuis <rwlbuis@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 26 Nov 2006 13:09:00 +0000 (13:09 +0000)
        http://bugs.webkit.org/show_bug.cgi?id=11693
        Fix the Qt build, adapt to various enum/class renamings.

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

WebCore/ChangeLog
WebCore/kcanvas/device/qt/KRenderingDeviceQt.cpp
WebCore/kcanvas/device/qt/KRenderingDeviceQt.h
WebCore/platform/graphics/svg/qt/SVGPaintServerLinearGradientQt.cpp
WebCore/platform/graphics/svg/qt/SVGPaintServerQt.cpp
WebCore/platform/graphics/svg/qt/SVGPaintServerRadialGradientQt.cpp
WebCore/platform/graphics/svg/qt/SVGPaintServerSolidQt.cpp

index 74d335521a461f342598e09c961e04be1de91835..c58081ea03f7915cdfa366dbe22500846db79880 100644 (file)
@@ -1,3 +1,23 @@
+2006-11-26  Simon Hausmann  <hausmann@kde.org>
+
+        Reviewed by Maciej.
+
+        http://bugs.webkit.org/show_bug.cgi?id=11693
+        Fix the Qt build, adapt to various enum/class renamings.
+
+        * kcanvas/device/qt/KRenderingDeviceQt.cpp:
+        (WebCore::KRenderingDeviceQt::createResource):
+        (WebCore::KRenderingDeviceQt::createPaintServer):
+        * kcanvas/device/qt/KRenderingDeviceQt.h:
+        * platform/graphics/svg/qt/SVGPaintServerLinearGradientQt.cpp:
+        (WebCore::SVGPaintServerLinearGradient::setup):
+        * platform/graphics/svg/qt/SVGPaintServerQt.cpp:
+        (WebCore::SVGPaintServer::renderPath):
+        * platform/graphics/svg/qt/SVGPaintServerRadialGradientQt.cpp:
+        (WebCore::setup):
+        * platform/graphics/svg/qt/SVGPaintServerSolidQt.cpp:
+        (WebCore::SVGPaintServerSolid::setup):
+
 2006-11-24  Rob Buis  <buis@kde.org>
 
         Reviewed by Mitz.
index 59fbc5b4304c8aba5e3b9252fa66e75634c6f76d..c045cab987c8ee5c7d8b2188612bdd08a78455ef 100644 (file)
 #include "SVGResourceClipper.h"
 #include "SVGResourceMarker.h"
 #include "KRenderingDeviceQt.h"
-#include "KRenderingPaintServerSolidQt.h"
-#include "KRenderingPaintServerGradientQt.h"
-#include "KRenderingPaintServerPatternQt.h"
+#include "SVGPaintServerSolid.h"
+#include "SVGPaintServerLinearGradient.h"
+#include "SVGPaintServerRadialGradient.h"
+#include "SVGPaintServerPattern.h"
 
 namespace WebCore {
 
@@ -146,33 +147,33 @@ PassRefPtr<SVGResource> KRenderingDeviceQt::createResource(const SVGResourceType
 {
     switch (type)
     {
-        case RS_CLIPPER:
+        case ClipperResourceType:
             return new SVGResourceClipper();
-        case RS_MARKER:
+        case MarkerResourceType:
             return new SVGResourceMarker(); // Use default implementation...
-        case RS_IMAGE:
+        case ImageResourceType:
             // return new SVGResourceImageQt();
-        case RS_FILTER:
+        case FilterResourceType:
             // return new KCanvasFilterQt();
-        case RS_MASKER:
+        case MaskerResourceType:
             // return new KCanvasMaskerQt();
         default:
             return 0;
     }
 }
 
-PassRefPtr<KRenderingPaintServer> KRenderingDeviceQt::createPaintServer(const KCPaintServerType& type) const
+PassRefPtr<SVGPaintServer> KRenderingDeviceQt::createPaintServer(const SVGPaintServerType& type) const
 {
     switch (type)
     {
-        case PS_SOLID:
-            return new KRenderingPaintServerSolidQt();
-        case PS_PATTERN:
-            return new KRenderingPaintServerPatternQt();
-        case PS_LINEAR_GRADIENT:
-            return new KRenderingPaintServerLinearGradientQt();
-        case PS_RADIAL_GRADIENT:
-            return new KRenderingPaintServerRadialGradientQt();
+        case SolidPaintServer:
+            return new SVGPaintServerSolid();
+        case PatternPaintServer:
+            return new SVGPaintServerPattern();
+        case LinearGradientPaintServer:
+            return new SVGPaintServerLinearGradient();
+        case RadialGradientPaintServer:
+            return new SVGPaintServerRadialGradient();
         default:
             return 0;
     }
index 2fdf339e2176b4a11a2b9d97f2f5415bb2fe98d6..a5d0a46e37f2c447a388095ac2470ccfff12a5b2 100644 (file)
@@ -26,6 +26,7 @@
 #include <QPainter>
 #include <QPainterPath>
 
+#include "Path.h"
 #include "KRenderingDevice.h"
 
 namespace WebCore {
@@ -78,7 +79,7 @@ public:
 
     // Resource creation
     virtual PassRefPtr<SVGResource> createResource(const SVGResourceType&) const;
-    virtual PassRefPtr<KRenderingPaintServer> createPaintServer(const KCPaintServerType&) const;
+    virtual PassRefPtr<SVGPaintServer> createPaintServer(const SVGPaintServerType&) const;
     virtual SVGFilterEffect* createFilterEffect(const SVGFilterEffectType&) const;
 };
 
index c8850399096364e08f9f78a4cfa4c094fc6ea67d..dd9ce3f22bb5ff07295f0187a0f83c0630e4b479 100644 (file)
@@ -70,7 +70,7 @@ bool SVGPaintServerLinearGradient::setup(KRenderingDeviceContext* context, const
 
     // TODO: Gradient transform + opacity fixes!
 
-    if ((type & APPLY_TO_FILL) && renderStyle->svgStyle()->hasFill()) {
+    if ((type & ApplyToFillTargetType) && renderStyle->svgStyle()->hasFill()) {
         fillColorArray(gradient, gradientStops(), opacity);
 
         QBrush brush(gradient);
@@ -79,7 +79,7 @@ bool SVGPaintServerLinearGradient::setup(KRenderingDeviceContext* context, const
         qtContext->setFillRule(renderStyle->svgStyle()->fillRule());
     }
 
-    if ((type & APPLY_TO_STROKE) && renderStyle->svgStyle()->hasStroke()) {
+    if ((type & ApplyToStrokeTargetType) && renderStyle->svgStyle()->hasStroke()) {
         fillColorArray(gradient, gradientStops(), opacity);
 
         QPen pen;
index 1dff0295f18e30bef3ee76bf6692ce6ce3839bd4..29fff047e0871636acd1e2e54fdc77aac3c70855 100644 (file)
@@ -85,10 +85,10 @@ void SVGPaintServer::renderPath(KRenderingDeviceContext* context, const RenderPa
     RenderStyle* renderStyle = path->style();
     KRenderingDeviceContextQt* qtContext = static_cast<KRenderingDeviceContextQt*>(context);
 
-    if ((type & APPLY_TO_FILL) && renderStyle->svgStyle()->hasFill())
+    if ((type & ApplyToFillTargetType) && renderStyle->svgStyle()->hasFill())
         qtContext->fillPath();
 
-    if ((type & APPLY_TO_STROKE) && renderStyle->svgStyle()->hasStroke())
+    if ((type & ApplyToStrokeTargetType) && renderStyle->svgStyle()->hasStroke())
         qtContext->strokePath();
 }
 
index e7ebd65a8a4527cc9a53d76917c26fc3d381a334..4193adfae98dc7bbb8fd60bafdc0704ab81703e8 100644 (file)
@@ -102,7 +102,7 @@ bool SVGPaintServerRadialGradient:: setup(KRenderingDeviceContext* context, cons
     // gradientTrans.map(cx, cy, &cx, &cy);
     // qtContext->painter().setMatrix(mat);
 
-    if ((type & APPLY_TO_FILL) && renderStyle->svgStyle()->hasFill()) {
+    if ((type & ApplyToFillTargetType) && renderStyle->svgStyle()->hasFill()) {
         fillColorArray(gradient, gradientStops(), opacity);
 
         QBrush brush(gradient);
@@ -111,7 +111,7 @@ bool SVGPaintServerRadialGradient:: setup(KRenderingDeviceContext* context, cons
         qtContext->setFillRule(renderStyle->svgStyle()->fillRule());
     }
 
-    if ((type & APPLY_TO_STROKE) && renderStyle->svgStyle()->hasStroke()) {
+    if ((type & ApplyToStrokeTargetType) && renderStyle->svgStyle()->hasStroke()) {
         fillColorArray(gradient, gradientStops(), opacity);
 
         QPen pen;
index 408ac650ae65ebb017989920da13bbae2a3d33ad..46cbf1746f3df33f6a87e2d53cc4c4b7e70126cf 100644 (file)
@@ -38,7 +38,7 @@ bool SVGPaintServerSolid::setup(KRenderingDeviceContext* context, const RenderOb
 
     QColor c = color();
 
-    if ((type & APPLY_TO_FILL) && renderStyle->svgStyle()->hasFill()) {
+    if ((type & ApplyToFillTargetType) && renderStyle->svgStyle()->hasFill()) {
         c.setAlphaF(renderStyle->svgStyle()->fillOpacity());
 
         QBrush brush(c);
@@ -48,7 +48,7 @@ bool SVGPaintServerSolid::setup(KRenderingDeviceContext* context, const RenderOb
         /* if(isPaintingText()) ... */
     }
 
-    if((type & APPLY_TO_STROKE) && renderStyle->svgStyle()->hasStroke()) {
+    if ((type & ApplyToStrokeTargetType) && renderStyle->svgStyle()->hasStroke()) {
         c.setAlphaF(renderStyle->svgStyle()->strokeOpacity());
 
         QPen pen(c);