Bug 1806167 - Always append the access key in uppercase. r=jfkthame,layout-reviewers

Make accesskey reftest use modern box layout to test this code path.

Differential Revision: https://phabricator.services.mozilla.com/D164942
This commit is contained in:
Emilio Cobos Álvarez
2022-12-29 16:58:15 +00:00
parent 6ee9fd4c2f
commit 3d1b67f2d8
3 changed files with 4 additions and 1 deletions

View File

@@ -1623,6 +1623,8 @@ void nsCSSFrameConstructor::CreateGeneratedContent(
aOriginatingElement.GetAttr(nsGkAtoms::value, value);
auto AppendAccessKeyLabel = [&] {
// Always append accesskey text in uppercase, see bug 1806167.
ToUpperCase(accesskey);
nsAutoString accessKeyLabel = u"("_ns + accesskey + u")"_ns;
if (!StringEndsWith(value, accessKeyLabel)) {
if (nsTextBoxFrame::InsertSeparatorBeforeAccessKey() &&