Add Custom Element adorner to custom elements in Elements tree [devtools/devtools-frontend : main]

0 views
Skip to first unread message

Kateryna Prokopenko (Gerrit)

unread,
Jul 3, 2026, 3:01:49 AM (yesterday) Jul 3
to Nicholas Roscino, devtools-fro...@luci-project-accounts.iam.gserviceaccount.com, devtools-rev...@chromium.org
Attention needed from Nicholas Roscino

Kateryna Prokopenko voted and added 1 comment

Votes added by Kateryna Prokopenko

Auto-Submit+1

1 comment

Patchset-level comments
File-level comment, Patchset 3 (Latest):
Kateryna Prokopenko . resolved

Hi Nicholas, could you please take a look?:)

Open in Gerrit

Related details

Attention is currently required from:
  • Nicholas Roscino
Submit Requirements:
  • requirement satisfiedCode-Owners
  • requirement is not satisfiedCode-Review
  • requirement is not satisfiedReview-Enforcement
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: devtools/devtools-frontend
Gerrit-Branch: main
Gerrit-Change-Id: Ia65961c6ed85853852dba500ac8c90dbbe805bb2
Gerrit-Change-Number: 8035204
Gerrit-PatchSet: 3
Gerrit-Owner: Kateryna Prokopenko <kprok...@chromium.org>
Gerrit-Reviewer: Kateryna Prokopenko <kprok...@chromium.org>
Gerrit-Reviewer: Nicholas Roscino <nros...@chromium.org>
Gerrit-Attention: Nicholas Roscino <nros...@chromium.org>
Gerrit-Comment-Date: Fri, 03 Jul 2026 07:01:45 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
satisfied_requirement
unsatisfied_requirement
open
diffy

Nicholas Roscino (Gerrit)

unread,
Jul 3, 2026, 4:36:09 AM (yesterday) Jul 3
to Kateryna Prokopenko, devtools-fro...@luci-project-accounts.iam.gserviceaccount.com, devtools-rev...@chromium.org
Attention needed from Kateryna Prokopenko

Nicholas Roscino added 4 comments

Patchset-level comments
Nicholas Roscino . resolved

Hey Kateryna! I added a couple of comments!

