Bug 157417 - [css-grid] Fix static position for positioned grid items
Summary: [css-grid] Fix static position for positioned grid items
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: https://bugs.chromium.org/p/chromium/...
Keywords: BlinkMergeCandidate
Depends on:
Blocks: 60731
  Show dependency treegraph
Reported: 2016-05-06 02:14 PDT by Manuel Rego Casasnovas
Modified: 2016-05-09 03:16 PDT (History)
7 users (show)

See Also:

Patch (32.19 KB, patch)
2016-05-06 02:26 PDT, Manuel Rego Casasnovas
no flags Details | Formatted Diff | Diff
Patch (32.18 KB, patch)
2016-05-09 02:33 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-05-06 02:14:20 PDT
The spec was updated (almost 1 year ago) to define properly
the static position of the positioned grid items:

But we didn't apply this change in our implementation.

The specific wording from the spec (https://drafts.csswg.org/css-grid/#static-position):
"The static position [CSS21] of an absolutely-positioned child of a grid container
 is determined as if it were the sole grid item in a grid area whose edges
 coincide with the padding edges of the grid container.
 However, if the grid container parent is also the generator of
 the absolutely positioned element’s containing block, instead use the grid area
 determined in §11.1 With a Grid Container as Containing Block."

This was already fixed in Blink:
Comment 1 Manuel Rego Casasnovas 2016-05-06 02:26:54 PDT
Created attachment 278246 [details]
Comment 2 Darin Adler 2016-05-07 12:43:04 PDT
Comment on attachment 278246 [details]

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

> Source/WebCore/rendering/RenderGrid.cpp:1525
> +            RenderLayer* childLayer = child.layer();

Local variable should be a reference, not a pointer.

    auto& childLayer = *child.layer();
Comment 3 Manuel Rego Casasnovas 2016-05-09 02:33:12 PDT
Created attachment 278397 [details]
Comment 4 WebKit Commit Bot 2016-05-09 03:16:44 PDT
Comment on attachment 278397 [details]

Clearing flags on attachment: 278397

Committed r200572: <http://trac.webkit.org/changeset/200572>
Comment 5 WebKit Commit Bot 2016-05-09 03:16:47 PDT
All reviewed patches have been landed.  Closing bug.