[Webkit-unassigned] [Bug 204578] [css-grid] Failures on css/css-grid/grid-model/grid-box-sizing-001.html

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Feb 1 03:03:53 PST 2021


https://bugs.webkit.org/show_bug.cgi?id=204578

--- Comment #4 from Javier Fernandez <jfernandez at igalia.com> ---
Comment on attachment 418730
  --> https://bugs.webkit.org/attachment.cgi?id=418730
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=418730&action=review

> Source/WebCore/rendering/RenderGrid.cpp:194
> +        // FIXME: We should use RenderBlock::hasDefiniteLogicalHeight() only but it does not work for positioned stuff.

Why it doesn't work for positioned elements ? If that's the case, is there a WPT that still fails due to this issue ? If there isn't, would it be possible to define a test case and file a bug ? We could add such bug number as part of this comment to clarify the issue even more.

> Source/WebCore/rendering/RenderGrid.cpp:195
> +        m_hasDefiniteLogicalHeight = hasDefiniteLogicalHeight() || hasOverridingLogicalHeight() || computeContentLogicalHeight(MainOrPreferredSize, style().logicalHeight(), WTF::nullopt);

It's indeed true that if a box having an "override height" should be treated as if it had a definite size. However, this override height is set to apply the 'stretch' alignment, which is only implemented for grid and flexbox items. Is there any test case of the ones we pass now, thanks to this change, covering such situation ?

> Source/WebCore/rendering/RenderGrid.cpp:249
> +        if (cachedHasDefiniteLogicalHeight())

I'm not really sure why caching the result of the "hasDefiniteLogicalHeight" between layouts is the solution to this bug. Did you verify that the layout is correct in the first ons but wrong in the subsequent layouts ? I thin it'd be a good idea to explain in the ChangeLog why this is happening. Even if we eventually decide to land this patch, this information would be useful to implement a different solution, perhaps avoiding the inconsistencies between subsequent layout operations.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20210201/5be5edcc/attachment.htm>


More information about the webkit-unassigned mailing list