File front_end/core/sdk/DOMModel.ts
Line 1018, Patchset 3 (Latest): if (this.nodeType() !== Node.ELEMENT_NODE) {
Nicholas Roscino . unresolved

I did a little bit of experimenting here while reviewing and in case of an svg tag like `<font-face-src>` this check will not be enough to prevent it being marked as a custom element. Let me know if I am missing something!

File front_end/panels/elements/ElementsTreeElement.test.ts
Line 1182, Patchset 3 (Latest): it('custom-element adorner click reveals definition in sources', () => {
Nicholas Roscino . unresolved

The definition of the test mentions a click action, but the test itself is not checking any click behaviors. Since adding the additional assertion here might complicate the test with stubs maybe we can check this as an e2e test. I don't have a strong opinion on this tho. WDYT?

File front_end/panels/elements/ElementsTreeElement.ts
Line 1357, Patchset 3 (Latest): DEFAULT_VIEW({
Nicholas Roscino . unresolved

NIT: Is the reformat intended here?

Open in Gerrit

Related details

Attention is currently required from:
  • Kateryna Prokopenko
Submit Requirements:
    • requirement satisfiedCode-Owners
    • requirement is not satisfiedCode-Review
    • requirement is not satisfiedNo-Unresolved-Comments
    • requirement is not satisfiedReview-Enforcement
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: comment
    Gerrit-Project: devtools/devtools-frontend
    Gerrit-Branch: main
    Gerrit-Change-Id: Ia65961c6ed85853852dba500ac8c90dbbe805bb2
    Gerrit-Change-Number: 8035204
    Gerrit-PatchSet: 3
    Gerrit-Owner: Kateryna Prokopenko <kprok...@chromium.org>
    Gerrit-Reviewer: Kateryna Prokopenko <kprok...@chromium.org>
    Gerrit-Reviewer: Nicholas Roscino <nros...@chromium.org>
    Gerrit-Attention: Kateryna Prokopenko <kprok...@chromium.org>
    Gerrit-Comment-Date: Fri, 03 Jul 2026 08:36:05 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Kateryna Prokopenko (Gerrit)

    unread,
    Jul 3, 2026, 9:32:45 AM (yesterday) Jul 3
    to Nicholas Roscino, devtools-fro...@luci-project-accounts.iam.gserviceaccount.com, devtools-rev...@chromium.org
    Attention needed from Nicholas Roscino

    Kateryna Prokopenko voted and added 4 comments

    Votes added by Kateryna Prokopenko

    Auto-Submit+1
    Commit-Queue+1

    4 comments

    Patchset-level comments
    File-level comment, Patchset 5 (Latest):
    Kateryna Prokopenko . resolved

    Hey Nicho, please take another look?

    File front_end/core/sdk/DOMModel.ts
    Line 1018, Patchset 3: if (this.nodeType() !== Node.ELEMENT_NODE) {
    Nicholas Roscino . unresolved

    I did a little bit of experimenting here while reviewing and in case of an svg tag like `<font-face-src>` this check will not be enough to prevent it being marked as a custom element. Let me know if I am missing something!

    Kateryna Prokopenko

    I've looked into it some more, it seems we can check against the list of exceptions that is not supposed to change according to the spec
    https://html.spec.whatwg.org/multipage/custom-elements.html#custom-elements-core-concepts

    File front_end/panels/elements/ElementsTreeElement.test.ts
    Line 1182, Patchset 3: it('custom-element adorner click reveals definition in sources', () => {
    Nicholas Roscino . resolved

    The definition of the test mentions a click action, but the test itself is not checking any click behaviors. Since adding the additional assertion here might complicate the test with stubs maybe we can check this as an e2e test. I don't have a strong opinion on this tho. WDYT?

    Kateryna Prokopenko

    Done

    File front_end/panels/elements/ElementsTreeElement.ts
    Line 1357, Patchset 3: DEFAULT_VIEW({
    Nicholas Roscino . unresolved

    NIT: Is the reformat intended here?

    Kateryna Prokopenko

    That's presubmit's fault, has to upload with --bypass-hooks now to avoid the formatting, let's see if the dry run passes like this. If not, I guess we'll have to keep the formatting changes too

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Nicholas Roscino
    Submit Requirements:
    • requirement satisfiedCode-Owners
    • requirement is not satisfiedCode-Review
    • requirement is not satisfiedNo-Unresolved-Comments
    • requirement is not satisfiedReview-Enforcement
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: comment
    Gerrit-Project: devtools/devtools-frontend
    Gerrit-Branch: main
    Gerrit-Change-Id: Ia65961c6ed85853852dba500ac8c90dbbe805bb2
    Gerrit-Change-Number: 8035204
    Gerrit-PatchSet: 5
    Gerrit-Owner: Kateryna Prokopenko <kprok...@chromium.org>
    Gerrit-Reviewer: Kateryna Prokopenko <kprok...@chromium.org>
    Gerrit-Reviewer: Nicholas Roscino <nros...@chromium.org>
    Gerrit-Attention: Nicholas Roscino <nros...@chromium.org>
    Gerrit-Comment-Date: Fri, 03 Jul 2026 13:32:42 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: Yes
    Comment-In-Reply-To: Nicholas Roscino <nros...@chromium.org>
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Kateryna Prokopenko (Gerrit)

    unread,
    Jul 3, 2026, 9:51:34 AM (yesterday) Jul 3
    to Nicholas Roscino, devtools-fro...@luci-project-accounts.iam.gserviceaccount.com, devtools-rev...@chromium.org
    Attention needed from Nicholas Roscino

    Kateryna Prokopenko voted and added 1 comment

    Votes added by Kateryna Prokopenko

    Auto-Submit+1

    1 comment

    File front_end/panels/elements/ElementsTreeElement.ts
    Line 1357, Patchset 3: DEFAULT_VIEW({
    Nicholas Roscino . unresolved

    NIT: Is the reformat intended here?

    Kateryna Prokopenko

    That's presubmit's fault, has to upload with --bypass-hooks now to avoid the formatting, let's see if the dry run passes like this. If not, I guess we'll have to keep the formatting changes too

    Kateryna Prokopenko

    Yeah, the formatting is something presubmit want to necessarily have and the tests fail without it

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Nicholas Roscino
    Submit Requirements:
    • requirement satisfiedCode-Owners
    • requirement is not satisfiedCode-Review
    • requirement is not satisfiedNo-Unresolved-Comments
    • requirement is not satisfiedReview-Enforcement
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: comment
    Gerrit-Project: devtools/devtools-frontend
    Gerrit-Branch: main
    Gerrit-Change-Id: Ia65961c6ed85853852dba500ac8c90dbbe805bb2
    Gerrit-Change-Number: 8035204
    Gerrit-PatchSet: 7
    Gerrit-Owner: Kateryna Prokopenko <kprok...@chromium.org>
    Gerrit-Reviewer: Kateryna Prokopenko <kprok...@chromium.org>
    Gerrit-Reviewer: Nicholas Roscino <nros...@chromium.org>
    Gerrit-Attention: Nicholas Roscino <nros...@chromium.org>
    Gerrit-Comment-Date: Fri, 03 Jul 2026 13:51:30 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: Yes
    Comment-In-Reply-To: Nicholas Roscino <nros...@chromium.org>
    Comment-In-Reply-To: Kateryna Prokopenko <kprok...@chromium.org>
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Nicholas Roscino (Gerrit)

    unread,
    Jul 3, 2026, 10:08:42 AM (yesterday) Jul 3
    to Kateryna Prokopenko, devtools-fro...@luci-project-accounts.iam.gserviceaccount.com, devtools-rev...@chromium.org
    Attention needed from Kateryna Prokopenko

    Nicholas Roscino added 4 comments

    Patchset-level comments
    File-level comment, Patchset 7 (Latest):
    Nicholas Roscino . resolved

    Thank you Kateryna. I added another couple of minor comments, LMKWYT! :)

    File front_end/core/sdk/DOMModel.ts
    Line 1018, Patchset 3: if (this.nodeType() !== Node.ELEMENT_NODE) {
    Nicholas Roscino . unresolved

    I did a little bit of experimenting here while reviewing and in case of an svg tag like `<font-face-src>` this check will not be enough to prevent it being marked as a custom element. Let me know if I am missing something!

    Kateryna Prokopenko

    I've looked into it some more, it seems we can check against the list of exceptions that is not supposed to change according to the spec
    https://html.spec.whatwg.org/multipage/custom-elements.html#custom-elements-core-concepts

    Nicholas Roscino

    Sounds good! I think we should also exclude all the XML nodes completely so that we avoid any custom xml tag to be captured as custom element.

    File front_end/panels/elements/ElementsTreeElement.ts
    Line 1357, Patchset 3: DEFAULT_VIEW({
    Nicholas Roscino . resolved

    NIT: Is the reformat intended here?

    Kateryna Prokopenko

    That's presubmit's fault, has to upload with --bypass-hooks now to avoid the formatting, let's see if the dry run passes like this. If not, I guess we'll have to keep the formatting changes too

    Nicholas Roscino

    Ok! no problem, wanted just to make sure if it was a previous wrong formatting fixed or something automatic change

    Line 3267, Patchset 6: constructorObject.release();
    Nicholas Roscino . unresolved

    I might have overlook something but I think that in case of any error that doesn't allow us to reach this point we are creating a memory leak. We should release the object in any case. Since we are in an async function we could use `try {} finally {}` WDYT? If I am missing something let me know!

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Kateryna Prokopenko
    Submit Requirements:
    • requirement satisfiedCode-Owners
    • requirement is not satisfiedCode-Review
    • requirement is not satisfiedNo-Unresolved-Comments
    • requirement is not satisfiedReview-Enforcement
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: comment
    Gerrit-Project: devtools/devtools-frontend
    Gerrit-Branch: main
    Gerrit-Change-Id: Ia65961c6ed85853852dba500ac8c90dbbe805bb2
    Gerrit-Change-Number: 8035204
    Gerrit-PatchSet: 7
    Gerrit-Owner: Kateryna Prokopenko <kprok...@chromium.org>
    Gerrit-Reviewer: Kateryna Prokopenko <kprok...@chromium.org>
    Gerrit-Reviewer: Nicholas Roscino <nros...@chromium.org>
    Gerrit-Attention: Kateryna Prokopenko <kprok...@chromium.org>
    Gerrit-Comment-Date: Fri, 03 Jul 2026 14:08:37 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy
    Reply all
    Reply to author
    Forward
    0 new messages