Bug 148070

Summary: [CSS Grid Layout] Relayout whenever Box Alignment properties change
Product: WebKit Reporter: Javier Fernandez <jfernandez>
Component: Layout and RenderingAssignee: Javier Fernandez <jfernandez>
Status: RESOLVED FIXED    
Severity: Normal CC: commit-queue, darin, esprehn+autocc, glenn, hyatt, jfernandez, kondapallykalyan, rego, svillar
Priority: P2 Keywords: BlinkMergeCandidate
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on:    
Bug Blocks: 60731, 91512    
Attachments:
Description Flags
Patch
none
Patch none

Description Javier Fernandez 2015-08-16 15:24:05 PDT
Since we need to resolve 'auto' values on alignment properties at layout time, we must force a relayout whenever these properties change.

Additionally, we perform grid items location during the grid container layout, hence we need to trigger it as well if any of these properties chance. However, only stretching implies a size change, so perhaps we can look for smarter ways to re-alig grid items without forcing an expensive relayout.
Comment 1 Javier Fernandez 2015-08-27 07:43:11 PDT
Created attachment 260054 [details]
Patch
Comment 2 Dave Hyatt 2015-09-09 14:23:47 PDT
Comment on attachment 260054 [details]
Patch

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

r-

> Source/WebCore/rendering/RenderGrid.cpp:285
> +                child->setChildNeedsLayout();

This should change to:

child->setChildNeedsLayout(MarkOnlyThis).

Shouldn't positioned objects be skipped by the for loop? It seems like you are checking all children, but don't you only need to check children that are actually part of the grid?
Comment 3 Javier Fernandez 2015-09-09 15:18:05 PDT
Created attachment 260879 [details]
Patch
Comment 4 WebKit Commit Bot 2015-09-17 02:13:50 PDT
Comment on attachment 260879 [details]
Patch

Clearing flags on attachment: 260879

Committed r189910: <http://trac.webkit.org/changeset/189910>
Comment 5 WebKit Commit Bot 2015-09-17 02:13:55 PDT
All reviewed patches have been landed.  Closing bug.