[ntp-realbox] Adding animated caret [chromium/src : main]

3 views
Skip to first unread message

Roman Arora (Gerrit)

unread,
Feb 18, 2026, 5:56:06 PM (9 days ago) Feb 18
to Omar Flores, Marlon Facey, Chromium LUCI CQ, chromium...@chromium.org, oshima...@chromium.org
Attention needed from Marlon Facey and Omar Flores

Roman Arora added 3 comments

Patchset-level comments
File-level comment, Patchset 7 (Latest):
Roman Arora . unresolved

Optional: I wonder if we could have the caret animation be something that is managed by its own class, like the way we do the placeholder animation, makes it maybe easier to reduce/test in isolation and reusable.

File ui/webui/resources/cr_components/composebox/composebox.ts
Line 1078, Patchset 7 (Latest): emptySpan.textContent = '\u200b';
Roman Arora . unresolved

nit: this string should probably be a constant at the file level.

Line 1153, Patchset 7 (Latest): const originX = 12;
Roman Arora . unresolved

nit: add explanation for the purpose/reason/origin of these numbers, maybe a constant too.

Open in Gerrit

Related details

Attention is currently required from:
  • Marlon Facey
  • Omar Flores
Submit Requirements:
  • requirement satisfiedCode-Coverage
  • requirement is not 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: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: I2359ec39f6897da2ce04c60f4a1389106752a2d4
Gerrit-Change-Number: 7590674
Gerrit-PatchSet: 7
Gerrit-Owner: Omar Flores <omarf...@google.com>
Gerrit-Reviewer: Marlon Facey <mfa...@chromium.org>
Gerrit-Reviewer: Omar Flores <omarf...@google.com>
Gerrit-Reviewer: Roman Arora <roman...@chromium.org>
Gerrit-CC: Moe Ahmadi <mah...@chromium.org>
Gerrit-Attention: Omar Flores <omarf...@google.com>
Gerrit-Attention: Marlon Facey <mfa...@chromium.org>
Gerrit-Comment-Date: Wed, 18 Feb 2026 22:55:57 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
satisfied_requirement
unsatisfied_requirement
open
diffy

Omar Flores (Gerrit)

unread,
Feb 18, 2026, 7:01:40 PM (9 days ago) Feb 18
to Marlon Facey, Roman Arora, Chromium LUCI CQ, chromium...@chromium.org, oshima...@chromium.org
Attention needed from Marlon Facey and Roman Arora

Omar Flores added 1 comment

Patchset-level comments
Roman Arora . unresolved

Optional: I wonder if we could have the caret animation be something that is managed by its own class, like the way we do the placeholder animation, makes it maybe easier to reduce/test in isolation and reusable.

Omar Flores

I don't know how much complexity would be involved in this but perhaps can be added as a follow up past resolving this blocker

Open in Gerrit

Related details

Attention is currently required from:
  • Marlon Facey
  • Roman Arora
Submit Requirements:
  • requirement satisfiedCode-Coverage
  • requirement is not 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: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: I2359ec39f6897da2ce04c60f4a1389106752a2d4
Gerrit-Change-Number: 7590674
Gerrit-PatchSet: 7
Gerrit-Owner: Omar Flores <omarf...@google.com>
Gerrit-Reviewer: Marlon Facey <mfa...@chromium.org>
Gerrit-Reviewer: Omar Flores <omarf...@google.com>
Gerrit-Reviewer: Roman Arora <roman...@chromium.org>
Gerrit-CC: Moe Ahmadi <mah...@chromium.org>
Gerrit-Attention: Roman Arora <roman...@chromium.org>
Gerrit-Attention: Marlon Facey <mfa...@chromium.org>
Gerrit-Comment-Date: Thu, 19 Feb 2026 00:01:31 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Roman Arora <roman...@chromium.org>
satisfied_requirement
unsatisfied_requirement
open
diffy

Marlon Facey (Gerrit)

unread,
Feb 19, 2026, 11:02:39 AM (9 days ago) Feb 19
to Omar Flores, Roman Arora, Chromium LUCI CQ, chromium...@chromium.org, oshima...@chromium.org
Attention needed from Omar Flores and Roman Arora

Marlon Facey added 12 comments

Patchset-level comments
Marlon Facey . resolved

LGTM. Just a few comments on simplification.

File ui/webui/resources/cr_components/composebox/composebox.css
Line 235, Patchset 7 (Latest): grid-template-areas: 'stack';
Marlon Facey . unresolved

