gecko-dev/dom/html/reftests/bug1512297.html
Edgar Chen 2f22be013f Bug 1512297 - Do not need to clear image broken state in BindToTree call; r=smaug
ImageLoadingContent will take care of updating element to correct state, we don't need to do this.
Especially for HTMLImageElement, because it may not reload the image after BindToTree (
e.g. the selected source isn't changed), clearing broken state may put element into
incorrect state.

The original code seems from https://bugzilla.mozilla.org/show_bug.cgi?id=491063#c32
for a performance reason, however I test the http://mozilla.pettay.fi/moztests/1x1image.html
again on recent codebase, I don't see difference with/without applying this patch.

--HG--
extra : rebase_source : 2de29cced4ad0a18a5a6908641305203cc88a5f4
2018-12-20 13:59:34 +01:00

15 lines
253 B
HTML

<!DOCTYPE html>
<html>
<head class="reftest-wait"></head>
<body>
<div><img src="" alt="ALT"></div>
<script>
var img = document.querySelector('img');
img.remove();
var div = document.querySelector('div');
div.appendChild(img);
</script>
</body>
</html>