Files
sousa-gecko/testing/web-platform/tests/css/css-flexbox/inline-flex-column-image-load.html
T
Sammy Gill 902614cb8c Bug 2033389 [wpt PR 59288] - WebKit export of https://bugs.webkit.org/show_bug.cgi?id=291890, a=testonly
Automatic update from web-platform-tests
WebKit export of https://bugs.webkit.org/show_bug.cgi?id=291890 (#59288)

* WebKit export of https://bugs.webkit.org/show_bug.cgi?id=291890
--

wpt-commits: a0d0b9b0e51fd33d9781cc25e1731edd6fd1cf86
wpt-pr: 59288
2026-04-28 18:10:02 +00:00

32 lines
1.2 KiB
HTML

<!DOCTYPE html>
<html class="reftest-wait">
<meta charset="utf-8">
<title>Inline-flex column container should size to image after async load</title>
<link rel="help" href="https://drafts.csswg.org/css-flexbox-1/#algo-cross-item">
<link rel="match" href="inline-flex-column-image-load-ref.html">
<meta name="assert" content="
An inline-flex container with flex-direction: column should update its
width when a child image finishes loading asynchronously.
">
<style>
.parent {
display: inline-flex;
flex-direction: column;
background: green;
}
</style>
<p>Test passes if there is a filled green square.</p>
<div class="parent">
<img id="img">
</div>
<script>
var img = document.getElementById('img');
img.onload = function() {
document.documentElement.classList.remove('reftest-wait');
};
// Force layout before setting src so image loads asynchronously
document.body.offsetHeight;
// 100x100 green PNG
img.src = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGQAAABkCAYAAABw4pVUAAAAZklEQVR42u3BAQEAAACCIP+vbkhAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAB8GUk4AAFt3lJRAAAAAElFTkSuQmCC';
</script>