-
Notifications
You must be signed in to change notification settings - Fork 3.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[css-flex] Obey stretch size in replaced items' content size suggestion
Content size suggestion is just min-content size. The min-content size of a replaced element is supposed to account for preferred size in the opposite axis. We were not doing that for content size suggestion when the opposize axis preferred size came from a flexbox's fixed cross size. In the example below, Blink now gives the image content size suggestion 100px because 100 = 300*150/50. Before this patch Blink gave it a content size suggestion equal to its natural width 300px. <div style="display: flex; height: 50px;"> <img src="support/300x150-green.png"> </div> Firefox matches Blink's behavior before this patch. We may have compat issues. See w3c/csswg-drafts#6693 for discussion of this new behavior. Bug: 1246126 Change-Id: I1d42c7151b9a0da7e001ca89ea1d7fb9187ae235 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3173922 Commit-Queue: David Grogan <[email protected]> Reviewed-by: Ian Kilpatrick <[email protected]> Cr-Commit-Position: refs/heads/main@{#931259}
- Loading branch information
1 parent
6ccfe6f
commit 2c83d2e
Showing
3 changed files
with
32 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters