Bug 149800

Summary: [css-grid] Implement grid gutters
Product: WebKit Reporter: Sergio Villar Senin <svillar>
Component: New BugsAssignee: Sergio Villar Senin <svillar>
Status: RESOLVED FIXED    
Severity: Normal CC: darin, dino, hyatt, koivisto, mmaxfield
Priority: P2    
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on:    
Bug Blocks: 60731    
Attachments:
Description Flags
Patch
none
Patch darin: review+

Description Sergio Villar Senin 2015-10-05 01:15:37 PDT
[css-grid] Implement grid gutters
Comment 1 Sergio Villar Senin 2015-10-05 01:30:21 PDT
Citing the specs

    "These properties specify the gutters between grid rows and grid columns, respectively. The effect is as though the affected grid lines acquired width: the grid track between two grid lines is the space between the gutters that represent them."
Comment 2 Sergio Villar Senin 2015-10-05 01:37:46 PDT
Created attachment 262421 [details]
Patch
Comment 3 Sergio Villar Senin 2015-10-05 08:09:31 PDT
Created attachment 262437 [details]
Patch

removed normal as a valid keyword
Comment 4 Darin Adler 2015-10-06 08:38:48 PDT
Comment on attachment 262437 [details]
Patch

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

> Source/WebCore/rendering/style/StyleGridData.h:51
>          // FIXME: comparing two hashes doesn't look great for performance. Something to keep in mind going forward.

I don’t understand this comment. Where is the code comparing two hashes?

> Source/WebCore/rendering/style/StyleGridData.h:58
> +        return m_gridColumns == o.m_gridColumns && m_gridRows == o.m_gridRows
> +        && m_gridAutoFlow == o.m_gridAutoFlow && m_gridAutoRows == o.m_gridAutoRows && m_gridAutoColumns == o.m_gridAutoColumns
> +        && m_namedGridColumnLines == o.m_namedGridColumnLines && m_namedGridRowLines == o.m_namedGridRowLines
> +        && m_namedGridArea == o.m_namedGridArea && m_namedGridArea == o.m_namedGridArea
> +        && m_namedGridAreaRowCount == o.m_namedGridAreaRowCount && m_namedGridAreaColumnCount == o.m_namedGridAreaColumnCount
> +        && m_orderedNamedGridRowLines == o.m_orderedNamedGridRowLines && m_orderedNamedGridColumnLines == o.m_orderedNamedGridColumnLines
> +        && m_gridColumnGap == o.m_gridColumnGap && m_gridRowGap == o.m_gridRowGap;

WebKit coding style would have the && indented by four spaces on subsequent lines.
Comment 5 Sergio Villar Senin 2015-10-07 01:40:39 PDT
Comment on attachment 262437 [details]
Patch

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

>> Source/WebCore/rendering/style/StyleGridData.h:51
>>          // FIXME: comparing two hashes doesn't look great for performance. Something to keep in mind going forward.
> 
> I don’t understand this comment. Where is the code comparing two hashes?

Some of those structures are hashmaps.

>> Source/WebCore/rendering/style/StyleGridData.h:58
>> +        && m_gridColumnGap == o.m_gridColumnGap && m_gridRowGap == o.m_gridRowGap;
> 
> WebKit coding style would have the && indented by four spaces on subsequent lines.

Not sure why it has this weird indentation, I'll fix it.
Comment 6 Sergio Villar Senin 2015-10-07 02:41:21 PDT
Committed r190663: <http://trac.webkit.org/changeset/190663>