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 187 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
198 return false; | 198 return false; |
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 SVGRenderSupport::updateGraphicsContext(context, style, *this, Apply ToFillMode); | |
pdr.
2014/10/07 02:57:48
Can we move this call into applyResource so it doe
fs
2014/10/07 12:34:20
We can - at least for now. In ~2 CLs applyResource
| |
208 fillShape(context); | 209 fillShape(context); |
209 fillPaintingResource->postApplyResource(context); | 210 fillPaintingResource->postApplyResource(context); |
210 } else if (hasFallback) { | 211 } else if (hasFallback) { |
211 RenderSVGResourceSolidColor* fallbackResource = RenderSVGResource::s haredSolidPaintingResource(); | 212 RenderSVGResourceSolidColor* fallbackResource = RenderSVGResource::s haredSolidPaintingResource(); |
212 if (fallbackResource->applyResource(this, style, context, ApplyToFil lMode)) { | 213 if (fallbackResource->applyResource(this, style, context, ApplyToFil lMode)) { |
214 SVGRenderSupport::updateGraphicsContext(context, style, *this, A pplyToFillMode); | |
213 fillShape(context); | 215 fillShape(context); |
214 fallbackResource->postApplyResource(context); | 216 fallbackResource->postApplyResource(context); |
215 } | 217 } |
216 } | 218 } |
217 } | 219 } |
218 } | 220 } |
219 | 221 |
220 void RenderSVGShape::strokeShape(RenderStyle* style, GraphicsContext* context) | 222 void RenderSVGShape::strokeShape(RenderStyle* style, GraphicsContext* context) |
221 { | 223 { |
222 bool hasFallback; | 224 bool hasFallback; |
223 if (RenderSVGResource* strokePaintingResource = RenderSVGResource::requestPa intingResource(ApplyToStrokeMode, this, style, hasFallback)) { | 225 if (RenderSVGResource* strokePaintingResource = RenderSVGResource::requestPa intingResource(ApplyToStrokeMode, this, style, hasFallback)) { |
224 if (strokePaintingResource->applyResource(this, style, context, ApplyToS trokeMode)) { | 226 if (strokePaintingResource->applyResource(this, style, context, ApplyToS trokeMode)) { |
227 SVGRenderSupport::updateGraphicsContext(context, style, *this, Apply ToStrokeMode); | |
225 strokeShape(context); | 228 strokeShape(context); |
226 strokePaintingResource->postApplyResource(context); | 229 strokePaintingResource->postApplyResource(context); |
227 } else if (hasFallback) { | 230 } else if (hasFallback) { |
228 RenderSVGResourceSolidColor* fallbackResource = RenderSVGResource::s haredSolidPaintingResource(); | 231 RenderSVGResourceSolidColor* fallbackResource = RenderSVGResource::s haredSolidPaintingResource(); |
229 if (fallbackResource->applyResource(this, style, context, ApplyToStr okeMode)) { | 232 if (fallbackResource->applyResource(this, style, context, ApplyToStr okeMode)) { |
233 SVGRenderSupport::updateGraphicsContext(context, style, *this, A pplyToStrokeMode); | |
230 strokeShape(context); | 234 strokeShape(context); |
231 fallbackResource->postApplyResource(context); | 235 fallbackResource->postApplyResource(context); |
232 } | 236 } |
233 } | 237 } |
234 } | 238 } |
235 } | 239 } |
236 | 240 |
237 void RenderSVGShape::paint(PaintInfo& paintInfo, const LayoutPoint&) | 241 void RenderSVGShape::paint(PaintInfo& paintInfo, const LayoutPoint&) |
238 { | 242 { |
239 ANNOTATE_GRAPHICS_CONTEXT(paintInfo, this); | 243 ANNOTATE_GRAPHICS_CONTEXT(paintInfo, this); |
(...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
462 ASSERT(resources); | 466 ASSERT(resources); |
463 | 467 |
464 RenderSVGResourceMarker* markerStart = resources->markerStart(); | 468 RenderSVGResourceMarker* markerStart = resources->markerStart(); |
465 | 469 |
466 SVGMarkerData markerData(m_markerPositions, markerStart ? markerStart->orien tType() == SVGMarkerOrientAutoStartReverse : false); | 470 SVGMarkerData markerData(m_markerPositions, markerStart ? markerStart->orien tType() == SVGMarkerOrientAutoStartReverse : false); |
467 m_path->apply(&markerData, SVGMarkerData::updateFromPathElement); | 471 m_path->apply(&markerData, SVGMarkerData::updateFromPathElement); |
468 markerData.pathIsDone(); | 472 markerData.pathIsDone(); |
469 } | 473 } |
470 | 474 |
471 } | 475 } |
OLD | NEW |