summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Poucet <poucet@google.com>2022-09-28 15:38:33 +0200
committerChris Poucet <poucet@google.com>2022-09-28 15:38:33 +0200
commit84f2a15e6db22a8d0b764b857643fe0a606df88c (patch)
tree93676dd67db584365cf64cc8b6f70b113a5d9847
parent9c4f925e498d39b83e64b626967df8a2ee8bb6e8 (diff)
Use HTMLPatched for all html stanzas leading down to files.
Change 343814 introduced a patched version of Lit's html operator to work around the fact that Chrome does not actually return the same strings-array for the same template as it should. This is getting fixed upstream in Chrome, but in the interim, leverage the HTMLPatched operator for all html calls down to the gr-diff-host to avoid that it gets recreated. Release-Notes: skip Google-Bug-Id: b/235808180 Change-Id: I2e9fef04e20374218a96b8b51976ac322c74dff5
-rw-r--r--polygerrit-ui/app/elements/change/gr-file-list/gr-file-list.ts6
1 files changed, 3 insertions, 3 deletions
diff --git a/polygerrit-ui/app/elements/change/gr-file-list/gr-file-list.ts b/polygerrit-ui/app/elements/change/gr-file-list/gr-file-list.ts
index 731f227b2c..a0e4c89d6d 100644
--- a/polygerrit-ui/app/elements/change/gr-file-list/gr-file-list.ts
+++ b/polygerrit-ui/app/elements/change/gr-file-list/gr-file-list.ts
@@ -882,7 +882,7 @@ export class GrFileList extends LitElement {
override render() {
this.classList.toggle('editMode', this.editMode);
const patchChange = this.calculatePatchChange();
- return html`
+ return this.patched.html`
<h3 class="assistive-tech-only">File list</h3>
${this.renderContainer()} ${this.renderChangeTotals(patchChange)}
${this.renderBinaryTotals(patchChange)} ${this.renderControlRow()}
@@ -895,7 +895,7 @@ export class GrFileList extends LitElement {
}
private renderContainer() {
- return html`
+ return this.patched.html`
<div
id="container"
@click=${(e: MouseEvent) => this.handleFileListClick(e)}
@@ -1013,7 +1013,7 @@ export class GrFileList extends LitElement {
this.reportRenderedRow(index);
const previousFileName = this.shownFiles[index - 1]?.__path;
const patchSetFile = this.computePatchSetFile(file);
- return html` <div class="stickyArea">
+ return this.patched.html` <div class="stickyArea">
<div
class=${`file-row row ${this.computePathClass(file.__path)}`}
data-file=${JSON.stringify(patchSetFile)}