Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reland [TablesNG] Width over percentage columns redistribution bugfix #28855

Merged
merged 1 commit into from May 6, 2021

Conversation

chromium-wpt-export-bot
Copy link
Collaborator

@chromium-wpt-export-bot chromium-wpt-export-bot commented May 6, 2021

Column width redistribution was incorrect if:

  • table width was wider than max columns width
  • all columns were percentage columns
  • column min width was wider than intrinsic percent width

Something like this would trigger it:
<td style="width:1%"> <- small percentage size
<div style=width:500px> <- large min width

Its a bit more complicated than that because of reverse percentage
width computation, you have to hit just the right ration of min/%.

The correct fix matches FF/Legacy:

  • distributed size is min-width + cell%/total% * excess width.

Bug: 1205135
Change-Id: Iae53f3166f1e532a30c9e08c3d124bb194625658
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2875946
Commit-Queue: Aleks Totic <atotic@chromium.org>
Commit-Queue: Ian Kilpatrick <ikilpatrick@chromium.org>
Reviewed-by: Ian Kilpatrick <ikilpatrick@chromium.org>
Cr-Commit-Position: refs/heads/master@{#879655}

Copy link
Collaborator

@wpt-pr-bot wpt-pr-bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The review process for this patch is being conducted in the Chromium project.

Column width redistribution was incorrect if:
- table width was wider than max columns width
- all columns were percentage columns
- column min width was wider than intrinsic percent width

Something like this would trigger it:
  <td style="width:1%">  <- small percentage size
    <div style=width:500px> <- large min width

Its a bit more complicated than that because of reverse percentage
width computation, you have to hit just the right ration of min/%.

The correct fix matches FF/Legacy:
- distributed size is min-width + cell%/total% * excess width.

Bug: 1205135
Change-Id: Iae53f3166f1e532a30c9e08c3d124bb194625658
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2875946
Commit-Queue: Aleks Totic <atotic@chromium.org>
Commit-Queue: Ian Kilpatrick <ikilpatrick@chromium.org>
Reviewed-by: Ian Kilpatrick <ikilpatrick@chromium.org>
Cr-Commit-Position: refs/heads/master@{#879655}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants