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

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

Issue 266063002: Store SVGElement instead of SVGElementInstance for instancesForElement (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Also check that ShadowRoot type is UserAgentShadowRoot Created 6 years, 7 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) 2007 Eric Seidel <eric@webkit.org> 2 * Copyright (C) 2007 Eric Seidel <eric@webkit.org>
3 * Copyright (C) 2007 Rob Buis <buis@kde.org> 3 * Copyright (C) 2007 Rob Buis <buis@kde.org>
4 * Copyright (C) 2008 Apple Inc. All rights reserved. 4 * Copyright (C) 2008 Apple Inc. All rights reserved.
5 * 5 *
6 * This library is free software; you can redistribute it and/or 6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Library General Public 7 * modify it under the terms of the GNU Library General Public
8 * License as published by the Free Software Foundation; either 8 * License as published by the Free Software Foundation; either
9 * version 2 of the License, or (at your option) any later version. 9 * version 2 of the License, or (at your option) any later version.
10 * 10 *
(...skipping 291 matching lines...) Expand 10 before | Expand all | Expand 10 after
302 return; 302 return;
303 303
304 if (RenderObject* renderer = targetElement->renderer()) 304 if (RenderObject* renderer = targetElement->renderer())
305 RenderSVGResource::markForLayoutAndParentResourceInvalidation(renderer); 305 RenderSVGResource::markForLayoutAndParentResourceInvalidation(renderer);
306 306
307 AffineTransform* t = targetElement->supplementalTransform(); 307 AffineTransform* t = targetElement->supplementalTransform();
308 if (!t) 308 if (!t)
309 return; 309 return;
310 310
311 // ...except in case where we have additional instances in <use> trees. 311 // ...except in case where we have additional instances in <use> trees.
312 const HashSet<SVGElementInstance*>& instances = targetElement->instancesForE lement(); 312 const HashSet<SVGElement*>& instances = targetElement->instancesForElement() ;
313 const HashSet<SVGElementInstance*>::const_iterator end = instances.end(); 313 const HashSet<SVGElement*>::const_iterator end = instances.end();
314 for (HashSet<SVGElementInstance*>::const_iterator it = instances.begin(); it != end; ++it) { 314 for (HashSet<SVGElement*>::const_iterator it = instances.begin(); it != end; ++it) {
315 SVGElement* shadowTreeElement = (*it)->shadowTreeElement(); 315 SVGElement* shadowTreeElement = *it;
316 ASSERT(shadowTreeElement); 316 ASSERT(shadowTreeElement);
317 AffineTransform* transform = shadowTreeElement->supplementalTransform(); 317 AffineTransform* transform = shadowTreeElement->supplementalTransform();
318 if (!transform) 318 if (!transform)
319 continue; 319 continue;
320 transform->setMatrix(t->a(), t->b(), t->c(), t->d(), t->e(), t->f()); 320 transform->setMatrix(t->a(), t->b(), t->c(), t->d(), t->e(), t->f());
321 if (RenderObject* renderer = shadowTreeElement->renderer()) { 321 if (RenderObject* renderer = shadowTreeElement->renderer()) {
322 renderer->setNeedsTransformUpdate(); 322 renderer->setNeedsTransformUpdate();
323 RenderSVGResource::markForLayoutAndParentResourceInvalidation(render er); 323 RenderSVGResource::markForLayoutAndParentResourceInvalidation(render er);
324 } 324 }
325 } 325 }
(...skipping 13 matching lines...) Expand all
339 339
340 void SVGAnimateMotionElement::updateAnimationMode() 340 void SVGAnimateMotionElement::updateAnimationMode()
341 { 341 {
342 if (!m_animationPath.isEmpty()) 342 if (!m_animationPath.isEmpty())
343 setAnimationMode(PathAnimation); 343 setAnimationMode(PathAnimation);
344 else 344 else
345 SVGAnimationElement::updateAnimationMode(); 345 SVGAnimationElement::updateAnimationMode();
346 } 346 }
347 347
348 } 348 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698