Description[CSS Grid Layout] Fix issues adding new items to grid
First if the grid auto flow property is different to none, the grid is
marked as dirty when a new child is added. Because of if it contains
auto-placed items, they might need to be re-positioned.
Then if the new item has definite positions and auto flow is none, the
grid will grow as required and place the new item without being marked
as dirty.
The test was not working properly, as it was adding the PASS messages
as auto-placed grid items which was marking the grid as dirty and force
a re-calculation of the position.
Moving the results of the test to a different div make the test fails
without this patch. Test expectation was updated accordingly.
BUG=248151
TEST=fast/css-grid-layout/grid-item-addition-auto-placement-update.html
Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=169784
Patch Set 1 #Patch Set 2 : Simplify code of addChild() #
Total comments: 2
Patch Set 3 : Update growGrid() to grow several positions at a time #
Total comments: 2
Patch Set 4 : Keep else, improve comment and change param in growGrid() #
Messages
Total messages: 10 (0 generated)
|