New issue
Advanced search Search tips

Issue 670642 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Closed: Dec 2016
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux
Pri: 3
Type: Bug



Sign in to add a comment

[css-grid] Orthogonal items with margins are not positioned correctly.

Project Member Reported by jfernan...@igalia.com, Dec 2 2016

Issue description

What steps will reproduce the problem?
(1) Load the attached test case.
(2)
(3)

What is the expected result?

The for items are located so the left-most item's left-offset is 15px, the right-most item's right-offset is 5px and the space between items is 20px.

What happens instead?

The space between items is 15px and the right-most item's right-offset is 0px.
 
margins-with-orthogonal.html
436 bytes View Download
Project Member

Comment 1 by bugdroid1@chromium.org, Dec 3 2016

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

commit bed02e0d9a18e1355ee2c5bacee610b6036b4f88
Author: jfernandez <jfernandez@igalia.com>
Date: Sat Dec 03 02:46:46 2016

[css-grid] Use child's marginLogicalWidth to compute content-sized track

When computing min-content and max-content of the content-sized tracks
we are using the marginIntrinsicLogicalWidthForChild function, which
uses the grid's writing-mode to determine wether to use the child's
margin width or height. This is not correct when the grid item is
orthogonal.

This patch changes how we compute the tracks width so we use always
the item's marginLogicalWidth, which depends only on its own writing
mode.

BUG= 670642 

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

[add] https://crrev.com/bed02e0d9a18e1355ee2c5bacee610b6036b4f88/third_party/WebKit/LayoutTests/fast/css-grid-layout/grid-track-sizing-with-margins-and-orthogonal-flows.html
[modify] https://crrev.com/bed02e0d9a18e1355ee2c5bacee610b6036b4f88/third_party/WebKit/Source/core/layout/LayoutGrid.cpp

Status: Fixed (was: Assigned)
This issue should be FIXED now.

Sign in to add a comment