Grid spec has some particularities regarding positioned elements that we should support: https://drafts.csswg.org/css-grid/#abspos This has been already implemented on Blink, so we need to port the different patches from the following bug: http://code.google.com/p/chromium/issues/detail?id=273898
Created attachment 264691 [details] Patch
Comment on attachment 264691 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=264691&action=review Unfortunate that so many of the tests just write out PASS PASS PASS without making clearer what each PASS represents. > Source/WebCore/rendering/RenderBlock.h:316 > + virtual void layoutPositionedObject(RenderBox&, bool relayoutChildren, bool fixedPositionObjectsOnly); A little disappointing that we have to make one more function virtual, meaning we slow down all layout at least a tiny bit.
Thanks for the review! (In reply to comment #2) > Comment on attachment 264691 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=264691&action=review > > Unfortunate that so many of the tests just write out PASS PASS PASS without > making clearer what each PASS represents. Yeah, we've many of those in grid layout, maybe we should think in some kind of refactoring in the tests so we provide more information. > > Source/WebCore/rendering/RenderBlock.h:316 > > + virtual void layoutPositionedObject(RenderBox&, bool relayoutChildren, bool fixedPositionObjectsOnly); > > A little disappointing that we have to make one more function virtual, > meaning we slow down all layout at least a tiny bit. This only affects positioned elements, so I guess only layouts with positioned elements will be affected. I cannot think in a better way right now. We might have a method only in grid to prepare positioned children for layout, but we'd be looping twice the list of positioned elements (first in the new method, then in layoutPositionedObjects()), so I guess it's worse than current approach.
Comment on attachment 264691 [details] Patch Clearing flags on attachment: 264691 Committed r192054: <http://trac.webkit.org/changeset/192054>
All reviewed patches have been landed. Closing bug.
<rdar://problem/24913184>