<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[168921] trunk</title>
</head>
<body>
<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; }
#msg dl a { font-weight: bold}
#msg dl a:link { color:#fc3; }
#msg dl a:active { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/168921">168921</a></dd>
<dt>Author</dt> <dd>dbates@webkit.org</dd>
<dt>Date</dt> <dd>2014-05-15 21:30:12 -0700 (Thu, 15 May 2014)</dd>
</dl>
<h3>Log Message</h3>
<pre>ASSERT_NOT_REACHED() in DocumentOrderedMap::get() when removing SVG subtree
https://bugs.webkit.org/show_bug.cgi?id=132669
<rdar://problem/14931432>
Reviewed by Brent Fulgham and Ryosuke Niwa.
Source/WebCore:
Fixes an assertion failure when removing an SVG element with a duplicate id.
When removing an SVG element with id A we synchronously instruct each element that references A
to find the first element with id A, call this N, from the document root and register itself to
either receive subsequent notifications from N (say, there is another element with id A) or as
waiting for an element with id A (say, N = nullptr; => we removed the last element with id A from
the document). Because the elements that reference A perform this operation synchronously when
removing an element they consult an transient state of the DocumentOrderedMap when querying for the
element with id A.
Without loss of generality, let E, E_1, E_2, and E_3 be elements, where E_1, E_2, E_3 are children
of E in that order and E_1.id = E_2.id = A and E_3.href = #A (that is, it references an element
with id A). Suppose we remove E then we remove E_1, update DocumentOrderedMap to decrement its count
for id A, and notify E_3 to look for an element with id A. This leads to an assertion failure since
DocumentOrderedMap expects to find an element with id A, E_2, but cannot find such an element when
traversing from the document root because E was unlinked from the document root (i.e. E_2 is in a
disjoint subtree).
Tests: svg/custom/change-id-of-use-during-removal.html
svg/custom/remove-subtree-including-path-with-duplicate-id-referenced-by-later-textpath.html
svg/custom/remove-subtree-including-text-with-duplicate-id-referenced-by-later-tref.html
svg/custom/remove-subtree-including-use-with-duplicate-id-referenced-by-earlier-use.html
svg/custom/remove-subtree-including-use-with-duplicate-id-referenced-by-later-animate.html
svg/custom/remove-subtree-including-use-with-duplicate-id-referenced-by-later-feimage.html
svg/custom/remove-subtree-including-use-with-duplicate-id-referenced-by-later-mpath.html
svg/custom/remove-subtree-including-use-with-duplicate-id-referenced-by-later-use.html
svg/custom/remove-subtree-including-use-with-duplicate-id-referenced-by-later-use2.html
svg/custom/remove-subtree-including-use-with-duplicate-id-referenced-by-use-in-different-subtree.html
svg/custom/remove-subtree-including-use-with-duplicate-id-referenced-by-use-with-duplicate-id-in-different-subtree.html
svg/custom/remove-use-with-duplicate-id-referenced-by-later-use.html
* dom/ContainerNode.cpp:
(WebCore::ContainerNode::removeChild): Call SVGDocumentExtensions::rebuildElements() after we remove
a DOM subtree so that applicable SVG elements can update their referenced element when the DocumentOrderedMap
is in a stable-state.
(WebCore::ContainerNode::removeChildren): Ditto.
* svg/SVGDocumentExtensions.cpp:
(WebCore::SVGDocumentExtensions::rebuildElements): Added; notifies SVG elements that their href attribute
changed so that they query the DocumentOrderedMap for the element they reference by id in their href attribute.
(WebCore::SVGDocumentExtensions::clearTargetDependencies): Added; Called from removing
an SVG element S from the DOM. Appends all elements that reference the id of S to the end of a Vector of
elements to be rebuilt (when SVGDocumentExtensions::rebuildElements() is called) and notifies these elements
that have been marked to be rebuilt so that they can invalidate their state (e.g. stop animating).
(WebCore::SVGDocumentExtensions::rebuildAllElementReferencesForTarget): Changed to take its argument by reference
(since it's always non-null) and simplified logic to synchronously notify SVG updates that their referenced element
may have changed. Calling SVGElement::svgAttributeChanged() on an element E should at most remove the dependencies
of E.
* svg/SVGDocumentExtensions.h:
* svg/SVGElement.cpp:
(WebCore::SVGElement::~SVGElement): Substitute "*this" for "this" as SVGDocumentExtensions::rebuildAllElementReferencesForTarget()
now takes a reference instead of a pointer.
(WebCore::SVGElement::removedFrom): Modified to call SVGDocumentExtensions::clearTargetDependencies().
(WebCore::SVGElement::attributeChanged): Substitute "*this" for "this" as SVGDocumentExtensions::rebuildAllElementReferencesForTarget()
now takes a reference instead of a pointer.
* svg/SVGElement.h:
(WebCore::SVGElement::callClearTarget): Added; calls through to private virtual SVGElement::clearTarget().
(WebCore::SVGElement::clearTarget): Added.
* svg/SVGTRefElement.cpp:
(WebCore::SVGTRefElement::clearTarget): Added.
* svg/SVGTRefElement.h:
* svg/animation/SVGSMILElement.cpp:
(WebCore::SVGSMILElement::clearTarget): Added.
* svg/animation/SVGSMILElement.h:
LayoutTests:
Add tests to ensure that we don't cause an assertion failure when removing an SVG element with a duplicate id.
* svg/custom/change-id-of-use-during-removal-expected.txt: Added.
* svg/custom/change-id-of-use-during-removal.html: Added.
* svg/custom/remove-subtree-including-path-with-duplicate-id-referenced-by-later-textpath-expected.txt: Added.
* svg/custom/remove-subtree-including-path-with-duplicate-id-referenced-by-later-textpath.html: Added.
* svg/custom/remove-subtree-including-text-with-duplicate-id-referenced-by-later-tref-expected.txt: Added.
* svg/custom/remove-subtree-including-text-with-duplicate-id-referenced-by-later-tref.html: Added.
* svg/custom/remove-subtree-including-use-with-duplicate-id-referenced-by-earlier-use-expected.txt: Added.
* svg/custom/remove-subtree-including-use-with-duplicate-id-referenced-by-earlier-use.html: Added.
* svg/custom/remove-subtree-including-use-with-duplicate-id-referenced-by-later-animate-expected.txt: Added.
* svg/custom/remove-subtree-including-use-with-duplicate-id-referenced-by-later-animate.html: Added.
* svg/custom/remove-subtree-including-use-with-duplicate-id-referenced-by-later-feimage-expected.txt: Added.
* svg/custom/remove-subtree-including-use-with-duplicate-id-referenced-by-later-feimage.html: Added.
* svg/custom/remove-subtree-including-use-with-duplicate-id-referenced-by-later-mpath-expected.txt: Added.
* svg/custom/remove-subtree-including-use-with-duplicate-id-referenced-by-later-mpath.html: Added.
* svg/custom/remove-subtree-including-use-with-duplicate-id-referenced-by-later-use-expected.txt: Added.
* svg/custom/remove-subtree-including-use-with-duplicate-id-referenced-by-later-use.html: Added.
* svg/custom/remove-subtree-including-use-with-duplicate-id-referenced-by-later-use2-expected.txt: Added.
* svg/custom/remove-subtree-including-use-with-duplicate-id-referenced-by-later-use2.html: Added.
* svg/custom/remove-subtree-including-use-with-duplicate-id-referenced-by-use-in-different-subtree-expected.txt: Added.
* svg/custom/remove-subtree-including-use-with-duplicate-id-referenced-by-use-in-different-subtree.html: Added.
* svg/custom/remove-subtree-including-use-with-duplicate-id-referenced-by-use-with-duplicate-id-in-different-subtree-expected.html: Added.
* svg/custom/remove-subtree-including-use-with-duplicate-id-referenced-by-use-with-duplicate-id-in-different-subtree.html: Added.
* svg/custom/remove-use-with-duplicate-id-referenced-by-later-use-expected.html: Added.
* svg/custom/remove-use-with-duplicate-id-referenced-by-later-use.html: Added.</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsChangeLog">trunk/LayoutTests/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoredomContainerNodecpp">trunk/Source/WebCore/dom/ContainerNode.cpp</a></li>
<li><a href="#trunkSourceWebCoresvgSVGDocumentExtensionscpp">trunk/Source/WebCore/svg/SVGDocumentExtensions.cpp</a></li>
<li><a href="#trunkSourceWebCoresvgSVGDocumentExtensionsh">trunk/Source/WebCore/svg/SVGDocumentExtensions.h</a></li>
<li><a href="#trunkSourceWebCoresvgSVGElementcpp">trunk/Source/WebCore/svg/SVGElement.cpp</a></li>
<li><a href="#trunkSourceWebCoresvgSVGElementh">trunk/Source/WebCore/svg/SVGElement.h</a></li>
<li><a href="#trunkSourceWebCoresvgSVGTRefElementcpp">trunk/Source/WebCore/svg/SVGTRefElement.cpp</a></li>
<li><a href="#trunkSourceWebCoresvgSVGTRefElementh">trunk/Source/WebCore/svg/SVGTRefElement.h</a></li>
<li><a href="#trunkSourceWebCoresvganimationSVGSMILElementcpp">trunk/Source/WebCore/svg/animation/SVGSMILElement.cpp</a></li>
<li><a href="#trunkSourceWebCoresvganimationSVGSMILElementh">trunk/Source/WebCore/svg/animation/SVGSMILElement.h</a></li>
</ul>
<h3>Added Paths</h3>
<ul>
<li><a href="#trunkLayoutTestssvgcustomchangeidofuseduringremovalexpectedtxt">trunk/LayoutTests/svg/custom/change-id-of-use-during-removal-expected.txt</a></li>
<li><a href="#trunkLayoutTestssvgcustomchangeidofuseduringremovalhtml">trunk/LayoutTests/svg/custom/change-id-of-use-during-removal.html</a></li>
<li><a href="#trunkLayoutTestssvgcustomremovesubtreeincludingpathwithduplicateidreferencedbylatertextpathexpectedtxt">trunk/LayoutTests/svg/custom/remove-subtree-including-path-with-duplicate-id-referenced-by-later-textpath-expected.txt</a></li>
<li><a href="#trunkLayoutTestssvgcustomremovesubtreeincludingpathwithduplicateidreferencedbylatertextpathhtml">trunk/LayoutTests/svg/custom/remove-subtree-including-path-with-duplicate-id-referenced-by-later-textpath.html</a></li>
<li><a href="#trunkLayoutTestssvgcustomremovesubtreeincludingtextwithduplicateidreferencedbylatertrefexpectedtxt">trunk/LayoutTests/svg/custom/remove-subtree-including-text-with-duplicate-id-referenced-by-later-tref-expected.txt</a></li>
<li><a href="#trunkLayoutTestssvgcustomremovesubtreeincludingtextwithduplicateidreferencedbylatertrefhtml">trunk/LayoutTests/svg/custom/remove-subtree-including-text-with-duplicate-id-referenced-by-later-tref.html</a></li>
<li><a href="#trunkLayoutTestssvgcustomremovesubtreeincludingusewithduplicateidreferencedbyearlieruseexpectedtxt">trunk/LayoutTests/svg/custom/remove-subtree-including-use-with-duplicate-id-referenced-by-earlier-use-expected.txt</a></li>
<li><a href="#trunkLayoutTestssvgcustomremovesubtreeincludingusewithduplicateidreferencedbyearlierusehtml">trunk/LayoutTests/svg/custom/remove-subtree-including-use-with-duplicate-id-referenced-by-earlier-use.html</a></li>
<li><a href="#trunkLayoutTestssvgcustomremovesubtreeincludingusewithduplicateidreferencedbylateranimateexpectedtxt">trunk/LayoutTests/svg/custom/remove-subtree-including-use-with-duplicate-id-referenced-by-later-animate-expected.txt</a></li>
<li><a href="#trunkLayoutTestssvgcustomremovesubtreeincludingusewithduplicateidreferencedbylateranimatehtml">trunk/LayoutTests/svg/custom/remove-subtree-including-use-with-duplicate-id-referenced-by-later-animate.html</a></li>
<li><a href="#trunkLayoutTestssvgcustomremovesubtreeincludingusewithduplicateidreferencedbylaterfeimageexpectedtxt">trunk/LayoutTests/svg/custom/remove-subtree-including-use-with-duplicate-id-referenced-by-later-feimage-expected.txt</a></li>
<li><a href="#trunkLayoutTestssvgcustomremovesubtreeincludingusewithduplicateidreferencedbylaterfeimagehtml">trunk/LayoutTests/svg/custom/remove-subtree-including-use-with-duplicate-id-referenced-by-later-feimage.html</a></li>
<li><a href="#trunkLayoutTestssvgcustomremovesubtreeincludingusewithduplicateidreferencedbylatermpathexpectedtxt">trunk/LayoutTests/svg/custom/remove-subtree-including-use-with-duplicate-id-referenced-by-later-mpath-expected.txt</a></li>
<li><a href="#trunkLayoutTestssvgcustomremovesubtreeincludingusewithduplicateidreferencedbylatermpathhtml">trunk/LayoutTests/svg/custom/remove-subtree-including-use-with-duplicate-id-referenced-by-later-mpath.html</a></li>
<li><a href="#trunkLayoutTestssvgcustomremovesubtreeincludingusewithduplicateidreferencedbylateruseexpectedtxt">trunk/LayoutTests/svg/custom/remove-subtree-including-use-with-duplicate-id-referenced-by-later-use-expected.txt</a></li>
<li><a href="#trunkLayoutTestssvgcustomremovesubtreeincludingusewithduplicateidreferencedbylaterusehtml">trunk/LayoutTests/svg/custom/remove-subtree-including-use-with-duplicate-id-referenced-by-later-use.html</a></li>
<li><a href="#trunkLayoutTestssvgcustomremovesubtreeincludingusewithduplicateidreferencedbylateruse2expectedtxt">trunk/LayoutTests/svg/custom/remove-subtree-including-use-with-duplicate-id-referenced-by-later-use2-expected.txt</a></li>
<li><a href="#trunkLayoutTestssvgcustomremovesubtreeincludingusewithduplicateidreferencedbylateruse2html">trunk/LayoutTests/svg/custom/remove-subtree-including-use-with-duplicate-id-referenced-by-later-use2.html</a></li>
<li><a href="#trunkLayoutTestssvgcustomremovesubtreeincludingusewithduplicateidreferencedbyuseindifferentsubtreeexpectedtxt">trunk/LayoutTests/svg/custom/remove-subtree-including-use-with-duplicate-id-referenced-by-use-in-different-subtree-expected.txt</a></li>
<li><a href="#trunkLayoutTestssvgcustomremovesubtreeincludingusewithduplicateidreferencedbyuseindifferentsubtreehtml">trunk/LayoutTests/svg/custom/remove-subtree-including-use-with-duplicate-id-referenced-by-use-in-different-subtree.html</a></li>
<li><a href="#trunkLayoutTestssvgcustomremovesubtreeincludingusewithduplicateidreferencedbyusewithduplicateidindifferentsubtreeexpectedhtml">trunk/LayoutTests/svg/custom/remove-subtree-including-use-with-duplicate-id-referenced-by-use-with-duplicate-id-in-different-subtree-expected.html</a></li>
<li><a href="#trunkLayoutTestssvgcustomremovesubtreeincludingusewithduplicateidreferencedbyusewithduplicateidindifferentsubtreehtml">trunk/LayoutTests/svg/custom/remove-subtree-including-use-with-duplicate-id-referenced-by-use-with-duplicate-id-in-different-subtree.html</a></li>
<li><a href="#trunkLayoutTestssvgcustomremoveusewithduplicateidreferencedbylateruseexpectedhtml">trunk/LayoutTests/svg/custom/remove-use-with-duplicate-id-referenced-by-later-use-expected.html</a></li>
<li><a href="#trunkLayoutTestssvgcustomremoveusewithduplicateidreferencedbylaterusehtml">trunk/LayoutTests/svg/custom/remove-use-with-duplicate-id-referenced-by-later-use.html</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ChangeLog (168920 => 168921)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ChangeLog        2014-05-16 03:56:10 UTC (rev 168920)
+++ trunk/LayoutTests/ChangeLog        2014-05-16 04:30:12 UTC (rev 168921)
</span><span class="lines">@@ -1,5 +1,40 @@
</span><span class="cx"> 2014-05-15 Daniel Bates <dabates@apple.com>
</span><span class="cx">
</span><ins>+ ASSERT_NOT_REACHED() in DocumentOrderedMap::get() when removing SVG subtree
+ https://bugs.webkit.org/show_bug.cgi?id=132669
+ <rdar://problem/14931432>
+
+ Reviewed by Brent Fulgham and Ryosuke Niwa.
+
+ Add tests to ensure that we don't cause an assertion failure when removing an SVG element with a duplicate id.
+
+ * svg/custom/change-id-of-use-during-removal-expected.txt: Added.
+ * svg/custom/change-id-of-use-during-removal.html: Added.
+ * svg/custom/remove-subtree-including-path-with-duplicate-id-referenced-by-later-textpath-expected.txt: Added.
+ * svg/custom/remove-subtree-including-path-with-duplicate-id-referenced-by-later-textpath.html: Added.
+ * svg/custom/remove-subtree-including-text-with-duplicate-id-referenced-by-later-tref-expected.txt: Added.
+ * svg/custom/remove-subtree-including-text-with-duplicate-id-referenced-by-later-tref.html: Added.
+ * svg/custom/remove-subtree-including-use-with-duplicate-id-referenced-by-earlier-use-expected.txt: Added.
+ * svg/custom/remove-subtree-including-use-with-duplicate-id-referenced-by-earlier-use.html: Added.
+ * svg/custom/remove-subtree-including-use-with-duplicate-id-referenced-by-later-animate-expected.txt: Added.
+ * svg/custom/remove-subtree-including-use-with-duplicate-id-referenced-by-later-animate.html: Added.
+ * svg/custom/remove-subtree-including-use-with-duplicate-id-referenced-by-later-feimage-expected.txt: Added.
+ * svg/custom/remove-subtree-including-use-with-duplicate-id-referenced-by-later-feimage.html: Added.
+ * svg/custom/remove-subtree-including-use-with-duplicate-id-referenced-by-later-mpath-expected.txt: Added.
+ * svg/custom/remove-subtree-including-use-with-duplicate-id-referenced-by-later-mpath.html: Added.
+ * svg/custom/remove-subtree-including-use-with-duplicate-id-referenced-by-later-use-expected.txt: Added.
+ * svg/custom/remove-subtree-including-use-with-duplicate-id-referenced-by-later-use.html: Added.
+ * svg/custom/remove-subtree-including-use-with-duplicate-id-referenced-by-later-use2-expected.txt: Added.
+ * svg/custom/remove-subtree-including-use-with-duplicate-id-referenced-by-later-use2.html: Added.
+ * svg/custom/remove-subtree-including-use-with-duplicate-id-referenced-by-use-in-different-subtree-expected.txt: Added.
+ * svg/custom/remove-subtree-including-use-with-duplicate-id-referenced-by-use-in-different-subtree.html: Added.
+ * svg/custom/remove-subtree-including-use-with-duplicate-id-referenced-by-use-with-duplicate-id-in-different-subtree-expected.html: Added.
+ * svg/custom/remove-subtree-including-use-with-duplicate-id-referenced-by-use-with-duplicate-id-in-different-subtree.html: Added.
+ * svg/custom/remove-use-with-duplicate-id-referenced-by-later-use-expected.html: Added.
+ * svg/custom/remove-use-with-duplicate-id-referenced-by-later-use.html: Added.
+
+2014-05-15 Daniel Bates <dabates@apple.com>
+
</ins><span class="cx"> SVG element may reference arbitrary DOM element before running its insertion logic
</span><span class="cx"> https://bugs.webkit.org/show_bug.cgi?id=132757
</span><span class="cx"> <rdar://problem/15703817>
</span></span></pre></div>
<a id="trunkLayoutTestssvgcustomchangeidofuseduringremovalexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/svg/custom/change-id-of-use-during-removal-expected.txt (0 => 168921)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/svg/custom/change-id-of-use-during-removal-expected.txt         (rev 0)
+++ trunk/LayoutTests/svg/custom/change-id-of-use-during-removal-expected.txt        2014-05-16 04:30:12 UTC (rev 168921)
</span><span class="lines">@@ -0,0 +1,3 @@
</span><ins>+This tests that we don't cause an assertion failure when changing the id of a <use> on removal from the document despite a later <use> referencing its former id.
+
+PASS
</ins></span></pre></div>
<a id="trunkLayoutTestssvgcustomchangeidofuseduringremovalhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/svg/custom/change-id-of-use-during-removal.html (0 => 168921)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/svg/custom/change-id-of-use-during-removal.html         (rev 0)
+++ trunk/LayoutTests/svg/custom/change-id-of-use-during-removal.html        2014-05-16 04:30:12 UTC (rev 168921)
</span><span class="lines">@@ -0,0 +1,31 @@
</span><ins>+<!DOCTYPE html>
+<html>
+<head>
+<script>
+if (window.testRunner)
+ testRunner.dumpAsText();
+
+function handleNodeRemoved(event)
+{
+ document.removeEventListener("DOMNodeRemoved", handleNodeRemoved, false);
+ firstUseElement.id = "B";
+}
+
+document.addEventListener("DOMNodeRemoved", handleNodeRemoved, false);
+</script>
+</head>
+<body>
+<p>This tests that we don't cause an assertion failure when changing the id of a &lt;use&gt; on removal from the document despite a later &lt;use&gt; referencing its former id.</p>
+<svg>
+ <use id="A"></use>
+ <use id="A"></use>
+ <use xlink:href="#A"></use>
+</svg>
+<script>
+var firstUseElement = document.querySelector("use");
+var svg = document.querySelector("svg");
+document.body.removeChild(svg);
+</script>
+<p>PASS</p>
+</body>
+</html>
</ins></span></pre></div>
<a id="trunkLayoutTestssvgcustomremovesubtreeincludingpathwithduplicateidreferencedbylatertextpathexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/svg/custom/remove-subtree-including-path-with-duplicate-id-referenced-by-later-textpath-expected.txt (0 => 168921)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/svg/custom/remove-subtree-including-path-with-duplicate-id-referenced-by-later-textpath-expected.txt         (rev 0)
+++ trunk/LayoutTests/svg/custom/remove-subtree-including-path-with-duplicate-id-referenced-by-later-textpath-expected.txt        2014-05-16 04:30:12 UTC (rev 168921)
</span><span class="lines">@@ -0,0 +1,3 @@
</span><ins>+This tests that we don't cause an assertion failure when implicitly removing a <path> (by removing its parent), with the same id as another element, that is referenced by a later <textpath>.
+
+PASS
</ins></span></pre></div>
<a id="trunkLayoutTestssvgcustomremovesubtreeincludingpathwithduplicateidreferencedbylatertextpathhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/svg/custom/remove-subtree-including-path-with-duplicate-id-referenced-by-later-textpath.html (0 => 168921)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/svg/custom/remove-subtree-including-path-with-duplicate-id-referenced-by-later-textpath.html         (rev 0)
+++ trunk/LayoutTests/svg/custom/remove-subtree-including-path-with-duplicate-id-referenced-by-later-textpath.html        2014-05-16 04:30:12 UTC (rev 168921)
</span><span class="lines">@@ -0,0 +1,24 @@
</span><ins>+<!DOCTYPE html>
+<html>
+<head>
+<script>
+if (window.testRunner)
+ testRunner.dumpAsText();
+</script>
+</head>
+<body>
+<p>This tests that we don't cause an assertion failure when implicitly removing a &lt;path&gt; (by removing its parent), with the same id as another element, that is referenced by a later &lt;textpath&gt;.</p>
+<svg style="width: 200px; height: 200px">
+ <path id="A" d="M 0 20 L 100 20 L 100 120 L 0 120" fill="red" />
+ <path id="A" d="M 0 20 L 100 20 L 100 120 L 0 120" fill="red" />
+ <text>
+ <textPath xlink:href="#A">FAIL FAIL FAIL FAIL FAIL FAIL FAIL FAIL</textPath>
+ </text>
+</svg>
+<script>
+var svg = document.querySelector("svg");
+document.body.removeChild(svg);
+</script>
+<p>PASS</p>
+</body>
+</html>
</ins></span></pre></div>
<a id="trunkLayoutTestssvgcustomremovesubtreeincludingtextwithduplicateidreferencedbylatertrefexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/svg/custom/remove-subtree-including-text-with-duplicate-id-referenced-by-later-tref-expected.txt (0 => 168921)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/svg/custom/remove-subtree-including-text-with-duplicate-id-referenced-by-later-tref-expected.txt         (rev 0)
+++ trunk/LayoutTests/svg/custom/remove-subtree-including-text-with-duplicate-id-referenced-by-later-tref-expected.txt        2014-05-16 04:30:12 UTC (rev 168921)
</span><span class="lines">@@ -0,0 +1,3 @@
</span><ins>+This tests that we don't cause an assertion failure when implicitly removing a <text> (by removing its parent), with the same id as another element, that is referenced by a later <tref>.
+
+PASS
</ins></span></pre></div>
<a id="trunkLayoutTestssvgcustomremovesubtreeincludingtextwithduplicateidreferencedbylatertrefhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/svg/custom/remove-subtree-including-text-with-duplicate-id-referenced-by-later-tref.html (0 => 168921)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/svg/custom/remove-subtree-including-text-with-duplicate-id-referenced-by-later-tref.html         (rev 0)
+++ trunk/LayoutTests/svg/custom/remove-subtree-including-text-with-duplicate-id-referenced-by-later-tref.html        2014-05-16 04:30:12 UTC (rev 168921)
</span><span class="lines">@@ -0,0 +1,26 @@
</span><ins>+<!DOCTYPE html>
+<html>
+<head>
+<script>
+if (window.testRunner)
+ testRunner.dumpAsText();
+</script>
+</head>
+<body>
+<p>This tests that we don't cause an assertion failure when implicitly removing a &lt;text&gt; (by removing its parent), with the same id as another element, that is referenced by a later &lt;tref&gt;.</p>
+<svg version="1.1">
+ <defs>
+ <text id="A">FAIL</text>
+ <text id="A">FAIL</text>
+ </defs>
+ <text x="0" y="20">
+ <tref xlink:href="#A"></tref>
+ </text>
+</svg>
+<script>
+var svg = document.querySelector("svg");
+document.body.removeChild(svg);
+</script>
+<p>PASS</p>
+</body>
+</html>
</ins></span></pre></div>
<a id="trunkLayoutTestssvgcustomremovesubtreeincludingusewithduplicateidreferencedbyearlieruseexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/svg/custom/remove-subtree-including-use-with-duplicate-id-referenced-by-earlier-use-expected.txt (0 => 168921)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/svg/custom/remove-subtree-including-use-with-duplicate-id-referenced-by-earlier-use-expected.txt         (rev 0)
+++ trunk/LayoutTests/svg/custom/remove-subtree-including-use-with-duplicate-id-referenced-by-earlier-use-expected.txt        2014-05-16 04:30:12 UTC (rev 168921)
</span><span class="lines">@@ -0,0 +1,3 @@
</span><ins>+This tests that we don't cause an assertion failure when implicitly removing a <use> (by removing its parent), with the same id as another element, that is referenced by an earlier <use>.
+
+PASS
</ins></span></pre></div>
<a id="trunkLayoutTestssvgcustomremovesubtreeincludingusewithduplicateidreferencedbyearlierusehtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/svg/custom/remove-subtree-including-use-with-duplicate-id-referenced-by-earlier-use.html (0 => 168921)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/svg/custom/remove-subtree-including-use-with-duplicate-id-referenced-by-earlier-use.html         (rev 0)
+++ trunk/LayoutTests/svg/custom/remove-subtree-including-use-with-duplicate-id-referenced-by-earlier-use.html        2014-05-16 04:30:12 UTC (rev 168921)
</span><span class="lines">@@ -0,0 +1,22 @@
</span><ins>+<!DOCTYPE html>
+<html>
+<head>
+<script>
+if (window.testRunner)
+ testRunner.dumpAsText();
+</script>
+</head>
+<body>
+<p>This tests that we don't cause an assertion failure when implicitly removing a &lt;use&gt; (by removing its parent), with the same id as another element, that is referenced by an earlier &lt;use&gt;.</p>
+<svg>
+ <use xlink:href="#A"></use>
+ <use id="A"></use>
+ <use id="A"></use>
+</svg>
+<script>
+var svg = document.querySelector("svg");
+document.body.removeChild(svg);
+</script>
+<p>PASS</p>
+</body>
+</html>
</ins></span></pre></div>
<a id="trunkLayoutTestssvgcustomremovesubtreeincludingusewithduplicateidreferencedbylateranimateexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/svg/custom/remove-subtree-including-use-with-duplicate-id-referenced-by-later-animate-expected.txt (0 => 168921)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/svg/custom/remove-subtree-including-use-with-duplicate-id-referenced-by-later-animate-expected.txt         (rev 0)
+++ trunk/LayoutTests/svg/custom/remove-subtree-including-use-with-duplicate-id-referenced-by-later-animate-expected.txt        2014-05-16 04:30:12 UTC (rev 168921)
</span><span class="lines">@@ -0,0 +1,3 @@
</span><ins>+This tests that we don't cause an assertion failure when implicitly removing a <use> (by removing its parent), with the same id as another element, that is referenced by a later <animate>.
+
+PASS
</ins></span></pre></div>
<a id="trunkLayoutTestssvgcustomremovesubtreeincludingusewithduplicateidreferencedbylateranimatehtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/svg/custom/remove-subtree-including-use-with-duplicate-id-referenced-by-later-animate.html (0 => 168921)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/svg/custom/remove-subtree-including-use-with-duplicate-id-referenced-by-later-animate.html         (rev 0)
+++ trunk/LayoutTests/svg/custom/remove-subtree-including-use-with-duplicate-id-referenced-by-later-animate.html        2014-05-16 04:30:12 UTC (rev 168921)
</span><span class="lines">@@ -0,0 +1,22 @@
</span><ins>+<!DOCTYPE html>
+<html>
+<head>
+<script>
+if (window.testRunner)
+ testRunner.dumpAsText();
+</script>
+</head>
+<body>
+<p>This tests that we don't cause an assertion failure when implicitly removing a &lt;use&gt; (by removing its parent), with the same id as another element, that is referenced by a later &lt;animate&gt;.</p>
+<svg>
+ <use id="A"></use>
+ <use id="A"></use>
+ <animate xlink:href="#A"></animate>
+</svg>
+<script>
+var svg = document.querySelector("svg");
+document.body.removeChild(svg);
+</script>
+<p>PASS</p>
+</body>
+</html>
</ins></span></pre></div>
<a id="trunkLayoutTestssvgcustomremovesubtreeincludingusewithduplicateidreferencedbylaterfeimageexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/svg/custom/remove-subtree-including-use-with-duplicate-id-referenced-by-later-feimage-expected.txt (0 => 168921)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/svg/custom/remove-subtree-including-use-with-duplicate-id-referenced-by-later-feimage-expected.txt         (rev 0)
+++ trunk/LayoutTests/svg/custom/remove-subtree-including-use-with-duplicate-id-referenced-by-later-feimage-expected.txt        2014-05-16 04:30:12 UTC (rev 168921)
</span><span class="lines">@@ -0,0 +1,3 @@
</span><ins>+This tests that we don't cause an assertion failure when implicitly removing a <use> (by removing its parent), with the same id as another element, that is referenced by a later <feimage>.
+
+PASS
</ins></span></pre></div>
<a id="trunkLayoutTestssvgcustomremovesubtreeincludingusewithduplicateidreferencedbylaterfeimagehtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/svg/custom/remove-subtree-including-use-with-duplicate-id-referenced-by-later-feimage.html (0 => 168921)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/svg/custom/remove-subtree-including-use-with-duplicate-id-referenced-by-later-feimage.html         (rev 0)
+++ trunk/LayoutTests/svg/custom/remove-subtree-including-use-with-duplicate-id-referenced-by-later-feimage.html        2014-05-16 04:30:12 UTC (rev 168921)
</span><span class="lines">@@ -0,0 +1,22 @@
</span><ins>+<!DOCTYPE html>
+<html>
+<head>
+<script>
+if (window.testRunner)
+ testRunner.dumpAsText();
+</script>
+</head>
+<body>
+<p>This tests that we don't cause an assertion failure when implicitly removing a &lt;use&gt; (by removing its parent), with the same id as another element, that is referenced by a later &lt;feimage&gt;.</p>
+<svg>
+ <use id="A"></use>
+ <use id="A"></use>
+ <feimage xlink:href="#A"></feimage>
+</svg>
+<script>
+var svg = document.querySelector("svg");
+document.body.removeChild(svg);
+</script>
+<p>PASS</p>
+</body>
+</html>
</ins></span></pre></div>
<a id="trunkLayoutTestssvgcustomremovesubtreeincludingusewithduplicateidreferencedbylatermpathexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/svg/custom/remove-subtree-including-use-with-duplicate-id-referenced-by-later-mpath-expected.txt (0 => 168921)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/svg/custom/remove-subtree-including-use-with-duplicate-id-referenced-by-later-mpath-expected.txt         (rev 0)
+++ trunk/LayoutTests/svg/custom/remove-subtree-including-use-with-duplicate-id-referenced-by-later-mpath-expected.txt        2014-05-16 04:30:12 UTC (rev 168921)
</span><span class="lines">@@ -0,0 +1,3 @@
</span><ins>+This tests that we don't cause an assertion failure when implicitly removing a <use> (by removing its parent), with the same id as another element, that is referenced by a later <mpath>.
+
+PASS
</ins></span></pre></div>
<a id="trunkLayoutTestssvgcustomremovesubtreeincludingusewithduplicateidreferencedbylatermpathhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/svg/custom/remove-subtree-including-use-with-duplicate-id-referenced-by-later-mpath.html (0 => 168921)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/svg/custom/remove-subtree-including-use-with-duplicate-id-referenced-by-later-mpath.html         (rev 0)
+++ trunk/LayoutTests/svg/custom/remove-subtree-including-use-with-duplicate-id-referenced-by-later-mpath.html        2014-05-16 04:30:12 UTC (rev 168921)
</span><span class="lines">@@ -0,0 +1,22 @@
</span><ins>+<!DOCTYPE html>
+<html>
+<head>
+<script>
+if (window.testRunner)
+ testRunner.dumpAsText();
+</script>
+</head>
+<body>
+<p>This tests that we don't cause an assertion failure when implicitly removing a &lt;use&gt; (by removing its parent), with the same id as another element, that is referenced by a later &lt;mpath&gt;.</p>
+<svg>
+ <use id="A"></use>
+ <use id="A"></use>
+ <mpath xlink:href="#A"></mpath>
+</svg>
+<script>
+var svg = document.querySelector("svg");
+document.body.removeChild(svg);
+</script>
+<p>PASS</p>
+</body>
+</html>
</ins></span></pre></div>
<a id="trunkLayoutTestssvgcustomremovesubtreeincludingusewithduplicateidreferencedbylateruseexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/svg/custom/remove-subtree-including-use-with-duplicate-id-referenced-by-later-use-expected.txt (0 => 168921)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/svg/custom/remove-subtree-including-use-with-duplicate-id-referenced-by-later-use-expected.txt         (rev 0)
+++ trunk/LayoutTests/svg/custom/remove-subtree-including-use-with-duplicate-id-referenced-by-later-use-expected.txt        2014-05-16 04:30:12 UTC (rev 168921)
</span><span class="lines">@@ -0,0 +1,3 @@
</span><ins>+This tests that we don't cause an assertion failure when implicitly removing a <use> (by removing its parent), with the same id as another element, that is referenced by a later <use>.
+
+PASS
</ins></span></pre></div>
<a id="trunkLayoutTestssvgcustomremovesubtreeincludingusewithduplicateidreferencedbylaterusehtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/svg/custom/remove-subtree-including-use-with-duplicate-id-referenced-by-later-use.html (0 => 168921)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/svg/custom/remove-subtree-including-use-with-duplicate-id-referenced-by-later-use.html         (rev 0)
+++ trunk/LayoutTests/svg/custom/remove-subtree-including-use-with-duplicate-id-referenced-by-later-use.html        2014-05-16 04:30:12 UTC (rev 168921)
</span><span class="lines">@@ -0,0 +1,22 @@
</span><ins>+<!DOCTYPE html>
+<html>
+<head>
+<script>
+if (window.testRunner)
+ testRunner.dumpAsText();
+</script>
+</head>
+<body>
+<p>This tests that we don't cause an assertion failure when implicitly removing a &lt;use&gt; (by removing its parent), with the same id as another element, that is referenced by a later &lt;use&gt;.</p>
+<svg>
+ <use id="A"></use>
+ <use id="A"></use>
+ <use xlink:href="#A"></use>
+</svg>
+<script>
+var svg = document.querySelector("svg");
+document.body.removeChild(svg);
+</script>
+<p>PASS</p>
+</body>
+</html>
</ins></span></pre></div>
<a id="trunkLayoutTestssvgcustomremovesubtreeincludingusewithduplicateidreferencedbylateruse2expectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/svg/custom/remove-subtree-including-use-with-duplicate-id-referenced-by-later-use2-expected.txt (0 => 168921)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/svg/custom/remove-subtree-including-use-with-duplicate-id-referenced-by-later-use2-expected.txt         (rev 0)
+++ trunk/LayoutTests/svg/custom/remove-subtree-including-use-with-duplicate-id-referenced-by-later-use2-expected.txt        2014-05-16 04:30:12 UTC (rev 168921)
</span><span class="lines">@@ -0,0 +1,3 @@
</span><ins>+This tests that we don't cause an assertion failure when implicitly removing a <use> (by removing its parent), with the same id as another element, that is referenced by a later <use>.
+
+PASS
</ins></span></pre></div>
<a id="trunkLayoutTestssvgcustomremovesubtreeincludingusewithduplicateidreferencedbylateruse2html"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/svg/custom/remove-subtree-including-use-with-duplicate-id-referenced-by-later-use2.html (0 => 168921)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/svg/custom/remove-subtree-including-use-with-duplicate-id-referenced-by-later-use2.html         (rev 0)
+++ trunk/LayoutTests/svg/custom/remove-subtree-including-use-with-duplicate-id-referenced-by-later-use2.html        2014-05-16 04:30:12 UTC (rev 168921)
</span><span class="lines">@@ -0,0 +1,22 @@
</span><ins>+<!DOCTYPE html>
+<html>
+<head>
+<script>
+if (window.testRunner)
+ testRunner.dumpAsText();
+</script>
+</head>
+<body>
+<p>This tests that we don't cause an assertion failure when implicitly removing a &lt;use&gt; (by removing its parent), with the same id as another element, that is referenced by a later &lt;use&gt;.</p>
+<svg>
+ <use id="A"></use>
+ <g id="A"></g>
+ <use xlink:href="#A"></use>
+</svg>
+<script>
+var svg = document.querySelector("svg");
+document.body.removeChild(svg);
+</script>
+<p>PASS</p>
+</body>
+</html>
</ins></span></pre></div>
<a id="trunkLayoutTestssvgcustomremovesubtreeincludingusewithduplicateidreferencedbyuseindifferentsubtreeexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/svg/custom/remove-subtree-including-use-with-duplicate-id-referenced-by-use-in-different-subtree-expected.txt (0 => 168921)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/svg/custom/remove-subtree-including-use-with-duplicate-id-referenced-by-use-in-different-subtree-expected.txt         (rev 0)
+++ trunk/LayoutTests/svg/custom/remove-subtree-including-use-with-duplicate-id-referenced-by-use-in-different-subtree-expected.txt        2014-05-16 04:30:12 UTC (rev 168921)
</span><span class="lines">@@ -0,0 +1,3 @@
</span><ins>+This tests that we don't cause an assertion failure when implicitly removing a <use> (by removing its parent), with the same id as another element, that is referenced by a later <use> in a different SVG subtree.
+
+PASS
</ins></span></pre></div>
<a id="trunkLayoutTestssvgcustomremovesubtreeincludingusewithduplicateidreferencedbyuseindifferentsubtreehtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/svg/custom/remove-subtree-including-use-with-duplicate-id-referenced-by-use-in-different-subtree.html (0 => 168921)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/svg/custom/remove-subtree-including-use-with-duplicate-id-referenced-by-use-in-different-subtree.html         (rev 0)
+++ trunk/LayoutTests/svg/custom/remove-subtree-including-use-with-duplicate-id-referenced-by-use-in-different-subtree.html        2014-05-16 04:30:12 UTC (rev 168921)
</span><span class="lines">@@ -0,0 +1,33 @@
</span><ins>+<!DOCTYPE html>
+<html>
+<head>
+<script>
+if (window.testRunner)
+ testRunner.dumpAsText();
+</script>
+<style>
+svg {
+ height: 128px;
+ width: 128px;
+}
+</style>
+</head>
+<body>
+<p>This tests that we don't cause an assertion failure when implicitly removing a &lt;use&gt; (by removing its parent), with the same id as another element, that is referenced by a later &lt;use&gt; in a different SVG subtree.</p>
+<svg id="svg1">
+ <defs>
+ <text id="fail" x="0" y="20">FAIL</text>
+ </defs>
+ <use id="A" xlink:href="#fail"></use>
+ <use id="A" xlink:href="#fail"></use>
+</svg>
+<svg>
+ <use xlink:href="#A"></use>
+</svg>
+<script>
+var svg = document.getElementById("svg1");
+document.body.removeChild(svg);
+</script>
+<p>PASS</p>
+</body>
+</html>
</ins></span></pre></div>
<a id="trunkLayoutTestssvgcustomremovesubtreeincludingusewithduplicateidreferencedbyusewithduplicateidindifferentsubtreeexpectedhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/svg/custom/remove-subtree-including-use-with-duplicate-id-referenced-by-use-with-duplicate-id-in-different-subtree-expected.html (0 => 168921)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/svg/custom/remove-subtree-including-use-with-duplicate-id-referenced-by-use-with-duplicate-id-in-different-subtree-expected.html         (rev 0)
+++ trunk/LayoutTests/svg/custom/remove-subtree-including-use-with-duplicate-id-referenced-by-use-with-duplicate-id-in-different-subtree-expected.html        2014-05-16 04:30:12 UTC (rev 168921)
</span><span class="lines">@@ -0,0 +1,6 @@
</span><ins>+<!DOCTYPE html>
+<html>
+<body>
+<div style="width: 128px; height: 128px; background-color: green"></div>
+</body>
+</html>
</ins></span></pre></div>
<a id="trunkLayoutTestssvgcustomremovesubtreeincludingusewithduplicateidreferencedbyusewithduplicateidindifferentsubtreehtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/svg/custom/remove-subtree-including-use-with-duplicate-id-referenced-by-use-with-duplicate-id-in-different-subtree.html (0 => 168921)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/svg/custom/remove-subtree-including-use-with-duplicate-id-referenced-by-use-with-duplicate-id-in-different-subtree.html         (rev 0)
+++ trunk/LayoutTests/svg/custom/remove-subtree-including-use-with-duplicate-id-referenced-by-use-with-duplicate-id-in-different-subtree.html        2014-05-16 04:30:12 UTC (rev 168921)
</span><span class="lines">@@ -0,0 +1,32 @@
</span><ins>+<!DOCTYPE html>
+<html>
+<head>
+<style>
+svg {
+ height: 128px;
+ width: 128px;
+}
+</style>
+</head>
+<body>
+<!-- This tests that we don't cause an assertion failure when implicitly removing a <use> (by removing its parent), with the same id as other elements, that is referenced by a later <use> in a different SVG subtree. -->
+<svg id="svg1">
+ <defs>
+ <rect id="bad" x="0" y="0" width="128" height="128" fill="red"></rect>
+ </defs>
+ <use id="A" xlink:href="#bad"></use>
+ <use id="A" xlink:href="#bad"></use>
+</svg>
+<svg>
+ <defs>
+ <rect id="good" x="0" y="0" width="128" height="128" fill="green"></rect>
+ <use id="A" xlink:href="#good"></use> <!-- [1] -->
+ </defs>
+ <use xlink:href="#A"></use> <!-- [2] -->
+</svg>
+<script>
+var svg = document.getElementById("svg1");
+document.body.removeChild(svg); // [2] will depend on [1]
+</script>
+</body>
+</html>
</ins></span></pre></div>
<a id="trunkLayoutTestssvgcustomremoveusewithduplicateidreferencedbylateruseexpectedhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/svg/custom/remove-use-with-duplicate-id-referenced-by-later-use-expected.html (0 => 168921)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/svg/custom/remove-use-with-duplicate-id-referenced-by-later-use-expected.html         (rev 0)
+++ trunk/LayoutTests/svg/custom/remove-use-with-duplicate-id-referenced-by-later-use-expected.html        2014-05-16 04:30:12 UTC (rev 168921)
</span><span class="lines">@@ -0,0 +1,6 @@
</span><ins>+<!DOCTYPE html>
+<html>
+<body>
+<div style="width: 128px; height: 128px; background-color: green"></div>
+</body>
+</html>
</ins></span></pre></div>
<a id="trunkLayoutTestssvgcustomremoveusewithduplicateidreferencedbylaterusehtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/svg/custom/remove-use-with-duplicate-id-referenced-by-later-use.html (0 => 168921)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/svg/custom/remove-use-with-duplicate-id-referenced-by-later-use.html         (rev 0)
+++ trunk/LayoutTests/svg/custom/remove-use-with-duplicate-id-referenced-by-later-use.html        2014-05-16 04:30:12 UTC (rev 168921)
</span><span class="lines">@@ -0,0 +1,27 @@
</span><ins>+<!DOCTYPE html>
+<html>
+<head>
+<style>
+svg {
+ height: 128px;
+ width: 128px;
+}
+</style>
+</head>
+<body>
+<!-- This tests that we don't cause an assertion failure when removing a <use>, with the same id another element, that is referenced by a later <use>. -->
+<svg>
+ <defs>
+ <rect id="pass" x="0" y="0" width="128" height="128" fill="green"></rect>
+ <rect id="fail" x="0" y="0" width="128" height="128" fill="red"></rect>
+ <use id="A" xlink:href="#fail"></use>
+ <use id="A" xlink:href="#pass"></use>
+ </defs>
+ <use xlink:href="#A"></use>
+</svg>
+<script>
+var firstUseElement = document.querySelector("use");
+firstUseElement.parentNode.removeChild(firstUseElement);
+</script>
+</body>
+</html>
</ins></span></pre></div>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (168920 => 168921)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2014-05-16 03:56:10 UTC (rev 168920)
+++ trunk/Source/WebCore/ChangeLog        2014-05-16 04:30:12 UTC (rev 168921)
</span><span class="lines">@@ -1,3 +1,75 @@
</span><ins>+2014-05-15 Daniel Bates <dabates@apple.com>
+
+ ASSERT_NOT_REACHED() in DocumentOrderedMap::get() when removing SVG subtree
+ https://bugs.webkit.org/show_bug.cgi?id=132669
+ <rdar://problem/14931432>
+
+ Reviewed by Brent Fulgham and Ryosuke Niwa.
+
+ Fixes an assertion failure when removing an SVG element with a duplicate id.
+
+ When removing an SVG element with id A we synchronously instruct each element that references A
+ to find the first element with id A, call this N, from the document root and register itself to
+ either receive subsequent notifications from N (say, there is another element with id A) or as
+ waiting for an element with id A (say, N = nullptr; => we removed the last element with id A from
+ the document). Because the elements that reference A perform this operation synchronously when
+ removing an element they consult an transient state of the DocumentOrderedMap when querying for the
+ element with id A.
+
+ Without loss of generality, let E, E_1, E_2, and E_3 be elements, where E_1, E_2, E_3 are children
+ of E in that order and E_1.id = E_2.id = A and E_3.href = #A (that is, it references an element
+ with id A). Suppose we remove E then we remove E_1, update DocumentOrderedMap to decrement its count
+ for id A, and notify E_3 to look for an element with id A. This leads to an assertion failure since
+ DocumentOrderedMap expects to find an element with id A, E_2, but cannot find such an element when
+ traversing from the document root because E was unlinked from the document root (i.e. E_2 is in a
+ disjoint subtree).
+
+ Tests: svg/custom/change-id-of-use-during-removal.html
+ svg/custom/remove-subtree-including-path-with-duplicate-id-referenced-by-later-textpath.html
+ svg/custom/remove-subtree-including-text-with-duplicate-id-referenced-by-later-tref.html
+ svg/custom/remove-subtree-including-use-with-duplicate-id-referenced-by-earlier-use.html
+ svg/custom/remove-subtree-including-use-with-duplicate-id-referenced-by-later-animate.html
+ svg/custom/remove-subtree-including-use-with-duplicate-id-referenced-by-later-feimage.html
+ svg/custom/remove-subtree-including-use-with-duplicate-id-referenced-by-later-mpath.html
+ svg/custom/remove-subtree-including-use-with-duplicate-id-referenced-by-later-use.html
+ svg/custom/remove-subtree-including-use-with-duplicate-id-referenced-by-later-use2.html
+ svg/custom/remove-subtree-including-use-with-duplicate-id-referenced-by-use-in-different-subtree.html
+ svg/custom/remove-subtree-including-use-with-duplicate-id-referenced-by-use-with-duplicate-id-in-different-subtree.html
+ svg/custom/remove-use-with-duplicate-id-referenced-by-later-use.html
+
+ * dom/ContainerNode.cpp:
+ (WebCore::ContainerNode::removeChild): Call SVGDocumentExtensions::rebuildElements() after we remove
+ a DOM subtree so that applicable SVG elements can update their referenced element when the DocumentOrderedMap
+ is in a stable-state.
+ (WebCore::ContainerNode::removeChildren): Ditto.
+ * svg/SVGDocumentExtensions.cpp:
+ (WebCore::SVGDocumentExtensions::rebuildElements): Added; notifies SVG elements that their href attribute
+ changed so that they query the DocumentOrderedMap for the element they reference by id in their href attribute.
+ (WebCore::SVGDocumentExtensions::clearTargetDependencies): Added; Called from removing
+ an SVG element S from the DOM. Appends all elements that reference the id of S to the end of a Vector of
+ elements to be rebuilt (when SVGDocumentExtensions::rebuildElements() is called) and notifies these elements
+ that have been marked to be rebuilt so that they can invalidate their state (e.g. stop animating).
+ (WebCore::SVGDocumentExtensions::rebuildAllElementReferencesForTarget): Changed to take its argument by reference
+ (since it's always non-null) and simplified logic to synchronously notify SVG updates that their referenced element
+ may have changed. Calling SVGElement::svgAttributeChanged() on an element E should at most remove the dependencies
+ of E.
+ * svg/SVGDocumentExtensions.h:
+ * svg/SVGElement.cpp:
+ (WebCore::SVGElement::~SVGElement): Substitute "*this" for "this" as SVGDocumentExtensions::rebuildAllElementReferencesForTarget()
+ now takes a reference instead of a pointer.
+ (WebCore::SVGElement::removedFrom): Modified to call SVGDocumentExtensions::clearTargetDependencies().
+ (WebCore::SVGElement::attributeChanged): Substitute "*this" for "this" as SVGDocumentExtensions::rebuildAllElementReferencesForTarget()
+ now takes a reference instead of a pointer.
+ * svg/SVGElement.h:
+ (WebCore::SVGElement::callClearTarget): Added; calls through to private virtual SVGElement::clearTarget().
+ (WebCore::SVGElement::clearTarget): Added.
+ * svg/SVGTRefElement.cpp:
+ (WebCore::SVGTRefElement::clearTarget): Added.
+ * svg/SVGTRefElement.h:
+ * svg/animation/SVGSMILElement.cpp:
+ (WebCore::SVGSMILElement::clearTarget): Added.
+ * svg/animation/SVGSMILElement.h:
+
</ins><span class="cx"> 2014-05-15 Simon Fraser <simon.fraser@apple.com>
</span><span class="cx">
</span><span class="cx"> [iOS WK2] When zoomed, fixed elements jump at the start of a scroll, and jump back at the end.
</span></span></pre></div>
<a id="trunkSourceWebCoredomContainerNodecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/dom/ContainerNode.cpp (168920 => 168921)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/dom/ContainerNode.cpp        2014-05-16 03:56:10 UTC (rev 168920)
+++ trunk/Source/WebCore/dom/ContainerNode.cpp        2014-05-16 04:30:12 UTC (rev 168921)
</span><span class="lines">@@ -47,6 +47,8 @@
</span><span class="cx"> #include "RenderWidget.h"
</span><span class="cx"> #include "ResourceLoadScheduler.h"
</span><span class="cx"> #include "RootInlineBox.h"
</span><ins>+#include "SVGDocumentExtensions.h"
+#include "SVGNames.h"
</ins><span class="cx"> #include "SelectorQuery.h"
</span><span class="cx"> #include "TemplateContentDocumentFragment.h"
</span><span class="cx"> #include <wtf/CurrentTime.h>
</span><span class="lines">@@ -565,6 +567,14 @@
</span><span class="cx">
</span><span class="cx"> ChildNodeRemovalNotifier(*this).notify(child.get());
</span><span class="cx"> }
</span><ins>+
+
+ if (document().svgExtensions()) {
+ Element* shadowHost = this->shadowHost();
+ if (!shadowHost || !shadowHost->hasTagName(SVGNames::useTag))
+ document().accessSVGExtensions()->rebuildElements();
+ }
+
</ins><span class="cx"> dispatchSubtreeModifiedEvent();
</span><span class="cx">
</span><span class="cx"> return true;
</span><span class="lines">@@ -656,6 +666,12 @@
</span><span class="cx"> ChildNodeRemovalNotifier(*this).notify(removedChildren[i].get());
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+ if (document().svgExtensions()) {
+ Element* shadowHost = this->shadowHost();
+ if (!shadowHost || !shadowHost->hasTagName(SVGNames::useTag))
+ document().accessSVGExtensions()->rebuildElements();
+ }
+
</ins><span class="cx"> dispatchSubtreeModifiedEvent();
</span><span class="cx"> }
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCoresvgSVGDocumentExtensionscpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/svg/SVGDocumentExtensions.cpp (168920 => 168921)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/svg/SVGDocumentExtensions.cpp        2014-05-16 03:56:10 UTC (rev 168920)
+++ trunk/Source/WebCore/svg/SVGDocumentExtensions.cpp        2014-05-16 04:30:12 UTC (rev 168921)
</span><span class="lines">@@ -34,6 +34,7 @@
</span><span class="cx"> #include "SVGSMILElement.h"
</span><span class="cx"> #include "SVGSVGElement.h"
</span><span class="cx"> #include "ScriptableDocumentParser.h"
</span><ins>+#include "ShadowRoot.h"
</ins><span class="cx"> #include "XLinkNames.h"
</span><span class="cx"> #include <wtf/text/AtomicString.h>
</span><span class="cx">
</span><span class="lines">@@ -331,29 +332,48 @@
</span><span class="cx"> m_elementDependencies.remove(*it);
</span><span class="cx"> }
</span><span class="cx">
</span><del>-void SVGDocumentExtensions::rebuildAllElementReferencesForTarget(SVGElement* referencedElement)
</del><ins>+void SVGDocumentExtensions::rebuildElements()
</ins><span class="cx"> {
</span><del>- ASSERT(referencedElement);
- auto it = m_elementDependencies.find(referencedElement);
</del><ins>+ Vector<SVGElement*> shadowRebuildElements = std::move(m_rebuildElements);
+ for (auto* element : shadowRebuildElements)
+ element->svgAttributeChanged(XLinkNames::hrefAttr);
+}
+
+void SVGDocumentExtensions::clearTargetDependencies(SVGElement& referencedElement)
+{
+ if (referencedElement.isInShadowTree()) {
+ // The host element (e.g. <use>) of the shadow root will rebuild the shadow tree
+ // and all its references.
+ ASSERT(referencedElement.shadowRoot());
+ ASSERT(m_rebuildElements.contains(referencedElement.shadowRoot()->hostElement()));
+ return;
+ }
+ auto it = m_elementDependencies.find(&referencedElement);
</ins><span class="cx"> if (it == m_elementDependencies.end())
</span><span class="cx"> return;
</span><del>- ASSERT(it->key == referencedElement);
- Vector<SVGElement*> toBeNotified;
</del><ins>+ ASSERT(it->key == &referencedElement);
+ HashSet<SVGElement*>* referencingElements = it->value.get();
+ for (auto* element : *referencingElements) {
+ m_rebuildElements.append(element);
+ element->callClearTarget();
+ }
+}
</ins><span class="cx">
</span><ins>+void SVGDocumentExtensions::rebuildAllElementReferencesForTarget(SVGElement& referencedElement)
+{
+ auto it = m_elementDependencies.find(&referencedElement);
+ if (it == m_elementDependencies.end())
+ return;
+ ASSERT(it->key == &referencedElement);
+
</ins><span class="cx"> HashSet<SVGElement*>* referencingElements = it->value.get();
</span><del>- auto setEnd = referencingElements->end();
- for (auto setIt = referencingElements->begin(); setIt != setEnd; ++setIt)
- toBeNotified.append(*setIt);
</del><ins>+ Vector<SVGElement*> elementsToRebuild;
+ elementsToRebuild.reserveInitialCapacity(referencingElements->size());
+ for (auto* element : *referencingElements)
+ elementsToRebuild.uncheckedAppend(element);
</ins><span class="cx">
</span><del>- // Force rebuilding the referencingElement so it knows about this change.
- auto vectorEnd = toBeNotified.end();
- for (auto vectorIt = toBeNotified.begin(); vectorIt != vectorEnd; ++vectorIt) {
- // Before rebuilding referencingElement ensure it was not removed from under us.
- if (HashSet<SVGElement*>* referencingElements = setOfElementsReferencingTarget(referencedElement)) {
- if (referencingElements->contains(*vectorIt))
- (*vectorIt)->svgAttributeChanged(XLinkNames::hrefAttr);
- }
- }
</del><ins>+ for (auto* element : elementsToRebuild)
+ element->svgAttributeChanged(XLinkNames::hrefAttr);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void SVGDocumentExtensions::removeAllElementReferencesForTarget(SVGElement* referencedElement)
</span></span></pre></div>
<a id="trunkSourceWebCoresvgSVGDocumentExtensionsh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/svg/SVGDocumentExtensions.h (168920 => 168921)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/svg/SVGDocumentExtensions.h        2014-05-16 03:56:10 UTC (rev 168920)
+++ trunk/Source/WebCore/svg/SVGDocumentExtensions.h        2014-05-16 04:30:12 UTC (rev 168921)
</span><span class="lines">@@ -66,9 +66,12 @@
</span><span class="cx"> HashSet<SVGElement*>* setOfElementsReferencingTarget(SVGElement* referencedElement) const;
</span><span class="cx"> void addElementReferencingTarget(SVGElement* referencingElement, SVGElement* referencedElement);
</span><span class="cx"> void removeAllTargetReferencesForElement(SVGElement*);
</span><del>- void rebuildAllElementReferencesForTarget(SVGElement*);
</del><ins>+ void rebuildAllElementReferencesForTarget(SVGElement&);
</ins><span class="cx"> void removeAllElementReferencesForTarget(SVGElement*);
</span><span class="cx">
</span><ins>+ void clearTargetDependencies(SVGElement&);
+ void rebuildElements();
+
</ins><span class="cx"> #if ENABLE(SVG_FONTS)
</span><span class="cx"> const HashSet<SVGFontFaceElement*>& svgFontFaceElements() const { return m_svgFontFaceElements; }
</span><span class="cx"> void registerSVGFontFaceElement(SVGFontFaceElement*);
</span><span class="lines">@@ -87,6 +90,7 @@
</span><span class="cx"> HashMap<SVGElement*, std::unique_ptr<HashSet<SVGElement*>>> m_elementDependencies;
</span><span class="cx"> std::unique_ptr<SVGResourcesCache> m_resourcesCache;
</span><span class="cx">
</span><ins>+ Vector<SVGElement*> m_rebuildElements;
</ins><span class="cx"> public:
</span><span class="cx"> // This HashMap contains a list of pending resources. Pending resources, are such
</span><span class="cx"> // which are referenced by any object in the SVG document, but do NOT exist yet.
</span></span></pre></div>
<a id="trunkSourceWebCoresvgSVGElementcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/svg/SVGElement.cpp (168920 => 168921)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/svg/SVGElement.cpp        2014-05-16 03:56:10 UTC (rev 168920)
+++ trunk/Source/WebCore/svg/SVGElement.cpp        2014-05-16 04:30:12 UTC (rev 168921)
</span><span class="lines">@@ -249,7 +249,7 @@
</span><span class="cx">
</span><span class="cx"> m_svgRareData = nullptr;
</span><span class="cx"> }
</span><del>- document().accessSVGExtensions()->rebuildAllElementReferencesForTarget(this);
</del><ins>+ document().accessSVGExtensions()->rebuildAllElementReferencesForTarget(*this);
</ins><span class="cx"> document().accessSVGExtensions()->removeAllElementReferencesForTarget(this);
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -346,7 +346,7 @@
</span><span class="cx"> StyledElement::removedFrom(rootParent);
</span><span class="cx">
</span><span class="cx"> if (wasInDocument) {
</span><del>- document().accessSVGExtensions()->rebuildAllElementReferencesForTarget(this);
</del><ins>+ document().accessSVGExtensions()->clearTargetDependencies(*this);
</ins><span class="cx"> document().accessSVGExtensions()->removeAllElementReferencesForTarget(this);
</span><span class="cx"> }
</span><span class="cx"> SVGElementInstance::invalidateAllInstancesOfElement(this);
</span><span class="lines">@@ -697,7 +697,7 @@
</span><span class="cx"> StyledElement::attributeChanged(name, oldValue, newValue);
</span><span class="cx">
</span><span class="cx"> if (name == HTMLNames::idAttr)
</span><del>- document().accessSVGExtensions()->rebuildAllElementReferencesForTarget(this);
</del><ins>+ document().accessSVGExtensions()->rebuildAllElementReferencesForTarget(*this);
</ins><span class="cx">
</span><span class="cx"> // Changes to the style attribute are processed lazily (see Element::getAttribute() and related methods),
</span><span class="cx"> // so we don't want changes to the style attribute to result in extra work here.
</span></span></pre></div>
<a id="trunkSourceWebCoresvgSVGElementh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/svg/SVGElement.h (168920 => 168921)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/svg/SVGElement.h        2014-05-16 03:56:10 UTC (rev 168920)
+++ trunk/Source/WebCore/svg/SVGElement.h        2014-05-16 04:30:12 UTC (rev 168921)
</span><span class="lines">@@ -145,6 +145,8 @@
</span><span class="cx"> bool hasTagName(const SVGQualifiedName& name) const { return hasLocalName(name.localName()); }
</span><span class="cx"> virtual short tabIndex() const override;
</span><span class="cx">
</span><ins>+ void callClearTarget() { clearTarget(); }
+
</ins><span class="cx"> protected:
</span><span class="cx"> SVGElement(const QualifiedName&, Document&);
</span><span class="cx"> virtual ~SVGElement();
</span><span class="lines">@@ -181,6 +183,8 @@
</span><span class="cx">
</span><span class="cx"> virtual bool isSupported(StringImpl* feature, StringImpl* version) const;
</span><span class="cx">
</span><ins>+ virtual void clearTarget() { }
+
</ins><span class="cx"> void mapInstanceToElement(SVGElementInstance*);
</span><span class="cx"> void removeInstanceMapping(SVGElementInstance*);
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCoresvgSVGTRefElementcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/svg/SVGTRefElement.cpp (168920 => 168921)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/svg/SVGTRefElement.cpp        2014-05-16 03:56:10 UTC (rev 168920)
+++ trunk/Source/WebCore/svg/SVGTRefElement.cpp        2014-05-16 04:30:12 UTC (rev 168921)
</span><span class="lines">@@ -243,6 +243,11 @@
</span><span class="cx"> return false;
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+void SVGTRefElement::clearTarget()
+{
+ m_targetListener->detach();
+}
+
</ins><span class="cx"> void SVGTRefElement::buildPendingResource()
</span><span class="cx"> {
</span><span class="cx"> // Remove any existing event listener.
</span></span></pre></div>
<a id="trunkSourceWebCoresvgSVGTRefElementh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/svg/SVGTRefElement.h (168920 => 168921)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/svg/SVGTRefElement.h        2014-05-16 03:56:10 UTC (rev 168920)
+++ trunk/Source/WebCore/svg/SVGTRefElement.h        2014-05-16 04:30:12 UTC (rev 168921)
</span><span class="lines">@@ -53,6 +53,8 @@
</span><span class="cx"> virtual InsertionNotificationRequest insertedInto(ContainerNode&) override;
</span><span class="cx"> virtual void removedFrom(ContainerNode&) override;
</span><span class="cx">
</span><ins>+ virtual void clearTarget() override;
+
</ins><span class="cx"> void updateReferencedText(Element*);
</span><span class="cx">
</span><span class="cx"> void detachTarget();
</span></span></pre></div>
<a id="trunkSourceWebCoresvganimationSVGSMILElementcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/svg/animation/SVGSMILElement.cpp (168920 => 168921)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/svg/animation/SVGSMILElement.cpp        2014-05-16 03:56:10 UTC (rev 168920)
+++ trunk/Source/WebCore/svg/animation/SVGSMILElement.cpp        2014-05-16 04:30:12 UTC (rev 168921)
</span><span class="lines">@@ -146,6 +146,11 @@
</span><span class="cx"> document().accessSVGExtensions()->removeAllTargetReferencesForElement(this);
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+void SVGSMILElement::clearTarget()
+{
+ setTargetElement(nullptr);
+}
+
</ins><span class="cx"> void SVGSMILElement::buildPendingResource()
</span><span class="cx"> {
</span><span class="cx"> clearResourceReferences();
</span></span></pre></div>
<a id="trunkSourceWebCoresvganimationSVGSMILElementh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/svg/animation/SVGSMILElement.h (168920 => 168921)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/svg/animation/SVGSMILElement.h        2014-05-16 03:56:10 UTC (rev 168920)
+++ trunk/Source/WebCore/svg/animation/SVGSMILElement.h        2014-05-16 04:30:12 UTC (rev 168921)
</span><span class="lines">@@ -126,6 +126,8 @@
</span><span class="cx"> void buildPendingResource() override;
</span><span class="cx"> void clearResourceReferences();
</span><span class="cx">
</span><ins>+ virtual void clearTarget() override;
+
</ins><span class="cx"> virtual void startedActiveInterval() = 0;
</span><span class="cx"> void endedActiveInterval();
</span><span class="cx"> virtual void updateAnimation(float percent, unsigned repeat, SVGSMILElement* resultElement) = 0;
</span></span></pre>
</div>
</div>
</body>
</html>