New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 806622 link

Starred by 3 users

Issue metadata

Status: Fixed
Owner:
Closed: Feb 2018
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Windows , Chrome , Mac
Pri: 1
Type: Bug-Regression



Sign in to add a comment

align-self center and position sticky don't work together

Reported by eyee...@gmail.com, Jan 29 2018

Issue description

UserAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/64.0.3282.119 Safari/537.36

Example URL:
https://jsfiddle.net/irislieuw/p8ourosu/

Steps to reproduce the problem:
1. Open the JSFiddle URL
2. Scroll down in the rendered result. Notice that the text is displayed at the top of the gray container.
3. Comment out css for sticky positioning and re-run; now the text is displayed in the center of the gray container.

What is the expected behavior?
Text that says "I should be centered" should be vertically and horizontally centered in its gray container. Firefox and Safari both show the expected behavior.

What went wrong?
The text is horizontally centered, but not vertically centered. It gets rendered at the top of the container.

Does it occur on multiple sites: Yes

Is it a problem with a plugin? N/A 

Did this work before? Yes 63

Does this work in other browsers? Yes

Chrome version: 64.0.3282.119  Channel: stable
OS Version: OS X 10.13.3
Flash Version:
 
Labels: Needs-Triage-M64
Cc: sc00335...@techmahindra.com
Components: -Blink Blink>CSS
Labels: -Type-Bug -Pri-2 hasbisect-per-revision ReleaseBlock-Stable Triaged-ET RegressedIn-64 M-64 Target-65 FoundIn-66 Target-66 FoundIn-64 FoundIn-65 Target-64 OS-Linux OS-Windows Pri-1 Type-Bug-Regression
Owner: jfernan...@igalia.com
Status: Assigned (was: Unconfirmed)
Able to reproduce this issue on reported version 64.0.3282.119 and on latest canary 66.0.3334.0 using Windows 10,Mac 10.13.1 and Ubuntu 14.04 with link given in comment#0.

Good Build: 64.0.3263.0
Bad Build: 64.0.3264.0

You are probably looking for a change made after 515390 (known good), but no later than 515391 (first known bad).
CHANGELOG URL:
 https://chromium.googlesource.com/chromium/src/+log/0fa6d91431e578ca439086a6d8ebc367b10b6ed3..6dc4cef851061c3421ba4b05e51a37beb1364f38

Reviewed-on: https://chromium-review.googlesource.com/672423

Suspecting same from changelog.

@fernandez@igalia.com: Please confirm the bug and help in re-assigning if it is not related to your change.

Adding RB-Stable for M64. Please remove if not the case.
Labels: OS-Chrome
Reproduce the issue on Chrome 64.0.3282.122/CrOS 10176.61.0 - Reks
Labels: M-65
We can punt this bug to M-65.
Cc: gov...@chromium.org abdulsyed@chromium.org
Status: Started (was: Assigned)
I confirm the issue and currently cooking a patch for the issue.
Labels: -M-64 -Target-64
Fix in progress, waiting for review: https://crrev.com/c/897949
Project Member

Comment 9 by bugdroid1@chromium.org, Feb 2 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/a123787c6df637b7e7b33fef67e15a587978110f

commit a123787c6df637b7e7b33fef67e15a587978110f
Author: Javier Fernandez <jfernandez@igalia.com>
Date: Fri Feb 02 12:32:16 2018

[css-grid] Allow alignment of in-flow items with non-static positions

This is a fix for a regression introduced in r515391, where we landed
the implementation of alignment for positioned objects in a Grid Layout
container.

We assumed that items with non-static positions shouldn't honor the
CSS Box Alignment properties. This is only true for out-of-flow items,
absolute or fixed positioned elements. However, sticky positioned
elements are treated as relative positioned items, but they indeed use
non-static position to define their behavior.

Bug:  806622 
Change-Id: Ibaed2c36530d81223d1491def9022e82cf9c3525
Reviewed-on: https://chromium-review.googlesource.com/897949
Commit-Queue: Javier Fernandez <jfernandez@igalia.com>
Reviewed-by: Manuel Rego Casasnovas <rego@igalia.com>
Reviewed-by: Christian Biesinger <cbiesinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#534029}
[add] https://crrev.com/a123787c6df637b7e7b33fef67e15a587978110f/third_party/WebKit/LayoutTests/external/wpt/css/css-grid/alignment/grid-column-axis-alignment-sticky-positioned-items-001.html
[add] https://crrev.com/a123787c6df637b7e7b33fef67e15a587978110f/third_party/WebKit/LayoutTests/external/wpt/css/css-grid/alignment/grid-column-axis-alignment-sticky-positioned-items-002.html
[add] https://crrev.com/a123787c6df637b7e7b33fef67e15a587978110f/third_party/WebKit/LayoutTests/external/wpt/css/css-grid/alignment/grid-row-axis-alignment-sticky-positioned-items-001.html
[add] https://crrev.com/a123787c6df637b7e7b33fef67e15a587978110f/third_party/WebKit/LayoutTests/external/wpt/css/css-grid/alignment/grid-row-axis-alignment-sticky-positioned-items-002.html
[modify] https://crrev.com/a123787c6df637b7e7b33fef67e15a587978110f/third_party/WebKit/Source/core/layout/LayoutGrid.cpp

