Skip to content

Force layout before startViewTransition #32699

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

Merged
merged 1 commit into from
Mar 21, 2025

Conversation

sebmarkbage
Copy link
Collaborator

@sebmarkbage sebmarkbage commented Mar 21, 2025

This works around this Safari bug. https://bugs.webkit.org/show_bug.cgi?id=290146

This unfortunate because it may cause additional layouts if there's more updates to the tree coming by manual mutation before it gets painted naturally. However, we might end up wanting to read layout early anyway.

This affects the fixture because we clone the <link> from the <head> which is itself another bug. However, it should be possible to have <link> tags inserted into the new tree so this is still relevant.

@react-sizebot
Copy link

react-sizebot commented Mar 21, 2025

Comparing: ac799e5...e431df8

Critical size changes

Includes critical production bundles, as well as any change greater than 2%:

Name +/- Base Current +/- gzip Base gzip Current gzip
oss-stable/react-dom/cjs/react-dom.production.js = 6.68 kB 6.68 kB = 1.83 kB 1.83 kB
oss-stable/react-dom/cjs/react-dom-client.production.js = 517.29 kB 517.29 kB = 92.26 kB 92.26 kB
oss-experimental/react-dom/cjs/react-dom.production.js = 6.69 kB 6.69 kB = 1.83 kB 1.83 kB
oss-experimental/react-dom/cjs/react-dom-client.production.js +0.02% 617.58 kB 617.68 kB +0.02% 109.52 kB 109.55 kB
facebook-www/ReactDOM-prod.classic.js +0.01% 653.67 kB 653.74 kB +0.01% 115.18 kB 115.19 kB
facebook-www/ReactDOM-prod.modern.js +0.01% 643.95 kB 644.02 kB +0.01% 113.59 kB 113.61 kB

Significant size changes

Includes any change greater than 0.2%:

(No significant changes)

Generated by 🚫 dangerJS against e431df8

@sebmarkbage sebmarkbage merged commit e1e7407 into facebook:main Mar 21, 2025
241 checks passed
github-actions bot pushed a commit that referenced this pull request Mar 21, 2025
This works around this Safari bug.
https://bugs.webkit.org/show_bug.cgi?id=290146

This unfortunate because it may cause additional layouts if there's more
updates to the tree coming by manual mutation before it gets painted
naturally. However, we might end up wanting to read layout early anyway.

This affects the fixture because we clone the `<link>` from the `<head>`
which is itself another bug. However, it should be possible to have
`<link>` tags inserted into the new tree so this is still relevant.

DiffTrain build for [e1e7407](e1e7407)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed React Core Team Opened by a member of the React Core Team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants