Reviewed and landed by ap.
Fix Qt/Linux build, adapt to Eric's Quartz changes and to Maciej's ResourceLoader changes.
* kcanvas/device/qt/KRenderingPaintServerGradientQt.cpp:
(WebCore::KRenderingPaintServerLinearGradientQt::renderPath):
(WebCore::KRenderingPaintServerLinearGradientQt::setup):
(WebCore::KRenderingPaintServerRadialGradientQt::setup):
(WebCore::KRenderingPaintServerRadialGradientQt::renderPath):
* kcanvas/device/qt/KRenderingPaintServerPatternQt.cpp:
(WebCore::KRenderingPaintServerPatternQt::renderPath):
* kcanvas/device/qt/KRenderingPaintServerQt.cpp:
(WebCore::KRenderingPaintServerQt::setPenProperties):
* kcanvas/device/qt/KRenderingPaintServerSolidQt.cpp:
(WebCore::KRenderingPaintServerSolidQt::setup):
(WebCore::KRenderingPaintServerSolidQt::renderPath):
* kcanvas/device/qt/RenderPathQt.cpp:
(WebCore::getPathStroke):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@16810
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
+2006-10-05 Nikolas Zimmermann <zimmermann@kde.org>
+
+ Reviewed and landed by ap.
+
+ Fix Qt/Linux build, adapt to Eric's quartz changes and to Maciej's ResourceLoader changes.
+
+ * kcanvas/device/qt/KRenderingPaintServerGradientQt.cpp:
+ (WebCore::KRenderingPaintServerLinearGradientQt::renderPath):
+ (WebCore::KRenderingPaintServerLinearGradientQt::setup):
+ (WebCore::KRenderingPaintServerRadialGradientQt::setup):
+ (WebCore::KRenderingPaintServerRadialGradientQt::renderPath):
+ * kcanvas/device/qt/KRenderingPaintServerPatternQt.cpp:
+ (WebCore::KRenderingPaintServerPatternQt::renderPath):
+ * kcanvas/device/qt/KRenderingPaintServerQt.cpp:
+ (WebCore::KRenderingPaintServerQt::setPenProperties):
+ * kcanvas/device/qt/KRenderingPaintServerSolidQt.cpp:
+ (WebCore::KRenderingPaintServerSolidQt::setup):
+ (WebCore::KRenderingPaintServerSolidQt::renderPath):
+ * kcanvas/device/qt/RenderPathQt.cpp:
+ (WebCore::getPathStroke):
+
2006-10-05 Alexey Proskuryakov <ap@nypop.com>
Reviewed by Darin.
RenderStyle* renderStyle = path->style();
KRenderingDeviceContextQt* qtContext = static_cast<KRenderingDeviceContextQt*>(context);
- if ((type & APPLY_TO_FILL) && KSVGPainterFactory::isFilled(renderStyle))
+ if ((type & APPLY_TO_FILL) && renderStyle->svgStyle()->hasFill())
qtContext->fillPath();
- if ((type & APPLY_TO_STROKE) && KSVGPainterFactory::isStroked(renderStyle))
+ if ((type & APPLY_TO_STROKE) && renderStyle->svgStyle()->hasStroke())
qtContext->strokePath();
}
// TODO: Gradient transform + opacity fixes!
- if ((type & APPLY_TO_FILL) && KSVGPainterFactory::isFilled(renderStyle)) {
+ if ((type & APPLY_TO_FILL) && renderStyle->svgStyle()->hasFill()) {
KRenderingFillPainter fillPainter = KSVGPainterFactory::fillPainter(renderStyle, object);
fill_color_array(gradient, gradientStops(), opacity);
qtContext->setFillRule(fillPainter.fillRule());
}
- if ((type & APPLY_TO_STROKE) && KSVGPainterFactory::isStroked(renderStyle)) {
+ if ((type & APPLY_TO_STROKE) && renderStyle->svgStyle()->hasStroke()) {
KRenderingStrokePainter strokePainter = KSVGPainterFactory::strokePainter(renderStyle, object);
fill_color_array(gradient, gradientStops(), opacity);
// gradientTrans.map(cx, cy, &cx, &cy);
// qtContext->painter().setMatrix(mat);
- if ((type & APPLY_TO_FILL) && KSVGPainterFactory::isFilled(renderStyle)) {
+ if ((type & APPLY_TO_FILL) && renderStyle->svgStyle()->hasFill()) {
KRenderingFillPainter fillPainter = KSVGPainterFactory::fillPainter(renderStyle, object);
fill_color_array(gradient, gradientStops(), opacity);
qtContext->setFillRule(fillPainter.fillRule());
}
- if ((type & APPLY_TO_STROKE) && KSVGPainterFactory::isStroked(renderStyle)) {
+ if ((type & APPLY_TO_STROKE) && renderStyle->svgStyle()->hasStroke()) {
KRenderingStrokePainter strokePainter = KSVGPainterFactory::strokePainter(renderStyle, object);
fill_color_array(gradient, gradientStops(), opacity);
RenderStyle* renderStyle = path->style();
KRenderingDeviceContextQt* qtContext = static_cast<KRenderingDeviceContextQt*>(context);
- if ((type & APPLY_TO_FILL) && KSVGPainterFactory::isFilled(renderStyle))
+ if ((type & APPLY_TO_FILL) && renderStyle->svgStyle()->hasFill())
qtContext->fillPath();
- if ((type & APPLY_TO_STROKE) && KSVGPainterFactory::isStroked(renderStyle))
+ if ((type & APPLY_TO_STROKE) && renderStyle->svgStyle()->hasStroke())
qtContext->strokePath();
}
RenderStyle* renderStyle = path->style();
KRenderingDeviceContextQt* qtContext = static_cast<KRenderingDeviceContextQt*>(context);
- if ((type & APPLY_TO_FILL) && KSVGPainterFactory::isFilled(renderStyle))
+ if ((type & APPLY_TO_FILL) && renderStyle->svgStyle()->hasFill())
qtContext->fillPath();
- if ((type & APPLY_TO_STROKE) && KSVGPainterFactory::isStroked(renderStyle))
+ if ((type & APPLY_TO_STROKE) && renderStyle->svgStyle()->hasStroke())
qtContext->strokePath();
}
} else if(strokePainter.strokeJoinStyle() == JOIN_ROUND)
pen.setJoinStyle(Qt::RoundJoin);
- KCDashArray dashes = strokePainter.dashArray();
- unsigned int dashLength = !dashes.isEmpty() ? dashes.count() : 0;
+ const KCDashArray& dashes = strokePainter.dashArray();
+ unsigned int dashLength = !dashes.isEmpty() ? dashes.size() : 0;
if(dashLength) {
QVector<qreal> pattern;
unsigned int count = (dashLength % 2) == 0 ? dashLength : dashLength * 2;
QColor c = color();
- if ((type & APPLY_TO_FILL) && KSVGPainterFactory::isFilled(renderStyle)) {
+ if ((type & APPLY_TO_FILL) && renderStyle->svgStyle()->hasFill()) {
KRenderingFillPainter fillPainter = KSVGPainterFactory::fillPainter(renderStyle, object);
c.setAlphaF(fillPainter.opacity());
/* if(isPaintingText()) ... */
}
- if((type & APPLY_TO_STROKE) && KSVGPainterFactory::isStroked(renderStyle)) {
+ if((type & APPLY_TO_STROKE) && renderStyle->svgStyle()->hasStroke()) {
KRenderingStrokePainter strokePainter = KSVGPainterFactory::strokePainter(renderStyle, object);
c.setAlphaF(strokePainter.opacity());
RenderStyle* renderStyle = path->style();
KRenderingDeviceContextQt* qtContext = static_cast<KRenderingDeviceContextQt*>(context);
- if ((type & APPLY_TO_FILL) && KSVGPainterFactory::isFilled(renderStyle))
+ if ((type & APPLY_TO_FILL) && renderStyle->svgStyle()->hasFill())
qtContext->fillPath();
- if ((type & APPLY_TO_STROKE) && KSVGPainterFactory::isStroked(renderStyle))
+ if ((type & APPLY_TO_STROKE) && renderStyle->svgStyle()->hasStroke())
qtContext->strokePath();
}
} else if(strokePainter.strokeJoinStyle() == JOIN_ROUND)
s.setJoinStyle(Qt::RoundJoin);
- KCDashArray dashes = strokePainter.dashArray();
- unsigned int dashLength = !dashes.isEmpty() ? dashes.count() : 0;
+ const KCDashArray& dashes = strokePainter.dashArray();
+ unsigned int dashLength = !dashes.isEmpty() ? dashes.size() : 0;
if(dashLength) {
QVector<qreal> pattern;
unsigned int count = (dashLength % 2) == 0 ? dashLength : dashLength * 2;
m_frame->didOpenURL(url);
m_beginCalled = false;
- ResourceLoader* job = new ResourceLoader(this, "GET", url);
- job->start(0);
+ RefPtr<ResourceLoader> loader = ResourceLoader::create(this, "GET", url);
+ loader->start(0);
}
void FrameQtClientDefault::submitForm(const String& method, const KURL& url, const FormData* postData)
{
m_beginCalled = false;
- ResourceLoader* job = new ResourceLoader(this, method, url, *postData);
- job->start(0);
+ RefPtr<ResourceLoader> loader = ResourceLoader::create(this, method, url, *postData);
+ loader->start(0);
}
void FrameQtClientDefault::receivedResponse(ResourceLoader*, PlatformResponse)
bool ResourceLoader::start(DocLoader*)
{
+ ref();
ResourceLoaderManager::self()->add(this);
return true;
}