Bug 80292 - Layout test for window.devicePixelRatio
Summary: Layout test for window.devicePixelRatio
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-03-05 08:13 PST by Konrad Piascik
Modified: 2012-05-24 14:31 PDT (History)
8 users (show)

See Also:


Attachments
Patch (2.01 KB, patch)
2012-03-05 08:14 PST, Konrad Piascik
no flags Details | Formatted Diff | Diff
Patch (2.06 KB, patch)
2012-03-08 10:36 PST, Konrad Piascik
no flags Details | Formatted Diff | Diff
Patch (2.00 KB, patch)
2012-03-09 04:50 PST, Konrad Piascik
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Konrad Piascik 2012-03-05 08:13:12 PST
Layout test for window.devicePixelRatio
Comment 1 Konrad Piascik 2012-03-05 08:14:23 PST
Created attachment 130141 [details]
Patch
Comment 2 Antonio Gomes 2012-03-05 10:55:02 PST
Ossy, we are worried about that the level of precision the test introduces could have different results on ARM.

Mind to help us to verify that on QtWebKit arm bots? We do not want to red-ify it. Thanks
Comment 3 Csaba Osztrogonác 2012-03-07 06:54:34 PST
(In reply to comment #2)
> Ossy, we are worried about that the level of precision the test introduces could have different results on ARM.
> 
> Mind to help us to verify that on QtWebKit arm bots? We do not want to red-ify it. Thanks

Don't worry! ;) I suggested to Konrad on IRC that you should 
use a given +/- epsilon tolerance instead of expecting same 
high precision numbers on all platforms.

Or you can land it and check what bots say and then adjust the 
epsilion to make all platform happy.
Comment 4 Konrad Piascik 2012-03-08 10:36:53 PST
Created attachment 130846 [details]
Patch
Comment 5 Konrad Piascik 2012-03-08 10:39:42 PST
(In reply to comment #3)
> (In reply to comment #2)
> > Ossy, we are worried about that the level of precision the test introduces could have different results on ARM.
> > 
> > Mind to help us to verify that on QtWebKit arm bots? We do not want to red-ify it. Thanks
> 
> Don't worry! ;) I suggested to Konrad on IRC that you should 
> use a given +/- epsilon tolerance instead of expecting same 
> high precision numbers on all platforms.

The latest patch does just that by using shouldBeCloseTo

> 
> Or you can land it and check what bots say and then adjust the 
> epsilion to make all platform happy.
Comment 6 Rob Buis 2012-03-08 10:41:02 PST
Comment on attachment 130846 [details]
Patch

LGTM. Let's see the results on other platforms :)
Comment 7 WebKit Review Bot 2012-03-08 13:23:54 PST
Comment on attachment 130846 [details]
Patch

Clearing flags on attachment: 130846

Committed r110197: <http://trac.webkit.org/changeset/110197>
Comment 8 WebKit Review Bot 2012-03-08 13:23:59 PST
All reviewed patches have been landed.  Closing bug.
Comment 9 Nandor Huszka 2012-03-09 01:43:02 PST
This revision (r110197) causes fail on Qt and on GTK. The diffs are the same:

--- /home/slave/webkitgtk/gtk-linux-64-release/build/layout-test-results/fast/viewport/viewport-133-expected.txt 
+++ /home/slave/webkitgtk/gtk-linux-64-release/build/layout-test-results/fast/viewport/viewport-133-actual.txt 
@@ -1,3 +1,3 @@
 viewport size 480x534 scale 1.000000 with limits [1.000000, 5.000000] and userScalable -1.000000
-PASS window.devicePixelRatio is within 0.001 of 0.7083333134651184
+FAIL window.devicePixelRatio should be within 0.001 of 0.7083333134651184. Was 1.
Comment 10 Csaba Osztrogonác 2012-03-09 02:36:13 PST
Reopen it.
Comment 11 Csaba Osztrogonác 2012-03-09 02:36:39 PST
*** Bug 80689 has been marked as a duplicate of this bug. ***
Comment 12 Konrad Piascik 2012-03-09 04:28:37 PST
(In reply to comment #9)
> This revision (r110197) causes fail on Qt and on GTK. The diffs are the same:
> 
> --- /home/slave/webkitgtk/gtk-linux-64-release/build/layout-test-results/fast/viewport/viewport-133-expected.txt 
> +++ /home/slave/webkitgtk/gtk-linux-64-release/build/layout-test-results/fast/viewport/viewport-133-actual.txt 
> @@ -1,3 +1,3 @@
>  viewport size 480x534 scale 1.000000 with limits [1.000000, 5.000000] and userScalable -1.000000
> -PASS window.devicePixelRatio is within 0.001 of 0.7083333134651184
> +FAIL window.devicePixelRatio should be within 0.001 of 0.7083333134651184. Was 1.

This test is related to https://bugs.webkit.org/show_bug.cgi?id=80160 where I set the devicePixelRatio based based on the results from computeViewportAttributes.

This should work on Qt since I believe that they also set this value in the same way.  So the failure could be a genuine failure for Qt.  Looking further into other ports I see now the EFL and GTK don't do this so I'll post a patch soon that will add this new test to the skipped list for those ports.
Comment 13 Konrad Piascik 2012-03-09 04:50:47 PST
Created attachment 131029 [details]
Patch
Comment 14 Konrad Piascik 2012-03-09 04:51:20 PST
Comment on attachment 130846 [details]
Patch

webkit-patch incorrectly marked this as obsolete
Comment 15 WebKit Review Bot 2012-03-09 07:08:51 PST
Comment on attachment 131029 [details]
Patch

Clearing flags on attachment: 131029

Committed r110294: <http://trac.webkit.org/changeset/110294>
Comment 16 WebKit Review Bot 2012-03-09 07:08:57 PST
All reviewed patches have been landed.  Closing bug.
Comment 17 Adam Barth 2012-05-24 12:58:06 PDT
We're considering changing the behavior tested by this test in https://bugs.webkit.org/show_bug.cgi?id=87407