Currently we don't account for paddings and borders on the grid element in computePreferredLogicalWidths and layoutGridItems. This means that we don't compute the right width / height during layout and needs to be fixed. Patch forthcoming.
Created attachment 179062 [details] Proposed change.
Comment on attachment 179062 [details] Proposed change. View in context: https://bugs.webkit.org/attachment.cgi?id=179062&action=review > Source/WebCore/rendering/RenderGrid.cpp:203 > + LayoutUnit borderAndPaddingInBlockDirection = borderAndPaddingLogicalHeight(); > + setLogicalHeight(logicalHeight() + borderAndPaddingInBlockDirection); Nit: I would remove the temporary variable. > LayoutTests/fast/css-grid-layout/grid-element-padding-margin.html:9 > +.grid { > + display: -webkit-grid; We should consider making a .css file in resources that define classes for the various grid properties. This makes it easier to handle property name changes and makes it possible to make the tests cross platform by adding -ms prefixed properties. See css3/flexbox/resources/flexbox.css for an example of this. Would be good as a separate patch.
Comment on attachment 179062 [details] Proposed change. View in context: https://bugs.webkit.org/attachment.cgi?id=179062&action=review >> Source/WebCore/rendering/RenderGrid.cpp:203 >> + setLogicalHeight(logicalHeight() + borderAndPaddingInBlockDirection); > > Nit: I would remove the temporary variable. Will do. >> LayoutTests/fast/css-grid-layout/grid-element-padding-margin.html:9 >> + display: -webkit-grid; > > We should consider making a .css file in resources that define classes for the various grid properties. This makes it easier to handle property name changes and makes it possible to make the tests cross platform by adding -ms prefixed properties. See css3/flexbox/resources/flexbox.css for an example of this. Would be good as a separate patch. Filed https://bugs.webkit.org/show_bug.cgi?id=104869 about that.
Created attachment 179171 [details] Patch for landing
Comment on attachment 179171 [details] Patch for landing Clearing flags on attachment: 179171 Committed r137560: <http://trac.webkit.org/changeset/137560>
All reviewed patches have been landed. Closing bug.