Skip to content

Commit

Permalink
[cr133][Devtools] custom implementation of lit/static-html was removed
Browse files Browse the repository at this point in the history
Chromium change:

https://source.chromium.org/chromium/_/chromium/devtools/devtools-frontend/+/8d94a72e2fad3764dd347ff6c755b5613caae03d

commit 8d94a72e2fad3764dd347ff6c755b5613caae03d (origin/chromium/6934)
Author: Benedikt Meurer <bmeurer@chromium.org>
Date:   Thu Jan 2 14:00:42 2025 +0100

    [cleanup] Remove our custom implementation of `lit/static-html`.

    When we were using `litTagName` heavily, we rolled our own custom
    implementation of `lit/static-html`, which was optimized for the
    common case in our codebase. With the removal of `litTagName` we
    are left with only one place in the codebase where we use, and in
    this particular code path our optimization is useless (and even
    costs us more), since the `litTagName` changes in every loop
    iteration.

    Use the upstream `lit/static-html` module instead and remove our
    custom logic. This makes all regular calls to `html` faster in
    DevTools, since we no longer preprocess the template string
    looking for potential static parts.

    Drive-by-fix: Fix the build for `front_end/third_party/lit`.

    Bug: 370734442
  • Loading branch information
mkarolin committed Jan 14, 2025
1 parent 002dcb3 commit bc3dfab
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ const coordinator = Coordinator.RenderCoordinator.RenderCoordinator.instance()

export class RequestAdblockView extends LegacyWrapper.LegacyWrapper
.WrappableComponent {
static readonly litTagName = LitHtml.literal`devtools-request-adblock-info`
static readonly litTagName = LitHtml.StaticHtml.literal`devtools-request-adblock-info`
readonly #shadow = this.attachShadow({ mode: 'open' })
readonly #request: SDK.NetworkRequest.NetworkRequest
#manager: SDK.NetworkManager.NetworkManager | null
Expand Down

0 comments on commit bc3dfab

Please sign in to comment.