| 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 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 63 | 63 |
| 64 DEFINE_TRACE(SVGPathElement) | 64 DEFINE_TRACE(SVGPathElement) |
| 65 { | 65 { |
| 66 visitor->trace(m_pathLength); | 66 visitor->trace(m_pathLength); |
| 67 visitor->trace(m_path); | 67 visitor->trace(m_path); |
| 68 SVGGeometryElement::trace(visitor); | 68 SVGGeometryElement::trace(visitor); |
| 69 } | 69 } |
| 70 | 70 |
| 71 DEFINE_NODE_FACTORY(SVGPathElement) | 71 DEFINE_NODE_FACTORY(SVGPathElement) |
| 72 | 72 |
| 73 Path SVGPathElement::attributePath() const |
| 74 { |
| 75 return m_path->currentValue()->stylePath()->path(); |
| 76 } |
| 77 |
| 73 const StylePath* SVGPathElement::stylePath() const | 78 const StylePath* SVGPathElement::stylePath() const |
| 74 { | 79 { |
| 75 if (LayoutObject* layoutObject = this->layoutObject()) { | 80 if (LayoutObject* layoutObject = this->layoutObject()) { |
| 76 const StylePath* stylePath = layoutObject->styleRef().svgStyle().d(); | 81 const StylePath* stylePath = layoutObject->styleRef().svgStyle().d(); |
| 77 if (stylePath) | 82 if (stylePath) |
| 78 return stylePath; | 83 return stylePath; |
| 79 return StylePath::emptyPath(); | 84 return StylePath::emptyPath(); |
| 80 } | 85 } |
| 81 return m_path->currentValue()->stylePath(); | 86 return m_path->currentValue()->stylePath(); |
| 82 } | 87 } |
| (...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 209 | 214 |
| 210 FloatRect SVGPathElement::getBBox() | 215 FloatRect SVGPathElement::getBBox() |
| 211 { | 216 { |
| 212 document().updateStyleAndLayoutIgnorePendingStylesheets(); | 217 document().updateStyleAndLayoutIgnorePendingStylesheets(); |
| 213 | 218 |
| 214 // We want the exact bounds. | 219 // We want the exact bounds. |
| 215 return SVGPathElement::asPath().boundingRect(Path::BoundsType::Exact); | 220 return SVGPathElement::asPath().boundingRect(Path::BoundsType::Exact); |
| 216 } | 221 } |
| 217 | 222 |
| 218 } // namespace blink | 223 } // namespace blink |
| OLD | NEW |