Closed Bug 602322 Opened 12 years ago Closed 12 years ago
DPI on Android
Bug 537890 introduced a new nsIWidget::GetDPI method, which is useful for implementing device-independent UI with physical units like mozmm. Android is currently using the default implementation from nsBaseWidget, which always returns 96.0. Here's a patch to retrieve the correct value from the OS instead.
Attachment #481335 - Flags: review?(mwu)
We will need this to properly support different Android screens (bug 590777). Note for future reference: android.util.displayMetrics.density might be useful too; it closely matches the use case for our "zoom.dpiScale" pref.
tracking-fennec: --- → ?
Note: This patch works in chrome, but in the content process it always returns the default value of 96.
Assignee: nobody → mbrubeck
Status: NEW → ASSIGNED
After testing this more and learning more about the new DPI system, I am ready to check this in. This will only affect physical units like mozmm (which we are not currently using in Fennec chrome). Standard CSS units like mm and px are not affected.
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla2.0b8
Target Milestone: mozilla2.0b8 → mozilla2.0b7
You need to log in before you can comment on or make changes to this bug.