path: root/src/plugins/platforms/ios
diff options
authorMorten Johan Sørvig <>2020-08-03 21:36:20 +0200
committerMorten Johan Sørvig <>2020-08-05 11:23:13 +0200
commite8997cb05e7f9da6c9c6951ea06262d937de4d72 (patch)
tree440aa6fd3ffbf30409c47b813bcad3bd2fdf5116 /src/plugins/platforms/ios
parent9704cbaf03e99250040a166fbc32f33f6ba12658 (diff)
wasm: factor visual viewport scale into dpr
By default, mobile browsers create a (layout) viewport much wider than the visual viewport in order to be compatible with web pages created with desktop browsers in mind. This means that the default view is zoomed out. This zoom is not reflected in window.devicePixelRatio, and Qt ends up setting the canvas render size to be larger than actually needed. The window.visualViewport.scale property reflects this “mobile” zoom level: add it as a devicePixelRatio factor. (The value will be less than 1 when zoomed out). User pinch-to-zoom may change the zoom level and resize the visual viewport; install a resize handler as well. For now we limit the devicePixelRatio value in order to avoid creating gigantic backing store images - this is something we can revisit later on. Pick-to: 5.15 Task-number: QTBUG-85662 Change-Id: I96db6121fe17a6c213216e04e4724efc93a9b66a Reviewed-by: Lorn Potter <>
Diffstat (limited to 'src/plugins/platforms/ios')
0 files changed, 0 insertions, 0 deletions