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

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

Issue 1545713003: Add StylePath and use it to store 'd' in ComputedStyle (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Restore CSSPathValue::equals. Created 4 years, 11 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
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 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
71 71
72 DEFINE_NODE_FACTORY(SVGPathElement) 72 DEFINE_NODE_FACTORY(SVGPathElement)
73 73
74 Path SVGPathElement::asPath() const 74 Path SVGPathElement::asPath() const
75 { 75 {
76 if (layoutObject()) { 76 if (layoutObject()) {
77 const SVGComputedStyle& svgStyle = layoutObject()->styleRef().svgStyle() ; 77 const SVGComputedStyle& svgStyle = layoutObject()->styleRef().svgStyle() ;
78 return svgStyle.d()->path(); 78 return svgStyle.d()->path();
79 } 79 }
80 80
81 return m_path->currentValue()->pathValue()->path(); 81 return m_path->currentValue()->pathValue()->cachedPath()->path();
82 } 82 }
83 83
84 const SVGPathByteStream& SVGPathElement::pathByteStream() const 84 const SVGPathByteStream& SVGPathElement::pathByteStream() const
85 { 85 {
86 if (layoutObject()) { 86 if (layoutObject()) {
87 const SVGComputedStyle& svgStyle = layoutObject()->styleRef().svgStyle() ; 87 const SVGComputedStyle& svgStyle = layoutObject()->styleRef().svgStyle() ;
88 return svgStyle.d()->byteStream(); 88 return svgStyle.d()->byteStream();
89 } 89 }
90 90
91 return m_path->currentValue()->byteStream(); 91 return m_path->currentValue()->byteStream();
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
180 return InsertionDone; 180 return InsertionDone;
181 } 181 }
182 182
183 void SVGPathElement::removedFrom(ContainerNode* rootParent) 183 void SVGPathElement::removedFrom(ContainerNode* rootParent)
184 { 184 {
185 SVGGeometryElement::removedFrom(rootParent); 185 SVGGeometryElement::removedFrom(rootParent);
186 invalidateMPathDependencies(); 186 invalidateMPathDependencies();
187 } 187 }
188 188
189 } // namespace blink 189 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698