OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2004, 2005, 2006, 2008 Nikolas Zimmermann <zimmermann@kde.org> | 2 * Copyright (C) 2004, 2005, 2006, 2008 Nikolas Zimmermann <zimmermann@kde.org> |
3 * Copyright (C) 2004, 2005, 2006, 2007 Rob Buis <buis@kde.org> | 3 * Copyright (C) 2004, 2005, 2006, 2007 Rob Buis <buis@kde.org> |
4 * | 4 * |
5 * This library is free software; you can redistribute it and/or | 5 * This library is free software; you can redistribute it and/or |
6 * modify it under the terms of the GNU Library General Public | 6 * modify it under the terms of the GNU Library General Public |
7 * License as published by the Free Software Foundation; either | 7 * License as published by the Free Software Foundation; either |
8 * version 2 of the License, or (at your option) any later version. | 8 * version 2 of the License, or (at your option) any later version. |
9 * | 9 * |
10 * This library is distributed in the hope that it will be useful, | 10 * This library is distributed in the hope that it will be useful, |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
65 } | 65 } |
66 | 66 |
67 float SVGPathElement::getTotalLength() { | 67 float SVGPathElement::getTotalLength() { |
68 GetDocument().UpdateStyleAndLayoutIgnorePendingStylesheets(); | 68 GetDocument().UpdateStyleAndLayoutIgnorePendingStylesheets(); |
69 return SVGPathQuery(PathByteStream()).GetTotalLength(); | 69 return SVGPathQuery(PathByteStream()).GetTotalLength(); |
70 } | 70 } |
71 | 71 |
72 SVGPointTearOff* SVGPathElement::getPointAtLength(float length) { | 72 SVGPointTearOff* SVGPathElement::getPointAtLength(float length) { |
73 GetDocument().UpdateStyleAndLayoutIgnorePendingStylesheets(); | 73 GetDocument().UpdateStyleAndLayoutIgnorePendingStylesheets(); |
74 FloatPoint point = SVGPathQuery(PathByteStream()).GetPointAtLength(length); | 74 FloatPoint point = SVGPathQuery(PathByteStream()).GetPointAtLength(length); |
75 return SVGPointTearOff::Create(SVGPoint::Create(point), 0, | 75 return SVGPointTearOff::CreateDetached(point); |
76 kPropertyIsNotAnimVal); | |
77 } | 76 } |
78 | 77 |
79 unsigned SVGPathElement::getPathSegAtLength(float length) { | 78 unsigned SVGPathElement::getPathSegAtLength(float length) { |
80 GetDocument().UpdateStyleAndLayoutIgnorePendingStylesheets(); | 79 GetDocument().UpdateStyleAndLayoutIgnorePendingStylesheets(); |
81 return SVGPathQuery(PathByteStream()).GetPathSegIndexAtLength(length); | 80 return SVGPathQuery(PathByteStream()).GetPathSegIndexAtLength(length); |
82 } | 81 } |
83 | 82 |
84 void SVGPathElement::SvgAttributeChanged(const QualifiedName& attr_name) { | 83 void SVGPathElement::SvgAttributeChanged(const QualifiedName& attr_name) { |
85 if (attr_name == SVGNames::dAttr) { | 84 if (attr_name == SVGNames::dAttr) { |
86 SVGElement::InvalidationGuard invalidation_guard(this); | 85 SVGElement::InvalidationGuard invalidation_guard(this); |
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
149 SVGGeometryElement::RemovedFrom(root_parent); | 148 SVGGeometryElement::RemovedFrom(root_parent); |
150 InvalidateMPathDependencies(); | 149 InvalidateMPathDependencies(); |
151 } | 150 } |
152 | 151 |
153 FloatRect SVGPathElement::GetBBox() { | 152 FloatRect SVGPathElement::GetBBox() { |
154 // We want the exact bounds. | 153 // We want the exact bounds. |
155 return SVGPathElement::AsPath().BoundingRect(Path::BoundsType::kExact); | 154 return SVGPathElement::AsPath().BoundingRect(Path::BoundsType::kExact); |
156 } | 155 } |
157 | 156 |
158 } // namespace blink | 157 } // namespace blink |
OLD | NEW |