Closed Bug 1791108 Opened 2 years ago Closed 2 years ago

Firefox Select List Font Metrics/Rendering Glitch (macOS)

Categories

(Core :: Layout: Text and Fonts, defect)

defect

Tracking

()

RESOLVED FIXED
107 Branch
Tracking Status
firefox-esr102 --- wontfix
firefox105 --- wontfix
firefox106 --- verified
firefox107 --- verified

People

(Reporter: dejanyy, Assigned: emilio)

References

(Regression)

Details

(Keywords: regression, testcase)

Attachments

(3 files)

User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:104.0) Gecko/20100101 Firefox/104.0

Steps to reproduce:

I created the following HTML page and opened it using Firefox 104.0.2 (64-bit) on macOS (Intel):

<!DOCTYPE html>
<html>
<head>
<title>Firefox Select List Font Metrics/Rendering Glitch (macOS)</title>
<style>
@import url('https://fonts.googleapis.com/css?family=Montserrat:400');
body, input, select { font-family: 'Montserrat', sans-serif; font-size: 18px; }
</style>
</head>
<body>

<h1>Firefox Select List Font Metrics/Rendering Glitch (macOS)</h1>

<h2>Instructions</h2>
<p>Click the Select List below and choose option C. Click the Select List again to expand it. Letter C is missing. Only the checkmark is visible.</p>

<select>
<option value="A">A</option>
<option value="B">B</option>
<option value="C">C</option>
</select>

<h2>Environment</h2>

<ul>
<li>macOS (Intel)</li>
<li>Firefox 104.0.2 (64-bit)</li>
<li>Montserrat font (https://fonts.googleapis.com/css?family=Montserrat:400)</li>
</ul>

</body>
</html>

Actual results:

Letter C was not displayed in the drop-down list when option C was selected. Only the checkmark was shown.

Expected results:

A checkmark and letter C should be displayed when option C is selected.

Attached image C_selected.png

The Bugbug bot thinks this bug should belong to the 'Core::Layout: Text and Fonts' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.

Component: Untriaged → Layout: Text and Fonts
Product: Firefox → Core

The severity field is not set for this bug.
:dholbert, could you have a look please?

For more information, please visit auto_nag documentation.

Flags: needinfo?(dholbert)

Thanks for the bug report! I can reproduce. I don't have a mac physically available (traveling at the moment), but I tested macOS via BrowserStack.

BrowserStack let me test different Firefox versions too, and it seems that Firefox 102 is the first affected release. Firefox 101 release is unaffected.

Firefox 105 and 106beta (the latest I can test at the moment) are affected as well. I assume 107 Nightly must be affected too; setting that flag speculatively.

jfkthame, maybe you could take a look & bisect further to find out what regressed this in 102?

Severity: -- → S3
Status: UNCONFIRMED → NEW
Ever confirmed: true
Flags: needinfo?(dholbert) → needinfo?(jfkthame)
Version: Firefox 104 → Trunk
Keywords: testcase
QA Whiteboard: [qa-regression-triage]

I tried to reproduce this, but it doesn't seem to happen for me (with either Nightly or Firefox release versions) using the testcase here.

Flags: needinfo?(jfkthame)

Hello! Reproduced the issue on macOS 10.15.7 but I could not reproduce it on macOS 11 with Firefox 106.0b8. Here is the regression range:
Last good revision: be91ae588a2526842affc322b0672e501e20d841
First bad revision: 2662564f566cd0eae2963c73f1c573e16331eb3a
Pushlog:
https://hg.mozilla.org/integration/autoland/pushloghtml?fromchange=be91ae588a2526842affc322b0672e501e20d841&tochange=2662564f566cd0eae2963c73f1c573e16331eb3a
Potential regressor: bug 1703866
Emilio, it seems that the patch from bug 1703866 caused this issue, can you please have a look? Thank you!

Flags: needinfo?(emilio)
Regressed by: 1703866
Assignee: nobody → emilio
Flags: needinfo?(emilio)

I can reproduce this. The issue here is that on XUL layout width sets the
preferred width, but content might still expand the box size. In my machine the
checkmark is 15.01px, which is enough to break the math and push the C away.

Switching away from XUL flex into modern flex would fix it, but meanwhile this
achieves the same effect and fixes the bug.

Seems hard to add an automated test for this...

Comment on attachment 9297416 [details]
Bug 1791108 - Ensure macOS checked checkmark is actually 15px. r=jfkthame,mstange,spohl

Beta/Release Uplift Approval Request

  • User impact if declined: Some select menus on macos may have cropped characters at the end
  • Is this code covered by automated tests?: No
  • Has the fix been verified in Nightly?: No
  • Needs manual test from QE?: Yes
  • If yes, steps to reproduce: comment 0
  • List of other uplifts needed: none
  • Risk to taking this patch: Low
  • Why is the change risky/not risky? (and alternatives if risky): Really simple CSS patch.
  • String changes made/needed: none
  • Is Android affected?: No
Attachment #9297416 - Flags: approval-mozilla-beta?
Flags: qe-verify+
Pushed by ealvarez@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/d938816c9cd1
Ensure macOS checked checkmark is actually 15px. r=jfkthame
Pushed by emilio@crisal.io:
https://hg.mozilla.org/integration/autoland/rev/3025b63e8060
Keep width to keep menulist-shrinkwrap-1.xhtml passing.

Comment on attachment 9297416 [details]
Bug 1791108 - Ensure macOS checked checkmark is actually 15px. r=jfkthame,mstange,spohl

Minimal CSS patch, I think we can take it in the last beta even if we don't have nightlies with it yet.

Attachment #9297416 - Flags: approval-mozilla-beta? → approval-mozilla-beta+
Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 107 Branch
QA Whiteboard: [qa-regression-triage] → [qa-regression-triage][qa-triaged]

Reproduced the issue on Firefox 106.0a1 (2022-09-15) on macOS 13 by using the TC provided in Comment 0.

The issue is verified on Firefox 106.0b8 and Firefox 107.0a1 (2022-10-06) on the same system.

You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: