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.
Created attachment 260054 [details]
Comment on attachment 260054 [details]
View in context: https://bugs.webkit.org/attachment.cgi?id=260054&action=review
> + child->setChildNeedsLayout();
This should change to:
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?
Created attachment 260879 [details]
Comment on attachment 260879 [details]
Clearing flags on attachment: 260879
Committed r189910: <http://trac.webkit.org/changeset/189910>
All reviewed patches have been landed. Closing bug.