Skip to content

[HiC] Fix issues with shadow dom canvas children#61401

Merged
chromium-wpt-export-bot merged 1 commit into
masterfrom
chromium-export-cl-7899615
Jul 20, 2026
Merged

[HiC] Fix issues with shadow dom canvas children#61401
chromium-wpt-export-bot merged 1 commit into
masterfrom
chromium-export-cl-7899615

Conversation

@chromium-wpt-export-bot

@chromium-wpt-export-bot chromium-wpt-export-bot commented Jul 20, 2026

Copy link
Copy Markdown
Collaborator

Recursively mark shadow dom content as a canvas child when it's slotting
status changes (flat tree parent changes). This corrects problems with
privacy preserving painting and painting in general, particularly for
forms.

This approach was chosen over a style-based version for a couple of
reasons:

  • There is a significant chunk of code that depends on the
    DidChangeCanvasSubtree method, so it would need to stay in some form.
    There's less use in moving to style if we still need this DOM status
    tracking.
  • The style based relied on suppressing autofill data at the getter
    stage, rather than on setting. I think a setter approach is more
    robust to future changes.

Add tests for declarative slotting, custom elements, and privacy for
visited links and cross-origin image. The privacy tests cover things
protected by style setting (visited links) and paint flags (images).
Also a test for video correctly updating it's compositor read-back
needs, and lots of form control unit tests for autofill privacy.

Fixed: 501661601, 503553618
Change-Id: I261f0c55c3e7204ff919f3e64a9655c6f93e47e4
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7899615
Commit-Queue: Stephen Chenney <schenney@chromium.org>
Reviewed-by: Philip Rogers <pdr@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1664517}

Recursively mark shadow dom content as a canvas child when it's slotting
status changes (flat tree parent changes). This corrects problems with
privacy preserving painting and painting in general, particularly for
forms.

This approach was chosen over a style-based version for a couple of
reasons:
* There is a significant chunk of code that depends on the
  DidChangeCanvasSubtree method, so it would need to stay in some form.
  There's less use in moving to style if we still need this DOM status
  tracking.
* The style based relied on suppressing autofill data at the getter
  stage, rather than on setting. I think a setter approach is more
  robust to future changes.

Add tests for declarative slotting, custom elements, and privacy for
visited links and cross-origin image. The privacy tests cover things
protected by style setting (visited links) and paint flags (images).
Also a test for video correctly updating it's compositor read-back
needs, and lots of form control unit tests for autofill privacy.

Fixed: 501661601, 503553618
Change-Id: I261f0c55c3e7204ff919f3e64a9655c6f93e47e4
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7899615
Commit-Queue: Stephen Chenney <schenney@chromium.org>
Reviewed-by: Philip Rogers <pdr@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1664517}

@wpt-pr-bot wpt-pr-bot 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.

The review process for this patch is being conducted in the Chromium project.

@chromium-wpt-export-bot
chromium-wpt-export-bot merged commit 466ab94 into master Jul 20, 2026
28 checks passed
@chromium-wpt-export-bot
chromium-wpt-export-bot deleted the chromium-export-cl-7899615 branch July 20, 2026 07:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants