Home banner icon loaded from chrome:// URI is too small

NEW
Unassigned

Status

()

5 years ago
4 years ago

People

(Reporter: Margaret, Unassigned)

Tracking

(Blocks: 1 bug)

Trunk
ARM
Android
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [qa+])

Attachments

(1 attachment)

(Reporter)

Description

5 years ago
Created attachment 8360142 [details] [diff] [review]
patch that illustrates problem

This sounds similar to bug 921668, but I'm experiencing this issue with chrome:// URIs now.

This loosely blocks bug 958891 because I'd like to include that icon as a chrome URI, but I can always fall back to just using a data URI if needed.

wesj, do you know where along the line this might be going wrong?
Flags: needinfo?(wjohnston)
(Reporter)

Comment 1

5 years ago
I don't know what code path we're following, but if we're going down this path, we're not passing in the resources anywhere:
http://hg.mozilla.org/mozilla-central/annotate/3a264db9f9e7/mobile/android/base/gfx/BitmapUtils.java#l73
scaleType=center won't scale the image:

http://mxr.mozilla.org/mozilla-central/source/mobile/android/base/resources/layout/home_banner.xml#32

centerCrop,fitCenter, or centerInside will http://developer.android.com/reference/android/widget/ImageView.ScaleType.html

Other than that, we should probably do some blog posts/write some utilities to help detect DPI and use it provide better/correct resolution resources from JS (as well as documenting the expected resolutions better).
Flags: needinfo?(wjohnston)
Whiteboard: [qa+]
(Reporter)

Comment 3

5 years ago
But how does that explain the difference between chrome:// URIs and data: URIs? I tried loading the same image as a data: URI, and that actually made it large as expected.
(Reporter)

Comment 4

5 years ago
I'm just going to use Android resources for bug 958891, so this doesn't block anymore, although it would still be good to investigate this bug at some point.
No longer blocks: 958891
(Reporter)

Updated

4 years ago
Blocks: 1162107
You need to log in before you can comment on or make changes to this bug.