Closed Bug 903327 Opened 9 years ago Closed 9 years ago

Multiple selection dropdown listboxes are too small


(Firefox for Android Graveyard :: General, defect)

26 Branch
Not set


(firefox22 unaffected, firefox23 unaffected, firefox24 unaffected, firefox25+ verified, firefox26+ verified, fennec25+)

Firefox 26
Tracking Status
firefox22 --- unaffected
firefox23 --- unaffected
firefox24 --- unaffected
firefox25 + verified
firefox26 + verified
fennec 25+ ---


(Reporter: u421692, Assigned: wesj)




(Keywords: regression)


(3 files)

Attached image aurora25
Device: LG Nexus 4(Android 4.2.2)/HTC Desire HD(Android 2.3.5)
Build: Nightly 26.0a1(2013-08-08)/Aurora 25.0a2(2013-08-08)

Steps to reproduce:
1. Go to
2. Tap on "Advanced Search" tab
3. Observe the multiple selection listboxes

Expected result:
The multiple selection listboxes are sized correctly and have straight corners.(see attached screenshot)

Actual result:
The multiple selection listboxes are small and have rounded corners.(see attached screenshot)

It might be that the specification were changed, but I didn't find the bug related to this change.
Attached image beta24
font-inflation issue?
tracking-fennec: --- → ?
Keywords: regression
(In reply to Aaron Train [:aaronmt] from comment #2)
> font-inflation issue?

Hm, I don't know about the rendering differences (i.e. the rounded vs. straight corners), but I'll look and see if something changed between the two versions that might have affected font inflation calculations.
Changing font size does not influence the size of the list boxes.
tracking-fennec: ? → 25+
Flags: needinfo?(kbrosnan)
The regression window is:

good build: 22.07.2013 
bad build: 22.07.2013 
We can not go deeper in inbound because there are no available builds for that time. However we can only guess that this Bug 896138 is the bug that caused the regression.
I'm skeptical about that regression range, and would be interested in seeing a range down to the changeset (which would be useful even if it is that bug).
After the changes on "" the issue is not reproducing on this site on any Firefox build.
However, I was able to reproduce this issue on "". 

The regression window is:

good build: 04.07.2013 
bad build: 05.07.2013 
I will start a hg bisect on this, since there are no builds in the inbound folder for that time.
The first bad revision is:
changeset:   137443:efa23d6bd3fa
user:        Kartikaya Gupta <>
date:        Thu Jul 04 09:02:29 2013 -0400
summary:     Bug 803207 - Kill GetDevicePixelsPerMetaViewportPixel and use widget scaling correctly on Fennec. r=mbrubeck

inbound pushlog:

It seems that Bug 803207 caused this issue.
I believe this has to do with the default styling we have for form elements in Fennec. On my Nexus 4, the following page looks different on Beta and in Aurora:

On Beta the two buttons are the same size but on Aurora they are not. If I change layout.css.devPixelsPerPx to 1.0 on the Aurora build (the default is 2.0 on the Nexus 4) then the buttons render the same size.

Based on this I believe the default styling we apply to form elements (and perhaps other parts of the page) are specified in CSS pixels, and so when bug 803207 landed and changed the default value of devPixelsPerPx on hi-dpi devices, it affected how large the form elements are rendered as.

I took a quick look at Fennec's content.css but didn't see which CSS properties might be affecting this. Wesj, do you know where our form elements pick up default properties regarding font size from?
Flags: needinfo?(kbrosnan) → needinfo?(wjohnston)
I don't think this font-size is specified in CSS. It comes from the eCSSUnit_System_Font keyword. I'll have to dig more to see where that's set for us.
Flags: needinfo?(wjohnston)
Attached patch PatchSplinter Review
Attachment #803172 - Flags: review?(bugmail.mozilla)
Attachment #803172 - Flags: review?(bugmail.mozilla) → review+
Comment on attachment 803172 [details] [diff] [review]

[Approval Request Comment]
Bug caused by (feature/regressing bug #): bug 803207. We're correcting something that should have been done in bug 674373, but wasn't noticed until we made some later changes.
User impact if declined: Text fields using strange font sizes
Testing completed (on m-c, etc.): Landed on mc today. Tested locally on test pages.
Risk to taking this patch (and alternatives if risky): Low risk. Will change rendering of textboxes (hopefully to match their old display). I cant think of any alternatives. Back out the dev pixels change?
String or IDL/UUID changes made by this patch: None.
Attachment #803172 - Flags: approval-mozilla-aurora?
Duplicate of this bug: 892843
Assignee: nobody → wjohnston
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 26
Attachment #803172 - Flags: approval-mozilla-aurora? → approval-mozilla-aurora+
Verified as fixed on:
Device: LG Nexus 4 (Android 4.2.2)
Build: Nightly 26.0a1 (2013-09-16) / Aurora 25.0a2 (2013-09-16)
Comment on attachment 803172 [details] [diff] [review]

Review of attachment 803172 [details] [diff] [review]:

::: widget/android/nsLookAndFeel.cpp
@@ +452,5 @@
>      aFontName.AssignLiteral("\"Droid Sans\"");
>      aFontStyle.weight = NS_FONT_WEIGHT_NORMAL;
>      aFontStyle.stretch = NS_FONT_STRETCH_NORMAL;
> +    aFontStyle.size = 9.0 * 96.0f / 72.0f * aDevPixPerCSSPixel;

The number of magic numbers makes me sad.
Product: Firefox for Android → Firefox for Android Graveyard
You need to log in before you can comment on or make changes to this bug.