Bug 85534

Summary: Add test for subpixel precision in DOM APIs
Product: WebKit Reporter: Emil A Eklund <eae>
Component: Layout and RenderingAssignee: Emil A Eklund <eae>
Status: RESOLVED FIXED    
Severity: Normal CC: dglazkov, eric, leviw, webkit.review.bot
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on: 60318    
Bug Blocks:    
Attachments:
Description Flags
Patch
none
Archive of layout-test-results from ec2-cr-linux-01
none
Patch
none
Archive of layout-test-results from ec2-cr-linux-02 none

Description Emil A Eklund 2012-05-03 13:00:00 PDT
Add test for increased precision due to subpixel support in the getBoundingClientRect api. Also test that clientWidth returns the pixel snapped value.
Comment 1 Emil A Eklund 2012-05-03 13:03:43 PDT
Created attachment 140074 [details]
Patch
Comment 2 Emil A Eklund 2012-05-03 13:10:12 PDT
This will clearly need to land _after_ we turn on the flag. Just wanted to make sure it didn't get lost and have it ready to commit once the flag is flipped.
Comment 3 Eric Seidel (no email) 2012-05-03 13:21:25 PDT
Comment on attachment 140074 [details]
Patch

OK.  I suspect this would be way cleaner using js-test-pre.js however. :)
Comment 4 Emil A Eklund 2012-05-03 13:30:15 PDT
(In reply to comment #3)
> (From update of attachment 140074 [details])
> OK.  I suspect this would be way cleaner using js-test-pre.js however. :)

I'm surprised that you think so. The only thing js-test-pre would do is provide a log function at the cost of a lot of overhead as the test is not making use of any of the functionality that js-test-pre provides.
Comment 5 Emil A Eklund 2012-05-03 13:32:36 PDT
I should add that I'd happily change it to use js-test-pre if you think it makes sense, I just didn't see the value.

The same applies to the other tests I've added as a part of 60318.
Comment 6 WebKit Review Bot 2012-05-03 13:47:30 PDT
Comment on attachment 140074 [details]
Patch

Attachment 140074 [details] did not pass chromium-ews (chromium-xvfb):
Output: http://queues.webkit.org/results/12610341

New failing tests:
fast/sub-pixel/client-rect-has-subpixel-precision.html
Comment 7 WebKit Review Bot 2012-05-03 13:47:37 PDT
Created attachment 140081 [details]
Archive of layout-test-results from ec2-cr-linux-01

The attached test failures were seen while running run-webkit-tests on the chromium-ews.
Bot: ec2-cr-linux-01  Port: <class 'webkitpy.common.config.ports.ChromiumXVFBPort'>  Platform: Linux-2.6.35-28-virtual-x86_64-with-Ubuntu-10.10-maverick
Comment 8 Eric Seidel (no email) 2012-05-03 13:47:58 PDT
Comment on attachment 140074 [details]
Patch

Why would you want this to be a ref test instead of a dumpAsText test?
Comment 9 Emil A Eklund 2012-05-03 13:54:12 PDT
(In reply to comment #8)
> (From update of attachment 140074 [details])
> Why would you want this to be a ref test instead of a dumpAsText test?

I want to make sure that the box is painted at the pixel-snapped size and that clientWidth returns the same width as is painted.

I suppose I could split it into two separate tests instead if you think that makes more sense/is easier to understand.
Comment 10 Eric Seidel (no email) 2012-05-03 13:55:50 PDT
Wouldn't you want your reference html to use integer values then if you wish to show the box is painted a specific pixel boundaries?
Comment 11 Emil A Eklund 2012-05-03 13:57:14 PDT
(In reply to comment #10)
> Wouldn't you want your reference html to use integer values then if you wish to show the box is painted a specific pixel boundaries?

I do. I could have sword I changed that. Good catch!
Comment 12 Emil A Eklund 2012-05-03 14:02:06 PDT
Created attachment 140087 [details]
Patch
Comment 13 Eric Seidel (no email) 2012-05-03 14:04:14 PDT
Comment on attachment 140087 [details]
Patch

OK.
Comment 14 WebKit Review Bot 2012-05-03 15:36:50 PDT
Comment on attachment 140087 [details]
Patch

Attachment 140087 [details] did not pass chromium-ews (chromium-xvfb):
Output: http://queues.webkit.org/results/12620248

New failing tests:
fast/sub-pixel/client-rect-has-subpixel-precision.html
Comment 15 WebKit Review Bot 2012-05-03 15:37:00 PDT
Created attachment 140112 [details]
Archive of layout-test-results from ec2-cr-linux-02

The attached test failures were seen while running run-webkit-tests on the chromium-ews.
Bot: ec2-cr-linux-02  Port: <class 'webkitpy.common.config.ports.ChromiumXVFBPort'>  Platform: Linux-2.6.35-28-virtual-x86_64-with-Ubuntu-10.10-maverick
Comment 16 Emil A Eklund 2012-05-23 09:16:31 PDT
Committed r118184: <http://trac.webkit.org/changeset/118184>