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

Issue 670537 link

Starred by 1 user

Issue metadata

Status: Verified
Owner: ----
Closed: Oct 2
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Android
Pri: 3
Type: Bug

Blocking:
issue 620929



Sign in to add a comment

ResourceManager.java should take DIP scale at the time of resource loading

Reported by ti...@chromium.org, Dec 2 2016

Issue description

ResourceManager in Java layer obtains DIP scale during construction
https://cs.chromium.org/chromium/src/ui/android/java/src/org/chromium/ui/resources/ResourceManager.java?rcl=0&l=44
and later passes it to the LayoutResource creation.

Instead it should obtain the DIP scale after resource is loaded since it might have changed since the ResourceManager creation time.

The Java ResourceManager is owned by ResourceManagerImpl and then by compositor_impl_android, i.e. it is not used by WebView.
 
Project Member

Comment 1 by sheriffbot@chromium.org, Sep 4 2017

Labels: Hotlist-Recharge-BouncingOwner
Owner: ----
Status: Untriaged (was: Assigned)
The assigned owner "timav@chromium.org" is not able to receive e-mails, please re-triage.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
Components: UI>Browser Mobile>WebView
Status: Available (was: Untriaged)

Comment 3 by sgu...@chromium.org, Sep 27 2017

Cc: -sgu...@chromium.org
Project Member

Comment 4 by sheriffbot@chromium.org, Sep 28

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
Cc: tedc...@chromium.org twelling...@chromium.org ntfschr@chromium.org
Components: -UI>Browser -Mobile>WebView UI
Labels: -Hotlist-Recharge-Cold -Hotlist-Recharge-BouncingOwner
I have no clue if this is still an issue. Passing this to UI/Android OWNERS.
I stumbled across this doc from timav@, which is likely related: https://docs.google.com/document/d/1Ty9PhAtkwz82dlYYR6rQkuODaf3QpBrRReXoKSOti1U/edit#
Cc: dtrainor@chromium.org jaekyun@chromium.org
I would have naively expected that the DIP scale never changes without a process restart, so I must be missing some context here.


+some other folks who may have background on this class.
I think this is supposed to deal with multi-display, but I don't know if Android currently supports multi-display DIP query or if we just use the primary and always key off of that for native.  Do we have a plan to implement the doc in #6?  If so we can change this but if we aren't planning on doing that any time soon it's probably not worth it here.
It seems we landed some support for this in  issue 625089 . boliu@ is this issue worth pursuing?
Status: Verified (was: Untriaged)
> I would have naively expected that the DIP scale never changes without a process restart, so I must be missing some context here.

That's true for chrome, but not for webview. Which means the general rule is that code in content layer and below needs to handle DIP change correctly (or as well as possible) without process restart.

But ResourceManager in particular is never used in webview. So we don't have to worry about that.

And looking at the code, looks like it should handle multi-display correctly. It's already using the density and context from a WindowAndroid, rather than querying some global state.

So nothing to do here I think.

Sign in to add a comment