haikuwebkit/LayoutTests/svg/animations/smil-leak-element-instances...

73 lines
2.1 KiB
XML
Raw Permalink Normal View History

SMIL animation causes leak of the related Document (and many elements) https://bugs.webkit.org/show_bug.cgi?id=83856 <rdar://problem/11216047> Reviewed by Dean Jackson. The SVGAnimatedProperty cache was previously holding a reference to the properties it contained; said references were cleared in the SVGAnimatedProperty destructor (which was never called because there was always one remaining reference from the cache). The SVGAnimatedProperty cache now holds raw pointers instead of RefPtrs; the SVGAnimateElement now owns its own SVGAnimatedProperties, both for itself and for any <use/> instances of itself. They're cleared and destroyed within SVGAnimateElement::targetElementWillChange, at which time they're removed from the cache. SVGPropertyTearOffs now keep a reference to their SVGElement (m_contextElement) instead of their SVGAnimatedProperty; this way, there is no reference cycle, but the animated property (owned by the element) and the element itself are kept alive until the TearOff is garbage collected. Add a few tests for different parts of this patch: smil-leak-elements tests that animated elements are garbage collected properly after being removed from the page; smil-leak-element-instances and its related smil-leak-element-instances-noBaseValRef test that we don't leak instances after they're removed from the document while the original element is still alive; smil-leak-dynamically-added-element-instances tests the same thing, but adds half of the instances while the animation is in the middle of running; svglength-element-removed-crash ensures that an animated element is not freed if JavaScript code is holding a reference to an animated property wrapper. File lists left off because they're very long. Canonical link: https://commits.webkit.org/102642@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@115518 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2012-04-28 00:04:50 +00:00
<svg id="svg" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" onload="load()">
<defs>
<rect id="rect" width="100" height="100" />
</defs>
<g id="g"/>
<text x="50" y="50" id="log"/>
<script id="script">
<![CDATA[
var g = document.getElementById("g");
function log(message) {
var logDiv = document.getElementById('log');
logDiv.appendChild(document.createTextNode(message));
}
function createAnimatedRectInstance() {
var use = document.createElementNS("http://www.w3.org/2000/svg", "use");
use.setAttributeNS("http://www.w3.org/1999/xlink", "href", "#rect");
var anim = document.createElementNS("http://www.w3.org/2000/svg", "animate");
anim.setAttribute("attributeType", "XML");
anim.setAttribute("attributeName", "x");
anim.setAttribute("from", "100");
anim.setAttribute("to", "0");
anim.setAttribute("begin", "0s");
anim.setAttribute("dur", "10.0s");
anim.setAttribute("repeatCount", 1);
use.appendChild(anim);
return use;
}
function runTest() {
// Collect garbage before recording starting live node count, in case there are live elements from previous tests.
GCController.collect();
var originalLiveElements = window.internals.numberOfLiveNodes();
for (var i = 0; i < 1000; i++)
g.appendChild(createAnimatedRectInstance());
SMIL animation causes leak of the related Document (and many elements) https://bugs.webkit.org/show_bug.cgi?id=83856 <rdar://problem/11216047> Reviewed by Dean Jackson. The SVGAnimatedProperty cache was previously holding a reference to the properties it contained; said references were cleared in the SVGAnimatedProperty destructor (which was never called because there was always one remaining reference from the cache). The SVGAnimatedProperty cache now holds raw pointers instead of RefPtrs; the SVGAnimateElement now owns its own SVGAnimatedProperties, both for itself and for any <use/> instances of itself. They're cleared and destroyed within SVGAnimateElement::targetElementWillChange, at which time they're removed from the cache. SVGPropertyTearOffs now keep a reference to their SVGElement (m_contextElement) instead of their SVGAnimatedProperty; this way, there is no reference cycle, but the animated property (owned by the element) and the element itself are kept alive until the TearOff is garbage collected. Add a few tests for different parts of this patch: smil-leak-elements tests that animated elements are garbage collected properly after being removed from the page; smil-leak-element-instances and its related smil-leak-element-instances-noBaseValRef test that we don't leak instances after they're removed from the document while the original element is still alive; smil-leak-dynamically-added-element-instances tests the same thing, but adds half of the instances while the animation is in the middle of running; svglength-element-removed-crash ensures that an animated element is not freed if JavaScript code is holding a reference to an animated property wrapper. File lists left off because they're very long. Canonical link: https://commits.webkit.org/102642@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@115518 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2012-04-28 00:04:50 +00:00
while (g.hasChildNodes())
g.removeChild(g.lastChild);
GCController.collect();
var liveDelta = window.internals.numberOfLiveNodes() - originalLiveElements;
// The goal of this test is to verify allocating lots and lots of objects will not
// grow the allocated memory a lot once they are removed.
if (liveDelta <= 5)
SMIL animation causes leak of the related Document (and many elements) https://bugs.webkit.org/show_bug.cgi?id=83856 <rdar://problem/11216047> Reviewed by Dean Jackson. The SVGAnimatedProperty cache was previously holding a reference to the properties it contained; said references were cleared in the SVGAnimatedProperty destructor (which was never called because there was always one remaining reference from the cache). The SVGAnimatedProperty cache now holds raw pointers instead of RefPtrs; the SVGAnimateElement now owns its own SVGAnimatedProperties, both for itself and for any <use/> instances of itself. They're cleared and destroyed within SVGAnimateElement::targetElementWillChange, at which time they're removed from the cache. SVGPropertyTearOffs now keep a reference to their SVGElement (m_contextElement) instead of their SVGAnimatedProperty; this way, there is no reference cycle, but the animated property (owned by the element) and the element itself are kept alive until the TearOff is garbage collected. Add a few tests for different parts of this patch: smil-leak-elements tests that animated elements are garbage collected properly after being removed from the page; smil-leak-element-instances and its related smil-leak-element-instances-noBaseValRef test that we don't leak instances after they're removed from the document while the original element is still alive; smil-leak-dynamically-added-element-instances tests the same thing, but adds half of the instances while the animation is in the middle of running; svglength-element-removed-crash ensures that an animated element is not freed if JavaScript code is holding a reference to an animated property wrapper. File lists left off because they're very long. Canonical link: https://commits.webkit.org/102642@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@115518 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2012-04-28 00:04:50 +00:00
log("PASS");
else
SMIL animation causes leak of the related Document (and many elements) https://bugs.webkit.org/show_bug.cgi?id=83856 <rdar://problem/11216047> Reviewed by Dean Jackson. The SVGAnimatedProperty cache was previously holding a reference to the properties it contained; said references were cleared in the SVGAnimatedProperty destructor (which was never called because there was always one remaining reference from the cache). The SVGAnimatedProperty cache now holds raw pointers instead of RefPtrs; the SVGAnimateElement now owns its own SVGAnimatedProperties, both for itself and for any <use/> instances of itself. They're cleared and destroyed within SVGAnimateElement::targetElementWillChange, at which time they're removed from the cache. SVGPropertyTearOffs now keep a reference to their SVGElement (m_contextElement) instead of their SVGAnimatedProperty; this way, there is no reference cycle, but the animated property (owned by the element) and the element itself are kept alive until the TearOff is garbage collected. Add a few tests for different parts of this patch: smil-leak-elements tests that animated elements are garbage collected properly after being removed from the page; smil-leak-element-instances and its related smil-leak-element-instances-noBaseValRef test that we don't leak instances after they're removed from the document while the original element is still alive; smil-leak-dynamically-added-element-instances tests the same thing, but adds half of the instances while the animation is in the middle of running; svglength-element-removed-crash ensures that an animated element is not freed if JavaScript code is holding a reference to an animated property wrapper. File lists left off because they're very long. Canonical link: https://commits.webkit.org/102642@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@115518 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2012-04-28 00:04:50 +00:00
log("FAIL: " + liveDelta + " extra live node(s)");
Use testRunner instead of layoutTestController in SVG tests https://bugs.webkit.org/show_bug.cgi?id=92898 Reviewed by Dirk Schulze. * svg/W3C-SVG-1.1-SE/paths-dom-02-f.svg: * svg/animations/animate-beginElementAt.svg: * svg/animations/animate-calcMode-spline-crash-bad-array-length.xhtml: * svg/animations/animate-linear-discrete-additive-b.svg: * svg/animations/animate-linear-discrete-additive-c.svg: * svg/animations/animate-linear-discrete-additive.svg: * svg/animations/animate-list-crash.svg: * svg/animations/animate-setcurrenttime.html: * svg/animations/animate-update-crash.xhtml: * svg/animations/animateColor-additive-2a.svg: * svg/animations/animateColor-additive-2b.svg: * svg/animations/animateColor-additive-2c.svg: * svg/animations/animateColor-additive-2d.svg: * svg/animations/animateMotion-additive-1.svg: * svg/animations/animateMotion-additive-2a.svg: * svg/animations/animateMotion-additive-2b.svg: * svg/animations/animateMotion-additive-2c.svg: * svg/animations/animateMotion-additive-2d.svg: * svg/animations/animateTransform-accumulation.svg: * svg/animations/animateTransform-by-scale-1.svg: * svg/animations/animateTransform-by-scale.svg: * svg/animations/animateTransform-from-by-from-to-comparision-expected.svg: * svg/animations/animateTransform-from-by-from-to-comparision.svg: * svg/animations/animateTransform-from-by-scale-additive-sum.svg: * svg/animations/animateTransform-from-by-scale.svg: * svg/animations/animateTransform-rotate-around-point.svg: * svg/animations/animateTransform-skewX.svg: * svg/animations/animateTransform-skewY.svg: * svg/animations/animateTransform-translate.svg: * svg/animations/dynamic-modify-attributename-crash.svg: * svg/animations/keypoints-mismatch.svg: * svg/animations/length-list-animation.svg: * svg/animations/list-wrapper-assertion.svg: * svg/animations/mozilla/animateMotion-by-1.svg: * svg/animations/mozilla/animateMotion-from-to-1-expected.svg: * svg/animations/mozilla/animateMotion-from-to-1.svg: * svg/animations/mozilla/animateMotion-mpath-pathLength-1.svg: * svg/animations/mozilla/animateMotion-mpath-targetChange-1.svg: * svg/animations/mozilla/animateMotion-to-overridden-1.svg: * svg/animations/multiple-animateTransform-additive-sum.svg: * svg/animations/multiple-begin-animation-discrete.svg: * svg/animations/multiple-begin-animation.svg: * svg/animations/path-animation.svg: * svg/animations/repeatDur-zero.xhtml: * svg/animations/repeating-path-animation.svg: * svg/animations/resources/SVGAnimationTestCase.js: (runAnimationTest): * svg/animations/smil-element-not-removed-crash.html: * svg/animations/smil-element-target-crash-main.html: * svg/animations/smil-leak-dynamically-added-element-instances.svg: * svg/animations/smil-leak-element-instances-noBaseValRef.svg: * svg/animations/smil-leak-element-instances.svg: * svg/animations/smil-leak-elements.svg: * svg/animations/svg-two-animate-elements-crash.svg: * svg/animations/svglength-animation-retarget-crash.html: * svg/animations/svglength-element-removed-crash.svg: * svg/as-background-image/animated-svg-as-background.html: * svg/as-background-image/svg-background-crash-on-refresh.html: * svg/as-image/animated-svg-as-image-no-fixed-intrinsic-size.html: * svg/as-image/animated-svg-as-image-same-image.html: * svg/as-image/animated-svg-as-image.html: * svg/as-image/animated-svg-repaints-completely-in-hidpi.html: * svg/as-image/drag-svg-as-image.html: * svg/as-image/image-respects-deviceScaleFactor.html: * svg/as-image/image-respects-pageScaleFactor-change.html: * svg/as-image/svg-image-leak-cached-data.html: * svg/as-image/svg-image-leak-loader.html: * svg/as-image/svg-nested.html: * svg/as-object/embedded-svg-immediate-offsetWidth-query.html: * svg/as-object/embedded-svg-size-changes-no-layout-triggers.html: * svg/as-object/embedded-svg-size-changes.html: * svg/as-object/nested-embedded-svg-size-changes-no-layout-triggers-1.html: * svg/as-object/nested-embedded-svg-size-changes-no-layout-triggers-2.html: * svg/as-object/nested-embedded-svg-size-changes.html: * svg/as-object/resources/embedded-svg-size-changes-no-layout-triggers.svg: * svg/as-object/resources/nested-embedded-svg-size-changes-target-no-layout-triggers-1.html: * svg/carto.net/frameless-svg-parse-error.html: * svg/carto.net/window.svg: * svg/css/crash-css-generated-content.xhtml: * svg/css/cursor-image-replace.svg: * svg/css/cursor-replace.svg: * svg/css/getComputedStyle-basic.xhtml: * svg/css/invalid-color-crash.svg: * svg/css/multiple-cursors-crash.html: * svg/css/script-tests/svg-attribute-length-parsing.js: * svg/css/script-tests/svg-attribute-parser-mode.js: * svg/css/style-change-crash.html: * svg/css/svg-ellipse-render-crash.html: * svg/custom/acid3-test-77.html: * svg/custom/anchor-on-use.svg: * svg/custom/animate-disallowed-mask-element.svg: * svg/custom/animate-disallowed-use-element.svg: * svg/custom/animate-path-discrete.svg: * svg/custom/animate-path-morphing.svg: * svg/custom/animate-target-id-changed.svg: * svg/custom/animate-target-removed-from-document.svg: * svg/custom/animate-use-crash.xhtml: * svg/custom/assert-empty-layout-attributes.svg: * svg/custom/bbox-of-g-in-symbol.svg: * svg/custom/boundingBox.html: * svg/custom/bug78700.svg: * svg/custom/bug78807.svg: * svg/custom/bug78838.html: * svg/custom/bug79798.html: * svg/custom/bug86119.html: * svg/custom/bug86392.html: * svg/custom/bug86781.html: * svg/custom/click-internal-anchor-with-use-crash.xhtml: * svg/custom/crash-inline-container-client.html: * svg/custom/crash-text-in-textpath.svg: * svg/custom/crash-textPath-attributes.html: * svg/custom/delete-modified-text-in-defs-crash.svg: * svg/custom/delete-text-crash.html: * svg/custom/delete-text-innerText-crash.html: * svg/custom/detached-outermost-svg-crash.html: * svg/custom/disallowed-text-content-rendering.svg: * svg/custom/display-table-caption-foreignObject.svg: * svg/custom/display-table-caption-inherit-foreignObject.xhtml: * svg/custom/display-table-caption-inherit-text.xhtml: * svg/custom/display-table-caption-text.svg: * svg/custom/element-instance-held-by-js-crash.svg: * svg/custom/embedded-svg-allowed-in-dashboard.xml: * svg/custom/empty-className-baseVal-crash.html: * svg/custom/filter-on-svgimage.svg: * svg/custom/font-face-move.svg: * svg/custom/font-face-name-without-name-attr.svg: * svg/custom/font-face-not-in-document.svg: * svg/custom/font-platformDestroy-crash.svg: * svg/custom/foreignObject-crash-on-hover.xml: * svg/custom/foreignobject-crash-with-absolute-positioned-children.svg: * svg/custom/frame-getSVGDocument.html: * svg/custom/g-outside-svg.html: * svg/custom/get-text-element-transform-crash.html: * svg/custom/getBBox-empty-container.html: * svg/custom/getBBox-js.svg: * svg/custom/getBBox-path.svg: * svg/custom/getBBox-perpendicular-path.svg: * svg/custom/getscreenctm-in-mixed-content2.xhtml: * svg/custom/gradient-attr-update.svg: * svg/custom/gradient-stop-display-none-crash.svg: * svg/custom/hit-test-path-stroke.svg: * svg/custom/hit-test-path.svg: * svg/custom/hit-test-unclosed-subpaths.svg: * svg/custom/hit-test-with-br.xhtml: * svg/custom/image-base-uri.svg: * svg/custom/image-clipped-hit.svg: * svg/custom/image-rescale-scroll.html: * svg/custom/image-with-prefix-in-webarchive-expected.webarchive: * svg/custom/image-with-prefix-in-webarchive.svg: * svg/custom/insertItemBefore-from-non-list-origin.svg: * svg/custom/intersection-list-clipping.svg: * svg/custom/intersection-list-crash.svg: * svg/custom/intersection-list-nested-svg.svg: * svg/custom/intersection-list-null.svg: * svg/custom/invalid-gradient-with-xlink.svg: * svg/custom/invalid-paint-shape-mask.svg: * svg/custom/js-late-clipPath-and-object-creation.svg: * svg/custom/js-late-clipPath-creation.svg: * svg/custom/js-late-gradient-and-object-creation.svg: * svg/custom/js-late-gradient-creation.svg: * svg/custom/js-late-marker-and-object-creation.svg: * svg/custom/js-late-marker-creation.svg: * svg/custom/js-late-mask-and-object-creation.svg: * svg/custom/js-late-mask-creation.svg: * svg/custom/js-late-pattern-and-object-creation.svg: * svg/custom/js-late-pattern-creation.svg: * svg/custom/js-svg-constructors.svg: * svg/custom/js-update-container2.svg: * svg/custom/js-update-image-and-display.svg: * svg/custom/js-update-image-and-display2.svg: * svg/custom/js-update-image-and-display3.svg: * svg/custom/layout-loop.svg: * svg/custom/linking-a-03-b-all.svg: * svg/custom/linking-a-03-b-preserveAspectRatio.svg: * svg/custom/linking-a-03-b-transform.svg: * svg/custom/linking-a-03-b-viewBox-transform.svg: * svg/custom/linking-a-03-b-viewBox.svg: * svg/custom/linking-a-03-b-viewTarget.svg: * svg/custom/linking-a-03-b-zoomAndPan.svg: * svg/custom/linking-uri-01-b.svg: * svg/custom/loadevents-capturing.svg: * svg/custom/loadevents-externalresourcesrequired-displaynone.svg: * svg/custom/loadevents-externalresourcesrequired.svg: * svg/custom/loadevents-normal-displaynone.svg: * svg/custom/loadevents-normal.svg: * svg/custom/manually-parsed-embedded-svg-allowed-in-dashboard.html: * svg/custom/manually-parsed-svg-allowed-in-dashboard.html: * svg/custom/marker-getPropertyValue.svg: * svg/custom/mask-changes.svg: * svg/custom/mask-invalidation.svg: * svg/custom/mouse-move-on-svg-container-standalone.svg: * svg/custom/mouse-move-on-svg-container.xhtml: * svg/custom/mouse-move-on-svg-root-standalone.svg: * svg/custom/mouse-move-on-svg-root.xhtml: * svg/custom/multiple-title-elements.svg: * svg/custom/new-image-is-html-element.svg: * svg/custom/path-getPresentationAttribute-crash.html: * svg/custom/path-getTotalLength-on-big-segment-crash.svg: * svg/custom/path-getTotalLength.svg: * svg/custom/pending-resource-after-removal.xhtml: * svg/custom/pending-resource-leak-2.svg: * svg/custom/pending-resource-leak-3.svg: * svg/custom/pending-resource-leak.svg: * svg/custom/pointer-events-image-css-transform.svg: * svg/custom/pointer-events-image.svg: * svg/custom/pointer-events-invalid-fill.svg: * svg/custom/pointer-events-on-rounded-rect.xhtml: * svg/custom/pointer-events-on-svg-with-pointer.xhtml: * svg/custom/pointer-events-on-svg-without-pointer.xhtml: * svg/custom/pointer-events-text-css-transform.svg: * svg/custom/pointer-events-text.svg: * svg/custom/pointer-events-with-linecaps-and-miterlimits.xhtml: * svg/custom/poly-points-attribute-changes.svg: * svg/custom/polyline-hittest.svg: * svg/custom/polyline-points-crash.html: * svg/custom/prevent-default.svg: * svg/custom/recursive-use.svg: * svg/custom/recursive-use2.svg: * svg/custom/repaint-moving-svg-and-div.xhtml: * svg/custom/resource-client-removal.svg: * svg/custom/resources/focus-event-handling-keyboard.js: * svg/custom/resources/focus-event-handling.js: * svg/custom/resources/link-target.html: * svg/custom/resources/linkingCircle-f.svg: * svg/custom/resources/svgsvgelement-ctm.js: * svg/custom/resources/use-instanceRoot-event-bubbling.js: (repaintTest): * svg/custom/resources/use-instanceRoot-event-listeners.js: (repaintTest): * svg/custom/scroll-hit-test.xhtml: * svg/custom/scroll-to-anchor-in-symbol.svg: * svg/custom/scroll-to-svg-element-assertion.html: * svg/custom/scrolling-embedded-svg-file-image-repaint-problem.html: * svg/custom/stop-crash.svg: * svg/custom/stroke-width-click.svg: * svg/custom/svg-allowed-in-dashboard-object.html: * svg/custom/svg-features.html: * svg/custom/svg-fonts-in-html-linebreaks.html: * svg/custom/svg-fonts-no-latin-glyph.html: * svg/custom/svg-getelementid.xhtml: * svg/custom/svg-parse-overflow-1.html: * svg/custom/svg-parse-overflow-2.html: * svg/custom/svg-parse-overflow-3.html: * svg/custom/svg-parse-overflow-4.html: * svg/custom/svg-parse-overflow-5.html: * svg/custom/svg-use-style-float-crash.svg: * svg/custom/svg-width-intrinsic-crash.html: * svg/custom/symbol-viewport-element-crash.svg: * svg/custom/text-node-in-text-invalidated.svg: * svg/custom/text-tref-03-b-dynamic.svg: * svg/custom/text-tref-03-b-dynamic2.svg: * svg/custom/textPath-assert.svg: * svg/custom/textPath-set-id.svg: * svg/custom/tiling-regular-hexagonal-crash.svg: * svg/custom/tref-clone-crash.html: * svg/custom/tref-shadowdom.html: * svg/custom/use-animation-in-fill.html: * svg/custom/use-crash-in-non-wellformed-document.svg: * svg/custom/use-crash-pending-resource.svg: * svg/custom/use-crash-using-children-before-destroy.svg: * svg/custom/use-crash-when-href-change.svg: * svg/custom/use-detach.svg: * svg/custom/use-display-none.svg: * svg/custom/use-elementInstance-event-target.svg: * svg/custom/use-elementInstance-methods.svg: * svg/custom/use-event-handler-on-referenced-element.svg: * svg/custom/use-event-handler-on-use-element.svg: * svg/custom/use-external-crash.svg: * svg/custom/use-instanceRoot-as-event-target.xhtml: * svg/custom/use-instanceRoot-event-listener-liveness.xhtml: * svg/custom/use-instanceRoot-with-use-removed.svg: * svg/custom/use-invalid-font-face.svg: * svg/custom/use-invalid-html.xhtml: * svg/custom/use-invalid-pattern.svg: * svg/custom/use-invalid-style.svg: * svg/custom/use-move-to-offset.svg: * svg/custom/use-multiple-on-nested-disallowed-font.html: * svg/custom/use-mutation-event-crash.svg: * svg/custom/use-nested-children.svg: * svg/custom/use-nested-disallowed-target.svg: * svg/custom/use-nested-missing-target-added.svg: * svg/custom/use-nested-missing-target-removed.svg: * svg/custom/use-nested-missing-target.svg: * svg/custom/use-nested-notarget.svg: * svg/custom/use-non-existing-symbol-crash.svg: * svg/custom/use-on-use-with-child-and-empty-target.svg: * svg/custom/use-on-use-with-child.svg: * svg/custom/use-referencing-style-crash.svg: * svg/custom/use-shadow-root-parent-removal.svg: * svg/custom/use-tref-crash.svg: * svg/custom/webkit-transform-crash.html: * svg/custom/xlink-prefix-in-attributes.html: * svg/custom/xlink-to-invalid-gradient.svg: * svg/dom/SVGPathSegList-xml-dom-synchronization.xhtml: * svg/dom/SVGPolygonElement-baseVal-list-removal-crash.html: * svg/dom/SVGScriptElement/script-async-attr.svg: * svg/dom/SVGScriptElement/script-change-externalResourcesRequired-while-loading.svg: * svg/dom/SVGScriptElement/script-clone-rerun-self.svg: * svg/dom/SVGScriptElement/script-clone-rerun.svg: * svg/dom/SVGScriptElement/script-load-and-error-events.svg: * svg/dom/SVGScriptElement/script-onerror-bubbling.svg: * svg/dom/SVGScriptElement/script-reexecution.svg: * svg/dom/SVGScriptElement/script-set-href.svg: * svg/dom/SVGStyledElement-pendingResource-crash.html: * svg/dom/SVGTransformList-empty-list-consolidation.html: * svg/dom/animated-tearoff-equality.xhtml: * svg/dom/animated-tearoff-lifespan.xhtml: * svg/dom/baseVal-animVal-crash.html: * svg/dom/baseVal-animVal-list-crash.html: * svg/dom/frame-related-api-during-load.html: * svg/dom/parent-view-layout-crash.html: * svg/dom/path-marker-removed-crash.svg: * svg/dom/resources/viewspec-parser.js: (continueFuzzing.else.script.onload): (continueFuzzing): * svg/dom/script-tests/SVGViewSpec.js: (completeTest.script.onload): (completeTest): * svg/dom/smil-methods.svg: * svg/dom/stylesheet-candidate-node-crash-main.html: * svg/dom/svg-element-attribute-js-null.xhtml: * svg/dom/symbol-embeddedAnimation.svg: * svg/dom/use-style-recalc-script-execute-crash.html: * svg/dom/use-transform.svg: * svg/dom/viewport-container-crash.svg: * svg/dom/vkern-element-crash.html: * svg/dynamic-updates/resources/SVGTestCase.js: (createSVGTestCase): (embedSVGTestCase): (completeTest.script.onload): (completeTest): * svg/dynamic-updates/resources/linkTarget.svg: * svg/filters/feBlend-invalid-mode.xhtml: * svg/filters/feColorMatrix-invalid-value.svg: * svg/filters/feComponentTransfer-style-crash.xhtml: * svg/filters/feDisplacementMap-crash-test.xhtml: * svg/filters/feImage-animated-transform-on-target-rect.svg: * svg/filters/feImage-target-reappend-to-document.svg: * svg/filters/feImage-zero-size-crash.svg: * svg/filters/feMorphology-invalid-radius.svg: * svg/filters/feMorphology-zero-radius.svg: * svg/filters/filter-after-transform-crash.svg: * svg/filters/reparent-animated-filter-target.html: * svg/filters/svg-transform-blur-crash.svg: * svg/foreignObject/absolute-position-foreign-object-child-crash.html: * svg/foreignObject/fO-fixed-position-crash.html: * svg/hittest/foreign-object-background.svg: * svg/hittest/svg-ellipse-non-scale-stroke.xhtml: * svg/hittest/svg-ellipse-rect-stroke.xhtml: * svg/hittest/svg-ellipse.xhtml: * svg/hittest/svg-inside-display-table.xhtml: * svg/hittest/svg-inside-table.xhtml: * svg/hittest/svg-padding.xhtml: * svg/hittest/svg-shapes-non-scale-stroke.html: * svg/hittest/svg-small-path.xhtml: * svg/hittest/svg-small-viewbox.xhtml: * svg/hittest/zero-length-butt-cap-path.xhtml: * svg/hittest/zero-length-round-cap-path.xhtml: * svg/hittest/zero-length-square-cap-path.xhtml: * svg/hixie/dynamic/001.xml: * svg/hixie/links/003.xml: * svg/hixie/perf/001.xml: * svg/hixie/perf/002.xml: * svg/hixie/perf/003.xml: * svg/hixie/perf/004.xml: * svg/hixie/perf/005.xml: * svg/hixie/perf/006.xml: * svg/hixie/perf/007.xml: * svg/in-html/script-external.html: * svg/in-html/script-nested.html: * svg/in-html/script-write.html: * svg/in-html/script.html: * svg/in-html/svg-assert-failure-percentage.html: * svg/path-arc-invalid.html: * svg/repaint/filter-repaint.svg: * svg/repaint/image-href-change.svg: * svg/repaint/image-with-clip-path.svg: * svg/repaint/repainting-after-animation-element-removal.svg: * svg/text/add-tspan-position-bug.html: * svg/text/caret-in-svg-text.xhtml: * svg/text/clear-floats-crash.svg: * svg/text/font-size-null-assertion.svg: * svg/text/font-size-too-large-crash.svg: * svg/text/foreignObject-text-clipping-bug.xml: * svg/text/glyphref-renderer-create-crash.html: * svg/text/highcharts-assertion.html: * svg/text/inline-text-destroy-attributes-crash.xhtml: * svg/text/modify-tspan-position-bug.html: * svg/text/resources/SelectionTestCase.js: * svg/text/select-text-svgfont.html: * svg/text/selection-doubleclick.svg: * svg/text/selection-tripleclick.svg: * svg/text/svg-rtl-text-crash.html: * svg/text/svg-zoom-large-value.xhtml: * svg/text/text-align-01-b.svg: * svg/text/text-align-02-b.svg: * svg/text/text-align-03-b.svg: * svg/text/text-align-04-b.svg: * svg/text/text-align-05-b.svg: * svg/text/text-align-06-b.svg: * svg/text/text-altglyph-01-b.svg: * svg/text/text-assert.svg: * svg/text/text-block-child-crash.xhtml: * svg/text/text-deco-01-b.svg: * svg/text/text-font-anonymous-parent.xhtml: * svg/text/text-font-invalid.html: * svg/text/text-font-uri-invalid.svg: * svg/text/text-fonts-01-t.svg: * svg/text/text-fonts-02-t.svg: * svg/text/text-intro-05-t.svg: * svg/text/text-path-01-b.svg: * svg/text/text-positioning-remove-child-crash.svg: * svg/text/text-property-with-display-none.html: * svg/text/text-spacing-01-b.svg: * svg/text/text-style-invalid.svg: * svg/text/text-style-recalc-crash.html: * svg/text/text-text-01-b.svg: * svg/text/text-text-03-b.svg: * svg/text/text-text-04-t.svg: * svg/text/text-text-05-t.svg: * svg/text/text-text-06-t.svg: * svg/text/text-text-07-t.svg: * svg/text/text-text-08-b.svg: * svg/text/text-tref-01-b.svg: * svg/text/text-tselect-01-b.svg: * svg/text/text-tselect-02-f.svg: * svg/text/text-tspan-01-b.svg: * svg/text/text-ws-01-t.svg: * svg/text/text-ws-02-t.svg: * svg/text/textPathBoundsBug.svg: * svg/text/textpath-reference-crash.html: * svg/text/tref-event-listener-crash.svg: * svg/text/tspan-getComputedTextLength.svg: * svg/transforms/percent-transform-values.xhtml: * svg/transforms/transform-origin-presentation-attribute.xhtml: * svg/webarchive/svg-cursor-subresources-expected.webarchive: * svg/webarchive/svg-cursor-subresources.svg: * svg/webarchive/svg-feimage-subresources-expected.webarchive: * svg/webarchive/svg-feimage-subresources.svg: * svg/webarchive/svg-script-subresouces-expected.webarchive: * svg/webarchive/svg-script-subresouces.svg: * svg/zoom/page/zoom-getBoundingClientRect.xhtml: * svg/zoom/page/zoom-zoom-coords.xhtml: * svg/zoom/resources/testPageZoom.js: (repaintTest): (completeDynamicTest.script.onload): (completeDynamicTest): * svg/zoom/resources/testTextZoom.js: (repaintTest): Canonical link: https://commits.webkit.org/110751@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@124380 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2012-08-01 23:05:16 +00:00
testRunner.notifyDone();
SMIL animation causes leak of the related Document (and many elements) https://bugs.webkit.org/show_bug.cgi?id=83856 <rdar://problem/11216047> Reviewed by Dean Jackson. The SVGAnimatedProperty cache was previously holding a reference to the properties it contained; said references were cleared in the SVGAnimatedProperty destructor (which was never called because there was always one remaining reference from the cache). The SVGAnimatedProperty cache now holds raw pointers instead of RefPtrs; the SVGAnimateElement now owns its own SVGAnimatedProperties, both for itself and for any <use/> instances of itself. They're cleared and destroyed within SVGAnimateElement::targetElementWillChange, at which time they're removed from the cache. SVGPropertyTearOffs now keep a reference to their SVGElement (m_contextElement) instead of their SVGAnimatedProperty; this way, there is no reference cycle, but the animated property (owned by the element) and the element itself are kept alive until the TearOff is garbage collected. Add a few tests for different parts of this patch: smil-leak-elements tests that animated elements are garbage collected properly after being removed from the page; smil-leak-element-instances and its related smil-leak-element-instances-noBaseValRef test that we don't leak instances after they're removed from the document while the original element is still alive; smil-leak-dynamically-added-element-instances tests the same thing, but adds half of the instances while the animation is in the middle of running; svglength-element-removed-crash ensures that an animated element is not freed if JavaScript code is holding a reference to an animated property wrapper. File lists left off because they're very long. Canonical link: https://commits.webkit.org/102642@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@115518 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2012-04-28 00:04:50 +00:00
}
function load() {
Use testRunner instead of layoutTestController in SVG tests https://bugs.webkit.org/show_bug.cgi?id=92898 Reviewed by Dirk Schulze. * svg/W3C-SVG-1.1-SE/paths-dom-02-f.svg: * svg/animations/animate-beginElementAt.svg: * svg/animations/animate-calcMode-spline-crash-bad-array-length.xhtml: * svg/animations/animate-linear-discrete-additive-b.svg: * svg/animations/animate-linear-discrete-additive-c.svg: * svg/animations/animate-linear-discrete-additive.svg: * svg/animations/animate-list-crash.svg: * svg/animations/animate-setcurrenttime.html: * svg/animations/animate-update-crash.xhtml: * svg/animations/animateColor-additive-2a.svg: * svg/animations/animateColor-additive-2b.svg: * svg/animations/animateColor-additive-2c.svg: * svg/animations/animateColor-additive-2d.svg: * svg/animations/animateMotion-additive-1.svg: * svg/animations/animateMotion-additive-2a.svg: * svg/animations/animateMotion-additive-2b.svg: * svg/animations/animateMotion-additive-2c.svg: * svg/animations/animateMotion-additive-2d.svg: * svg/animations/animateTransform-accumulation.svg: * svg/animations/animateTransform-by-scale-1.svg: * svg/animations/animateTransform-by-scale.svg: * svg/animations/animateTransform-from-by-from-to-comparision-expected.svg: * svg/animations/animateTransform-from-by-from-to-comparision.svg: * svg/animations/animateTransform-from-by-scale-additive-sum.svg: * svg/animations/animateTransform-from-by-scale.svg: * svg/animations/animateTransform-rotate-around-point.svg: * svg/animations/animateTransform-skewX.svg: * svg/animations/animateTransform-skewY.svg: * svg/animations/animateTransform-translate.svg: * svg/animations/dynamic-modify-attributename-crash.svg: * svg/animations/keypoints-mismatch.svg: * svg/animations/length-list-animation.svg: * svg/animations/list-wrapper-assertion.svg: * svg/animations/mozilla/animateMotion-by-1.svg: * svg/animations/mozilla/animateMotion-from-to-1-expected.svg: * svg/animations/mozilla/animateMotion-from-to-1.svg: * svg/animations/mozilla/animateMotion-mpath-pathLength-1.svg: * svg/animations/mozilla/animateMotion-mpath-targetChange-1.svg: * svg/animations/mozilla/animateMotion-to-overridden-1.svg: * svg/animations/multiple-animateTransform-additive-sum.svg: * svg/animations/multiple-begin-animation-discrete.svg: * svg/animations/multiple-begin-animation.svg: * svg/animations/path-animation.svg: * svg/animations/repeatDur-zero.xhtml: * svg/animations/repeating-path-animation.svg: * svg/animations/resources/SVGAnimationTestCase.js: (runAnimationTest): * svg/animations/smil-element-not-removed-crash.html: * svg/animations/smil-element-target-crash-main.html: * svg/animations/smil-leak-dynamically-added-element-instances.svg: * svg/animations/smil-leak-element-instances-noBaseValRef.svg: * svg/animations/smil-leak-element-instances.svg: * svg/animations/smil-leak-elements.svg: * svg/animations/svg-two-animate-elements-crash.svg: * svg/animations/svglength-animation-retarget-crash.html: * svg/animations/svglength-element-removed-crash.svg: * svg/as-background-image/animated-svg-as-background.html: * svg/as-background-image/svg-background-crash-on-refresh.html: * svg/as-image/animated-svg-as-image-no-fixed-intrinsic-size.html: * svg/as-image/animated-svg-as-image-same-image.html: * svg/as-image/animated-svg-as-image.html: * svg/as-image/animated-svg-repaints-completely-in-hidpi.html: * svg/as-image/drag-svg-as-image.html: * svg/as-image/image-respects-deviceScaleFactor.html: * svg/as-image/image-respects-pageScaleFactor-change.html: * svg/as-image/svg-image-leak-cached-data.html: * svg/as-image/svg-image-leak-loader.html: * svg/as-image/svg-nested.html: * svg/as-object/embedded-svg-immediate-offsetWidth-query.html: * svg/as-object/embedded-svg-size-changes-no-layout-triggers.html: * svg/as-object/embedded-svg-size-changes.html: * svg/as-object/nested-embedded-svg-size-changes-no-layout-triggers-1.html: * svg/as-object/nested-embedded-svg-size-changes-no-layout-triggers-2.html: * svg/as-object/nested-embedded-svg-size-changes.html: * svg/as-object/resources/embedded-svg-size-changes-no-layout-triggers.svg: * svg/as-object/resources/nested-embedded-svg-size-changes-target-no-layout-triggers-1.html: * svg/carto.net/frameless-svg-parse-error.html: * svg/carto.net/window.svg: * svg/css/crash-css-generated-content.xhtml: * svg/css/cursor-image-replace.svg: * svg/css/cursor-replace.svg: * svg/css/getComputedStyle-basic.xhtml: * svg/css/invalid-color-crash.svg: * svg/css/multiple-cursors-crash.html: * svg/css/script-tests/svg-attribute-length-parsing.js: * svg/css/script-tests/svg-attribute-parser-mode.js: * svg/css/style-change-crash.html: * svg/css/svg-ellipse-render-crash.html: * svg/custom/acid3-test-77.html: * svg/custom/anchor-on-use.svg: * svg/custom/animate-disallowed-mask-element.svg: * svg/custom/animate-disallowed-use-element.svg: * svg/custom/animate-path-discrete.svg: * svg/custom/animate-path-morphing.svg: * svg/custom/animate-target-id-changed.svg: * svg/custom/animate-target-removed-from-document.svg: * svg/custom/animate-use-crash.xhtml: * svg/custom/assert-empty-layout-attributes.svg: * svg/custom/bbox-of-g-in-symbol.svg: * svg/custom/boundingBox.html: * svg/custom/bug78700.svg: * svg/custom/bug78807.svg: * svg/custom/bug78838.html: * svg/custom/bug79798.html: * svg/custom/bug86119.html: * svg/custom/bug86392.html: * svg/custom/bug86781.html: * svg/custom/click-internal-anchor-with-use-crash.xhtml: * svg/custom/crash-inline-container-client.html: * svg/custom/crash-text-in-textpath.svg: * svg/custom/crash-textPath-attributes.html: * svg/custom/delete-modified-text-in-defs-crash.svg: * svg/custom/delete-text-crash.html: * svg/custom/delete-text-innerText-crash.html: * svg/custom/detached-outermost-svg-crash.html: * svg/custom/disallowed-text-content-rendering.svg: * svg/custom/display-table-caption-foreignObject.svg: * svg/custom/display-table-caption-inherit-foreignObject.xhtml: * svg/custom/display-table-caption-inherit-text.xhtml: * svg/custom/display-table-caption-text.svg: * svg/custom/element-instance-held-by-js-crash.svg: * svg/custom/embedded-svg-allowed-in-dashboard.xml: * svg/custom/empty-className-baseVal-crash.html: * svg/custom/filter-on-svgimage.svg: * svg/custom/font-face-move.svg: * svg/custom/font-face-name-without-name-attr.svg: * svg/custom/font-face-not-in-document.svg: * svg/custom/font-platformDestroy-crash.svg: * svg/custom/foreignObject-crash-on-hover.xml: * svg/custom/foreignobject-crash-with-absolute-positioned-children.svg: * svg/custom/frame-getSVGDocument.html: * svg/custom/g-outside-svg.html: * svg/custom/get-text-element-transform-crash.html: * svg/custom/getBBox-empty-container.html: * svg/custom/getBBox-js.svg: * svg/custom/getBBox-path.svg: * svg/custom/getBBox-perpendicular-path.svg: * svg/custom/getscreenctm-in-mixed-content2.xhtml: * svg/custom/gradient-attr-update.svg: * svg/custom/gradient-stop-display-none-crash.svg: * svg/custom/hit-test-path-stroke.svg: * svg/custom/hit-test-path.svg: * svg/custom/hit-test-unclosed-subpaths.svg: * svg/custom/hit-test-with-br.xhtml: * svg/custom/image-base-uri.svg: * svg/custom/image-clipped-hit.svg: * svg/custom/image-rescale-scroll.html: * svg/custom/image-with-prefix-in-webarchive-expected.webarchive: * svg/custom/image-with-prefix-in-webarchive.svg: * svg/custom/insertItemBefore-from-non-list-origin.svg: * svg/custom/intersection-list-clipping.svg: * svg/custom/intersection-list-crash.svg: * svg/custom/intersection-list-nested-svg.svg: * svg/custom/intersection-list-null.svg: * svg/custom/invalid-gradient-with-xlink.svg: * svg/custom/invalid-paint-shape-mask.svg: * svg/custom/js-late-clipPath-and-object-creation.svg: * svg/custom/js-late-clipPath-creation.svg: * svg/custom/js-late-gradient-and-object-creation.svg: * svg/custom/js-late-gradient-creation.svg: * svg/custom/js-late-marker-and-object-creation.svg: * svg/custom/js-late-marker-creation.svg: * svg/custom/js-late-mask-and-object-creation.svg: * svg/custom/js-late-mask-creation.svg: * svg/custom/js-late-pattern-and-object-creation.svg: * svg/custom/js-late-pattern-creation.svg: * svg/custom/js-svg-constructors.svg: * svg/custom/js-update-container2.svg: * svg/custom/js-update-image-and-display.svg: * svg/custom/js-update-image-and-display2.svg: * svg/custom/js-update-image-and-display3.svg: * svg/custom/layout-loop.svg: * svg/custom/linking-a-03-b-all.svg: * svg/custom/linking-a-03-b-preserveAspectRatio.svg: * svg/custom/linking-a-03-b-transform.svg: * svg/custom/linking-a-03-b-viewBox-transform.svg: * svg/custom/linking-a-03-b-viewBox.svg: * svg/custom/linking-a-03-b-viewTarget.svg: * svg/custom/linking-a-03-b-zoomAndPan.svg: * svg/custom/linking-uri-01-b.svg: * svg/custom/loadevents-capturing.svg: * svg/custom/loadevents-externalresourcesrequired-displaynone.svg: * svg/custom/loadevents-externalresourcesrequired.svg: * svg/custom/loadevents-normal-displaynone.svg: * svg/custom/loadevents-normal.svg: * svg/custom/manually-parsed-embedded-svg-allowed-in-dashboard.html: * svg/custom/manually-parsed-svg-allowed-in-dashboard.html: * svg/custom/marker-getPropertyValue.svg: * svg/custom/mask-changes.svg: * svg/custom/mask-invalidation.svg: * svg/custom/mouse-move-on-svg-container-standalone.svg: * svg/custom/mouse-move-on-svg-container.xhtml: * svg/custom/mouse-move-on-svg-root-standalone.svg: * svg/custom/mouse-move-on-svg-root.xhtml: * svg/custom/multiple-title-elements.svg: * svg/custom/new-image-is-html-element.svg: * svg/custom/path-getPresentationAttribute-crash.html: * svg/custom/path-getTotalLength-on-big-segment-crash.svg: * svg/custom/path-getTotalLength.svg: * svg/custom/pending-resource-after-removal.xhtml: * svg/custom/pending-resource-leak-2.svg: * svg/custom/pending-resource-leak-3.svg: * svg/custom/pending-resource-leak.svg: * svg/custom/pointer-events-image-css-transform.svg: * svg/custom/pointer-events-image.svg: * svg/custom/pointer-events-invalid-fill.svg: * svg/custom/pointer-events-on-rounded-rect.xhtml: * svg/custom/pointer-events-on-svg-with-pointer.xhtml: * svg/custom/pointer-events-on-svg-without-pointer.xhtml: * svg/custom/pointer-events-text-css-transform.svg: * svg/custom/pointer-events-text.svg: * svg/custom/pointer-events-with-linecaps-and-miterlimits.xhtml: * svg/custom/poly-points-attribute-changes.svg: * svg/custom/polyline-hittest.svg: * svg/custom/polyline-points-crash.html: * svg/custom/prevent-default.svg: * svg/custom/recursive-use.svg: * svg/custom/recursive-use2.svg: * svg/custom/repaint-moving-svg-and-div.xhtml: * svg/custom/resource-client-removal.svg: * svg/custom/resources/focus-event-handling-keyboard.js: * svg/custom/resources/focus-event-handling.js: * svg/custom/resources/link-target.html: * svg/custom/resources/linkingCircle-f.svg: * svg/custom/resources/svgsvgelement-ctm.js: * svg/custom/resources/use-instanceRoot-event-bubbling.js: (repaintTest): * svg/custom/resources/use-instanceRoot-event-listeners.js: (repaintTest): * svg/custom/scroll-hit-test.xhtml: * svg/custom/scroll-to-anchor-in-symbol.svg: * svg/custom/scroll-to-svg-element-assertion.html: * svg/custom/scrolling-embedded-svg-file-image-repaint-problem.html: * svg/custom/stop-crash.svg: * svg/custom/stroke-width-click.svg: * svg/custom/svg-allowed-in-dashboard-object.html: * svg/custom/svg-features.html: * svg/custom/svg-fonts-in-html-linebreaks.html: * svg/custom/svg-fonts-no-latin-glyph.html: * svg/custom/svg-getelementid.xhtml: * svg/custom/svg-parse-overflow-1.html: * svg/custom/svg-parse-overflow-2.html: * svg/custom/svg-parse-overflow-3.html: * svg/custom/svg-parse-overflow-4.html: * svg/custom/svg-parse-overflow-5.html: * svg/custom/svg-use-style-float-crash.svg: * svg/custom/svg-width-intrinsic-crash.html: * svg/custom/symbol-viewport-element-crash.svg: * svg/custom/text-node-in-text-invalidated.svg: * svg/custom/text-tref-03-b-dynamic.svg: * svg/custom/text-tref-03-b-dynamic2.svg: * svg/custom/textPath-assert.svg: * svg/custom/textPath-set-id.svg: * svg/custom/tiling-regular-hexagonal-crash.svg: * svg/custom/tref-clone-crash.html: * svg/custom/tref-shadowdom.html: * svg/custom/use-animation-in-fill.html: * svg/custom/use-crash-in-non-wellformed-document.svg: * svg/custom/use-crash-pending-resource.svg: * svg/custom/use-crash-using-children-before-destroy.svg: * svg/custom/use-crash-when-href-change.svg: * svg/custom/use-detach.svg: * svg/custom/use-display-none.svg: * svg/custom/use-elementInstance-event-target.svg: * svg/custom/use-elementInstance-methods.svg: * svg/custom/use-event-handler-on-referenced-element.svg: * svg/custom/use-event-handler-on-use-element.svg: * svg/custom/use-external-crash.svg: * svg/custom/use-instanceRoot-as-event-target.xhtml: * svg/custom/use-instanceRoot-event-listener-liveness.xhtml: * svg/custom/use-instanceRoot-with-use-removed.svg: * svg/custom/use-invalid-font-face.svg: * svg/custom/use-invalid-html.xhtml: * svg/custom/use-invalid-pattern.svg: * svg/custom/use-invalid-style.svg: * svg/custom/use-move-to-offset.svg: * svg/custom/use-multiple-on-nested-disallowed-font.html: * svg/custom/use-mutation-event-crash.svg: * svg/custom/use-nested-children.svg: * svg/custom/use-nested-disallowed-target.svg: * svg/custom/use-nested-missing-target-added.svg: * svg/custom/use-nested-missing-target-removed.svg: * svg/custom/use-nested-missing-target.svg: * svg/custom/use-nested-notarget.svg: * svg/custom/use-non-existing-symbol-crash.svg: * svg/custom/use-on-use-with-child-and-empty-target.svg: * svg/custom/use-on-use-with-child.svg: * svg/custom/use-referencing-style-crash.svg: * svg/custom/use-shadow-root-parent-removal.svg: * svg/custom/use-tref-crash.svg: * svg/custom/webkit-transform-crash.html: * svg/custom/xlink-prefix-in-attributes.html: * svg/custom/xlink-to-invalid-gradient.svg: * svg/dom/SVGPathSegList-xml-dom-synchronization.xhtml: * svg/dom/SVGPolygonElement-baseVal-list-removal-crash.html: * svg/dom/SVGScriptElement/script-async-attr.svg: * svg/dom/SVGScriptElement/script-change-externalResourcesRequired-while-loading.svg: * svg/dom/SVGScriptElement/script-clone-rerun-self.svg: * svg/dom/SVGScriptElement/script-clone-rerun.svg: * svg/dom/SVGScriptElement/script-load-and-error-events.svg: * svg/dom/SVGScriptElement/script-onerror-bubbling.svg: * svg/dom/SVGScriptElement/script-reexecution.svg: * svg/dom/SVGScriptElement/script-set-href.svg: * svg/dom/SVGStyledElement-pendingResource-crash.html: * svg/dom/SVGTransformList-empty-list-consolidation.html: * svg/dom/animated-tearoff-equality.xhtml: * svg/dom/animated-tearoff-lifespan.xhtml: * svg/dom/baseVal-animVal-crash.html: * svg/dom/baseVal-animVal-list-crash.html: * svg/dom/frame-related-api-during-load.html: * svg/dom/parent-view-layout-crash.html: * svg/dom/path-marker-removed-crash.svg: * svg/dom/resources/viewspec-parser.js: (continueFuzzing.else.script.onload): (continueFuzzing): * svg/dom/script-tests/SVGViewSpec.js: (completeTest.script.onload): (completeTest): * svg/dom/smil-methods.svg: * svg/dom/stylesheet-candidate-node-crash-main.html: * svg/dom/svg-element-attribute-js-null.xhtml: * svg/dom/symbol-embeddedAnimation.svg: * svg/dom/use-style-recalc-script-execute-crash.html: * svg/dom/use-transform.svg: * svg/dom/viewport-container-crash.svg: * svg/dom/vkern-element-crash.html: * svg/dynamic-updates/resources/SVGTestCase.js: (createSVGTestCase): (embedSVGTestCase): (completeTest.script.onload): (completeTest): * svg/dynamic-updates/resources/linkTarget.svg: * svg/filters/feBlend-invalid-mode.xhtml: * svg/filters/feColorMatrix-invalid-value.svg: * svg/filters/feComponentTransfer-style-crash.xhtml: * svg/filters/feDisplacementMap-crash-test.xhtml: * svg/filters/feImage-animated-transform-on-target-rect.svg: * svg/filters/feImage-target-reappend-to-document.svg: * svg/filters/feImage-zero-size-crash.svg: * svg/filters/feMorphology-invalid-radius.svg: * svg/filters/feMorphology-zero-radius.svg: * svg/filters/filter-after-transform-crash.svg: * svg/filters/reparent-animated-filter-target.html: * svg/filters/svg-transform-blur-crash.svg: * svg/foreignObject/absolute-position-foreign-object-child-crash.html: * svg/foreignObject/fO-fixed-position-crash.html: * svg/hittest/foreign-object-background.svg: * svg/hittest/svg-ellipse-non-scale-stroke.xhtml: * svg/hittest/svg-ellipse-rect-stroke.xhtml: * svg/hittest/svg-ellipse.xhtml: * svg/hittest/svg-inside-display-table.xhtml: * svg/hittest/svg-inside-table.xhtml: * svg/hittest/svg-padding.xhtml: * svg/hittest/svg-shapes-non-scale-stroke.html: * svg/hittest/svg-small-path.xhtml: * svg/hittest/svg-small-viewbox.xhtml: * svg/hittest/zero-length-butt-cap-path.xhtml: * svg/hittest/zero-length-round-cap-path.xhtml: * svg/hittest/zero-length-square-cap-path.xhtml: * svg/hixie/dynamic/001.xml: * svg/hixie/links/003.xml: * svg/hixie/perf/001.xml: * svg/hixie/perf/002.xml: * svg/hixie/perf/003.xml: * svg/hixie/perf/004.xml: * svg/hixie/perf/005.xml: * svg/hixie/perf/006.xml: * svg/hixie/perf/007.xml: * svg/in-html/script-external.html: * svg/in-html/script-nested.html: * svg/in-html/script-write.html: * svg/in-html/script.html: * svg/in-html/svg-assert-failure-percentage.html: * svg/path-arc-invalid.html: * svg/repaint/filter-repaint.svg: * svg/repaint/image-href-change.svg: * svg/repaint/image-with-clip-path.svg: * svg/repaint/repainting-after-animation-element-removal.svg: * svg/text/add-tspan-position-bug.html: * svg/text/caret-in-svg-text.xhtml: * svg/text/clear-floats-crash.svg: * svg/text/font-size-null-assertion.svg: * svg/text/font-size-too-large-crash.svg: * svg/text/foreignObject-text-clipping-bug.xml: * svg/text/glyphref-renderer-create-crash.html: * svg/text/highcharts-assertion.html: * svg/text/inline-text-destroy-attributes-crash.xhtml: * svg/text/modify-tspan-position-bug.html: * svg/text/resources/SelectionTestCase.js: * svg/text/select-text-svgfont.html: * svg/text/selection-doubleclick.svg: * svg/text/selection-tripleclick.svg: * svg/text/svg-rtl-text-crash.html: * svg/text/svg-zoom-large-value.xhtml: * svg/text/text-align-01-b.svg: * svg/text/text-align-02-b.svg: * svg/text/text-align-03-b.svg: * svg/text/text-align-04-b.svg: * svg/text/text-align-05-b.svg: * svg/text/text-align-06-b.svg: * svg/text/text-altglyph-01-b.svg: * svg/text/text-assert.svg: * svg/text/text-block-child-crash.xhtml: * svg/text/text-deco-01-b.svg: * svg/text/text-font-anonymous-parent.xhtml: * svg/text/text-font-invalid.html: * svg/text/text-font-uri-invalid.svg: * svg/text/text-fonts-01-t.svg: * svg/text/text-fonts-02-t.svg: * svg/text/text-intro-05-t.svg: * svg/text/text-path-01-b.svg: * svg/text/text-positioning-remove-child-crash.svg: * svg/text/text-property-with-display-none.html: * svg/text/text-spacing-01-b.svg: * svg/text/text-style-invalid.svg: * svg/text/text-style-recalc-crash.html: * svg/text/text-text-01-b.svg: * svg/text/text-text-03-b.svg: * svg/text/text-text-04-t.svg: * svg/text/text-text-05-t.svg: * svg/text/text-text-06-t.svg: * svg/text/text-text-07-t.svg: * svg/text/text-text-08-b.svg: * svg/text/text-tref-01-b.svg: * svg/text/text-tselect-01-b.svg: * svg/text/text-tselect-02-f.svg: * svg/text/text-tspan-01-b.svg: * svg/text/text-ws-01-t.svg: * svg/text/text-ws-02-t.svg: * svg/text/textPathBoundsBug.svg: * svg/text/textpath-reference-crash.html: * svg/text/tref-event-listener-crash.svg: * svg/text/tspan-getComputedTextLength.svg: * svg/transforms/percent-transform-values.xhtml: * svg/transforms/transform-origin-presentation-attribute.xhtml: * svg/webarchive/svg-cursor-subresources-expected.webarchive: * svg/webarchive/svg-cursor-subresources.svg: * svg/webarchive/svg-feimage-subresources-expected.webarchive: * svg/webarchive/svg-feimage-subresources.svg: * svg/webarchive/svg-script-subresouces-expected.webarchive: * svg/webarchive/svg-script-subresouces.svg: * svg/zoom/page/zoom-getBoundingClientRect.xhtml: * svg/zoom/page/zoom-zoom-coords.xhtml: * svg/zoom/resources/testPageZoom.js: (repaintTest): (completeDynamicTest.script.onload): (completeDynamicTest): * svg/zoom/resources/testTextZoom.js: (repaintTest): Canonical link: https://commits.webkit.org/110751@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@124380 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2012-08-01 23:05:16 +00:00
if (window.testRunner && window.GCController && window.internals) {
testRunner.dumpAsText();
testRunner.waitUntilDone();
SMIL animation causes leak of the related Document (and many elements) https://bugs.webkit.org/show_bug.cgi?id=83856 <rdar://problem/11216047> Reviewed by Dean Jackson. The SVGAnimatedProperty cache was previously holding a reference to the properties it contained; said references were cleared in the SVGAnimatedProperty destructor (which was never called because there was always one remaining reference from the cache). The SVGAnimatedProperty cache now holds raw pointers instead of RefPtrs; the SVGAnimateElement now owns its own SVGAnimatedProperties, both for itself and for any <use/> instances of itself. They're cleared and destroyed within SVGAnimateElement::targetElementWillChange, at which time they're removed from the cache. SVGPropertyTearOffs now keep a reference to their SVGElement (m_contextElement) instead of their SVGAnimatedProperty; this way, there is no reference cycle, but the animated property (owned by the element) and the element itself are kept alive until the TearOff is garbage collected. Add a few tests for different parts of this patch: smil-leak-elements tests that animated elements are garbage collected properly after being removed from the page; smil-leak-element-instances and its related smil-leak-element-instances-noBaseValRef test that we don't leak instances after they're removed from the document while the original element is still alive; smil-leak-dynamically-added-element-instances tests the same thing, but adds half of the instances while the animation is in the middle of running; svglength-element-removed-crash ensures that an animated element is not freed if JavaScript code is holding a reference to an animated property wrapper. File lists left off because they're very long. Canonical link: https://commits.webkit.org/102642@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@115518 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2012-04-28 00:04:50 +00:00
} else {
Use testRunner instead of layoutTestController in SVG tests https://bugs.webkit.org/show_bug.cgi?id=92898 Reviewed by Dirk Schulze. * svg/W3C-SVG-1.1-SE/paths-dom-02-f.svg: * svg/animations/animate-beginElementAt.svg: * svg/animations/animate-calcMode-spline-crash-bad-array-length.xhtml: * svg/animations/animate-linear-discrete-additive-b.svg: * svg/animations/animate-linear-discrete-additive-c.svg: * svg/animations/animate-linear-discrete-additive.svg: * svg/animations/animate-list-crash.svg: * svg/animations/animate-setcurrenttime.html: * svg/animations/animate-update-crash.xhtml: * svg/animations/animateColor-additive-2a.svg: * svg/animations/animateColor-additive-2b.svg: * svg/animations/animateColor-additive-2c.svg: * svg/animations/animateColor-additive-2d.svg: * svg/animations/animateMotion-additive-1.svg: * svg/animations/animateMotion-additive-2a.svg: * svg/animations/animateMotion-additive-2b.svg: * svg/animations/animateMotion-additive-2c.svg: * svg/animations/animateMotion-additive-2d.svg: * svg/animations/animateTransform-accumulation.svg: * svg/animations/animateTransform-by-scale-1.svg: * svg/animations/animateTransform-by-scale.svg: * svg/animations/animateTransform-from-by-from-to-comparision-expected.svg: * svg/animations/animateTransform-from-by-from-to-comparision.svg: * svg/animations/animateTransform-from-by-scale-additive-sum.svg: * svg/animations/animateTransform-from-by-scale.svg: * svg/animations/animateTransform-rotate-around-point.svg: * svg/animations/animateTransform-skewX.svg: * svg/animations/animateTransform-skewY.svg: * svg/animations/animateTransform-translate.svg: * svg/animations/dynamic-modify-attributename-crash.svg: * svg/animations/keypoints-mismatch.svg: * svg/animations/length-list-animation.svg: * svg/animations/list-wrapper-assertion.svg: * svg/animations/mozilla/animateMotion-by-1.svg: * svg/animations/mozilla/animateMotion-from-to-1-expected.svg: * svg/animations/mozilla/animateMotion-from-to-1.svg: * svg/animations/mozilla/animateMotion-mpath-pathLength-1.svg: * svg/animations/mozilla/animateMotion-mpath-targetChange-1.svg: * svg/animations/mozilla/animateMotion-to-overridden-1.svg: * svg/animations/multiple-animateTransform-additive-sum.svg: * svg/animations/multiple-begin-animation-discrete.svg: * svg/animations/multiple-begin-animation.svg: * svg/animations/path-animation.svg: * svg/animations/repeatDur-zero.xhtml: * svg/animations/repeating-path-animation.svg: * svg/animations/resources/SVGAnimationTestCase.js: (runAnimationTest): * svg/animations/smil-element-not-removed-crash.html: * svg/animations/smil-element-target-crash-main.html: * svg/animations/smil-leak-dynamically-added-element-instances.svg: * svg/animations/smil-leak-element-instances-noBaseValRef.svg: * svg/animations/smil-leak-element-instances.svg: * svg/animations/smil-leak-elements.svg: * svg/animations/svg-two-animate-elements-crash.svg: * svg/animations/svglength-animation-retarget-crash.html: * svg/animations/svglength-element-removed-crash.svg: * svg/as-background-image/animated-svg-as-background.html: * svg/as-background-image/svg-background-crash-on-refresh.html: * svg/as-image/animated-svg-as-image-no-fixed-intrinsic-size.html: * svg/as-image/animated-svg-as-image-same-image.html: * svg/as-image/animated-svg-as-image.html: * svg/as-image/animated-svg-repaints-completely-in-hidpi.html: * svg/as-image/drag-svg-as-image.html: * svg/as-image/image-respects-deviceScaleFactor.html: * svg/as-image/image-respects-pageScaleFactor-change.html: * svg/as-image/svg-image-leak-cached-data.html: * svg/as-image/svg-image-leak-loader.html: * svg/as-image/svg-nested.html: * svg/as-object/embedded-svg-immediate-offsetWidth-query.html: * svg/as-object/embedded-svg-size-changes-no-layout-triggers.html: * svg/as-object/embedded-svg-size-changes.html: * svg/as-object/nested-embedded-svg-size-changes-no-layout-triggers-1.html: * svg/as-object/nested-embedded-svg-size-changes-no-layout-triggers-2.html: * svg/as-object/nested-embedded-svg-size-changes.html: * svg/as-object/resources/embedded-svg-size-changes-no-layout-triggers.svg: * svg/as-object/resources/nested-embedded-svg-size-changes-target-no-layout-triggers-1.html: * svg/carto.net/frameless-svg-parse-error.html: * svg/carto.net/window.svg: * svg/css/crash-css-generated-content.xhtml: * svg/css/cursor-image-replace.svg: * svg/css/cursor-replace.svg: * svg/css/getComputedStyle-basic.xhtml: * svg/css/invalid-color-crash.svg: * svg/css/multiple-cursors-crash.html: * svg/css/script-tests/svg-attribute-length-parsing.js: * svg/css/script-tests/svg-attribute-parser-mode.js: * svg/css/style-change-crash.html: * svg/css/svg-ellipse-render-crash.html: * svg/custom/acid3-test-77.html: * svg/custom/anchor-on-use.svg: * svg/custom/animate-disallowed-mask-element.svg: * svg/custom/animate-disallowed-use-element.svg: * svg/custom/animate-path-discrete.svg: * svg/custom/animate-path-morphing.svg: * svg/custom/animate-target-id-changed.svg: * svg/custom/animate-target-removed-from-document.svg: * svg/custom/animate-use-crash.xhtml: * svg/custom/assert-empty-layout-attributes.svg: * svg/custom/bbox-of-g-in-symbol.svg: * svg/custom/boundingBox.html: * svg/custom/bug78700.svg: * svg/custom/bug78807.svg: * svg/custom/bug78838.html: * svg/custom/bug79798.html: * svg/custom/bug86119.html: * svg/custom/bug86392.html: * svg/custom/bug86781.html: * svg/custom/click-internal-anchor-with-use-crash.xhtml: * svg/custom/crash-inline-container-client.html: * svg/custom/crash-text-in-textpath.svg: * svg/custom/crash-textPath-attributes.html: * svg/custom/delete-modified-text-in-defs-crash.svg: * svg/custom/delete-text-crash.html: * svg/custom/delete-text-innerText-crash.html: * svg/custom/detached-outermost-svg-crash.html: * svg/custom/disallowed-text-content-rendering.svg: * svg/custom/display-table-caption-foreignObject.svg: * svg/custom/display-table-caption-inherit-foreignObject.xhtml: * svg/custom/display-table-caption-inherit-text.xhtml: * svg/custom/display-table-caption-text.svg: * svg/custom/element-instance-held-by-js-crash.svg: * svg/custom/embedded-svg-allowed-in-dashboard.xml: * svg/custom/empty-className-baseVal-crash.html: * svg/custom/filter-on-svgimage.svg: * svg/custom/font-face-move.svg: * svg/custom/font-face-name-without-name-attr.svg: * svg/custom/font-face-not-in-document.svg: * svg/custom/font-platformDestroy-crash.svg: * svg/custom/foreignObject-crash-on-hover.xml: * svg/custom/foreignobject-crash-with-absolute-positioned-children.svg: * svg/custom/frame-getSVGDocument.html: * svg/custom/g-outside-svg.html: * svg/custom/get-text-element-transform-crash.html: * svg/custom/getBBox-empty-container.html: * svg/custom/getBBox-js.svg: * svg/custom/getBBox-path.svg: * svg/custom/getBBox-perpendicular-path.svg: * svg/custom/getscreenctm-in-mixed-content2.xhtml: * svg/custom/gradient-attr-update.svg: * svg/custom/gradient-stop-display-none-crash.svg: * svg/custom/hit-test-path-stroke.svg: * svg/custom/hit-test-path.svg: * svg/custom/hit-test-unclosed-subpaths.svg: * svg/custom/hit-test-with-br.xhtml: * svg/custom/image-base-uri.svg: * svg/custom/image-clipped-hit.svg: * svg/custom/image-rescale-scroll.html: * svg/custom/image-with-prefix-in-webarchive-expected.webarchive: * svg/custom/image-with-prefix-in-webarchive.svg: * svg/custom/insertItemBefore-from-non-list-origin.svg: * svg/custom/intersection-list-clipping.svg: * svg/custom/intersection-list-crash.svg: * svg/custom/intersection-list-nested-svg.svg: * svg/custom/intersection-list-null.svg: * svg/custom/invalid-gradient-with-xlink.svg: * svg/custom/invalid-paint-shape-mask.svg: * svg/custom/js-late-clipPath-and-object-creation.svg: * svg/custom/js-late-clipPath-creation.svg: * svg/custom/js-late-gradient-and-object-creation.svg: * svg/custom/js-late-gradient-creation.svg: * svg/custom/js-late-marker-and-object-creation.svg: * svg/custom/js-late-marker-creation.svg: * svg/custom/js-late-mask-and-object-creation.svg: * svg/custom/js-late-mask-creation.svg: * svg/custom/js-late-pattern-and-object-creation.svg: * svg/custom/js-late-pattern-creation.svg: * svg/custom/js-svg-constructors.svg: * svg/custom/js-update-container2.svg: * svg/custom/js-update-image-and-display.svg: * svg/custom/js-update-image-and-display2.svg: * svg/custom/js-update-image-and-display3.svg: * svg/custom/layout-loop.svg: * svg/custom/linking-a-03-b-all.svg: * svg/custom/linking-a-03-b-preserveAspectRatio.svg: * svg/custom/linking-a-03-b-transform.svg: * svg/custom/linking-a-03-b-viewBox-transform.svg: * svg/custom/linking-a-03-b-viewBox.svg: * svg/custom/linking-a-03-b-viewTarget.svg: * svg/custom/linking-a-03-b-zoomAndPan.svg: * svg/custom/linking-uri-01-b.svg: * svg/custom/loadevents-capturing.svg: * svg/custom/loadevents-externalresourcesrequired-displaynone.svg: * svg/custom/loadevents-externalresourcesrequired.svg: * svg/custom/loadevents-normal-displaynone.svg: * svg/custom/loadevents-normal.svg: * svg/custom/manually-parsed-embedded-svg-allowed-in-dashboard.html: * svg/custom/manually-parsed-svg-allowed-in-dashboard.html: * svg/custom/marker-getPropertyValue.svg: * svg/custom/mask-changes.svg: * svg/custom/mask-invalidation.svg: * svg/custom/mouse-move-on-svg-container-standalone.svg: * svg/custom/mouse-move-on-svg-container.xhtml: * svg/custom/mouse-move-on-svg-root-standalone.svg: * svg/custom/mouse-move-on-svg-root.xhtml: * svg/custom/multiple-title-elements.svg: * svg/custom/new-image-is-html-element.svg: * svg/custom/path-getPresentationAttribute-crash.html: * svg/custom/path-getTotalLength-on-big-segment-crash.svg: * svg/custom/path-getTotalLength.svg: * svg/custom/pending-resource-after-removal.xhtml: * svg/custom/pending-resource-leak-2.svg: * svg/custom/pending-resource-leak-3.svg: * svg/custom/pending-resource-leak.svg: * svg/custom/pointer-events-image-css-transform.svg: * svg/custom/pointer-events-image.svg: * svg/custom/pointer-events-invalid-fill.svg: * svg/custom/pointer-events-on-rounded-rect.xhtml: * svg/custom/pointer-events-on-svg-with-pointer.xhtml: * svg/custom/pointer-events-on-svg-without-pointer.xhtml: * svg/custom/pointer-events-text-css-transform.svg: * svg/custom/pointer-events-text.svg: * svg/custom/pointer-events-with-linecaps-and-miterlimits.xhtml: * svg/custom/poly-points-attribute-changes.svg: * svg/custom/polyline-hittest.svg: * svg/custom/polyline-points-crash.html: * svg/custom/prevent-default.svg: * svg/custom/recursive-use.svg: * svg/custom/recursive-use2.svg: * svg/custom/repaint-moving-svg-and-div.xhtml: * svg/custom/resource-client-removal.svg: * svg/custom/resources/focus-event-handling-keyboard.js: * svg/custom/resources/focus-event-handling.js: * svg/custom/resources/link-target.html: * svg/custom/resources/linkingCircle-f.svg: * svg/custom/resources/svgsvgelement-ctm.js: * svg/custom/resources/use-instanceRoot-event-bubbling.js: (repaintTest): * svg/custom/resources/use-instanceRoot-event-listeners.js: (repaintTest): * svg/custom/scroll-hit-test.xhtml: * svg/custom/scroll-to-anchor-in-symbol.svg: * svg/custom/scroll-to-svg-element-assertion.html: * svg/custom/scrolling-embedded-svg-file-image-repaint-problem.html: * svg/custom/stop-crash.svg: * svg/custom/stroke-width-click.svg: * svg/custom/svg-allowed-in-dashboard-object.html: * svg/custom/svg-features.html: * svg/custom/svg-fonts-in-html-linebreaks.html: * svg/custom/svg-fonts-no-latin-glyph.html: * svg/custom/svg-getelementid.xhtml: * svg/custom/svg-parse-overflow-1.html: * svg/custom/svg-parse-overflow-2.html: * svg/custom/svg-parse-overflow-3.html: * svg/custom/svg-parse-overflow-4.html: * svg/custom/svg-parse-overflow-5.html: * svg/custom/svg-use-style-float-crash.svg: * svg/custom/svg-width-intrinsic-crash.html: * svg/custom/symbol-viewport-element-crash.svg: * svg/custom/text-node-in-text-invalidated.svg: * svg/custom/text-tref-03-b-dynamic.svg: * svg/custom/text-tref-03-b-dynamic2.svg: * svg/custom/textPath-assert.svg: * svg/custom/textPath-set-id.svg: * svg/custom/tiling-regular-hexagonal-crash.svg: * svg/custom/tref-clone-crash.html: * svg/custom/tref-shadowdom.html: * svg/custom/use-animation-in-fill.html: * svg/custom/use-crash-in-non-wellformed-document.svg: * svg/custom/use-crash-pending-resource.svg: * svg/custom/use-crash-using-children-before-destroy.svg: * svg/custom/use-crash-when-href-change.svg: * svg/custom/use-detach.svg: * svg/custom/use-display-none.svg: * svg/custom/use-elementInstance-event-target.svg: * svg/custom/use-elementInstance-methods.svg: * svg/custom/use-event-handler-on-referenced-element.svg: * svg/custom/use-event-handler-on-use-element.svg: * svg/custom/use-external-crash.svg: * svg/custom/use-instanceRoot-as-event-target.xhtml: * svg/custom/use-instanceRoot-event-listener-liveness.xhtml: * svg/custom/use-instanceRoot-with-use-removed.svg: * svg/custom/use-invalid-font-face.svg: * svg/custom/use-invalid-html.xhtml: * svg/custom/use-invalid-pattern.svg: * svg/custom/use-invalid-style.svg: * svg/custom/use-move-to-offset.svg: * svg/custom/use-multiple-on-nested-disallowed-font.html: * svg/custom/use-mutation-event-crash.svg: * svg/custom/use-nested-children.svg: * svg/custom/use-nested-disallowed-target.svg: * svg/custom/use-nested-missing-target-added.svg: * svg/custom/use-nested-missing-target-removed.svg: * svg/custom/use-nested-missing-target.svg: * svg/custom/use-nested-notarget.svg: * svg/custom/use-non-existing-symbol-crash.svg: * svg/custom/use-on-use-with-child-and-empty-target.svg: * svg/custom/use-on-use-with-child.svg: * svg/custom/use-referencing-style-crash.svg: * svg/custom/use-shadow-root-parent-removal.svg: * svg/custom/use-tref-crash.svg: * svg/custom/webkit-transform-crash.html: * svg/custom/xlink-prefix-in-attributes.html: * svg/custom/xlink-to-invalid-gradient.svg: * svg/dom/SVGPathSegList-xml-dom-synchronization.xhtml: * svg/dom/SVGPolygonElement-baseVal-list-removal-crash.html: * svg/dom/SVGScriptElement/script-async-attr.svg: * svg/dom/SVGScriptElement/script-change-externalResourcesRequired-while-loading.svg: * svg/dom/SVGScriptElement/script-clone-rerun-self.svg: * svg/dom/SVGScriptElement/script-clone-rerun.svg: * svg/dom/SVGScriptElement/script-load-and-error-events.svg: * svg/dom/SVGScriptElement/script-onerror-bubbling.svg: * svg/dom/SVGScriptElement/script-reexecution.svg: * svg/dom/SVGScriptElement/script-set-href.svg: * svg/dom/SVGStyledElement-pendingResource-crash.html: * svg/dom/SVGTransformList-empty-list-consolidation.html: * svg/dom/animated-tearoff-equality.xhtml: * svg/dom/animated-tearoff-lifespan.xhtml: * svg/dom/baseVal-animVal-crash.html: * svg/dom/baseVal-animVal-list-crash.html: * svg/dom/frame-related-api-during-load.html: * svg/dom/parent-view-layout-crash.html: * svg/dom/path-marker-removed-crash.svg: * svg/dom/resources/viewspec-parser.js: (continueFuzzing.else.script.onload): (continueFuzzing): * svg/dom/script-tests/SVGViewSpec.js: (completeTest.script.onload): (completeTest): * svg/dom/smil-methods.svg: * svg/dom/stylesheet-candidate-node-crash-main.html: * svg/dom/svg-element-attribute-js-null.xhtml: * svg/dom/symbol-embeddedAnimation.svg: * svg/dom/use-style-recalc-script-execute-crash.html: * svg/dom/use-transform.svg: * svg/dom/viewport-container-crash.svg: * svg/dom/vkern-element-crash.html: * svg/dynamic-updates/resources/SVGTestCase.js: (createSVGTestCase): (embedSVGTestCase): (completeTest.script.onload): (completeTest): * svg/dynamic-updates/resources/linkTarget.svg: * svg/filters/feBlend-invalid-mode.xhtml: * svg/filters/feColorMatrix-invalid-value.svg: * svg/filters/feComponentTransfer-style-crash.xhtml: * svg/filters/feDisplacementMap-crash-test.xhtml: * svg/filters/feImage-animated-transform-on-target-rect.svg: * svg/filters/feImage-target-reappend-to-document.svg: * svg/filters/feImage-zero-size-crash.svg: * svg/filters/feMorphology-invalid-radius.svg: * svg/filters/feMorphology-zero-radius.svg: * svg/filters/filter-after-transform-crash.svg: * svg/filters/reparent-animated-filter-target.html: * svg/filters/svg-transform-blur-crash.svg: * svg/foreignObject/absolute-position-foreign-object-child-crash.html: * svg/foreignObject/fO-fixed-position-crash.html: * svg/hittest/foreign-object-background.svg: * svg/hittest/svg-ellipse-non-scale-stroke.xhtml: * svg/hittest/svg-ellipse-rect-stroke.xhtml: * svg/hittest/svg-ellipse.xhtml: * svg/hittest/svg-inside-display-table.xhtml: * svg/hittest/svg-inside-table.xhtml: * svg/hittest/svg-padding.xhtml: * svg/hittest/svg-shapes-non-scale-stroke.html: * svg/hittest/svg-small-path.xhtml: * svg/hittest/svg-small-viewbox.xhtml: * svg/hittest/zero-length-butt-cap-path.xhtml: * svg/hittest/zero-length-round-cap-path.xhtml: * svg/hittest/zero-length-square-cap-path.xhtml: * svg/hixie/dynamic/001.xml: * svg/hixie/links/003.xml: * svg/hixie/perf/001.xml: * svg/hixie/perf/002.xml: * svg/hixie/perf/003.xml: * svg/hixie/perf/004.xml: * svg/hixie/perf/005.xml: * svg/hixie/perf/006.xml: * svg/hixie/perf/007.xml: * svg/in-html/script-external.html: * svg/in-html/script-nested.html: * svg/in-html/script-write.html: * svg/in-html/script.html: * svg/in-html/svg-assert-failure-percentage.html: * svg/path-arc-invalid.html: * svg/repaint/filter-repaint.svg: * svg/repaint/image-href-change.svg: * svg/repaint/image-with-clip-path.svg: * svg/repaint/repainting-after-animation-element-removal.svg: * svg/text/add-tspan-position-bug.html: * svg/text/caret-in-svg-text.xhtml: * svg/text/clear-floats-crash.svg: * svg/text/font-size-null-assertion.svg: * svg/text/font-size-too-large-crash.svg: * svg/text/foreignObject-text-clipping-bug.xml: * svg/text/glyphref-renderer-create-crash.html: * svg/text/highcharts-assertion.html: * svg/text/inline-text-destroy-attributes-crash.xhtml: * svg/text/modify-tspan-position-bug.html: * svg/text/resources/SelectionTestCase.js: * svg/text/select-text-svgfont.html: * svg/text/selection-doubleclick.svg: * svg/text/selection-tripleclick.svg: * svg/text/svg-rtl-text-crash.html: * svg/text/svg-zoom-large-value.xhtml: * svg/text/text-align-01-b.svg: * svg/text/text-align-02-b.svg: * svg/text/text-align-03-b.svg: * svg/text/text-align-04-b.svg: * svg/text/text-align-05-b.svg: * svg/text/text-align-06-b.svg: * svg/text/text-altglyph-01-b.svg: * svg/text/text-assert.svg: * svg/text/text-block-child-crash.xhtml: * svg/text/text-deco-01-b.svg: * svg/text/text-font-anonymous-parent.xhtml: * svg/text/text-font-invalid.html: * svg/text/text-font-uri-invalid.svg: * svg/text/text-fonts-01-t.svg: * svg/text/text-fonts-02-t.svg: * svg/text/text-intro-05-t.svg: * svg/text/text-path-01-b.svg: * svg/text/text-positioning-remove-child-crash.svg: * svg/text/text-property-with-display-none.html: * svg/text/text-spacing-01-b.svg: * svg/text/text-style-invalid.svg: * svg/text/text-style-recalc-crash.html: * svg/text/text-text-01-b.svg: * svg/text/text-text-03-b.svg: * svg/text/text-text-04-t.svg: * svg/text/text-text-05-t.svg: * svg/text/text-text-06-t.svg: * svg/text/text-text-07-t.svg: * svg/text/text-text-08-b.svg: * svg/text/text-tref-01-b.svg: * svg/text/text-tselect-01-b.svg: * svg/text/text-tselect-02-f.svg: * svg/text/text-tspan-01-b.svg: * svg/text/text-ws-01-t.svg: * svg/text/text-ws-02-t.svg: * svg/text/textPathBoundsBug.svg: * svg/text/textpath-reference-crash.html: * svg/text/tref-event-listener-crash.svg: * svg/text/tspan-getComputedTextLength.svg: * svg/transforms/percent-transform-values.xhtml: * svg/transforms/transform-origin-presentation-attribute.xhtml: * svg/webarchive/svg-cursor-subresources-expected.webarchive: * svg/webarchive/svg-cursor-subresources.svg: * svg/webarchive/svg-feimage-subresources-expected.webarchive: * svg/webarchive/svg-feimage-subresources.svg: * svg/webarchive/svg-script-subresouces-expected.webarchive: * svg/webarchive/svg-script-subresouces.svg: * svg/zoom/page/zoom-getBoundingClientRect.xhtml: * svg/zoom/page/zoom-zoom-coords.xhtml: * svg/zoom/resources/testPageZoom.js: (repaintTest): (completeDynamicTest.script.onload): (completeDynamicTest): * svg/zoom/resources/testTextZoom.js: (repaintTest): Canonical link: https://commits.webkit.org/110751@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@124380 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2012-08-01 23:05:16 +00:00
log("This test only works when run with the testRunner, GCController, and internals available.");
SMIL animation causes leak of the related Document (and many elements) https://bugs.webkit.org/show_bug.cgi?id=83856 <rdar://problem/11216047> Reviewed by Dean Jackson. The SVGAnimatedProperty cache was previously holding a reference to the properties it contained; said references were cleared in the SVGAnimatedProperty destructor (which was never called because there was always one remaining reference from the cache). The SVGAnimatedProperty cache now holds raw pointers instead of RefPtrs; the SVGAnimateElement now owns its own SVGAnimatedProperties, both for itself and for any <use/> instances of itself. They're cleared and destroyed within SVGAnimateElement::targetElementWillChange, at which time they're removed from the cache. SVGPropertyTearOffs now keep a reference to their SVGElement (m_contextElement) instead of their SVGAnimatedProperty; this way, there is no reference cycle, but the animated property (owned by the element) and the element itself are kept alive until the TearOff is garbage collected. Add a few tests for different parts of this patch: smil-leak-elements tests that animated elements are garbage collected properly after being removed from the page; smil-leak-element-instances and its related smil-leak-element-instances-noBaseValRef test that we don't leak instances after they're removed from the document while the original element is still alive; smil-leak-dynamically-added-element-instances tests the same thing, but adds half of the instances while the animation is in the middle of running; svglength-element-removed-crash ensures that an animated element is not freed if JavaScript code is holding a reference to an animated property wrapper. File lists left off because they're very long. Canonical link: https://commits.webkit.org/102642@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@115518 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2012-04-28 00:04:50 +00:00
return;
}
setTimeout(runTest, 0);
SMIL animation causes leak of the related Document (and many elements) https://bugs.webkit.org/show_bug.cgi?id=83856 <rdar://problem/11216047> Reviewed by Dean Jackson. The SVGAnimatedProperty cache was previously holding a reference to the properties it contained; said references were cleared in the SVGAnimatedProperty destructor (which was never called because there was always one remaining reference from the cache). The SVGAnimatedProperty cache now holds raw pointers instead of RefPtrs; the SVGAnimateElement now owns its own SVGAnimatedProperties, both for itself and for any <use/> instances of itself. They're cleared and destroyed within SVGAnimateElement::targetElementWillChange, at which time they're removed from the cache. SVGPropertyTearOffs now keep a reference to their SVGElement (m_contextElement) instead of their SVGAnimatedProperty; this way, there is no reference cycle, but the animated property (owned by the element) and the element itself are kept alive until the TearOff is garbage collected. Add a few tests for different parts of this patch: smil-leak-elements tests that animated elements are garbage collected properly after being removed from the page; smil-leak-element-instances and its related smil-leak-element-instances-noBaseValRef test that we don't leak instances after they're removed from the document while the original element is still alive; smil-leak-dynamically-added-element-instances tests the same thing, but adds half of the instances while the animation is in the middle of running; svglength-element-removed-crash ensures that an animated element is not freed if JavaScript code is holding a reference to an animated property wrapper. File lists left off because they're very long. Canonical link: https://commits.webkit.org/102642@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@115518 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2012-04-28 00:04:50 +00:00
}
]]>
</script>
</svg>