This issue should be FIXED now.
Status: Fixed (was: Started)
Labels: Merge-TBD
[Auto-generated comment by a script] We noticed that this issue is targeted for M-65; it appears the fix may have landed after branch point, meaning a merge might be required. Please confirm if a merge is required here - if so add Merge-Request-65 label, otherwise remove Merge-TBD label. Thanks.
Labels: Merge-Request-65
In my opinion, the regression is not very severe. I don't think a grid layout with sticky positioned items is a frequent use case. However, the patch is quite simple and safe, so we can give it a try and merge it.
Labels: -Merge-TBD
Project Member

Comment 15 by sheriffbot@chromium.org, Feb 3 2018

Labels: -Merge-Request-65 Hotlist-Merge-Approved Merge-Approved-65
Your change meets the bar and is auto-approved for M65. Please go ahead and merge the CL to branch 3325 manually. Please contact milestone owner if you have questions.
Owners: cmasso@(Android), cmasso@(iOS), bhthompson@(ChromeOS), govind@(Desktop)

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
Pls merge your change to M65 branch 3325 before 2:00 PM PT tomorrow, Monday (02/25/18) so we can pick it up for last dev release on Tuesday. Thank you.
Project Member

Comment 17 by bugdroid1@chromium.org, Feb 5 2018

Labels: -merge-approved-65 merge-merged-3325
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/3fa4da13a5bcf8750c3a633065f9c3f318ebaf5f

commit 3fa4da13a5bcf8750c3a633065f9c3f318ebaf5f
Author: Javier Fernandez <jfernandez@igalia.com>
Date: Mon Feb 05 08:36:22 2018

[css-grid] Allow alignment of in-flow items with non-static positions

This is a fix for a regression introduced in r515391, where we landed
the implementation of alignment for positioned objects in a Grid Layout
container.

We assumed that items with non-static positions shouldn't honor the
CSS Box Alignment properties. This is only true for out-of-flow items,
absolute or fixed positioned elements. However, sticky positioned
elements are treated as relative positioned items, but they indeed use
non-static position to define their behavior.

Bug:  806622 
Change-Id: Ibaed2c36530d81223d1491def9022e82cf9c3525
Reviewed-on: https://chromium-review.googlesource.com/897949
Commit-Queue: Javier Fernandez <jfernandez@igalia.com>
Reviewed-by: Manuel Rego Casasnovas <rego@igalia.com>
Reviewed-by: Christian Biesinger <cbiesinger@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#534029}(cherry picked from commit a123787c6df637b7e7b33fef67e15a587978110f)
Reviewed-on: https://chromium-review.googlesource.com/901162
Cr-Commit-Position: refs/branch-heads/3325@{#290}
Cr-Branched-From: bc084a8b5afa3744a74927344e304c02ae54189f-refs/heads/master@{#530369}
[add] https://crrev.com/3fa4da13a5bcf8750c3a633065f9c3f318ebaf5f/third_party/WebKit/LayoutTests/external/wpt/css/css-grid/alignment/grid-column-axis-alignment-sticky-positioned-items-001.html
[add] https://crrev.com/3fa4da13a5bcf8750c3a633065f9c3f318ebaf5f/third_party/WebKit/LayoutTests/external/wpt/css/css-grid/alignment/grid-column-axis-alignment-sticky-positioned-items-002.html
[add] https://crrev.com/3fa4da13a5bcf8750c3a633065f9c3f318ebaf5f/third_party/WebKit/LayoutTests/external/wpt/css/css-grid/alignment/grid-row-axis-alignment-sticky-positioned-items-001.html
[add] https://crrev.com/3fa4da13a5bcf8750c3a633065f9c3f318ebaf5f/third_party/WebKit/LayoutTests/external/wpt/css/css-grid/alignment/grid-row-axis-alignment-sticky-positioned-items-002.html
[modify] https://crrev.com/3fa4da13a5bcf8750c3a633065f9c3f318ebaf5f/third_party/WebKit/Source/core/layout/LayoutGrid.cpp

Sign in to add a comment