[Webkit-unassigned] [Bug 236054] Add support for parsing 'subgrid' in grid-template-columns/row

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Feb 8 04:46:00 PST 2022


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

--- Comment #18 from Oriol Brufau <obrufau at igalia.com> ---
Comment on attachment 451192
  --> https://bugs.webkit.org/attachment.cgi?id=451192
Patch

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

Other than these comments, informal r+ (I'm not a reviewer).

> Source/WebCore/css/CSSComputedStyleDeclaration.cpp:1077
> +        populateSubgridLineNameList(list.get(), collector, autoRepeatInsertionPoint + 1, collector.namedGridLineCount() + 1);

The +1 seem wrong, a workaround for StyleBuilderConverter increasing the index after an auto-repeat.
I would rather fix the StyleBuilderConverter and here use

         autoRepeatInsertionPoint = std::clamp<int>(autoRepeatInsertionPoint, 0, collector.namedGridLineCount());
         populateSubgridLineNameList(list.get(), collector, 0, autoRepeatInsertionPoint);
         // ...
         populateSubgridLineNameList(list.get(), collector, autoRepeatInsertionPoint, collector.namedGridLineCount());

> Source/WebCore/style/StyleBuilderConverter.h:1028
> +                currentNamedGridLine++;

Some lines below,

    tracksData.m_autoRepeatInsertionPoint = currentNamedGridLine++;

should be

    tracksData.m_autoRepeatInsertionPoint = currentNamedGridLine;
    if (!tracksData.isSubgrid)
        currentNamedGridLine++;

No need to increase since it's already done here.

-- 
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/20220208/2643c7da/attachment.htm>


More information about the webkit-unassigned mailing list