Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LibWeb: Unify sizing of tracks with spanning and non-spanning items in GFC #18937

Merged
merged 2 commits into from
May 21, 2023

Conversation

kalenikaliaksandr
Copy link
Contributor

@kalenikaliaksandr kalenikaliaksandr commented May 20, 2023

No new layout tests or changes to existing tests are necessary for this refactor. The refactor aims to address the issue of having separate implementations for sizing tracks with items of span = 1 and items of span > 1. By using the same code for both cases, it will help make progress without writing it twice.

@github-actions github-actions bot added the 👀 pr-needs-review PR needs review from a maintainer or community member label May 20, 2023
@awesomekling
Copy link
Contributor

Missing some tests here :)

@BuggieBot
Copy link
Member

Hello!

One or more of the commit messages in this PR do not match the SerenityOS code submission policy, please check the lint_commits CI job for more details on which commits were flagged and why.
Please do not close this PR and open another, instead modify your commit message(s) with git commit --amend and force push those changes to update this PR.

Implements more parts of sizing algorithm for tracks with spanning
items to archive parity with implementation for sizing of tracks
with non-spanning items.
Since the specifications indicate that the algorithm for sizing tracks
without any spanning items is a simplified version of the more general
algorithm used for sizing tracks with spanning items, we can reuse the
code to size both cases.
@awesomekling awesomekling merged commit 09ef2c1 into SerenityOS:master May 21, 2023
@github-actions github-actions bot removed the 👀 pr-needs-review PR needs review from a maintainer or community member label May 21, 2023
@nicoburns
Copy link

@kalenikaliaksandr @awesomekling I'm not sure where performance comes in your priorities, but I would like to note that when we implemented the special casing that has been removed in this PR in Taffy (DioxusLabs/taffy#343), time to complete grid layouts dropped by half (from 16ms to 8ms for a nested grid layout containing 10k nodes).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants