[css-grid] Remove unnecessary iteration in populateGridPositions loop
authorjfernandez@igalia.com <jfernandez@igalia.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 8 Apr 2016 08:01:04 +0000 (08:01 +0000)
committerjfernandez@igalia.com <jfernandez@igalia.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 8 Apr 2016 08:01:04 +0000 (08:01 +0000)
commit4380a4d5fc3442f7ddf64e7fe71d194a486a3451
tree0e75abfeb1582261628681dd0962ac990f17b162
parenta8dad139d2d258cb520e32521e6a5e272b961005
[css-grid] Remove unnecessary iteration in populateGridPositions loop
https://bugs.webkit.org/show_bug.cgi?id=156376

Reviewed by Darin Adler.

The populateGridPositions loop limit was set to 'lastLine'. However, the
the position of last track's start line is updated after the loop, since
it does not follow the same pattern; it does not have a content
distribution offset.

So, since we are essentially overwriting the value stored in the last
iteration, we can just lower the loop limit.

No new tests added, because there is no change in the functionality.

* rendering/RenderGrid.cpp:
(WebCore::RenderGrid::populateGridPositions):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@199222 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/rendering/RenderGrid.cpp