I don't mind this but it does seem like it does the same thing that smart compose is accomplishing with position: absolute down in line 273. Would it be simpler to just share those styles too? In fact, it looks like the mirror div already does have those styles. Is this necessary?

Line 238, Patchset 7 (Latest):#mirror {
Marlon Facey . unresolved

Seems like a lot of these styles are shared with the other two input boxes that should be fairly similar. Could we not share the styles with them? Also are all of these styles needed? Seems like at least some of these font styles seem excessive.

File ui/webui/resources/cr_components/composebox/composebox.html.ts
Line 70, Patchset 7 (Latest): <div id="caret"></div>
Marlon Facey . unresolved

Could we move this below the mirror element inside the same conditional?

File ui/webui/resources/cr_components/composebox/composebox.ts
Line 1061, Patchset 7 (Latest):
private updateMirror_() {
if (this.disableCaretColorAnimation) {
return;
}

const mirror = this.$.mirror;
if (!mirror) {
return;
}

mirror.textContent = '';

const chars = this.input_.split('');

if (chars.length === 0) {
const emptySpan = document.createElement('span');
emptySpan.textContent = '\u200b';
mirror.appendChild(emptySpan);
return;
}

chars.forEach(char => {
const span = document.createElement('span');
if (char === ' ') {
span.textContent = ' ';
} else if (char === '\n') {
span.textContent = '\n\u200b';
} else {
span.textContent = char;
}
mirror.appendChild(span);
});

if (chars.length === 0) {
mirror.textContent = '\u200b';
}
}
Marlon Facey . unresolved

I wonder if instead of manually adding the input to this div every time we can just set the content to this.input_ like we do in the smart compose div. That would make this function not necessary right?

Line 1113, Patchset 7 (Latest): if (mirror.innerText.length !== input.value.length) {
this.updateMirror_();
}
Marlon Facey . unresolved

Would this ever happen?

Line 1117, Patchset 7 (Latest): caret.classList.remove('animating');
void caret.offsetHeight;
caret.classList.add('animating');
Marlon Facey . unresolved

I assume this just forces a rerender but is this necessary?

Line 1125, Patchset 7 (Latest): const firstSpan = mirror.firstChild as HTMLElement;
Marlon Facey . unresolved

nit: Can we name this something more descriptive?

