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

Side by Side Diff: Source/core/svg/SVGGraphicsElement.cpp

Issue 43223002: SVGTests should not leave detached elements in the tree (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Always reattach Created 7 years, 1 month 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 | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2004, 2005, 2008 Nikolas Zimmermann <zimmermann@kde.org> 2 * Copyright (C) 2004, 2005, 2008 Nikolas Zimmermann <zimmermann@kde.org>
3 * Copyright (C) 2004, 2005, 2006 Rob Buis <buis@kde.org> 3 * Copyright (C) 2004, 2005, 2006 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 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
122 122
123 void SVGGraphicsElement::svgAttributeChanged(const QualifiedName& attrName) 123 void SVGGraphicsElement::svgAttributeChanged(const QualifiedName& attrName)
124 { 124 {
125 if (!isSupportedAttribute(attrName)) { 125 if (!isSupportedAttribute(attrName)) {
126 SVGElement::svgAttributeChanged(attrName); 126 SVGElement::svgAttributeChanged(attrName);
127 return; 127 return;
128 } 128 }
129 129
130 SVGElementInstance::InvalidationGuard invalidationGuard(this); 130 SVGElementInstance::InvalidationGuard invalidationGuard(this);
131 131
132 if (SVGTests::handleAttributeChange(this, attrName)) 132 // Reattach so the isValid() check will be run again during renderer creatio n.
133 if (SVGTests::isKnownAttribute(attrName)) {
134 lazyReattachIfAttached();
133 return; 135 return;
136 }
134 137
135 RenderObject* object = renderer(); 138 RenderObject* object = renderer();
136 if (!object) 139 if (!object)
137 return; 140 return;
138 141
139 if (attrName == SVGNames::transformAttr) { 142 if (attrName == SVGNames::transformAttr) {
140 object->setNeedsTransformUpdate(); 143 object->setNeedsTransformUpdate();
141 RenderSVGResource::markForLayoutAndParentResourceInvalidation(object); 144 RenderSVGResource::markForLayoutAndParentResourceInvalidation(object);
142 return; 145 return;
143 } 146 }
(...skipping 23 matching lines...) Expand all
167 } 170 }
168 171
169 void SVGGraphicsElement::toClipPath(Path& path) 172 void SVGGraphicsElement::toClipPath(Path& path)
170 { 173 {
171 updatePathFromGraphicsElement(this, path); 174 updatePathFromGraphicsElement(this, path);
172 // FIXME: How do we know the element has done a layout? 175 // FIXME: How do we know the element has done a layout?
173 path.transform(animatedLocalTransform()); 176 path.transform(animatedLocalTransform());
174 } 177 }
175 178
176 } 179 }
OLDNEW
« no previous file with comments | « LayoutTests/svg/dynamic-updates/script-tests/SVGUseElement-svgdom-requiredFeatures.js ('k') | Source/core/svg/SVGTests.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698