OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2004, 2005, 2007 Nikolas Zimmermann <zimmermann@kde.org> | 2 * Copyright (C) 2004, 2005, 2007 Nikolas Zimmermann <zimmermann@kde.org> |
3 * Copyright (C) 2004, 2005, 2008 Rob Buis <buis@kde.org> | 3 * Copyright (C) 2004, 2005, 2008 Rob Buis <buis@kde.org> |
4 * Copyright (C) 2005, 2007 Eric Seidel <eric@webkit.org> | 4 * Copyright (C) 2005, 2007 Eric Seidel <eric@webkit.org> |
5 * Copyright (C) 2009 Google, Inc. | 5 * Copyright (C) 2009 Google, Inc. |
6 * Copyright (C) 2009 Dirk Schulze <krit@webkit.org> | 6 * Copyright (C) 2009 Dirk Schulze <krit@webkit.org> |
7 * Copyright (C) Research In Motion Limited 2010. All rights reserved. | 7 * Copyright (C) Research In Motion Limited 2010. All rights reserved. |
8 * Copyright (C) 2009 Jeff Schiller <codedread@gmail.com> | 8 * Copyright (C) 2009 Jeff Schiller <codedread@gmail.com> |
9 * Copyright (C) 2011 Renata Hodovan <reni@webkit.org> | 9 * Copyright (C) 2011 Renata Hodovan <reni@webkit.org> |
10 * Copyright (C) 2011 University of Szeged | 10 * Copyright (C) 2011 University of Szeged |
(...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
199 | 199 |
200 return resources->markerStart() || resources->markerMid() || resources->mark
erEnd(); | 200 return resources->markerStart() || resources->markerMid() || resources->mark
erEnd(); |
201 } | 201 } |
202 | 202 |
203 void RenderSVGShape::fillShape(RenderStyle* style, GraphicsContext* context) | 203 void RenderSVGShape::fillShape(RenderStyle* style, GraphicsContext* context) |
204 { | 204 { |
205 bool hasFallback; | 205 bool hasFallback; |
206 if (RenderSVGResource* fillPaintingResource = RenderSVGResource::requestPain
tingResource(ApplyToFillMode, this, style, hasFallback)) { | 206 if (RenderSVGResource* fillPaintingResource = RenderSVGResource::requestPain
tingResource(ApplyToFillMode, this, style, hasFallback)) { |
207 if (fillPaintingResource->applyResource(this, style, context, ApplyToFil
lMode)) { | 207 if (fillPaintingResource->applyResource(this, style, context, ApplyToFil
lMode)) { |
208 fillShape(context); | 208 fillShape(context); |
209 fillPaintingResource->postApplyResource(this, context); | 209 fillPaintingResource->postApplyResource(context); |
210 } else if (hasFallback) { | 210 } else if (hasFallback) { |
211 RenderSVGResourceSolidColor* fallbackResource = RenderSVGResource::s
haredSolidPaintingResource(); | 211 RenderSVGResourceSolidColor* fallbackResource = RenderSVGResource::s
haredSolidPaintingResource(); |
212 if (fallbackResource->applyResource(this, style, context, ApplyToFil
lMode)) { | 212 if (fallbackResource->applyResource(this, style, context, ApplyToFil
lMode)) { |
213 fillShape(context); | 213 fillShape(context); |
214 fallbackResource->postApplyResource(this, context); | 214 fallbackResource->postApplyResource(context); |
215 } | 215 } |
216 } | 216 } |
217 } | 217 } |
218 } | 218 } |
219 | 219 |
220 void RenderSVGShape::strokeShape(RenderStyle* style, GraphicsContext* context) | 220 void RenderSVGShape::strokeShape(RenderStyle* style, GraphicsContext* context) |
221 { | 221 { |
222 bool hasFallback; | 222 bool hasFallback; |
223 if (RenderSVGResource* strokePaintingResource = RenderSVGResource::requestPa
intingResource(ApplyToStrokeMode, this, style, hasFallback)) { | 223 if (RenderSVGResource* strokePaintingResource = RenderSVGResource::requestPa
intingResource(ApplyToStrokeMode, this, style, hasFallback)) { |
224 if (strokePaintingResource->applyResource(this, style, context, ApplyToS
trokeMode)) { | 224 if (strokePaintingResource->applyResource(this, style, context, ApplyToS
trokeMode)) { |
225 strokeShape(context); | 225 strokeShape(context); |
226 strokePaintingResource->postApplyResource(this, context); | 226 strokePaintingResource->postApplyResource(context); |
227 } else if (hasFallback) { | 227 } else if (hasFallback) { |
228 RenderSVGResourceSolidColor* fallbackResource = RenderSVGResource::s
haredSolidPaintingResource(); | 228 RenderSVGResourceSolidColor* fallbackResource = RenderSVGResource::s
haredSolidPaintingResource(); |
229 if (fallbackResource->applyResource(this, style, context, ApplyToStr
okeMode)) { | 229 if (fallbackResource->applyResource(this, style, context, ApplyToStr
okeMode)) { |
230 strokeShape(context); | 230 strokeShape(context); |
231 fallbackResource->postApplyResource(this, context); | 231 fallbackResource->postApplyResource(context); |
232 } | 232 } |
233 } | 233 } |
234 } | 234 } |
235 } | 235 } |
236 | 236 |
237 void RenderSVGShape::paint(PaintInfo& paintInfo, const LayoutPoint&) | 237 void RenderSVGShape::paint(PaintInfo& paintInfo, const LayoutPoint&) |
238 { | 238 { |
239 ANNOTATE_GRAPHICS_CONTEXT(paintInfo, this); | 239 ANNOTATE_GRAPHICS_CONTEXT(paintInfo, this); |
240 if (paintInfo.phase != PaintPhaseForeground | 240 if (paintInfo.phase != PaintPhaseForeground |
241 || style()->visibility() == HIDDEN | 241 || style()->visibility() == HIDDEN |
(...skipping 220 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
462 ASSERT(resources); | 462 ASSERT(resources); |
463 | 463 |
464 RenderSVGResourceMarker* markerStart = resources->markerStart(); | 464 RenderSVGResourceMarker* markerStart = resources->markerStart(); |
465 | 465 |
466 SVGMarkerData markerData(m_markerPositions, markerStart ? markerStart->orien
tType() == SVGMarkerOrientAutoStartReverse : false); | 466 SVGMarkerData markerData(m_markerPositions, markerStart ? markerStart->orien
tType() == SVGMarkerOrientAutoStartReverse : false); |
467 m_path->apply(&markerData, SVGMarkerData::updateFromPathElement); | 467 m_path->apply(&markerData, SVGMarkerData::updateFromPathElement); |
468 markerData.pathIsDone(); | 468 markerData.pathIsDone(); |
469 } | 469 } |
470 | 470 |
471 } | 471 } |
OLD | NEW |