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

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

Issue 1134453003: Merge 194421 "Avoid transiently creating disallowed elements whe..." (Closed) Base URL: svn://svn.chromium.org/blink/branches/chromium/2357/
Patch Set: Created 5 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 | Annotate | Revision Log
« no previous file with comments | « LayoutTests/svg/custom/use-referencing-animation-crash-expected.txt ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2004, 2005, 2006, 2007, 2008 Nikolas Zimmermann <zimmermann@kde .org> 2 * Copyright (C) 2004, 2005, 2006, 2007, 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 * Copyright (C) Research In Motion Limited 2009-2010. All rights reserved. 4 * Copyright (C) Research In Motion Limited 2009-2010. All rights reserved.
5 * Copyright (C) 2011 Torch Mobile (Beijing) Co. Ltd. All rights reserved. 5 * Copyright (C) 2011 Torch Mobile (Beijing) Co. Ltd. All rights reserved.
6 * Copyright (C) 2012 University of Szeged 6 * Copyright (C) 2012 University of Szeged
7 * Copyright (C) 2012 Renata Hodovan <reni@webkit.org> 7 * Copyright (C) 2012 Renata Hodovan <reni@webkit.org>
8 * 8 *
9 * This library is free software; you can redistribute it and/or 9 * This library is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU Library General Public 10 * modify it under the terms of the GNU Library General Public
(...skipping 374 matching lines...) Expand 10 before | Expand all | Expand 10 after
385 ASSERT(!m_targetElementInstance); 385 ASSERT(!m_targetElementInstance);
386 386
387 // <use> creates a "user agent" shadow root. Do not build the shadow/instanc e tree for <use> 387 // <use> creates a "user agent" shadow root. Do not build the shadow/instanc e tree for <use>
388 // elements living in a user agent shadow tree because they will get expande d in a second 388 // elements living in a user agent shadow tree because they will get expande d in a second
389 // pass -- see expandUseElementsInShadowTree(). 389 // pass -- see expandUseElementsInShadowTree().
390 if (inUseShadowTree()) 390 if (inUseShadowTree())
391 return; 391 return;
392 392
393 // Do not allow self-referencing. 393 // Do not allow self-referencing.
394 // 'target' may be null, if it's a non SVG namespaced element. 394 // 'target' may be null, if it's a non SVG namespaced element.
395 if (!target || target == this) 395 if (!target || target == this || isDisallowedElement(target))
396 return; 396 return;
397 397
398 // Set up root SVG element in shadow tree. 398 // Set up root SVG element in shadow tree.
399 RefPtrWillBeRawPtr<Element> newChild = target->cloneElementWithoutChildren() ; 399 RefPtrWillBeRawPtr<Element> newChild = target->cloneElementWithoutChildren() ;
400 m_targetElementInstance = toSVGElement(newChild.get()); 400 m_targetElementInstance = toSVGElement(newChild.get());
401 ShadowRoot* shadowTreeRootElement = closedShadowRoot(); 401 ShadowRoot* shadowTreeRootElement = closedShadowRoot();
402 shadowTreeRootElement->appendChild(newChild.release()); 402 shadowTreeRootElement->appendChild(newChild.release());
403 403
404 // Clone the target subtree into the shadow tree, not handling <use> and <sy mbol> yet. 404 // Clone the target subtree into the shadow tree, not handling <use> and <sy mbol> yet.
405 405
(...skipping 375 matching lines...) Expand 10 before | Expand all | Expand 10 after
781 781
782 if (m_resource) 782 if (m_resource)
783 m_resource->removeClient(this); 783 m_resource->removeClient(this);
784 784
785 m_resource = resource; 785 m_resource = resource;
786 if (m_resource) 786 if (m_resource)
787 m_resource->addClient(this); 787 m_resource->addClient(this);
788 } 788 }
789 789
790 } 790 }
OLDNEW
« no previous file with comments | « LayoutTests/svg/custom/use-referencing-animation-crash-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698