New issue
Advanced search Search tips

Issue 603854 link

Starred by 1 user

Issue metadata

Status: Duplicate
Merged: issue 616716
Owner:
Closed: Jun 2016
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: All
Pri: 3
Type: Bug

Blocking:
issue 79180



Sign in to add a comment

[css-grid] Floated grid containers have indefinite width

Project Member Reported by r...@igalia.com, Apr 15 2016

Issue description


Like for the case of positioned grid containers, if they're floated it should be considered that their width is indefinite (unless they have a specified width, of course).

Attached simple example reproducing the issue.
Check it live at: http://jsbin.com/wuripa/1/edit?html,css,output
 
float-indefinite.html
463 bytes View Download
float-indefinite-current.png
6.6 KB View Download
float-indefinite-expected.png
6.5 KB View Download

Comment 1 by r...@igalia.com, Apr 15 2016

Owner: r...@igalia.com
Status: Assigned (was: Available)
CL fixing the issue: https://codereview.chromium.org/1892813002/
Project Member

Comment 2 by bugdroid1@chromium.org, Apr 18 2016

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

commit a7f443f6a36a2a524c4c29a2ef1bb6d02249d7b2
Author: rego <rego@igalia.com>
Date: Mon Apr 18 22:30:55 2016

[css-grid] Floated grid containers have indefinite width

Fix LayoutBox::hasDefiniteLogicalWidth() to return FALSE for
floated grid containers with auto width.

This makes that percentage tracks are treated as "auto"
for floated grid containers with indefinite width.

BUG= 603854 
TEST=fast/css-grid-layout/floated-grid-container-percentage-tracks.html

Review URL: https://codereview.chromium.org/1892813002

