Open Bug 1169203 Opened 5 years ago Updated 3 months ago

Scale native themed <input type=number> spin buttons when the page is zoomed

Categories

(Core :: Layout: Form Controls, defect)

defect
Not set

Tracking

()

Tracking Status
firefox41 --- affected

People

(Reporter: alice0775, Unassigned)

References

(Depends on 1 open bug, )

Details

Attachments

(3 files)

Attached image bug.png
Steps to reproduce:
1. open data:text/html,<input type="number">
2. Zoom in

Actual Results:
something weird appearance

Expected results
Arrow controls also zoomed like <select>
This is actually tricky since platform APIs don't give a good way to do this. Note that Chrome doesn't do a great job at this either.
Summary: Up/Down Arrow controls of input type="number" is something weird appearance when page zoomed → Scale native themed <input type=number> spin buttons when the page is zoomed
Chrome doesn't change arrows' width when zooming while firefox doesn't change arrows' height. At least on Win7.
Depends on: 947365
No longer depends on: 947365
Omg, I just wanted to CC that bug in another tab
Depends on: 947365
What is the status? Is this still not addressed?

"Note that Chrome doesn't do a great job at this either."
==> Chrome does a very good job, just check how appropriately the buttons scale. So it is possible to do.
Assignee: nobody → dbaron
Status: NEW → ASSIGNED

So I took this because I was thinking the problem was that GetMinimumWidgetSize implementations were returning values in device pixels when the number they had was meant to be in CSS pixels. And fixing that does appear to fix the problem -- but on second thought I don't think it's right. I think the real problem here is likely that we're relying on GetMinimumWidgetSize and making these spin buttons as small as they can possibly be drawn, when we should really give them a reasonable default size. Although I'm really not sure what's right here.

This at least fixes the buttons to scale reasonably; we still have problems with native drawing of the arrows perhaps not doing the right thing. That said, when we use native drawing of the arrows, it's not clear that platforms are going to render varying sizes very well either...

Assignee: dbaron → nobody
Status: ASSIGNED → NEW
You need to log in before you can comment on or make changes to this bug.