New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 662066 link

Starred by 2 users

Issue metadata

Status: Available
Owner: ----
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: All
Pri: 2
Type: Bug

Blocked on:
issue 737850



Sign in to add a comment

Notification big picture sizing: cover vs. contain

Project Member Reported by peter@chromium.org, Nov 3 2016

Issue description

The display size of a notification's big picture is determined by the OS when we defer to it, or Chrome's Message Center when we don't.

It turns out that Android uses `cover` sizing, i.e. making sure that the image is as small as possible while ensuring that both dimensions are greater than or equal to the corresponding size of the container.

The Message Center uses `contain` sizing, i.e. making sure that each side is as large as possible while not exceeding the length of the corresponding side of the container.

(I'm not sure what the Action Center does, would be worth figuring out.)

This is likely to become an annoyance for developers -- there's a complicated matrix of big picture container sizes for the different platforms, this makes it worse.

** https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Background_and_Borders/Scaling_background_images
 
Labels: -Pri-3 Pri-2
Notes to whomever ends up owning this:

1. The current `contain` behavior was added in https://codereview.chromium.org/102473005 and https://codereview.chromium.org/1883473002.

2. If we don't want to change behaviour for extensions for compatibility reasons, switch based on the NotifierType of the NotifierId.

Comment 2 by awdf@chromium.org, Feb 10 2017

So is this bug actually just 'make the sizing work the same on all platforms', or might it involve something more complicated?

Comment 3 by peter@chromium.org, Feb 10 2017

Yup, that's what it is.

Comment 4 by joh...@chromium.org, Jul 13 2017

Blockedon: 737850
Several updates:

1. See also issue 737850 / https://codereview.chromium.org/2969603003 which might implement this.

2. I've realised that Android (at least N+) doesn't simply do `cover` - it does `cover` for tall images but `contain` for wide images.

3. When the sizing is fixed, note that we'll also need to update the logic for which image sizes to download, for example in NotificationImageLoaderTest.DownscalingPreserves3_2AspectRatio rather than scaling a 3000x2000 image (which is taller than the preferred aspect ratio) down to (height*3/2)x(height), instead we should scale it down to (width)x(width*2/3), which is larger, since it's being displayed with `cover` not `contain`.

Comment 5 by tetsui@chromium.org, Jul 27 2017

Cc: tetsui@chromium.org fukino@chromium.org yoshiki@chromium.org

Comment 6 by awdf@chromium.org, Jul 27 2017

Cc: -awdf@chromium.org
Project Member

Comment 7 by sheriffbot@chromium.org, Jul 27

Labels: Hotlist-Recharge-Cold
Status: Untriaged (was: Available)
This issue has been Available for over a year. If it's no longer important or seems unlikely to be fixed, please consider closing it out. If it is important, please re-triage the issue.

Sorry for the inconvenience if the bug really should have been left as Available.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
Status: Available (was: Untriaged)
Labels: Hotlist-DesktopUIToolingRequired Hotlist-DesktopUIChecked
UI Mass Triage

Sign in to add a comment