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

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

Issue 2001453002: Set ComputedStyle on Node and use that in buildOwnLayout() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@storage
Patch Set: Created 4 years, 5 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 128 matching lines...) Expand 10 before | Expand all | Expand 10 after
139 if (attrName == SVGNames::dAttr) { 139 if (attrName == SVGNames::dAttr) {
140 SVGElement::InvalidationGuard invalidationGuard(this); 140 SVGElement::InvalidationGuard invalidationGuard(this);
141 invalidateSVGPresentationAttributeStyle(); 141 invalidateSVGPresentationAttributeStyle();
142 setNeedsStyleRecalc(LocalStyleChange, 142 setNeedsStyleRecalc(LocalStyleChange,
143 StyleChangeReasonForTracing::fromAttribute(attrName)); 143 StyleChangeReasonForTracing::fromAttribute(attrName));
144 144
145 if (LayoutSVGShape* layoutPath = toLayoutSVGShape(this->layoutObject())) 145 if (LayoutSVGShape* layoutPath = toLayoutSVGShape(this->layoutObject()))
146 layoutPath->setNeedsShapeUpdate(); 146 layoutPath->setNeedsShapeUpdate();
147 147
148 invalidateMPathDependencies(); 148 invalidateMPathDependencies();
149 if (layoutObject()) 149 if (hasLayoutObject())
150 markForLayoutAndParentResourceInvalidation(layoutObject()); 150 markForLayoutAndParentResourceInvalidation(layoutObject());
151 151
152 return; 152 return;
153 } 153 }
154 154
155 if (attrName == SVGNames::pathLengthAttr) { 155 if (attrName == SVGNames::pathLengthAttr) {
156 SVGElement::InvalidationGuard invalidationGuard(this); 156 SVGElement::InvalidationGuard invalidationGuard(this);
157 if (layoutObject()) 157 if (hasLayoutObject())
158 markForLayoutAndParentResourceInvalidation(layoutObject()); 158 markForLayoutAndParentResourceInvalidation(layoutObject());
159 return; 159 return;
160 } 160 }
161 161
162 SVGGeometryElement::svgAttributeChanged(attrName); 162 SVGGeometryElement::svgAttributeChanged(attrName);
163 } 163 }
164 164
165 void SVGPathElement::collectStyleForPresentationAttribute(const QualifiedName& n ame, const AtomicString& value, MutableStylePropertySet* style) 165 void SVGPathElement::collectStyleForPresentationAttribute(const QualifiedName& n ame, const AtomicString& value, MutableStylePropertySet* style)
166 { 166 {
167 SVGAnimatedPropertyBase* property = propertyFromAttribute(name); 167 SVGAnimatedPropertyBase* property = propertyFromAttribute(name);
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
201 return InsertionDone; 201 return InsertionDone;
202 } 202 }
203 203
204 void SVGPathElement::removedFrom(ContainerNode* rootParent) 204 void SVGPathElement::removedFrom(ContainerNode* rootParent)
205 { 205 {
206 SVGGeometryElement::removedFrom(rootParent); 206 SVGGeometryElement::removedFrom(rootParent);
207 invalidateMPathDependencies(); 207 invalidateMPathDependencies();
208 } 208 }
209 209
210 } // namespace blink 210 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698