Automatic update from web-platform-tests
[html-in-canvas] Support nested html-in-canvas
Allow <canvas layoutsubtree> elements to contain other nested
<canvas layoutsubtree> elements, with proper `paint` event ordering,
placeholder recording, snapshot replacement, and origin-clean checks.
Key changes:
1. Compositing decisions: Assign CompositingReason::kCanvasChild to
direct children of nested layoutsubtree canvases.
2. Paint event ordering: Remove the IsInCanvasSubtree restriction in
LocalFrameView::DidPaintCanvasChild and RequestCanvasOnpaint. Sort
canvas_elements_needing_onpaint by DOM tree depth in descending
order so deeper canvases fire onpaint events first.
3. Placeholder recording: Record a CustomDataOp containing the nested
canvas's DOMNodeId as a placeholder in HTMLCanvasPainter.
4. cc::PaintRecord placeholder replacement: Add ReplaceCustomData to
PaintOpBuffer and PaintRecord to swap CustomDataOp placeholders
with replacement PaintRecords.
5. Snapshot resolution: Add GetCanvasSnapshotCallback to
PaintArtifactCompositor to retrieve unaccelerated snapshots for
nested canvases, and update GetCanvasChildPaintRecord to swap
placeholders with full snapshots.
Bug: 527969910
Change-Id: I65c56531a5e530bd31abbdc2db30fd3b46e6dead
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7964051
Reviewed-by: Stefan Zager <szager@chromium.org>
Commit-Queue: Philip Rogers <pdr@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1660605}
--
wpt-commits: 30e31f4c0f83f093c8d4ad878605a95942633632
wpt-pr: 61224