Line 1127, Patchset 7 (Latest): if (firstSpan && typeof firstSpan.getBoundingClientRect === 'function') {
Marlon Facey . unresolved

Wouldn't this always be true? Doesn't every HTML element have a boundingClientRect?

Line 1142, Patchset 7 (Latest): if (charBeforeCursor && charBeforeCursor.getBoundingClientRect) {
Marlon Facey . unresolved

Ditto here. Shouldn't this always exist if charBeforeCursor exists?

Roman Arora . unresolved

nit: add explanation for the purpose/reason/origin of these numbers, maybe a constant too.

Marlon Facey

+1

Line 1181, Patchset 7 (Latest): this.$.caret.classList.remove('caret-visible');
Marlon Facey . unresolved

I'm a little surprised that this isn't handled by blurring the input. Can we double check if this is necessary?

Open in Gerrit

Related details

Attention is currently required from:
  • Omar Flores
  • Roman Arora
Submit Requirements:
  • requirement satisfiedCode-Coverage
  • requirement is not 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: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: I2359ec39f6897da2ce04c60f4a1389106752a2d4
Gerrit-Change-Number: 7590674
Gerrit-PatchSet: 7
Gerrit-Owner: Omar Flores <omarf...@google.com>
Gerrit-Reviewer: Marlon Facey <mfa...@chromium.org>
Gerrit-Reviewer: Omar Flores <omarf...@google.com>
Gerrit-Reviewer: Roman Arora <roman...@chromium.org>
Gerrit-CC: Moe Ahmadi <mah...@chromium.org>
Gerrit-Attention: Omar Flores <omarf...@google.com>
Gerrit-Attention: Roman Arora <roman...@chromium.org>
Gerrit-Comment-Date: Thu, 19 Feb 2026 16:02:32 +0000
satisfied_requirement
unsatisfied_requirement
open
diffy

Marlon Facey (Gerrit)

unread,
Feb 19, 2026, 11:29:20 AM (9 days ago) Feb 19
to Omar Flores, Roman Arora, Chromium LUCI CQ, chromium...@chromium.org, oshima...@chromium.org
Attention needed from Omar Flores and Roman Arora

Marlon Facey added 1 comment

Patchset-level comments
Roman Arora . unresolved

Optional: I wonder if we could have the caret animation be something that is managed by its own class, like the way we do the placeholder animation, makes it maybe easier to reduce/test in isolation and reusable.

Omar Flores

I don't know how much complexity would be involved in this but perhaps can be added as a follow up past resolving this blocker

Marlon Facey

I think this is fine to do in a follow up. FWIW, I think it should be fairly simple since the caret component should really only need to know about the input.

Gerrit-Comment-Date: Thu, 19 Feb 2026 16:29:15 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Omar Flores <omarf...@google.com>
Comment-In-Reply-To: Roman Arora <roman...@chromium.org>
satisfied_requirement
unsatisfied_requirement
open
diffy

Moe Ahmadi (Gerrit)

unread,
Feb 22, 2026, 11:23:58 AM (6 days ago) Feb 22
to Omar Flores, Jonathan Ross, Marlon Facey, Roman Arora, Chromium LUCI CQ, chromium...@chromium.org, oshima...@chromium.org
Attention needed from Omar Flores and Roman Arora

Moe Ahmadi added 1 comment

Patchset-level comments
Moe Ahmadi . unresolved

Thank you Omar! to make sure we don't reintroduce the graphics smoothness regressions documented and mitigated in http://shortn/_vC8AOXjab6, let's make sure @jon...@chromium.org signs off on this change. a few gotchas comes to mind.

  • iiuc getBoundingClientRect() forces a synchronous layout, if called repeatedly inside the input handler or animation frame, it could lead to dropped frames.
  • I would benefit from a half-pagers description of how this trick is done, but iiuc the general idea is syncing the text to a hidden div. we should be mindful that every keystroke doesn't trigger a double-layout, one for the input, and one for the mirror.
  • Ideally, animations should be offloaded to the compositor thread. Jonathan is best positioned to guide how to ensure that and which animations are compositor friendly or not (some information on that in the doc).
  • making sure the caret component is hidden and/or its animation removed on blur. otherwise a WebUI like OB which is always present in the bg will continuously animate.
  • general code complexity and maintenance, I'm particularly keen on minimizing the number of hidden/mirror divs we have for this solution and things like smart compose which iiuc uses a similar trick. I don't know if Search source of truth does a good job of managing complexity. It would be good to check in with Search FE Eng and philipbell@ to have consistent and manageable codes.
  • Perhaps Jonathan can also help guide how to use the DevTools Performance panel to see the impact of this change.
Open in Gerrit

Related details

Attention is currently required from:
  • Omar Flores
  • Roman Arora
Submit Requirements:
  • requirement satisfiedCode-Coverage
  • requirement is not 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: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: I2359ec39f6897da2ce04c60f4a1389106752a2d4
Gerrit-Change-Number: 7590674
Gerrit-PatchSet: 7
Gerrit-Owner: Omar Flores <omarf...@google.com>
Gerrit-Reviewer: Marlon Facey <mfa...@chromium.org>
Gerrit-Reviewer: Omar Flores <omarf...@google.com>
Gerrit-Reviewer: Roman Arora <roman...@chromium.org>
Gerrit-CC: Jonathan Ross <jon...@chromium.org>
Gerrit-CC: Moe Ahmadi <mah...@chromium.org>
Gerrit-Attention: Omar Flores <omarf...@google.com>
Gerrit-Attention: Roman Arora <roman...@chromium.org>
Gerrit-Comment-Date: Sun, 22 Feb 2026 16:23:51 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
satisfied_requirement
unsatisfied_requirement
open
diffy

Omar Flores (Gerrit)

unread,
Feb 26, 2026, 12:10:33 PM (2 days ago) Feb 26
to Sophie Chang, AyeAye, Roman Arora, Code Review Nudger, Jonathan Ross, Marlon Facey, Chromium LUCI CQ, chromium...@chromium.org, jdonnel...@chromium.org, omnibox-...@chromium.org, oshima...@chromium.org
Attention needed from Marlon Facey and Roman Arora

Omar Flores added 4 comments

File ui/webui/resources/cr_components/composebox/composebox.html.ts
Line 70, Patchset 7: <div id="caret"></div>
Marlon Facey . resolved

Could we move this below the mirror element inside the same conditional?

Omar Flores

moved above

File ui/webui/resources/cr_components/composebox/composebox.ts
Line 1078, Patchset 7: emptySpan.textContent = '\u200b';
Roman Arora . resolved

nit: this string should probably be a constant at the file level.

Omar Flores

Done

Line 1153, Patchset 7: const originX = 12;
Roman Arora . resolved

nit: add explanation for the purpose/reason/origin of these numbers, maybe a constant too.

Marlon Facey

+1

Omar Flores

Added explanation above these, its to match the padding spacing from the bounding box

Line 1181, Patchset 7: this.$.caret.classList.remove('caret-visible');
Marlon Facey . resolved

I'm a little surprised that this isn't handled by blurring the input. Can we double check if this is necessary?

Omar Flores

this is right, I think I was being overly cautious about this case, it's not needed after testing

Open in Gerrit

Related details

Attention is currently required from:
  • Marlon Facey
  • Roman Arora
Submit Requirements:
  • requirement satisfiedCode-Coverage
  • requirement is not 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: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: I2359ec39f6897da2ce04c60f4a1389106752a2d4
Gerrit-Change-Number: 7590674
Gerrit-PatchSet: 8
Gerrit-Owner: Omar Flores <omarf...@google.com>
Gerrit-Reviewer: Marlon Facey <mfa...@chromium.org>
Gerrit-Reviewer: Omar Flores <omarf...@google.com>
Gerrit-CC: Code Review Nudger <android-build...@prod.google.com>
Gerrit-CC: Jonathan Ross <jon...@chromium.org>
Gerrit-CC: Moe Ahmadi <mah...@chromium.org>
Gerrit-CC: Roman Arora <roman...@chromium.org>
Gerrit-CC: Sophie Chang <sophi...@chromium.org>
Gerrit-Attention: Roman Arora <roman...@chromium.org>
Gerrit-Attention: Marlon Facey <mfa...@chromium.org>
Gerrit-Comment-Date: Thu, 26 Feb 2026 17:10:27 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Roman Arora <roman...@chromium.org>
Comment-In-Reply-To: Marlon Facey <mfa...@chromium.org>
satisfied_requirement
unsatisfied_requirement
open
diffy

Omar Flores (Gerrit)

unread,
Feb 26, 2026, 2:41:16 PM (2 days ago) Feb 26
to Sophie Chang, AyeAye, Roman Arora, Code Review Nudger, Jonathan Ross, Marlon Facey, Chromium LUCI CQ, chromium...@chromium.org, jdonnel...@chromium.org, omnibox-...@chromium.org, oshima...@chromium.org
Attention needed from Marlon Facey and Roman Arora

Omar Flores added 5 comments

File ui/webui/resources/cr_components/composebox/composebox.ts
Line 1113, Patchset 7: if (mirror.innerText.length !== input.value.length) {
this.updateMirror_();
}
Marlon Facey . resolved

Would this ever happen?

Omar Flores

This is needed when the mirror itself changes with values that can be prepopulated with suggestions, which can happen, without this the caret itself won't move unless text is directly typed in the input

Line 1117, Patchset 7: caret.classList.remove('animating');
void caret.offsetHeight;
caret.classList.add('animating');
Marlon Facey . resolved

I assume this just forces a rerender but is this necessary?

Omar Flores

We do need this as the caret color needs to be reset + the blinking animations need to restart whenever there's new input

Line 1125, Patchset 7: const firstSpan = mirror.firstChild as HTMLElement;
Marlon Facey . resolved

nit: Can we name this something more descriptive?

Omar Flores

Done

Line 1127, Patchset 7: if (firstSpan && typeof firstSpan.getBoundingClientRect === 'function') {
Marlon Facey . resolved

Wouldn't this always be true? Doesn't every HTML element have a boundingClientRect?

Omar Flores

Done

Line 1142, Patchset 7: if (charBeforeCursor && charBeforeCursor.getBoundingClientRect) {
Marlon Facey . resolved

Ditto here. Shouldn't this always exist if charBeforeCursor exists?

Omar Flores

Done

Open in Gerrit

Related details

Attention is currently required from:
  • Marlon Facey
  • Roman Arora
Submit Requirements:
  • requirement satisfiedCode-Coverage
  • requirement is not 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: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: I2359ec39f6897da2ce04c60f4a1389106752a2d4
Gerrit-Change-Number: 7590674
Gerrit-PatchSet: 10
Gerrit-Owner: Omar Flores <omarf...@google.com>
Gerrit-Reviewer: Marlon Facey <mfa...@chromium.org>
Gerrit-Reviewer: Omar Flores <omarf...@google.com>
Gerrit-CC: Code Review Nudger <android-build...@prod.google.com>
Gerrit-CC: Jonathan Ross <jon...@chromium.org>
Gerrit-CC: Moe Ahmadi <mah...@chromium.org>
Gerrit-CC: Roman Arora <roman...@chromium.org>
Gerrit-CC: Sophie Chang <sophi...@chromium.org>
Gerrit-Attention: Roman Arora <roman...@chromium.org>
Gerrit-Attention: Marlon Facey <mfa...@chromium.org>
Gerrit-Comment-Date: Thu, 26 Feb 2026 19:41:11 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Marlon Facey <mfa...@chromium.org>
satisfied_requirement
unsatisfied_requirement
open
diffy

Omar Flores (Gerrit)

unread,
Feb 26, 2026, 5:13:41 PM (2 days ago) Feb 26
to Sophie Chang, AyeAye, Roman Arora, Code Review Nudger, Jonathan Ross, Marlon Facey, Chromium LUCI CQ, chromium...@chromium.org, jdonnel...@chromium.org, omnibox-...@chromium.org, oshima...@chromium.org
Attention needed from Marlon Facey and Roman Arora

Omar Flores added 1 comment

File ui/webui/resources/cr_components/composebox/composebox.ts
Marlon Facey . resolved

I wonder if instead of manually adding the input to this div every time we can just set the content to this.input_ like we do in the smart compose div. That would make this function not necessary right?

Omar Flores

this wouldn't really work for the mirror purposes because we need to figure out the exact x and y coordinates of all the letters placed in the input, if we were to use a single input this would make it almost impossible to figure out the y coordinates for multi line

Open in Gerrit

Related details

Attention is currently required from:
  • Marlon Facey
  • Roman Arora
Submit Requirements:
  • requirement satisfiedCode-Coverage
  • requirement is not 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: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: I2359ec39f6897da2ce04c60f4a1389106752a2d4
Gerrit-Change-Number: 7590674
Gerrit-PatchSet: 11
Gerrit-Owner: Omar Flores <omarf...@google.com>
Gerrit-Reviewer: Marlon Facey <mfa...@chromium.org>
Gerrit-Reviewer: Omar Flores <omarf...@google.com>
Gerrit-CC: Code Review Nudger <android-build...@prod.google.com>
Gerrit-CC: Jonathan Ross <jon...@chromium.org>
Gerrit-CC: Moe Ahmadi <mah...@chromium.org>
Gerrit-CC: Roman Arora <roman...@chromium.org>
Gerrit-CC: Sophie Chang <sophi...@chromium.org>
Gerrit-Attention: Roman Arora <roman...@chromium.org>
Gerrit-Attention: Marlon Facey <mfa...@chromium.org>
Gerrit-Comment-Date: Thu, 26 Feb 2026 22:13:34 +0000
satisfied_requirement
unsatisfied_requirement
open
diffy

Omar Flores (Gerrit)

unread,
Feb 26, 2026, 5:27:39 PM (2 days ago) Feb 26
to Sophie Chang, AyeAye, Roman Arora, Code Review Nudger, Jonathan Ross, Marlon Facey, Chromium LUCI CQ, chromium...@chromium.org, jdonnel...@chromium.org, omnibox-...@chromium.org, oshima...@chromium.org
Attention needed from Marlon Facey and Roman Arora

Omar Flores added 1 comment

File ui/webui/resources/cr_components/composebox/composebox.css
Line 235, Patchset 7: grid-template-areas: 'stack';
Marlon Facey . resolved

I don't mind this but it does seem like it does the same thing that smart compose is accomplishing with position: absolute down in line 273. Would it be simpler to just share those styles too? In fact, it looks like the mirror div already does have those styles. Is this necessary?

Omar Flores

we don't need this

Gerrit-Comment-Date: Thu, 26 Feb 2026 22:27:34 +0000
satisfied_requirement
unsatisfied_requirement
open
diffy

Omar Flores (Gerrit)

unread,
Feb 26, 2026, 5:34:59 PM (2 days ago) Feb 26
to Sophie Chang, AyeAye, Roman Arora, Code Review Nudger, Jonathan Ross, Marlon Facey, Chromium LUCI CQ, chromium...@chromium.org, jdonnel...@chromium.org, omnibox-...@chromium.org, oshima...@chromium.org
Attention needed from Marlon Facey and Roman Arora

Omar Flores added 2 comments

Patchset-level comments
File-level comment, Patchset 7:
Roman Arora . resolved

Optional: I wonder if we could have the caret animation be something that is managed by its own class, like the way we do the placeholder animation, makes it maybe easier to reduce/test in isolation and reusable.

Omar Flores

I don't know how much complexity would be involved in this but perhaps can be added as a follow up past resolving this blocker

Marlon Facey

I think this is fine to do in a follow up. FWIW, I think it should be fairly simple since the caret component should really only need to know about the input.

Omar Flores

Done

File ui/webui/resources/cr_components/composebox/composebox.css
Line 238, Patchset 7:#mirror {
Marlon Facey . resolved

Seems like a lot of these styles are shared with the other two input boxes that should be fairly similar. Could we not share the styles with them? Also are all of these styles needed? Seems like at least some of these font styles seem excessive.

Omar Flores

I've removed a few rules that are in deed overkill, however, and I've used Gemini to help me out here, we want to keep a few of the font rendering rules because the cursor could drift as there is more text in the input, and I'd rather play it safe here

Open in Gerrit

Related details

Attention is currently required from:
  • Marlon Facey
  • Roman Arora
Submit Requirements:
  • requirement satisfiedCode-Coverage
  • requirement is not 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: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: I2359ec39f6897da2ce04c60f4a1389106752a2d4
Gerrit-Change-Number: 7590674
Gerrit-PatchSet: 13
Gerrit-Owner: Omar Flores <omarf...@google.com>
Gerrit-Reviewer: Marlon Facey <mfa...@chromium.org>
Gerrit-Reviewer: Omar Flores <omarf...@google.com>
Gerrit-CC: Code Review Nudger <android-build...@prod.google.com>
Gerrit-CC: Jonathan Ross <jon...@chromium.org>
Gerrit-CC: Moe Ahmadi <mah...@chromium.org>
Gerrit-CC: Roman Arora <roman...@chromium.org>
Gerrit-CC: Sophie Chang <sophi...@chromium.org>
Gerrit-Attention: Roman Arora <roman...@chromium.org>
Gerrit-Attention: Marlon Facey <mfa...@chromium.org>
Gerrit-Comment-Date: Thu, 26 Feb 2026 22:34:54 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Omar Flores <omarf...@google.com>
satisfied_requirement
unsatisfied_requirement
open
diffy

Marlon Facey (Gerrit)

unread,
Feb 27, 2026, 10:32:50 AM (15 hours ago) Feb 27
to Omar Flores, Sophie Chang, AyeAye, Roman Arora, Code Review Nudger, Jonathan Ross, Chromium LUCI CQ, chromium...@chromium.org, jdonnel...@chromium.org, omnibox-...@chromium.org, oshima...@chromium.org
Attention needed from Omar Flores and Roman Arora

Marlon Facey added 2 comments

File ui/webui/resources/cr_components/composebox/composebox.css
Marlon Facey . unresolved

Seems like a lot of these styles are shared with the other two input boxes that should be fairly similar. Could we not share the styles with them? Also are all of these styles needed? Seems like at least some of these font styles seem excessive.

Omar Flores

I've removed a few rules that are in deed overkill, however, and I've used Gemini to help me out here, we want to keep a few of the font rendering rules because the cursor could drift as there is more text in the input, and I'd rather play it safe here

Marlon Facey

That makes sense that there are a few extra styles but we could at least have the div share the reused styles and then only specify the remaining styles that differ with a different selector.

File ui/webui/resources/cr_components/composebox/composebox.ts
Marlon Facey . unresolved

I wonder if instead of manually adding the input to this div every time we can just set the content to this.input_ like we do in the smart compose div. That would make this function not necessary right?

Omar Flores

this wouldn't really work for the mirror purposes because we need to figure out the exact x and y coordinates of all the letters placed in the input, if we were to use a single input this would make it almost impossible to figure out the y coordinates for multi line

Marlon Facey

I'm not sure how that would change the y coordinate for multiline. Shouldn't the caret always be positioned right after the characters. So if the characters, font stylings and padding etc. are the same, the caret should just be in the right position naturally right?

Open in Gerrit

Related details

Attention is currently required from:
  • Omar Flores
  • Roman Arora
Submit Requirements:
  • requirement satisfiedCode-Coverage
  • requirement is not 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: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: I2359ec39f6897da2ce04c60f4a1389106752a2d4
Gerrit-Change-Number: 7590674
Gerrit-PatchSet: 14
Gerrit-Owner: Omar Flores <omarf...@google.com>
Gerrit-Reviewer: Marlon Facey <mfa...@chromium.org>
Gerrit-Reviewer: Omar Flores <omarf...@google.com>
Gerrit-CC: Code Review Nudger <android-build...@prod.google.com>
Gerrit-CC: Jonathan Ross <jon...@chromium.org>
Gerrit-CC: Moe Ahmadi <mah...@chromium.org>
Gerrit-CC: Roman Arora <roman...@chromium.org>
Gerrit-CC: Sophie Chang <sophi...@chromium.org>
Gerrit-Attention: Omar Flores <omarf...@google.com>
Gerrit-Attention: Roman Arora <roman...@chromium.org>
Gerrit-Comment-Date: Fri, 27 Feb 2026 15:32:42 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Omar Flores <omarf...@google.com>
Comment-In-Reply-To: Marlon Facey <mfa...@chromium.org>
satisfied_requirement
unsatisfied_requirement
open
diffy

Roman Arora (Gerrit)

unread,
Feb 27, 2026, 10:38:24 AM (15 hours ago) Feb 27
to Omar Flores, John Lee, Tibor Goldschwendt, Sophie Chang, AyeAye, Code Review Nudger, Jonathan Ross, Marlon Facey, Chromium LUCI CQ, chromium...@chromium.org, jdonnel...@chromium.org, omnibox-...@chromium.org, oshima...@chromium.org
Attention needed from John Lee and Omar Flores

Roman Arora added 1 comment

Patchset-level comments
File-level comment, Patchset 14 (Latest):
Roman Arora . resolved

Looping in John who is a pro at webui / animations.

Open in Gerrit

Related details

Attention is currently required from:
  • John Lee
  • Omar Flores
Submit Requirements:
  • requirement satisfiedCode-Coverage
  • requirement is not 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: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: I2359ec39f6897da2ce04c60f4a1389106752a2d4
Gerrit-Change-Number: 7590674
Gerrit-PatchSet: 14
Gerrit-Owner: Omar Flores <omarf...@google.com>
Gerrit-Reviewer: John Lee <john...@chromium.org>
Gerrit-Reviewer: Marlon Facey <mfa...@chromium.org>
Gerrit-Reviewer: Omar Flores <omarf...@google.com>
Gerrit-CC: Code Review Nudger <android-build...@prod.google.com>
Gerrit-CC: Jonathan Ross <jon...@chromium.org>
Gerrit-CC: Moe Ahmadi <mah...@chromium.org>
Gerrit-CC: Roman Arora <roman...@chromium.org>
Gerrit-CC: Sophie Chang <sophi...@chromium.org>
Gerrit-CC: Tibor Goldschwendt <tib...@chromium.org>
Gerrit-Attention: Omar Flores <omarf...@google.com>
Gerrit-Attention: John Lee <john...@chromium.org>
Gerrit-Comment-Date: Fri, 27 Feb 2026 15:38:17 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
satisfied_requirement
unsatisfied_requirement
open
diffy

Philip Rogers (Gerrit)

unread,
Feb 27, 2026, 3:17:35 PM (11 hours ago) Feb 27
to Omar Flores, Robert Flack, John Lee, Tibor Goldschwendt, Sophie Chang, AyeAye, Roman Arora, Code Review Nudger, Jonathan Ross, Marlon Facey, Chromium LUCI CQ, chromium...@chromium.org, jdonnel...@chromium.org, omnibox-...@chromium.org, oshima...@chromium.org
Attention needed from John Lee and Omar Flores

Philip Rogers added 1 comment

File ui/webui/resources/cr_components/composebox/composebox.css
Line 318, Patchset 14 (Latest):@keyframes cycleColor {
Philip Rogers . unresolved
Have you considered using a step animation so the animation effectively runs at lower fps? For example:
```
.box {
width: 150px;
height: 150px;
/* 3s duration divided into 15 discrete steps = 5 frames per second */
animation: choppyColor 3s steps(15) infinite;
}
@keyframes choppyColor {
0% {
background-color: red;
}
50% {
background-color: green;
}
100% {
background-color: blue;
}
}
```

Please reach out to flackr@ to ask if this is a potential power savings.

Gerrit-CC: Philip Rogers <p...@chromium.org>
Gerrit-CC: Robert Flack <fla...@chromium.org>
Gerrit-CC: Roman Arora <roman...@chromium.org>
Gerrit-CC: Sophie Chang <sophi...@chromium.org>
Gerrit-CC: Tibor Goldschwendt <tib...@chromium.org>
Gerrit-Attention: Omar Flores <omarf...@google.com>
Gerrit-Attention: John Lee <john...@chromium.org>
Gerrit-Comment-Date: Fri, 27 Feb 2026 20:17:29 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
satisfied_requirement
unsatisfied_requirement
open
diffy

Omar Flores (Gerrit)

unread,
Feb 27, 2026, 10:26:07 PM (4 hours ago) Feb 27
to Robert Flack, Philip Rogers, John Lee, Tibor Goldschwendt, Sophie Chang, AyeAye, Roman Arora, Code Review Nudger, Jonathan Ross, Marlon Facey, Chromium LUCI CQ, chromium...@chromium.org, jdonnel...@chromium.org, omnibox-...@chromium.org, oshima...@chromium.org
Attention needed from John Lee and Marlon Facey

Omar Flores added 1 comment

File ui/webui/resources/cr_components/composebox/composebox.ts
Marlon Facey . resolved

I wonder if instead of manually adding the input to this div every time we can just set the content to this.input_ like we do in the smart compose div. That would make this function not necessary right?

Omar Flores

this wouldn't really work for the mirror purposes because we need to figure out the exact x and y coordinates of all the letters placed in the input, if we were to use a single input this would make it almost impossible to figure out the y coordinates for multi line

Marlon Facey

I'm not sure how that would change the y coordinate for multiline. Shouldn't the caret always be positioned right after the characters. So if the characters, font stylings and padding etc. are the same, the caret should just be in the right position naturally right?

Omar Flores

That might be case, however for the x position, I believe the bounding box, only calculates the x positions of the entire box, not where the last word is typed in a block, happy to explain offline

Open in Gerrit

Related details

Attention is currently required from:
  • John Lee
  • Marlon Facey
Gerrit-Attention: Marlon Facey <mfa...@chromium.org>
Gerrit-Attention: John Lee <john...@chromium.org>
Gerrit-Comment-Date: Sat, 28 Feb 2026 03:26:01 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
satisfied_requirement
unsatisfied_requirement
open
diffy

Omar Flores (Gerrit)

unread,
Feb 27, 2026, 11:07:27 PM (3 hours ago) Feb 27
to Robert Flack, Philip Rogers, John Lee, Tibor Goldschwendt, Sophie Chang, AyeAye, Roman Arora, Code Review Nudger, Jonathan Ross, Marlon Facey, Chromium LUCI CQ, chromium...@chromium.org, jdonnel...@chromium.org, omnibox-...@chromium.org, oshima...@chromium.org
Attention needed from John Lee, Marlon Facey and Philip Rogers

Omar Flores added 1 comment

File ui/webui/resources/cr_components/composebox/composebox.css
Line 318, Patchset 14:@keyframes cycleColor {
Philip Rogers . resolved
Have you considered using a step animation so the animation effectively runs at lower fps? For example:
```
.box {
width: 150px;
height: 150px;
/* 3s duration divided into 15 discrete steps = 5 frames per second */
animation: choppyColor 3s steps(15) infinite;
}
@keyframes choppyColor {
0% {
background-color: red;
}
50% {
background-color: green;
}
100% {
background-color: blue;
}
}
```

Please reach out to flackr@ to ask if this is a potential power savings.

Omar Flores

I've tried this change, and unfortunately this removes the sharp change between the colors that is required in the design

Open in Gerrit

Related details

Attention is currently required from:
  • John Lee
  • Marlon Facey
  • Philip Rogers
Gerrit-Attention: Philip Rogers <p...@chromium.org>
Gerrit-Attention: Marlon Facey <mfa...@chromium.org>
Gerrit-Attention: John Lee <john...@chromium.org>
Gerrit-Comment-Date: Sat, 28 Feb 2026 04:07:21 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Philip Rogers <p...@chromium.org>
satisfied_requirement
unsatisfied_requirement
open
diffy
Reply all
Reply to author
Forward
0 new messages