Commit 5d66b66d authored by Arvid Nilsson's avatar Arvid Nilsson Committed by The Qt Project
Browse files

Quick: Add experimental.viewport.devicePixelRatio


This specifies a devicePixelRatio to be used by web content instead of
the QScreen::devicePixelRatio(). This is necessary on non-iOS mobile
devices to remain compatible with the mobile web which assumes
devicePixelRatio is computed as the ratio of actual dpi to 160 dpi.
Non-iOS mobile platforms may use different criteria to determine the
QScreen::devicePixelRatio(), depending on the history of the platform,
or simply leave it at 1.0.

For QNX, this setting gets a reasonable default value so developers
don't have to regularly use this experimental API.

These changes were inspired by the Android Chromium port which uses a
GetDpiScale() to accomplish the same in
content/browser/android/content_view_core_impl.cc.

Change-Id: I1bc8878a47dabcdb6986c4fe5c8c4ac230ae2514
Reviewed-by: default avatarJocelyn Turcotte <jocelyn.turcotte@digia.com>
Showing with 157 additions and 21 deletions
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment