Notification big picture sizing: cover vs. contain |
|||||||
Issue descriptionThe 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
,
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?
,
Feb 10 2017
Yup, that's what it is.
,
Jul 13 2017
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`.
,
Jul 27 2017
,
Jul 27 2017
,
Jul 27
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
,
Jul 31
,
Nov 21
UI Mass Triage |
|||||||
►
Sign in to add a comment |
|||||||
Comment 1 by joh...@chromium.org
, Feb 9 2017