| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2004, 2005, 2007, 2008 Nikolas Zimmermann <zimmermann@kde.org> | 2 * Copyright (C) 2004, 2005, 2007, 2008 Nikolas Zimmermann <zimmermann@kde.org> |
| 3 * Copyright (C) 2004, 2005, 2006, 2007, 2008 Rob Buis <buis@kde.org> | 3 * Copyright (C) 2004, 2005, 2006, 2007, 2008 Rob Buis <buis@kde.org> |
| 4 * Copyright (C) Research In Motion Limited 2009-2010. All rights reserved. | 4 * Copyright (C) Research In Motion Limited 2009-2010. All rights reserved. |
| 5 * | 5 * |
| 6 * This library is free software; you can redistribute it and/or | 6 * This library is free software; you can redistribute it and/or |
| 7 * modify it under the terms of the GNU Library General Public | 7 * modify it under the terms of the GNU Library General Public |
| 8 * License as published by the Free Software Foundation; either | 8 * License as published by the Free Software Foundation; either |
| 9 * version 2 of the License, or (at your option) any later version. | 9 * version 2 of the License, or (at your option) any later version. |
| 10 * | 10 * |
| (...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 135 return transform; | 135 return transform; |
| 136 } | 136 } |
| 137 | 137 |
| 138 void RenderSVGResourceMarker::draw(PaintInfo& paintInfo, const AffineTransform&
transform) | 138 void RenderSVGResourceMarker::draw(PaintInfo& paintInfo, const AffineTransform&
transform) |
| 139 { | 139 { |
| 140 clearInvalidationMask(); | 140 clearInvalidationMask(); |
| 141 | 141 |
| 142 // An empty viewBox disables rendering. | 142 // An empty viewBox disables rendering. |
| 143 SVGMarkerElement* marker = toSVGMarkerElement(element()); | 143 SVGMarkerElement* marker = toSVGMarkerElement(element()); |
| 144 ASSERT(marker); | 144 ASSERT(marker); |
| 145 if (marker->hasAttribute(SVGNames::viewBoxAttr) && marker->viewBoxCurrentVal
ue().isValid() && marker->viewBoxCurrentValue().isEmpty()) | 145 if (marker->hasAttribute(SVGNames::viewBoxAttr) && marker->viewBox()->curren
tValue()->isValid() && marker->viewBox()->currentValue()->value().isEmpty()) |
| 146 return; | 146 return; |
| 147 | 147 |
| 148 PaintInfo info(paintInfo); | 148 PaintInfo info(paintInfo); |
| 149 GraphicsContextStateSaver stateSaver(*info.context); | 149 GraphicsContextStateSaver stateSaver(*info.context); |
| 150 info.applyTransform(transform); | 150 info.applyTransform(transform); |
| 151 RenderSVGContainer::paint(info, IntPoint()); | 151 RenderSVGContainer::paint(info, IntPoint()); |
| 152 } | 152 } |
| 153 | 153 |
| 154 AffineTransform RenderSVGResourceMarker::markerContentTransformation(const Affin
eTransform& contentTransformation, const FloatPoint& origin, float strokeWidth)
const | 154 AffineTransform RenderSVGResourceMarker::markerContentTransformation(const Affin
eTransform& contentTransformation, const FloatPoint& origin, float strokeWidth)
const |
| 155 { | 155 { |
| (...skipping 24 matching lines...) Expand all Loading... |
| 180 SVGMarkerElement* marker = toSVGMarkerElement(element()); | 180 SVGMarkerElement* marker = toSVGMarkerElement(element()); |
| 181 ASSERT(marker); | 181 ASSERT(marker); |
| 182 | 182 |
| 183 SVGLengthContext lengthContext(marker); | 183 SVGLengthContext lengthContext(marker); |
| 184 float w = marker->markerWidth()->currentValue()->value(lengthContext); | 184 float w = marker->markerWidth()->currentValue()->value(lengthContext); |
| 185 float h = marker->markerHeight()->currentValue()->value(lengthContext); | 185 float h = marker->markerHeight()->currentValue()->value(lengthContext); |
| 186 m_viewport = FloatRect(0, 0, w, h); | 186 m_viewport = FloatRect(0, 0, w, h); |
| 187 } | 187 } |
| 188 | 188 |
| 189 } | 189 } |
| OLD | NEW |