Closed
Bug 706889
Opened 13 years ago
Closed 13 years ago
checkboxes and radio buttons are extremely small when text around them is inflated
Categories
(Firefox for Android Graveyard :: General, defect, P1)
Tracking
(firefox11 verified, fennec11+)
VERIFIED
FIXED
Firefox 12
People
(Reporter: nhirata, Assigned: MatsPalmgren_bugz)
References
()
Details
(Whiteboard: readability, [font-inflation: form controls][inbound])
Attachments
(4 files)
41.85 KB,
image/png
|
Details | |
1.85 KB,
patch
|
dbaron
:
review+
akeybl
:
approval-mozilla-aurora+
akeybl
:
approval-mozilla-beta+
|
Details | Diff | Splinter Review |
95.48 KB,
image/png
|
Details | |
87.50 KB,
image/png
|
Details |
1. http://people.mozilla.com/~nhirata/html_tp/formsninput.html
Expeced: the checkbox and radio button should match the size of the text
Actual: the checkboxes and radio buttons are extremely small
Note:
Galaxy S II, Android 2.3, Build 20111201
Comment 1•13 years ago
|
||
Seems like a font inflation bug to me. Can you use the preference to disable font inflation and test again?
Reporter | ||
Comment 2•13 years ago
|
||
Hi Mark, how do I disable font inflation?
Comment 3•13 years ago
|
||
font.size.inflation.minTwips
Reporter | ||
Comment 4•13 years ago
|
||
font.size.inflation.minTwips 0 caused the checkboxes and radio buttons to be normal again. Font inflation issue.
Updated•13 years ago
|
Whiteboard: readability
Updated•13 years ago
|
Blocks: font-inflation
Updated•13 years ago
|
Whiteboard: readability → readability, DUPEME
Blocks: 707361
Seems like we should be inflating checkboxes and radio buttons for font size inflation. It also looks like dropdown listboxes need work, and we may need to revisit buttons as well.
Er, bug 706609 covers dropdowns; this one should cover radios and checkboxes.
Updated•13 years ago
|
Whiteboard: readability, DUPEME → readability, [font-inflation: form controls]
Updated•13 years ago
|
Assignee: nobody → dbaron
Priority: -- → P1
Summary: checkboxes and radio buttons are extremely small on the Galaxy S II → checkboxes and radio buttons are extremely small when text around them is inflated
Assignee: dbaron → nobody
Updated•13 years ago
|
tracking-fennec: --- → 11+
Updated•13 years ago
|
Assignee: nobody → sjohnson
Updated•13 years ago
|
Assignee: sjohnson → matspal
Assignee | ||
Comment 8•13 years ago
|
||
nsGfxCheckboxControlFrame and nsGfxRadioControlFrame are the only classes
that inherits nsFormControlFrame AFAICT, so its Reflow method seems the
right place to fix both.
Attachment #590035 -
Flags: review?(dbaron)
Assignee | ||
Comment 9•13 years ago
|
||
Assignee | ||
Comment 10•13 years ago
|
||
The right border is missing for the checkboxes due to an unrelated pixel
rounding bug (it occurs also without the patch).
Comment on attachment 590035 [details] [diff] [review]
Like so?
>+ nsLeafFrame::Reflow(aPresContext, aDesiredSize, aReflowState, aStatus);
>+
use nsresult rv = nsLeafFrame::Reflow(...);
and then
if (NS_FAILED(rv)) {
return rv;
}
>+ if (nsLayoutUtils::FontSizeInflationEnabled(aPresContext)) {
>+ float inflation = nsLayoutUtils::FontSizeInflationFor(aReflowState);
add NS_ASSERTION(inflation >= 1.0f, "we assume inflation >= 1 with the simple handling of overflow areas below");
>+ aDesiredSize.width *= inflation;
>+ aDesiredSize.height *= inflation;
>+ aDesiredSize.UnionOverflowAreasWithDesiredBounds();
>+ FinishAndStoreOverflow(&aDesiredSize);
>+ }
>+ return NS_OK;
> }
r=dbaron with that
Attachment #590035 -
Flags: review?(dbaron) → review+
It would be good to also add a reftest in layout/base/tests/test_font_inflation_reftests.html and layout/base/tests/font-inflation/
Assignee | ||
Comment 13•13 years ago
|
||
(In reply to David Baron [:dbaron] (busy through 12 Feb) from comment #11)
> use nsresult rv = nsLeafFrame::Reflow(...);
Fixed.
> >+ float inflation = nsLayoutUtils::FontSizeInflationFor(aReflowState);
>
> add NS_ASSERTION(inflation >= 1.0f, "we assume inflation >= 1 with the
> simple handling of overflow areas below");
The documentation for nsLayoutUtils::FontSizeInflationFor now says:
* Return the font size inflation *ratio* for a given frame. This is
* the factor by which font sizes should be inflated; it is never
* smaller than 1.
so I didn't add an assertion.
Assignee | ||
Comment 14•13 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/9c30c5187e3e
https://hg.mozilla.org/integration/mozilla-inbound/rev/4d526d7ec680
Flags: in-testsuite+
Whiteboard: readability, [font-inflation: form controls] → readability, [font-inflation: form controls][inbound]
Target Milestone: --- → Firefox 12
Comment 15•13 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/9c30c5187e3e
https://hg.mozilla.org/mozilla-central/rev/4d526d7ec680
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Comment 16•13 years ago
|
||
Mats, be sure to get this onto whatever branch 11 is on (aurora now, will be beta in a couple hours)
Assignee | ||
Comment 17•13 years ago
|
||
Comment on attachment 590035 [details] [diff] [review]
Like so?
Please approve for the branch Fx11 is on.
Attachment #590035 -
Flags: approval-mozilla-beta?
Attachment #590035 -
Flags: approval-mozilla-aurora?
Comment 18•13 years ago
|
||
(In reply to Mats Palmgren [:mats] from comment #17)
> Comment on attachment 590035 [details] [diff] [review]
> Like so?
>
> Please approve for the branch Fx11 is on.
This patch doesn't look specific to mobile - if that's true, what risk to desktop does this carry?
Assignee | ||
Comment 19•13 years ago
|
||
The patch doesn't do anything unless font-size inflation is enabled.
Font-size inflation is enabled by default for mobile. It's disabled by default
for desktop but you can enable it in about:config. The risk is low even when
enabled - the worst that can happen is that radio/checkbox controls have wrong size.
Comment 21•13 years ago
|
||
Comment on attachment 590035 [details] [diff] [review]
Like so?
[Triage Comment]
Thanks Mats - approved for Aurora 12 and Beta 11.
Attachment #590035 -
Flags: approval-mozilla-beta?
Attachment #590035 -
Flags: approval-mozilla-beta+
Attachment #590035 -
Flags: approval-mozilla-aurora?
Attachment #590035 -
Flags: approval-mozilla-aurora+
Assignee | ||
Comment 22•13 years ago
|
||
https://hg.mozilla.org/releases/mozilla-beta/rev/6ad5d9c45278
https://hg.mozilla.org/releases/mozilla-beta/rev/6a71fe8b7ada
status-firefox11:
--- → fixed
Comment 23•13 years ago
|
||
Verified fixed on build:
Firefox 11 (tinderbox build): 1328738704/ 08-Feb-2012 15:44
20120208140504
Device: LG Optimus 2X (Android 2.2.2)
Status: RESOLVED → VERIFIED
The reftests for this bug don't actually test this bug, since they're != reftests, and there's a huge difference between them in that the text is inflated in one but not the other, so they'd pass even without this fix. This patch needs better tests.
Flags: in-testsuite+ → in-testsuite?
(But please wait until bug 743817 lands before fixing that.)
Updated•4 years ago
|
Product: Firefox for Android → Firefox for Android Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•