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] Overflow should be computed with the actual logical bottom #15284

Merged
merged 1 commit into from Feb 11, 2019

Conversation

chromium-wpt-export-bot
Copy link
Collaborator

@chromium-wpt-export-bot chromium-wpt-export-bot commented Feb 7, 2019

In order to compute the 'auto' height of the grid container, we set
temporarily a value based on the tracks' size. We can see this value as
a kind of 'intrinsic height'. Then, we call to the UpdateLogicalHeight
function to finally compute the grid container's actual logical height.

In order to compute the overflow area in the grid container we should
use the result of the ClientLogicalBottom function. However, we were
retrieving this value just after setting the tracks-based temporary
height, and before computing the actual logical height.

The consequence of this wrong logic is that empty grid areas may
affect the result of the ClientLogicalBottom and, as it's described
in the bug, conclude that there is a content overflow in the grid
container, even if such container has no grid items at all.

Since the grid itself is not a box, it can't contribute to the grid
container's content size; instead, its grid items should.

This change ensures that we always use the actual grid container's
logical bottom to properly compute the overflow area.

Bug: 928885
Change-Id: I05f86fbce06a83c0dbc0d5389bf0416763f8588a
Reviewed-on: https://chromium-review.googlesource.com/c/1459620
Commit-Queue: Javier Fernandez <jfernandez@igalia.com>
Reviewed-by: Manuel Rego <rego@igalia.com>
Cr-Commit-Position: refs/heads/master@{#630735}

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.

Already reviewed downstream.

@chromium-wpt-export-bot chromium-wpt-export-bot force-pushed the chromium-export-cl-1459620 branch 2 times, most recently from 0dcbd96 to 0b52ad4 Compare February 11, 2019 12:07
In order to compute the 'auto' height of the grid container, we set
temporarily a value based on the tracks' size. We can see this value as
a kind of 'intrinsic height'. Then, we call to the UpdateLogicalHeight
function to finally compute the grid container's actual logical height.

In order to compute the overflow area in the grid container we should
use the result of the ClientLogicalBottom function. However, we were
retrieving this value just after setting the tracks-based temporary
height, and before computing the actual logical height.

The consequence of this wrong logic is that empty grid areas may
affect the result of the ClientLogicalBottom and, as it's described
in the bug, conclude that there is a content overflow in the grid
container, even if such container has no grid items at all.

Since the grid itself is not a box, it can't contribute to the grid
container's content size; instead, its grid items should.

This change ensures that we always use the actual grid container's
logical bottom to properly compute the overflow area.

Bug: 928885
Change-Id: I05f86fbce06a83c0dbc0d5389bf0416763f8588a
Reviewed-on: https://chromium-review.googlesource.com/c/1459620
Commit-Queue: Javier Fernandez <jfernandez@igalia.com>
Reviewed-by: Manuel Rego <rego@igalia.com>
Cr-Commit-Position: refs/heads/master@{#630735}
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