Cr-Commit-Position: refs/heads/master@{#388054}

[add] https://crrev.com/a7f443f6a36a2a524c4c29a2ef1bb6d02249d7b2/third_party/WebKit/LayoutTests/fast/css-grid-layout/floated-grid-container-percentage-tracks.html
[modify] https://crrev.com/a7f443f6a36a2a524c4c29a2ef1bb6d02249d7b2/third_party/WebKit/Source/core/layout/LayoutBox.cpp

Comment 3 by r...@igalia.com, Apr 19 2016

Status: Fixed (was: Assigned)
Project Member

Comment 4 by bugdroid1@chromium.org, May 5 2016

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

commit ec80ed8bf97986c752629bd0a550800fbe8bd82b
Author: rego <rego@igalia.com>
Date: Thu May 05 09:35:36 2016

Revert of [css-grid] Floated grid containers have indefinite width (patchset #1 id:1 of https://codereview.chromium.org/1892813002/ )

Reason for revert:
This is breaking how percentages work in
Flexbox and Grid compared to regular Blocks.

There're some discussion ongoing on the CSS WG to verify
the expected behavior, so we're reverting this for now
until we've a final resolution.

Original issue's description:
> [css-grid] Floated grid containers have indefinite width
>
> Fix LayoutBox::hasDefiniteLogicalWidth() to return FALSE for
> floated grid containers with auto width.
>
> This makes that percentage tracks are treated as "auto"
> for floated grid containers with indefinite width.
>
> BUG= 603854 
> TEST=fast/css-grid-layout/floated-grid-container-percentage-tracks.html
>
> Committed: https://crrev.com/a7f443f6a36a2a524c4c29a2ef1bb6d02249d7b2
> Cr-Commit-Position: refs/heads/master@{#388054}

TBR=cbiesinger@chromium.org,mstensho@opera.com,svillar@igalia.com
# Not skipping CQ checks because original CL landed more than 1 days ago.
BUG= 538513 , 603854 , 604346 , 608783 

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

[delete] https://crrev.com/5f1b82e8460a3d4d0a45346cdcdf5862be27c2c7/third_party/WebKit/LayoutTests/fast/css-grid-layout/floated-grid-container-percentage-tracks.html
[modify] https://crrev.com/ec80ed8bf97986c752629bd0a550800fbe8bd82b/third_party/WebKit/Source/core/layout/LayoutBox.cpp

Project Member

Comment 5 by bugdroid1@chromium.org, May 5 2016

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

commit 83e80002d146d1493ae16c1cb585cc458e955ee3
Author: rego <rego@igalia.com>
Date: Thu May 05 12:18:13 2016

Revert of [css-grid] Fix definite/indefinite size detection for abspos elements (patchset #2 id:20001 of https://codereview.chromium.org/1383003002/ )

Reason for revert:
This is breaking how percentages work in
Flexbox and Grid compared to regular Blocks.

There're some discussion ongoing on the CSS WG to verify
the expected behavior, so we're reverting this for now
until we've a final resolution.

Original issue's description:
> [css-grid] Fix definite/indefinite size detection for abspos elements
>
> We were considering that any abspos element has a definite size, and
> that's not true. That's only true if the offset properties in that
> dimension (left and right or top and bottom) are non-auto.
> Fixed LayoutBox::hasDefiniteLogicalWidth|Height() to check this
> properly.
>
> This has been confirmed by the CSS WG in the following thread:
> https://lists.w3.org/Archives/Public/www-style/2015Nov/0074.html
>
> BUG= 538513 
> TEST=fast/css-grid-layout/positioned-grid-container-percentage-tracks.html
>
> Committed: https://crrev.com/b75b9bdaa3ede6fe0230ae822885d6fb38ed514b
> Cr-Commit-Position: refs/heads/master@{#386045}

TBR=cbiesinger@chromium.org,svillar@igalia.com,mstensho@opera.com
# Not skipping CQ checks because original CL landed more than 1 days ago.
BUG= 538513 , 603854 , 604346 , 608783 

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

[delete] https://crrev.com/16d0abdd7230c89c7d0bf55e8de24a86fed39f40/third_party/WebKit/LayoutTests/fast/css-grid-layout/positioned-grid-container-percentage-tracks.html
[modify] https://crrev.com/83e80002d146d1493ae16c1cb585cc458e955ee3/third_party/WebKit/Source/core/layout/LayoutBox.cpp

Comment 6 by r...@igalia.com, May 5 2016

Status: Assigned (was: Fixed)
Reopened as the patch has been reverted.

We might need to apply it again or not depending on CSS WG resolution:
https://lists.w3.org/Archives/Public/www-style/2016Apr/0329.html

Project Member

Comment 7 by bugdroid1@chromium.org, May 6 2016

Labels: merge-merged-2704
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/4cac97891d80a3f9789d4c5ae02a40ca4c9d3c21

commit 4cac97891d80a3f9789d4c5ae02a40ca4c9d3c21
Author: Christian Biesinger <cbiesinger@chromium.org>
Date: Fri May 06 17:24:14 2016

Revert of [css-grid] Fix definite/indefinite size detection for abspos elements (patchset #2 id:20001 of https://codereview.chromium.org/1383003002/ )

Reason for revert:
This is breaking how percentages work in
Flexbox and Grid compared to regular Blocks.

There're some discussion ongoing on the CSS WG to verify
the expected behavior, so we're reverting this for now
until we've a final resolution.

Original issue's description:
> [css-grid] Fix definite/indefinite size detection for abspos elements
>
> We were considering that any abspos element has a definite size, and
> that's not true. That's only true if the offset properties in that
> dimension (left and right or top and bottom) are non-auto.
> Fixed LayoutBox::hasDefiniteLogicalWidth|Height() to check this
> properly.
>
> This has been confirmed by the CSS WG in the following thread:
> https://lists.w3.org/Archives/Public/www-style/2015Nov/0074.html
>
> BUG= 538513 
> TEST=fast/css-grid-layout/positioned-grid-container-percentage-tracks.html
>
> Committed: https://crrev.com/b75b9bdaa3ede6fe0230ae822885d6fb38ed514b
> Cr-Commit-Position: refs/heads/master@{#386045}

TBR=cbiesinger@chromium.org,svillar@igalia.com,mstensho@opera.com
BUG= 538513 , 603854 , 604346 , 608783 

Review-Url: https://codereview.chromium.org/1954683002
Cr-Commit-Position: refs/heads/master@{#391789}
(cherry picked from commit 83e80002d146d1493ae16c1cb585cc458e955ee3)

Review URL: https://codereview.chromium.org/1957693002 .

Cr-Commit-Position: refs/branch-heads/2704@{#423}
Cr-Branched-From: 6e53600def8f60d8c632fadc70d7c1939ccea347-refs/heads/master@{#386251}

[delete] https://crrev.com/179b1ad323b6bd741391eced5868c7876d65f536/third_party/WebKit/LayoutTests/fast/css-grid-layout/positioned-grid-container-percentage-tracks.html
[modify] https://crrev.com/4cac97891d80a3f9789d4c5ae02a40ca4c9d3c21/third_party/WebKit/Source/core/layout/LayoutBox.cpp

Comment 8 by r...@igalia.com, Jun 2 2016

Mergedinto: 616716
Status: Duplicate (was: Assigned)
The example in this bug is not 100% right. Because of the special behavior
of "min-width: auto;" in grid items.

We'd need to add "min-width: 0px;" to the item to check the issue for real.
In that case the output would be the same than the following case in a regular block:
   <div style="border: 5px solid; float: left;">
     <div style="background: lime; width: 60%;">item</div>
   </div>

This will be fixed as part of  bug #616716  which has an extended explanation.
So we can close this at this point.

Sign in to add a comment