Change information
Commit message:
[M147] Fix DevTools Edit HTML not upgrading custom elements with scoped registry
Original change's description:
> Fix DevTools Edit HTML not upgrading custom elements with scoped registry
>
> DOMPatchSupport::PatchNode() was passing nullptr as the
> CustomElementRegistry to ParseHTML() when handling DOM.setOuterHTML CDP
> as part of the DevTools Edit HTML functionality. With the Scoped Custom
> Element Registry now enabled, nullptr registry causes the parser to skip
> custom element definition lookups entirely, resulting in elements not
> being recognized or upgraded as custom elements. The fix is to ensure
> the parser has the correct registry instead of nullptr.
>
> This matches the behavior of the JavaScript outerHTML and innerHTML
> setters, which already correctly pass the element's custom element
> registry.
>
> Bug: 495837545
> Change-Id: If1f3d53aa8b801e6170b7a160bcaa29f89937959
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7723658
> Reviewed-by: Philip Pfaffe <pfa...@chromium.org>
> Reviewed-by: Alex Rudenko <alexr...@chromium.org>
> Commit-Queue: Alex Rudenko <alexr...@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#1612028}
(cherry picked from commit b2beaee3ab663a19e7b54506fcdddfcff9efdf84)
Bug: 501425222,495837545
Change-Id: If1f3d53aa8b801e6170b7a160bcaa29f89937959
Cr-Commit-Position: refs/branch-heads/7727@{#2830}
Cr-Branched-From: ce01102937348db7b88c8a4257ee4b3ac702eb1a-refs/heads/main@{#1596535}
Files:
- M third_party/blink/renderer/core/inspector/dom_patch_support.cc
- A third_party/blink/web_tests/inspector-protocol/dom/dom-setOuterHTML-scoped-registry-expected.txt
- A third_party/blink/web_tests/inspector-protocol/dom/dom-setOuterHTML-scoped-registry.js
Change size: M
Delta: 3 files changed, 96 insertions(+), 3 deletions(-)
Branch: refs/branch-heads/7727