ubuntu-webapps-bugs team mailing list archive
-
ubuntu-webapps-bugs team
-
Mailing list archive
-
Message #00991
[Bug 1336730] [NEW] On Nexus 7, viewport{Width, Height} and content{Width, Height, X, Y} are not integers and do not add up correctly
Public bug reported:
Since revision 619 of lp:oxide, a flickable-like API was added to the
QML WebView, with viewport{Width,Height} and content{Width,Height,X,Y}
properties (see bug #1330511).
This works well on desktop where the device scale factor and page scale
factor are 1, but on Nexus 7 where the device scale factor is 2.25 and
the page scale factor can be any floating point number between 1.0 and
5.0, I’m seeing two issues:
- viewport{Width,Height} doesn’t match the webview’s dimensions: I’m
getting e.g. 1200.000056311 × 1862.000236082 where the webview’s
dimensions are 1200 × 1862 (all values in device pixels). Rounding the
values does the trick.
- If we subtract the maximum value of content{X,Y} from
content{Width,Height}, we should obtain viewport{Width,Height} (or at
least a value very close to 0.0 due to rounding issues), but I’m
sometimes seeing a difference > 1.0. This seems to be a consequence of
the above. Applying a corrective factor of
[round(viewport{Width,Height}) / viewport{Width,Height}] (values in DIP)
to content{Width,Height,X,Y} and rounding the result gets us the
expected values.
** Affects: oxide
Importance: High
Assignee: Olivier Tilloy (osomon)
Status: In Progress
** Changed in: oxide
Assignee: (unassigned) => Olivier Tilloy (osomon)
** Changed in: oxide
Status: New => In Progress
** Changed in: oxide
Importance: Undecided => High
--
You received this bug notification because you are a member of Ubuntu
WebApps bug tracking, which is subscribed to Oxide.
https://bugs.launchpad.net/bugs/1336730
Title:
On Nexus 7, viewport{Width,Height} and content{Width,Height,X,Y} are
not integers and do not add up correctly
Status in Oxide Webview:
In Progress
Bug description:
Since revision 619 of lp:oxide, a flickable-like API was added to the
QML WebView, with viewport{Width,Height} and content{Width,Height,X,Y}
properties (see bug #1330511).
This works well on desktop where the device scale factor and page
scale factor are 1, but on Nexus 7 where the device scale factor is
2.25 and the page scale factor can be any floating point number
between 1.0 and 5.0, I’m seeing two issues:
- viewport{Width,Height} doesn’t match the webview’s dimensions: I’m
getting e.g. 1200.000056311 × 1862.000236082 where the webview’s
dimensions are 1200 × 1862 (all values in device pixels). Rounding the
values does the trick.
- If we subtract the maximum value of content{X,Y} from
content{Width,Height}, we should obtain viewport{Width,Height} (or at
least a value very close to 0.0 due to rounding issues), but I’m
sometimes seeing a difference > 1.0. This seems to be a consequence of
the above. Applying a corrective factor of
[round(viewport{Width,Height}) / viewport{Width,Height}] (values in
DIP) to content{Width,Height,X,Y} and rounding the result gets us the
expected values.
To manage notifications about this bug go to:
https://bugs.launchpad.net/oxide/+bug/1336730/+subscriptions
Follow ups
-
[Bug 1336730] Re: On Nexus 7, viewport{Width, Height} and content{Width, Height, X, Y} are not integers and do not add up correctly
From: Chris Coulson, 2014-07-10
-
[Bug 1336730] [NEW] On Nexus 7, viewport{Width, Height} and content{Width, Height, X, Y} are not integers and do not add up correctly
From: Olivier Tilloy, 2014-07-02
References