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

Issue 666961 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Mar 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: All
Pri: 2
Type: Feature

Blocking:
issue 79180



Sign in to add a comment

[css-grid] Ratio-preserving image stretching for align/justify-self:normal doesn't work

Project Member Reported by mpalmg...@mozilla.com, Nov 18 2016

Issue description

Version: 56.0.2914.3 (Official Build) dev (64-bit)
OS: Linux

What steps will reproduce the problem?
(1) load any of the reftests:
https://hg.mozilla.org/mozilla-central/raw-file/tip/layout/reftests/css-grid/grid-item-intrinsic-ratio-normal-001.html
https://hg.mozilla.org/mozilla-central/raw-file/tip/layout/reftests/css-grid/grid-item-intrinsic-ratio-normal-002.html
https://hg.mozilla.org/mozilla-central/raw-file/tip/layout/reftests/css-grid/grid-item-intrinsic-ratio-normal-003.html

What is the expected result?
The rendering in Firefox Nightly is correct.
https://nightly.mozilla.org/
(there are also -ref files for these tests in the same directory as usual)

What happens instead?
You tell me. ;-)  I suspect you handle 'normal' identically to 'stretch',
which is wrong.  Maybe  bug 555027  affects these tests as well?


Relevant CSSWG decision:
"
Stretching image grid items in both dimensions
----------------------------------------------

  - RESOLVED: The normal value of align-self and justify-self
              preserves aspect of image but stretch causes it to
              stretch to fit containing block. Default value
              continues to be normal.
"

 
Description: Show this description

Comment 3 by r...@igalia.com, Nov 21 2016

Blocking: 79180
Cc: svil...@igalia.com jfernan...@igalia.com tabatkins@chromium.org
Owner: r...@igalia.com
Status: Available (was: Untriaged)
Yes we're not implementing this yet.
We were waiting for a clarification on your last comment at:
https://github.com/w3c/csswg-drafts/issues/523#issuecomment-251835188

We might need to ping CSS WG again about this.

Comment 4 by e...@chromium.org, Dec 14 2016

Labels: -Pri-1 -Type-Bug Pri-2 Type-Feature

Comment 5 by r...@igalia.com, Feb 15 2017

Labels: OS-All
It seems that the issue has been finally resolved by the CSS WG.
We should update our implementation as we're not doing anything special regarding "normal" and replaced elements.

Comment 6 by r...@igalia.com, Feb 28 2017

Status: Started (was: Available)
Project Member

Comment 7 by bugdroid1@chromium.org, Mar 2 2017

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

commit fad39c71033eea490d8437ca186529c8e87125c2
Author: rego <rego@igalia.com>
Date: Thu Mar 02 01:19:10 2017

[css-grid] "normal" alignment is "start" for replaced elements

"normal" alignment used to be "stretch" for all the elements,
however the CSS Grid Layout spec has been updated to change
this behavior for replaced elements:
https://github.com/w3c/csswg-drafts/issues/523

A few tests need to be updated due to this change.
We also take advantage to make
fast/css-grid-layout/grid-align-stretching-replaced-items.html
a testharness.js test so we can get rid of the expected file.

BUG= 666961 
TEST=external/csswg-test/css-grid-1/grid-items/grid-items-sizing-alignment-001.html

Review-Url: https://codereview.chromium.org/2722613003
Cr-Commit-Position: refs/heads/master@{#454133}

[add] https://crrev.com/fad39c71033eea490d8437ca186529c8e87125c2/third_party/WebKit/LayoutTests/external/csswg-test/css-grid-1/grid-items/grid-items-sizing-alignment-001-expected.html
[add] https://crrev.com/fad39c71033eea490d8437ca186529c8e87125c2/third_party/WebKit/LayoutTests/external/csswg-test/css-grid-1/grid-items/grid-items-sizing-alignment-001.html
[add] https://crrev.com/fad39c71033eea490d8437ca186529c8e87125c2/third_party/WebKit/LayoutTests/external/csswg-test/css-grid-1/grid-items/support/50x50-green.png
[delete] https://crrev.com/880895ed7e23b1d0b920d5c62c361a226a62c50e/third_party/WebKit/LayoutTests/fast/css-grid-layout/grid-align-stretching-replaced-items-expected.txt
[modify] https://crrev.com/fad39c71033eea490d8437ca186529c8e87125c2/third_party/WebKit/LayoutTests/fast/css-grid-layout/grid-align-stretching-replaced-items.html
[modify] https://crrev.com/fad39c71033eea490d8437ca186529c8e87125c2/third_party/WebKit/LayoutTests/fast/css-grid-layout/resources/grid-alignment.css
[modify] https://crrev.com/fad39c71033eea490d8437ca186529c8e87125c2/third_party/WebKit/Source/core/layout/LayoutBox.cpp
[modify] https://crrev.com/fad39c71033eea490d8437ca186529c8e87125c2/third_party/WebKit/Source/core/layout/LayoutBox.h
[modify] https://crrev.com/fad39c71033eea490d8437ca186529c8e87125c2/third_party/WebKit/Source/core/layout/LayoutFullScreen.h
[modify] https://crrev.com/fad39c71033eea490d8437ca186529c8e87125c2/third_party/WebKit/Source/core/layout/LayoutGrid.cpp
[modify] https://crrev.com/fad39c71033eea490d8437ca186529c8e87125c2/third_party/WebKit/Source/core/layout/LayoutGrid.h
[modify] https://crrev.com/fad39c71033eea490d8437ca186529c8e87125c2/third_party/WebKit/Source/core/layout/LayoutObject.h
[modify] https://crrev.com/fad39c71033eea490d8437ca186529c8e87125c2/third_party/WebKit/Source/core/layout/LayoutReplaced.h

Comment 8 by r...@igalia.com, Mar 2 2017

Status: Fixed (was: Started)
So I believe we're now following the spec on Chromium, maybe I'm missing some cases though.

It's seems Firefox is not updated to the last resolutions in, unless I'm getting something wrong:
https://github.com/w3c/csswg-drafts/issues/523

Sign in to add a comment