Description[CSS Grid Layout] Fix positioned grid children position and size
According to the spec positioned grid children have a special behavior
described at:
http://dev.w3.org/csswg/css-grid/#abspos-items
The idea is that for positioned children the containing block
will correspond to the padding edges of the grid container, unless the
grid-placement properties are defined.
This not only affects to positioned grid items (direct children) but
also to any descendant where the containing block is the grid
container.
In order to manage this special behavior, the patch is overriding
RenderBlock::layoutPositionedObjects() to calculate the position and
size depending on the grid-placement properties.
RenderBox class has some changes to calculate the containing block width
and height for positioned objects (using the override value). And also
to compute their static position.
Finally, the positioned items are not taken into account in all the
different grid methods, in order that they do not interfere the layout
of the grid as stated in the spec.
BUG=273898
TEST=fast/css-grid-layout/absolutely-positioned-grid-children.html
TEST=fast/css-grid-layout/grid-add-item-with-positioned-items.html
TEST=fast/css-grid-layout/grid-positioned-children-writing-modes.html
TEST=fast/css-grid-layout/grid-positioned-items-background.html
TEST=fast/css-grid-layout/grid-sizing-positioned-items.html
TEST=fast/css-grid-layout/positioned-grid-items-should-not-take-up-space.html
Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=186610
Patch Set 1 #
Total comments: 12
Patch Set 2 : New version applying suggested changes #
Total comments: 11
Patch Set 3 : New version checking for absolutely posotioned elements #Patch Set 4 : Minor fix in a comment #
Total comments: 9
Patch Set 5 : New version using layoutPositionedObjects() #Patch Set 6 : Remove FIXME #
Total comments: 20
Patch Set 7 : New version fixing writing mode issues #Patch Set 8 : Add missing orthogonal modes check #
Total comments: 15
Patch Set 9 : New version following review comments #Patch Set 10 : Remove "if else" #
Total comments: 10
Patch Set 11 : New version fixing some bugs #Patch Set 12 : Add missing FIXME related to auto determination #
Total comments: 13
Patch Set 13 : Update patch following review comments #
Total comments: 6
Patch Set 14 : Patch for landing #Patch Set 15 : Rebased patch #Patch Set 16 : #Messages
Total messages: 29 (4 generated)
|