Bug 156623 - [css-grid] Fix alignment with content distribution
Summary: [css-grid] Fix alignment with content distribution
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Layout and Rendering (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Manuel Rego Casasnovas
URL:
Keywords:
Depends on: 156597
Blocks: 60731
  Show dependency treegraph
 
Reported: 2016-04-15 01:11 PDT by Manuel Rego Casasnovas
Modified: 2016-04-28 01:54 PDT (History)
8 users (show)

See Also:


Attachments
Patch (65.55 KB, patch)
2016-04-15 01:17 PDT, Manuel Rego Casasnovas
no flags Details | Formatted Diff | Diff
Patch (65.66 KB, patch)
2016-04-18 02:23 PDT, Manuel Rego Casasnovas
no flags Details | Formatted Diff | Diff
Patch (65.51 KB, patch)
2016-04-28 01:01 PDT, Manuel Rego Casasnovas
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Manuel Rego Casasnovas 2016-04-15 01:11:21 PDT
If we use content distribution (with "space-around" and that kind of values) and we align one item with "center" and/or "end".
The item uses the space added by the content distribution, but it shouldn't use it.

For gaps this is working as expected.

This is a port of this Blink patch:
https://codereview.chromium.org/1880393005/

The patch has been developed on top of patch for bug #156597, which adds m_offsetBetweenColumns|Rows properties.
Comment 1 Manuel Rego Casasnovas 2016-04-15 01:17:28 PDT
Created attachment 276468 [details]
Patch
Comment 2 Manuel Rego Casasnovas 2016-04-18 02:23:09 PDT
Created attachment 276624 [details]
Patch

Rebased patch
Comment 3 Sergio Villar Senin 2016-04-28 00:19:02 PDT
Comment on attachment 276624 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=276624&action=review

> Source/WebCore/rendering/RenderGrid.cpp:1914
> +        }

Being just two and taking into account that you have a comment just above I'll just do
endOfRow -= gutters + m_offset

> Source/WebCore/rendering/RenderGrid.cpp:1948
> +        }

Ditto.
Comment 4 Manuel Rego Casasnovas 2016-04-28 01:01:07 PDT
Created attachment 277603 [details]
Patch
Comment 5 Manuel Rego Casasnovas 2016-04-28 01:05:32 PDT
Comment on attachment 277603 [details]
Patch

Thanks for the review.

Applied suggested changes.
Comment 6 WebKit Commit Bot 2016-04-28 01:54:06 PDT
Comment on attachment 277603 [details]
Patch

Clearing flags on attachment: 277603

Committed r200181: <http://trac.webkit.org/changeset/200181>
Comment 7 WebKit Commit Bot 2016-04-28 01:54:10 PDT
All reviewed patches have been landed.  Closing bug.