Skip to content

[DOM] Fix Fragment compareDocumentPosition for documentElement and empty portals - #37163

Merged
jackpope merged 2 commits into
mainfrom
fragment-refs/cdp-document-element-empty-portal
Aug 12, 2026
Merged

[DOM] Fix Fragment compareDocumentPosition for documentElement and empty portals#37163
jackpope merged 2 commits into
mainfrom
fragment-refs/cdp-document-element-empty-portal

Conversation

@jackpope

@jackpope jackpope commented Jul 31, 2026

Copy link
Copy Markdown
Collaborator

Accept documentElement in the CONTAINS fiber fallback when there is no React fiber, and position empty portaled fragments against the portal container instead of the React host parent.

@meta-cla meta-cla Bot added the CLA Signed label Jul 31, 2026
@jackpope
jackpope force-pushed the fragment-refs/cdp-document-element-empty-portal branch from aadaa86 to da5ac7b Compare July 31, 2026 19:14
@github-actions github-actions Bot added the React Core Team Opened by a member of the React Core Team label Jul 31, 2026
@jackpope
jackpope force-pushed the fragment-refs/cdp-document-element-empty-portal branch from da5ac7b to 4a6b6a4 Compare July 31, 2026 20:15
@jackpope jackpope changed the title [DOM] Fix Fragment CDP for documentElement and empty portals [DOM] Fix Fragment compareDocumentPosition for documentElement and empty portals Jul 31, 2026
@jackpope
jackpope marked this pull request as ready for review July 31, 2026 21:08
@jackpope
jackpope requested a review from eps1lon July 31, 2026 21:08
@jackpope
jackpope force-pushed the fragment-refs/cdp-document-element-empty-portal branch from 3b288ec to 6fb8578 Compare August 9, 2026 19:15
@jackpope
jackpope force-pushed the fragment-refs/cdp-document-element-empty-portal branch from 6fb8578 to 630b360 Compare August 11, 2026 03:49
@jackpope
jackpope force-pushed the fragment-refs/cdp-document-element-empty-portal branch from 630b360 to 6bcdaef Compare August 12, 2026 00:50
@jackpope
jackpope force-pushed the fragment-refs/cdp-document-element-empty-portal branch from 6bcdaef to 80eb3ea Compare August 12, 2026 01:05

@poteto poteto left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM (light skim). Stacking stamps for the fragment-refs land sequence.

Base automatically changed from fragment-refs/empty-fragment-host-siblings to main August 12, 2026 01:13
Accept documentElement in the CONTAINS fiber fallback when there is no
React fiber, and position empty portaled fragments against the portal
container instead of the React host parent.
@jackpope
jackpope force-pushed the fragment-refs/cdp-document-element-empty-portal branch from 80eb3ea to d9f9024 Compare August 12, 2026 01:13
@react-sizebot

Copy link
Copy Markdown

Comparing: db4ee65...d9f9024

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 = 7.35 kB 7.35 kB = 1.96 kB 1.96 kB
oss-stable/react-dom/cjs/react-dom-client.production.js +0.14% 619.81 kB 620.67 kB +0.12% 109.58 kB 109.70 kB
oss-experimental/react-dom/cjs/react-dom.production.js = 7.36 kB 7.36 kB = 1.96 kB 1.96 kB
oss-experimental/react-dom/cjs/react-dom-client.production.js +0.12% 691.02 kB 691.89 kB +0.10% 121.08 kB 121.20 kB
facebook-www/ReactDOM-prod.classic.js +0.12% 711.22 kB 712.08 kB +0.13% 124.51 kB 124.67 kB
facebook-www/ReactDOM-prod.modern.js +0.12% 701.53 kB 702.40 kB +0.13% 122.93 kB 123.09 kB
oss-experimental/react-reconciler/cjs/react-reconciler-reflection.production.js +2.47% 11.79 kB 12.08 kB +0.93% 2.69 kB 2.71 kB
oss-stable-semver/react-reconciler/cjs/react-reconciler-reflection.production.js +2.47% 11.79 kB 12.08 kB +0.93% 2.69 kB 2.71 kB
oss-stable/react-reconciler/cjs/react-reconciler-reflection.production.js +2.47% 11.79 kB 12.08 kB +0.93% 2.69 kB 2.71 kB
oss-experimental/react-reconciler/cjs/react-reconciler-reflection.development.js +2.41% 13.41 kB 13.73 kB +1.03% 2.73 kB 2.75 kB
oss-stable-semver/react-reconciler/cjs/react-reconciler-reflection.development.js +2.41% 13.41 kB 13.73 kB +1.03% 2.73 kB 2.75 kB
oss-stable/react-reconciler/cjs/react-reconciler-reflection.development.js +2.41% 13.41 kB 13.73 kB +1.03% 2.73 kB 2.75 kB

Significant size changes

Includes any change greater than 0.2%:

Expand to show
Name +/- Base Current +/- gzip Base gzip Current gzip
oss-experimental/react-reconciler/cjs/react-reconciler-reflection.production.js +2.47% 11.79 kB 12.08 kB +0.93% 2.69 kB 2.71 kB
oss-stable-semver/react-reconciler/cjs/react-reconciler-reflection.production.js +2.47% 11.79 kB 12.08 kB +0.93% 2.69 kB 2.71 kB
oss-stable/react-reconciler/cjs/react-reconciler-reflection.production.js +2.47% 11.79 kB 12.08 kB +0.93% 2.69 kB 2.71 kB
oss-experimental/react-reconciler/cjs/react-reconciler-reflection.development.js +2.41% 13.41 kB 13.73 kB +1.03% 2.73 kB 2.75 kB
oss-stable-semver/react-reconciler/cjs/react-reconciler-reflection.development.js +2.41% 13.41 kB 13.73 kB +1.03% 2.73 kB 2.75 kB
oss-stable/react-reconciler/cjs/react-reconciler-reflection.development.js +2.41% 13.41 kB 13.73 kB +1.03% 2.73 kB 2.75 kB

Generated by 🚫 dangerJS against d9f9024

@jackpope
jackpope merged commit 809280d into main Aug 12, 2026
238 checks passed
github-actions Bot pushed a commit that referenced this pull request Aug 12, 2026
…pty portals (#37163)

Accept documentElement in the CONTAINS fiber fallback when there is no
React fiber, and position empty portaled fragments against the portal
container instead of the React host parent.

DiffTrain build for [809280d](809280d)
github-actions Bot pushed a commit that referenced this pull request Aug 12, 2026
…pty portals (#37163)

Accept documentElement in the CONTAINS fiber fallback when there is no
React fiber, and position empty portaled fragments against the portal
container instead of the React host parent.

DiffTrain build for [809280d](809280d)
github-actions Bot pushed a commit to suhyeonus/react that referenced this pull request Aug 12, 2026
…pty portals (react#37163)

Accept documentElement in the CONTAINS fiber fallback when there is no
React fiber, and position empty portaled fragments against the portal
container instead of the React host parent.

DiffTrain build for [809280d](react@809280d)
github-actions Bot pushed a commit to suhyeonus/react that referenced this pull request Aug 12, 2026
…pty portals (react#37163)

Accept documentElement in the CONTAINS fiber fallback when there is no
React fiber, and position empty portaled fragments against the portal
container instead of the React host parent.

DiffTrain build for [809280d](react@809280d)
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