Grid Layout specification states that grid items should be centered horizontally when using auto margins. https://drafts.csswg.org/css-grid/#auto-margins Right now, we only manage vertical alignment with auto margins.
Created attachment 259945 [details] Patch
Comment on attachment 259945 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=259945&action=review > Source/WebCore/ChangeLog:11 > + implements the expected behavior in the row-axis. Where's the code refactoring? > Source/WebCore/rendering/RenderGrid.cpp:1204 > + // We need pending layouts to be done in order to compute auto-margins properly. Duplicate comment.
Comment on attachment 259945 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=259945&action=review >> Source/WebCore/ChangeLog:11 >> + implements the expected behavior in the row-axis. > > Where's the code refactoring? I meant the code removal from RenderBox to handle style changes affecting margin computation, so it's handled now in the new resetAutoMarginsAndLogicalTopInColumnAxis instead.
Created attachment 260283 [details] Patch
Comment on attachment 259945 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=259945&action=review >>> Source/WebCore/ChangeLog:11 >>> + implements the expected behavior in the row-axis. >> >> Where's the code refactoring? > > I meant the code removal from RenderBox to handle style changes affecting margin computation, so it's handled now in the new resetAutoMarginsAndLogicalTopInColumnAxis instead. I agree that is not a very clear sentence, because I talk about that removal later. So I'll remove it from the ChangeLog.
Created attachment 260284 [details] Patch
Comment on attachment 260284 [details] Patch Clearing flags on attachment: 260284 Committed r189169: <http://trac.webkit.org/changeset/189169>
All reviewed patches have been landed. Closing bug.