[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 10:49:11 PST 2022
https://bugs.webkit.org/show_bug.cgi?id=236054
--- Comment #19 from Matt Woodrow <mattwoodrow at apple.com> ---
(In reply to Oriol Brufau from comment #18)
> > 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.
Do you know why the non-sub grid code also does the same +1 after an auto-repeat?
I left it the same to match (and it means the code in CSSComputedStyleDeclaration/NamedLineCollection gets to be more similar), though I agree that it's probably better just to not bother.
I'll update this patch to not need it, but it might be nice to change the normal grid code at some point too.
--
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/fd0bd803/attachment-0001.htm>
More information about the webkit-unassigned
mailing list