Bug 85534

Summary: Add test for subpixel precision in DOM APIs
Product: WebKit Reporter: Emil A Eklund <eae@chromium.org>
Component: Layout and RenderingAssignee: Emil A Eklund <eae@chromium.org>
Status: RESOLVED FIXED    
Severity: Normal CC: dglazkov@chromium.org, eric@webkit.org, leviw@chromium.org, webkit.review.bot@gmail.com
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 From 2012-05-03 13:00:00 PST
Add test for increased precision due to subpixel support in the getBoundingClientRect api. Also test that clientWidth returns the pixel snapped value.
------- Comment #1 From 2012-05-03 13:03:43 PST -------
Created an attachment (id=140074) [details]
Patch
------- Comment #2 From 2012-05-03 13:10:12 PST -------
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 From 2012-05-03 13:21:25 PST -------
(From update of attachment 140074 [details])
OK.  I suspect this would be way cleaner using js-test-pre.js however. :)
------- Comment #4 From 2012-05-03 13:30:15 PST -------
(In reply to comment #3)
> (From update of attachment 140074 [details] [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 From 2012-05-03 13:32:36 PST -------
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 From 2012-05-03 13:47:30 PST -------
(From update of attachment 140074 [details])
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 From 2012-05-03 13:47:37 PST -------
Created an attachment (id=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 From 2012-05-03 13:47:58 PST -------
(From update of attachment 140074 [details])
Why would you want this to be a ref test instead of a dumpAsText test?
------- Comment #9 From 2012-05-03 13:54:12 PST -------
(In reply to comment #8)
> (From update of attachment 140074 [details] [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 From 2012-05-03 13:55:50 PST -------
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 From 2012-05-03 13:57:14 PST -------
(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 From 2012-05-03 14:02:06 PST -------
Created an attachment (id=140087) [details]
Patch
------- Comment #13 From 2012-05-03 14:04:14 PST -------
(From update of attachment 140087 [details])
OK.
------- Comment #14 From 2012-05-03 15:36:50 PST -------
(From update of attachment 140087 [details])
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 From 2012-05-03 15:37:00 PST -------
Created an attachment (id=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 From 2012-05-23 09:16:31 PST -------
Committed r118184: <http://trac.webkit.org/changeset/118184>