| 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 * | 9 * |
| 10 * This library is free software; you can redistribute it and/or | 10 * This library is free software; you can redistribute it and/or |
| (...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 148 RenderSVGModelObject::setNeedsBoundariesUpdate(); | 148 RenderSVGModelObject::setNeedsBoundariesUpdate(); |
| 149 | 149 |
| 150 repainter.repaintAfterLayout(); | 150 repainter.repaintAfterLayout(); |
| 151 setNeedsLayout(false); | 151 setNeedsLayout(false); |
| 152 } | 152 } |
| 153 | 153 |
| 154 bool RenderSVGPath::shouldStrokeZeroLengthSubpath() const | 154 bool RenderSVGPath::shouldStrokeZeroLengthSubpath() const |
| 155 { | 155 { |
| 156 // Spec(11.4): Any zero length subpath shall not be stroked if the ‘stroke-l
inecap’ property has a value of butt | 156 // Spec(11.4): Any zero length subpath shall not be stroked if the ‘stroke-l
inecap’ property has a value of butt |
| 157 // but shall be stroked if the ‘stroke-linecap’ property has a value of roun
d or square | 157 // but shall be stroked if the ‘stroke-linecap’ property has a value of roun
d or square |
| 158 return style()->svgStyle()->capStyle() != ButtCap && !m_fillBoundingBox.widt
h() && !m_fillBoundingBox.height(); | 158 return style()->svgStyle()->hasStroke() && style()->svgStyle()->capStyle() !
= ButtCap && !m_fillBoundingBox.width() && !m_fillBoundingBox.height(); |
| 159 } | 159 } |
| 160 | 160 |
| 161 FloatRect RenderSVGPath::zeroLengthSubpathRect() const | 161 FloatRect RenderSVGPath::zeroLengthSubpathRect() const |
| 162 { | 162 { |
| 163 SVGElement* svgElement = static_cast<SVGElement*>(node()); | 163 SVGElement* svgElement = static_cast<SVGElement*>(node()); |
| 164 float strokeWidth = style()->svgStyle()->strokeWidth().value(svgElement); | 164 float strokeWidth = style()->svgStyle()->strokeWidth().value(svgElement); |
| 165 return FloatRect(m_fillBoundingBox.x() - strokeWidth / 2, m_fillBoundingBox.
y() - strokeWidth / 2, strokeWidth, strokeWidth); | 165 return FloatRect(m_fillBoundingBox.x() - strokeWidth / 2, m_fillBoundingBox.
y() - strokeWidth / 2, strokeWidth, strokeWidth); |
| 166 } | 166 } |
| 167 | 167 |
| 168 void RenderSVGPath::setupSquareCapPath(Path*& usePath, int& applyMode) | 168 void RenderSVGPath::setupSquareCapPath(Path*& usePath, int& applyMode) |
| (...skipping 215 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 384 } | 384 } |
| 385 | 385 |
| 386 // Cache smallest possible repaint rectangle | 386 // Cache smallest possible repaint rectangle |
| 387 m_repaintBoundingBox = m_strokeAndMarkerBoundingBox; | 387 m_repaintBoundingBox = m_strokeAndMarkerBoundingBox; |
| 388 SVGRenderSupport::intersectRepaintRectWithResources(this, m_repaintBoundingB
ox); | 388 SVGRenderSupport::intersectRepaintRectWithResources(this, m_repaintBoundingB
ox); |
| 389 } | 389 } |
| 390 | 390 |
| 391 } | 391 } |
| 392 | 392 |
| 393 #endif // ENABLE(SVG) | 393 #endif // ENABLE(SVG) |
| OLD | NEW |