Hinted by Ojan in https://bugs.webkit.org/show_bug.cgi?id=106474#c15. To reproduce, just try to update either properties and watch as we: * don't properly trigger a layout. * don't relayout the grid items, leaving them with a wrong size. Taking this bug as it will likely help me solve bug 106474.
Created attachment 183071 [details] Proposed fix 1: Force a relayout if the grid area size changed and fixed a boolean logic in the style diff method.
Comment on attachment 183071 [details] Proposed fix 1: Force a relayout if the grid area size changed and fixed a boolean logic in the style diff method. View in context: https://bugs.webkit.org/attachment.cgi?id=183071&action=review > Source/WebCore/rendering/RenderGrid.cpp:236 > + LayoutUnit oldOverrideContainingBlockContentLogicalWidth = child->hasOverrideContainingBlockLogicalWidth() ? child->overrideContainingBlockContentLogicalWidth() : LayoutUnit(); > + LayoutUnit oldOverrideContainingBlockContentLogicalHeight = child->hasOverrideContainingBlockLogicalHeight() ? child->overrideContainingBlockContentLogicalHeight() : LayoutUnit(); > + LayoutUnit newOverrideContainingBlockContentLogicalWidth = columnTracks[columnTrack].m_usedBreadth; > + LayoutUnit newOverrideContainingBlockContentLogicalHeight = rowTracks[rowTrack].m_usedBreadth; This is pretty hard to read. How about: LayoutUnit oldOverrideContainingBlockContentLogicalWidth = child->hasOverrideContainingBlockLogicalWidth() ? child->overrideContainingBlockContentLogicalWidth() : LayoutUnit(); LayoutUnit oldOverrideContainingBlockContentLogicalHeight = child->hasOverrideContainingBlockLogicalHeight() ? child->overrideContainingBlockContentLogicalHeight() : LayoutUnit(); bool widthOrHeightChanged = oldOverrideContainingBlockContentLogicalWidth != columnTracks[columnTrack].m_usedBreadth || oldOverrideContainingBlockContentLogicalHeight != rowTracks[rowTrack].m_usedBreadth; if (widthOrHeightChanged) child->setNeedsLayout(true, MarkOnlyThis); child->setOverride... child->setOverride...
Comment on attachment 183071 [details] Proposed fix 1: Force a relayout if the grid area size changed and fixed a boolean logic in the style diff method. View in context: https://bugs.webkit.org/attachment.cgi?id=183071&action=review >> Source/WebCore/rendering/RenderGrid.cpp:236 >> + LayoutUnit newOverrideContainingBlockContentLogicalHeight = rowTracks[rowTrack].m_usedBreadth; > > This is pretty hard to read. How about: > LayoutUnit oldOverrideContainingBlockContentLogicalWidth = child->hasOverrideContainingBlockLogicalWidth() ? child->overrideContainingBlockContentLogicalWidth() : LayoutUnit(); > LayoutUnit oldOverrideContainingBlockContentLogicalHeight = child->hasOverrideContainingBlockLogicalHeight() ? child->overrideContainingBlockContentLogicalHeight() : LayoutUnit(); > > bool widthOrHeightChanged = oldOverrideContainingBlockContentLogicalWidth != columnTracks[columnTrack].m_usedBreadth || oldOverrideContainingBlockContentLogicalHeight != rowTracks[rowTrack].m_usedBreadth; > if (widthOrHeightChanged) > child->setNeedsLayout(true, MarkOnlyThis); > > child->setOverride... > child->setOverride... No issue with transforming the code, will change it before landing.
Created attachment 183220 [details] Patch for landing
Comment on attachment 183220 [details] Patch for landing Clearing flags on attachment: 183220 Committed r140045: <http://trac.webkit.org/changeset/140045>
All reviewed patches have been landed. Closing bug.