Bug 111886

Summary: [CSS Grid Layout] Fix the auto-placement algorithm to fully match the specification
Product: WebKit Reporter: Julien Chaffraix <jchaffraix>
Component: Layout and RenderingAssignee: Nobody <webkit-unassigned>
Status: RESOLVED INVALID    
Severity: Normal CC: ojan, tony, xan.lopez
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Bug Depends on:    
Bug Blocks: 103316    

Julien Chaffraix
Reported 2013-03-08 13:19:23 PST
I believe the current algorithm doesn't totally match the specification as we do the following placing: * Foreach grid items with a specified major axis, place it on the grid (placeSpecifiedMajorAxisItemsOnGrid(specifiedMajorAxisAutoGridItems)) * Foreach grid items with an auto major axis, place it on the grid (placeAutoMajorAxisItemsOnGrid(autoMajorAxisAutoGridItems)) The specification does a single loop over the unplaced grid items. See http://dev.w3.org/csswg/css3-grid-layout/#auto-placement-algo, point 4 of the algorithm. I am sure we can build a test case where our algorithm differs.
Attachments
Julien Chaffraix
Comment 1 2013-03-08 16:25:00 PST
I misread the code, we actually follow the proper algorithm: * We first place items for which we can resolve both positions (it's implicitly mentioned in step 1 - "will not overlap the grid area of any explicitly or previously auto-placed item."). * Then placeSpecifiedMajorAxisItemsOnGrid(specifiedMajorAxisAutoGridItems) is the step 1 loop. * placeAutoMajorAxisItemsOnGrid(autoMajorAxisAutoGridItems) is step 4.
Note You need to log in before you can comment on or make changes to this bug.