<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>111886</bug_id>
          
          <creation_ts>2013-03-08 13:19:23 -0800</creation_ts>
          <short_desc>[CSS Grid Layout] Fix the auto-placement algorithm to fully match the specification</short_desc>
          <delta_ts>2013-03-08 16:25:00 -0800</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>Layout and Rendering</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>All</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>INVALID</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          <blocked>103316</blocked>
          <everconfirmed>1</everconfirmed>
          <reporter name="Julien Chaffraix">jchaffraix</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>ojan</cc>
    
    <cc>tony</cc>
    
    <cc>xan.lopez</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>851467</commentid>
    <comment_count>0</comment_count>
    <who name="Julien Chaffraix">jchaffraix</who>
    <bug_when>2013-03-08 13:19:23 -0800</bug_when>
    <thetext>I believe the current algorithm doesn&apos;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.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>851598</commentid>
    <comment_count>1</comment_count>
    <who name="Julien Chaffraix">jchaffraix</who>
    <bug_when>2013-03-08 16:25:00 -0800</bug_when>
    <thetext>I misread the code, we actually follow the proper algorithm:

* We first place items for which we can resolve both positions (it&apos;s implicitly mentioned in step 1 - &quot;will not overlap the grid area of any explicitly or previously auto-placed item.&quot;).
* Then placeSpecifiedMajorAxisItemsOnGrid(specifiedMajorAxisAutoGridItems) is the step 1 loop.
* placeAutoMajorAxisItemsOnGrid(autoMajorAxisAutoGridItems) is step 4.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>