haikuwebkit/LayoutTests/svg/custom/use-listener-append-crash.html

31 lines
1021 B
HTML
Raw Permalink Normal View History

<!DOCTYPE html>
<html>
<svg width=80 height=40>
<defs>
<rect id="square" x=4 y=4 width=32 height=32 fill=orange></rect>
</defs>
<use id="leftSquare" xlink:href="#square"></use>
<use xlink:href="#square" x=40></use>
</svg>
<script>
if (window.testRunner)
testRunner.dumpAsText();
Remove SVGUseElement.instanceRoot and all tests that depend on it https://bugs.webkit.org/show_bug.cgi?id=141025 Reviewed by Anders Carlsson. Source/WebCore: * svg/SVGUseElement.cpp: (WebCore::SVGUseElement::instanceRoot): Deleted. * svg/SVGUseElement.h: Removed instanceRoot. * svg/SVGUseElement.idl: Ditto. LayoutTests: * platform/gtk/TestExpectations: Removed expected failure for now-removed test. * platform/ios-simulator-wk2/TestExpectations: Ditto. * platform/mac/TestExpectations: Ditto. * platform/gtk/svg/custom/use-elementInstance-event-target-expected.png: Removed. * platform/gtk/svg/custom/use-elementInstance-event-target-expected.txt: Removed. * platform/gtk/svg/custom/use-elementInstance-methods-expected.png: Removed. * platform/gtk/svg/custom/use-elementInstance-methods-expected.txt: Removed. * platform/ios-sim-deprecated/svg/custom/use-elementInstance-event-target-expected.txt: Removed. * platform/ios-sim-deprecated/svg/custom/use-elementInstance-methods-expected.txt: Removed. * platform/ios-simulator/svg/custom/use-elementInstance-event-target-expected.txt: Removed. * platform/ios-simulator/svg/custom/use-elementInstance-methods-expected.txt: Removed. * platform/mac-mountainlion/svg/custom/use-elementInstance-event-target-expected.txt: Removed. * platform/mac-mountainlion/svg/custom/use-elementInstance-methods-expected.txt: Removed. * platform/mac/svg/custom/use-elementInstance-event-target-expected.png: Removed. * platform/mac/svg/custom/use-elementInstance-event-target-expected.txt: Removed. * platform/mac/svg/custom/use-elementInstance-methods-expected.png: Removed. * platform/mac/svg/custom/use-elementInstance-methods-expected.txt: Removed. * svg/custom/element-instance-held-by-js-crash-expected.txt: Removed. * svg/custom/element-instance-held-by-js-crash.svg: Removed. * svg/custom/resources/use-instanceRoot-event-bubbling.js: Find element by id instead of using use.instanceRoot.correspondingElement. * svg/custom/resources/use-instanceRoot-event-listeners.js: Removed. * svg/custom/use-crash-using-children-before-destroy.svg: Removed a line of code that got at the instanceRoot. It's possible this test no longer has value, and if so, then we could later delete it, but it does no harm. * svg/custom/use-elementInstance-event-target.svg: Removed. * svg/custom/use-elementInstance-methods.svg: Removed. * svg/custom/use-instanceRoot-as-event-target-expected.txt: Removed. * svg/custom/use-instanceRoot-as-event-target.xhtml: Removed. * svg/custom/use-instanceRoot-event-listener-liveness-expected.txt: Removed. * svg/custom/use-instanceRoot-event-listener-liveness.xhtml: Removed. * svg/custom/use-instanceRoot-event-listeners-expected.txt: Removed. * svg/custom/use-instanceRoot-event-listeners.xhtml: Removed. * svg/custom/use-instanceRoot-modifications.svg: Removed the part of this that involved the instanceRoot property. It's possible this test now has reduced value, and if so, we could later delete it but it does no harm. * svg/custom/use-instanceRoot-with-use-removed.svg: Removed the use of instanceRoot and correspondingUseElement. Not certain this remains a useful test. Also converted line endings to LF instead of CRLF. * svg/custom/use-listener-append-crash.html: Get elements by id instead of instanceRoot. * svg/custom/use-modify-target-container.svg: Ditto. * svg/custom/use-modify-target-symbol.svg: Ditto. * svg/custom/use-on-use-with-child-expected.txt: Updated since we don't dump an instance tree any more. * svg/custom/use-on-use-with-child.svg: Removed the part about dumping the instance tree, and added in the part about dragging to make sure it doesn't crash. * svg/dom/use-transform.svg: Get element by id instead of instanceRoot. Canonical link: https://commits.webkit.org/159071@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@179391 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2015-01-30 04:23:51 +00:00
var leftSquare = document.getElementById("leftSquare");
var square = document.getElementById("square");
leftSquare.addEventListener('mousedown', function() { leftSquare.parentNode.appendChild(leftSquare); });
Remove SVGUseElement.instanceRoot and all tests that depend on it https://bugs.webkit.org/show_bug.cgi?id=141025 Reviewed by Anders Carlsson. Source/WebCore: * svg/SVGUseElement.cpp: (WebCore::SVGUseElement::instanceRoot): Deleted. * svg/SVGUseElement.h: Removed instanceRoot. * svg/SVGUseElement.idl: Ditto. LayoutTests: * platform/gtk/TestExpectations: Removed expected failure for now-removed test. * platform/ios-simulator-wk2/TestExpectations: Ditto. * platform/mac/TestExpectations: Ditto. * platform/gtk/svg/custom/use-elementInstance-event-target-expected.png: Removed. * platform/gtk/svg/custom/use-elementInstance-event-target-expected.txt: Removed. * platform/gtk/svg/custom/use-elementInstance-methods-expected.png: Removed. * platform/gtk/svg/custom/use-elementInstance-methods-expected.txt: Removed. * platform/ios-sim-deprecated/svg/custom/use-elementInstance-event-target-expected.txt: Removed. * platform/ios-sim-deprecated/svg/custom/use-elementInstance-methods-expected.txt: Removed. * platform/ios-simulator/svg/custom/use-elementInstance-event-target-expected.txt: Removed. * platform/ios-simulator/svg/custom/use-elementInstance-methods-expected.txt: Removed. * platform/mac-mountainlion/svg/custom/use-elementInstance-event-target-expected.txt: Removed. * platform/mac-mountainlion/svg/custom/use-elementInstance-methods-expected.txt: Removed. * platform/mac/svg/custom/use-elementInstance-event-target-expected.png: Removed. * platform/mac/svg/custom/use-elementInstance-event-target-expected.txt: Removed. * platform/mac/svg/custom/use-elementInstance-methods-expected.png: Removed. * platform/mac/svg/custom/use-elementInstance-methods-expected.txt: Removed. * svg/custom/element-instance-held-by-js-crash-expected.txt: Removed. * svg/custom/element-instance-held-by-js-crash.svg: Removed. * svg/custom/resources/use-instanceRoot-event-bubbling.js: Find element by id instead of using use.instanceRoot.correspondingElement. * svg/custom/resources/use-instanceRoot-event-listeners.js: Removed. * svg/custom/use-crash-using-children-before-destroy.svg: Removed a line of code that got at the instanceRoot. It's possible this test no longer has value, and if so, then we could later delete it, but it does no harm. * svg/custom/use-elementInstance-event-target.svg: Removed. * svg/custom/use-elementInstance-methods.svg: Removed. * svg/custom/use-instanceRoot-as-event-target-expected.txt: Removed. * svg/custom/use-instanceRoot-as-event-target.xhtml: Removed. * svg/custom/use-instanceRoot-event-listener-liveness-expected.txt: Removed. * svg/custom/use-instanceRoot-event-listener-liveness.xhtml: Removed. * svg/custom/use-instanceRoot-event-listeners-expected.txt: Removed. * svg/custom/use-instanceRoot-event-listeners.xhtml: Removed. * svg/custom/use-instanceRoot-modifications.svg: Removed the part of this that involved the instanceRoot property. It's possible this test now has reduced value, and if so, we could later delete it but it does no harm. * svg/custom/use-instanceRoot-with-use-removed.svg: Removed the use of instanceRoot and correspondingUseElement. Not certain this remains a useful test. Also converted line endings to LF instead of CRLF. * svg/custom/use-listener-append-crash.html: Get elements by id instead of instanceRoot. * svg/custom/use-modify-target-container.svg: Ditto. * svg/custom/use-modify-target-symbol.svg: Ditto. * svg/custom/use-on-use-with-child-expected.txt: Updated since we don't dump an instance tree any more. * svg/custom/use-on-use-with-child.svg: Removed the part about dumping the instance tree, and added in the part about dragging to make sure it doesn't crash. * svg/dom/use-transform.svg: Get element by id instead of instanceRoot. Canonical link: https://commits.webkit.org/159071@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@179391 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2015-01-30 04:23:51 +00:00
leftSquare.addEventListener('mousedown', function() { square.setAttribute("fill", "green"); });
if (window.eventSender) {
eventSender.mouseMoveTo(20, 20);
eventSender.mouseDown();
eventSender.mouseUp();
}
</script>
<p>Test re-appending a use node with multiple event listeners, triggered by the first listener.
If running manually, click on the left square.
Pass if no crash and the visible result is an orange square left of a green square.</p>
</html>