Fix layout of fallback img elements with max-size and flow-root #56990
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 <[email protected]>
Reviewed-by: Fredrik Söderquist <[email protected]>
Cr-Commit-Position: refs/heads/main@{#1564405}