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

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

Issue 2346193002: Split CSSPrimitiveValue into CSSPrimitiveValue and CSSIdentifierValue (Closed)
Patch Set: Rebase please work Created 4 years, 2 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,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * Library General Public License for more details. 13 * Library General Public License for more details.
14 * 14 *
15 * You should have received a copy of the GNU Library General Public License 15 * You should have received a copy of the GNU Library General Public License
16 * along with this library; see the file COPYING.LIB. If not, write to 16 * along with this library; see the file COPYING.LIB. If not, write to
17 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 17 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
18 * Boston, MA 02110-1301, USA. 18 * Boston, MA 02110-1301, USA.
19 */ 19 */
20 20
21 #include "core/svg/SVGPathElement.h" 21 #include "core/svg/SVGPathElement.h"
22 22
23 #include "core/css/CSSPrimitiveValue.h" 23 #include "core/css/CSSIdentifierValue.h"
24 #include "core/dom/StyleChangeReason.h" 24 #include "core/dom/StyleChangeReason.h"
25 #include "core/layout/svg/LayoutSVGPath.h" 25 #include "core/layout/svg/LayoutSVGPath.h"
26 #include "core/svg/SVGMPathElement.h" 26 #include "core/svg/SVGMPathElement.h"
27 #include "core/svg/SVGPathQuery.h" 27 #include "core/svg/SVGPathQuery.h"
28 #include "core/svg/SVGPathUtilities.h" 28 #include "core/svg/SVGPathUtilities.h"
29 #include "core/svg/SVGPointTearOff.h" 29 #include "core/svg/SVGPointTearOff.h"
30 30
31 namespace blink { 31 namespace blink {
32 32
33 class SVGAnimatedPathLength final : public SVGAnimatedNumber { 33 class SVGAnimatedPathLength final : public SVGAnimatedNumber {
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after
171 { 171 {
172 SVGAnimatedPropertyBase* property = propertyFromAttribute(name); 172 SVGAnimatedPropertyBase* property = propertyFromAttribute(name);
173 if (property == m_path) { 173 if (property == m_path) {
174 SVGAnimatedPath* path = this->path(); 174 SVGAnimatedPath* path = this->path();
175 // If this is a <use> instance, return the referenced path to maximize g eometry sharing. 175 // If this is a <use> instance, return the referenced path to maximize g eometry sharing.
176 if (const SVGElement* element = correspondingElement()) 176 if (const SVGElement* element = correspondingElement())
177 path = toSVGPathElement(element)->path(); 177 path = toSVGPathElement(element)->path();
178 178
179 CSSPathValue* pathValue = path->currentValue()->pathValue(); 179 CSSPathValue* pathValue = path->currentValue()->pathValue();
180 if (pathValue->stylePath()->byteStream().isEmpty()) { 180 if (pathValue->stylePath()->byteStream().isEmpty()) {
181 addPropertyToPresentationAttributeStyle(style, CSSPropertyD, CSSPrim itiveValue::createIdentifier(CSSValueNone)); 181 addPropertyToPresentationAttributeStyle(style, CSSPropertyD, CSSIden tifierValue::create(CSSValueNone));
182 return; 182 return;
183 } 183 }
184 addPropertyToPresentationAttributeStyle(style, CSSPropertyD, pathValue); 184 addPropertyToPresentationAttributeStyle(style, CSSPropertyD, pathValue);
185 return; 185 return;
186 } 186 }
187 SVGGeometryElement::collectStyleForPresentationAttribute(name, value, style) ; 187 SVGGeometryElement::collectStyleForPresentationAttribute(name, value, style) ;
188 } 188 }
189 189
190 void SVGPathElement::invalidateMPathDependencies() 190 void SVGPathElement::invalidateMPathDependencies()
191 { 191 {
(...skipping 22 matching lines...) Expand all
214 214
215 FloatRect SVGPathElement::getBBox() 215 FloatRect SVGPathElement::getBBox()
216 { 216 {
217 document().updateStyleAndLayoutIgnorePendingStylesheets(); 217 document().updateStyleAndLayoutIgnorePendingStylesheets();
218 218
219 // We want the exact bounds. 219 // We want the exact bounds.
220 return SVGPathElement::asPath().boundingRect(Path::BoundsType::Exact); 220 return SVGPathElement::asPath().boundingRect(Path::BoundsType::Exact);
221 } 221 }
222 222
223 } // namespace blink 223 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698