[css-grid] The isValidTransition function must not alter the GridSizingData object
authorjfernandez@igalia.com <jfernandez@igalia.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 27 Jul 2016 18:46:42 +0000 (18:46 +0000)
committerjfernandez@igalia.com <jfernandez@igalia.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 27 Jul 2016 18:46:42 +0000 (18:46 +0000)
commitccaad138f598e0445b7f4c7c02197e369241f420
tree26c95e7f2d2b71bf55094734fb51c1c417390494
parent54088931569381c07e409c190d699b0ec9d66898
[css-grid] The isValidTransition function must not alter the GridSizingData object
https://bugs.webkit.org/show_bug.cgi?id=160252

Reviewed by Darin Adler.

It's not correct that a function which purpose is to check out the
validity of a state modifies such state.

That code was there to allow the extra row track sizing iteration
in the case of a grid container with indefinite height. We need to
do that in order to figure out its intrinsic height, which will be
used then to properly sizing the row tracks.

Since the intrinsic height computation uses directly the
computeUsedBreadthOfGridTracks function, it does not alter the
algorithm state-machine, hence, we can safely remove this code,
which was incorrect in any case.

No new tests, it's just a refactoring with no functionality change.

* rendering/RenderGrid.cpp:
(WebCore::RenderGrid::GridSizingData::isValidTransition):

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