mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 608261. Set img.complete to false while the image has a pending request. r=sicking
This commit is contained in:
parent
c8bda51c33
commit
fc7b3114d6
@ -207,6 +207,10 @@ HTMLImageElement::Complete()
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (mPendingRequest) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
uint32_t status;
|
uint32_t status;
|
||||||
mCurrentRequest->GetImageStatus(&status);
|
mCurrentRequest->GetImageStatus(&status);
|
||||||
return
|
return
|
||||||
|
@ -583,3 +583,4 @@ support-files = file_bug871161-1.html file_bug871161-2.html
|
|||||||
[test_bug1081037.html]
|
[test_bug1081037.html]
|
||||||
[test_window_open_close.html]
|
[test_window_open_close.html]
|
||||||
skip-if = buildapp == 'b2g' # bug 1129014
|
skip-if = buildapp == 'b2g' # bug 1129014
|
||||||
|
[test_img_complete.html]
|
||||||
|
37
dom/html/test/test_img_complete.html
Normal file
37
dom/html/test/test_img_complete.html
Normal file
@ -0,0 +1,37 @@
|
|||||||
|
<!DOCTYPE HTML>
|
||||||
|
<html>
|
||||||
|
<!--
|
||||||
|
https://bugzilla.mozilla.org/show_bug.cgi?id=608261
|
||||||
|
-->
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8">
|
||||||
|
<title>Test for Bug 608261</title>
|
||||||
|
<script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
|
||||||
|
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
|
||||||
|
<script type="application/javascript">
|
||||||
|
/** Test for Bug 608261 **/
|
||||||
|
SimpleTest.waitForExplicitFinish();
|
||||||
|
</script>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=608261">Mozilla Bug 608261</a>
|
||||||
|
<p id="display"><img src="image.png"></p>
|
||||||
|
<div id="content" style="display: none">
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<pre id="test">
|
||||||
|
<script type="application/javascript">
|
||||||
|
addLoadEvent(function() {
|
||||||
|
var img = document.querySelector("img");
|
||||||
|
ok(img.complete, "By onload, image should have loaded");
|
||||||
|
img.src = "image.png?cachebust";
|
||||||
|
ok(!img.complete, "Now that we're loading we should no longer be complete");
|
||||||
|
img.onload = function() {
|
||||||
|
ok(img.complete, "The new thing should have loaded.");
|
||||||
|
SimpleTest.finish();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
</pre>
|
||||||
|
</body>
|
||||||
|
</html>
|
Loading…
Reference in New Issue
Block a user