OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2007, 2008 Rob Buis <buis@kde.org> | 2 * Copyright (C) 2007, 2008 Rob Buis <buis@kde.org> |
3 * Copyright (C) 2007 Nikolas Zimmermann <zimmermann@kde.org> | 3 * Copyright (C) 2007 Nikolas Zimmermann <zimmermann@kde.org> |
4 * Copyright (C) 2007 Eric Seidel <eric@webkit.org> | 4 * Copyright (C) 2007 Eric Seidel <eric@webkit.org> |
5 * Copyright (C) 2009 Google, Inc. All rights reserved. | 5 * Copyright (C) 2009 Google, Inc. All rights reserved. |
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 2009-2010. All rights reserved. | 7 * Copyright (C) Research In Motion Limited 2009-2010. All rights reserved. |
8 * | 8 * |
9 * This library is free software; you can redistribute it and/or | 9 * This library is free software; you can redistribute it and/or |
10 * modify it under the terms of the GNU Library General Public | 10 * modify it under the terms of the GNU Library General Public |
(...skipping 347 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
358 return; | 358 return; |
359 | 359 |
360 DashArray dashArray; | 360 DashArray dashArray; |
361 size_t length = dashes->length(); | 361 size_t length = dashes->length(); |
362 for (size_t i = 0; i < length; ++i) | 362 for (size_t i = 0; i < length; ++i) |
363 dashArray.append(dashes->at(i)->value(lengthContext)); | 363 dashArray.append(dashes->at(i)->value(lengthContext)); |
364 | 364 |
365 strokeData->setLineDash(dashArray, svgStyle.strokeDashOffset()->value(length
Context)); | 365 strokeData->setLineDash(dashArray, svgStyle.strokeDashOffset()->value(length
Context)); |
366 } | 366 } |
367 | 367 |
368 void SVGRenderSupport::fillOrStrokePrimitive(GraphicsContext* context, unsigned
short resourceMode, const Path* path, const RenderSVGShape* shape) | 368 void SVGRenderSupport::fillOrStrokePath(GraphicsContext* context, unsigned short
resourceMode, const Path& path) |
369 { | 369 { |
370 ASSERT(resourceMode != ApplyToDefaultMode); | 370 ASSERT(resourceMode != ApplyToDefaultMode); |
371 | 371 |
372 if (resourceMode & ApplyToFillMode) { | 372 if (resourceMode & ApplyToFillMode) |
373 if (path) | 373 context->fillPath(path); |
374 context->fillPath(*path); | 374 if (resourceMode & ApplyToStrokeMode) |
375 else if (shape) | 375 context->strokePath(path); |
376 shape->fillShape(context); | |
377 } | |
378 if (resourceMode & ApplyToStrokeMode) { | |
379 if (path) | |
380 context->strokePath(*path); | |
381 else if (shape) | |
382 shape->strokeShape(context); | |
383 } | |
384 } | 376 } |
385 | 377 |
386 bool SVGRenderSupport::isRenderableTextNode(const RenderObject* object) | 378 bool SVGRenderSupport::isRenderableTextNode(const RenderObject* object) |
387 { | 379 { |
388 ASSERT(object->isText()); | 380 ASSERT(object->isText()); |
389 // <br> is marked as text, but is not handled by the SVG rendering code-path
. | 381 // <br> is marked as text, but is not handled by the SVG rendering code-path
. |
390 return object->isSVGInlineText() && !toRenderSVGInlineText(object)->hasEmpty
Text(); | 382 return object->isSVGInlineText() && !toRenderSVGInlineText(object)->hasEmpty
Text(); |
391 } | 383 } |
392 | 384 |
393 } | 385 } |
OLD | NEW |