Automatic update from web-platform-tests Fix layout of fallback img elements with max-size and flow-root Fallback img elements (e.g. broken src with empty alt) should consider max-width and max-height during layout. Fix Blink to clamp their used size accordingly. Also switch the affected layout handling from inline-block to flow-root to match Firefox and Safari. Existing tests have been rebaselined. The change from inline-block to flow-root affects the baseline alignment of the fallback content, resulting in expected layout differences. Bug: 40788530, 40830128 Change-Id: Ie51a2aacc95b4383b4788531b4a609183ff2856c Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7317113 Commit-Queue: Peng Zhou <zhoupeng.1996@bytedance.com> Reviewed-by: Fredrik Söderquist <fs@opera.com> Cr-Commit-Position: refs/heads/main@{#1564405} -- wpt-commits: 7b719c8e6d53932de28fe43bd5354aa4405e91df wpt-pr: 56990
24 lines
640 B
HTML
24 lines
640 B
HTML
<!DOCTYPE html>
|
|
<meta charset="utf-8">
|
|
<title>Image fallback respect max-width</title>
|
|
<link rel="author" href="mailto:zhoupeng.1996@bytedance.com">
|
|
<link rel="help" href="https://html.spec.whatwg.org/multipage/rendering.html#images-3">
|
|
<link rel="match" href="image-fallback-respect-max-width-ref.html">
|
|
<style>
|
|
div {
|
|
max-width: 200px;
|
|
}
|
|
img {
|
|
max-width: 100%;
|
|
height: auto;
|
|
}
|
|
</style>
|
|
<body>
|
|
<div>
|
|
<img src="" width="10000" height="100">
|
|
<img src="" width="10000" height="100"
|
|
alt="Lorem ipsum dolor sit amet, consectetur adipisicing elit.">
|
|
<img src="" width="1000" height="100">
|
|
</div>
|
|
</body>
|