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

[css-grid] Consider 'auto' height items for grid area estimation #23772

Merged
merged 1 commit into from Jun 2, 2020

Conversation

chromium-wpt-export-bot
Copy link
Collaborator

@chromium-wpt-export-bot chromium-wpt-export-bot commented May 26, 2020

We perform a pre-layout, based on a estimation of the grid area, of the
grid items in two different situations: orthogonal and baseline aligned
items.

In the case of baseline aligned items, we were doing this pre-layout
only in the case of items with relative inline and block sizes. However,
items with 'auto' block-size also depend on this estimated grid area
size to properly compute the baseline offset.

It was discarded in the past due to performance concerns, since the
'auto' height is a very common case. However, this codepath is only
executed for baseline aligned items. Since we already applied several
optimization to the baseline alignment logic, I think we can try this
approach to solve the bug and evaluate potential perf regressions when
they appear.

Bug: 1086132
Change-Id: I73c39e6c3ad6cd74aa50fe33106e25cd63b7625f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2215054
Reviewed-by: Manuel Rego <rego@igalia.com>
Reviewed-by: Oriol Brufau <obrufau@igalia.com>
Commit-Queue: Javier Fernandez <jfernandez@igalia.com>
Cr-Commit-Position: refs/heads/master@{#774139}

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.

@chromium-wpt-export-bot chromium-wpt-export-bot changed the title [css-grid] Avoid the estimated grid area on intrinsic size computation [css-grid] Consider 'auto' height items for grid area estimation May 28, 2020
We perform a pre-layout, based on a estimation of the grid area, of the
grid items in two different situations: orthogonal and baseline aligned
items.

In the case of baseline aligned items, we were doing this pre-layout
only in the case of items with relative inline and block sizes. However,
items with 'auto' block-size also depend on this estimated grid area
size to properly compute the baseline offset.

It was discarded in the past due to performance concerns, since the
'auto' height is a very common case. However, this codepath is only
executed for baseline aligned items. Since we already applied several
optimization to the baseline alignment logic, I think we can try this
approach to solve the bug and evaluate potential perf regressions when
they appear.

Bug: 1086132
Change-Id: I73c39e6c3ad6cd74aa50fe33106e25cd63b7625f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2215054
Reviewed-by: Manuel Rego <rego@igalia.com>
Reviewed-by: Oriol Brufau <obrufau@igalia.com>
Commit-Queue: Javier Fernandez <jfernandez@igalia.com>
Cr-Commit-Position: refs/heads/master@{#774139}
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

3 participants