This is somehow a port of a patch in Blink: https://codereview.chromium.org/1459373002/
It's not exactly the same, as we were already not using pointers in GridCoordinate in WebKit.
But porting this will help to avoid repeated calls to resolveGridPositionsFromStyle() from RenderGrid.
Created attachment 270656 [details]
Comment on attachment 270656 [details]
View in context: https://bugs.webkit.org/attachment.cgi?id=270656&action=review
> + Add new boolean to know if a GridSpan is definite or indefinite.
I was going to complain asking for an enumerated type, but then I saw that you are actually using it. In any case you need to fix this sentence.
Extra line here
> + initialPosition = (direction == ForColumns) ? gridItem.style().gridItemColumnStart() : gridItem.style().gridItemRowStart();
bool isRowAxis = direction == ForColumns;
and using that in these two ternary operators (also you don't need parens).
> + // We can't get our grid positions without running the auto placement algorithm.
You can move the comment out of the if block and remove the brackets.
Created attachment 271549 [details]
Thanks for the review, applied suggested changes!
Comment on attachment 271549 [details]
Clearing flags on attachment: 271549
Committed r196691: <http://trac.webkit.org/changeset/196691>
All reviewed patches have been landed. Closing bug.