auto table layout doesn't honor "max-width" on table cells, when distributing width between them#59664
Merged
webkit-commit-queue merged 1 commit intoWebKit:mainfrom Mar 9, 2026
Conversation
Collaborator
|
EWS run on previous version of this PR (hash c1786d6) Details |
alanbaradlay
approved these changes
Mar 3, 2026
c1786d6 to
58a3c91
Compare
Collaborator
|
EWS run on current version of this PR (hash 58a3c91) Details |
alanbaradlay
approved these changes
Mar 9, 2026
…ributing width between them https://bugs.webkit.org/show_bug.cgi?id=144338 rdar://171459245 Reviewed by Alan Baradlay. In AutoTableLayout::recalcColumn(), when a cell has an explicit CSS width, the value is stored into columnLayout.logicalWidth without consulting the cell's max-width. This causes max-width to be ignored during fixed-width column distribution in layout(). Clamp the resolved logicalWidth by the cell's CSS max-width right after it is computed, so the clamped value flows into columnLayout.logicalWidth and is respected during width distribution. Test: imported/w3c/web-platform-tests/css/css-tables/width-distribution/td-max-width-auto-layout.html imported/w3c/web-platform-tests/css/css-tables/width-distribution/td-min-width-auto-layout.html * LayoutTests/imported/w3c/web-platform-tests/css/css-tables/width-distribution/td-max-width-auto-layout-expected.txt: Added. * LayoutTests/imported/w3c/web-platform-tests/css/css-tables/width-distribution/td-max-width-auto-layout.html: Added. * LayoutTests/imported/w3c/web-platform-tests/css/css-tables/width-distribution/td-min-width-auto-layout-expected.txt: Added. * LayoutTests/imported/w3c/web-platform-tests/css/css-tables/width-distribution/td-min-width-auto-layout.html: Added. * Source/WebCore/rendering/AutoTableLayout.cpp: (WebCore::AutoTableLayout::recalcColumn): Canonical link: https://commits.webkit.org/308934@main
58a3c91 to
34394ef
Compare
Collaborator
|
Committed 308934@main (34394ef): https://commits.webkit.org/308934@main Reviewed commits have been landed. Closing PR #59664 and removing active labels. |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
34394ef
58a3c91