Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(55)

Side by Side Diff: third_party/WebKit/Source/core/svg/SVGPathElement.cpp

Issue 2227463002: SVG: Use path attribute for animateMotion (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: implicitWait Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « third_party/WebKit/Source/core/svg/SVGPathElement.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/svg/SVGPathElement.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698