Bug 89519

Summary: Elements absolutely positioned to bottom or right may be off by one pixel with sub-pixel layout
Product: WebKit Reporter: Levi Weintraub <leviw>
Component: Layout and RenderingAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: dglazkov, eae, eric, jamesr, webkit.review.bot
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Test case
none
Fixes the problem -- not for review
webkit.review.bot: commit-queue-
Archive of layout-test-results from ec2-cr-linux-02 none

Levi Weintraub
Reported 2012-06-19 15:47:14 PDT
Created attachment 148444 [details] Test case Due to pixel snapping, attempting to align the bottom or right-most edge can lead to the object pixel-snapping past that edge if it has a sub-pixel position.
Attachments
Test case (729 bytes, text/html)
2012-06-19 15:47 PDT, Levi Weintraub
no flags
Fixes the problem -- not for review (2.04 KB, patch)
2012-06-20 16:29 PDT, Levi Weintraub
webkit.review.bot: commit-queue-
Archive of layout-test-results from ec2-cr-linux-02 (803.48 KB, application/zip)
2012-06-20 20:48 PDT, WebKit Review Bot
no flags
Eric Seidel (no email)
Comment 1 2012-06-19 16:16:47 PDT
Oooh. Excellent catch.
Levi Weintraub
Comment 2 2012-06-20 16:29:07 PDT
Created attachment 148675 [details] Fixes the problem -- not for review This hack fixes all variations of the test case, but is gross. The Length.h change is needed to address the jittering that can be seen here http://jsfiddle.net/YkB7a/1/ I'll continue to think about this.
WebKit Review Bot
Comment 3 2012-06-20 20:48:48 PDT
Comment on attachment 148675 [details] Fixes the problem -- not for review Attachment 148675 [details] did not pass chromium-ews (chromium-xvfb): Output: http://queues.webkit.org/results/13016071 New failing tests: media/media-document-audio-repaint.html svg/custom/svg-fonts-in-html.html fast/block/positioning/047.html
WebKit Review Bot
Comment 4 2012-06-20 20:48:51 PDT
Created attachment 148723 [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
Emil A Eklund
Comment 5 2012-06-21 02:54:32 PDT
(In reply to comment #2) > Created an attachment (id=148675) [details] > Fixes the problem -- not for review > > This hack fixes all variations of the test case, but is gross. The Length.h change is needed to address the jittering that can be seen here http://jsfiddle.net/YkB7a/1/ > > I'll continue to think about this. The changes to RenderLayer.cpp are similar to what I've been trying, while it might not be the right place for it the concept seems reasonable in that we want to ensure that the values are aligned based on the bottom/right edges.
Levi Weintraub
Comment 6 2012-06-21 14:50:16 PDT
(In reply to comment #5) > The changes to RenderLayer.cpp are similar to what I've been trying, while it might not be the right place for it the concept seems reasonable in that we want to ensure that the values are aligned based on the bottom/right edges. I was troubled by the change to Length to round the value, but prior to our change to make Lengths floats, this was what occurred anyways. This makes me feel a little more comfortable. The test case attached is fine for the RenderLayer change (which I'm still not very proud of, but I haven't come up with a better solution), but I have no idea how to write a test to ensure we aren't triggering jittering during an animation... Adding Jamesr who may have advice?
Levi Weintraub
Comment 7 2012-06-22 15:36:09 PDT
Either way, this won't work without the patch on 89238
Levi Weintraub
Comment 8 2012-07-23 11:24:51 PDT
Emil A Eklund
Comment 9 2013-01-25 15:42:52 PST
This appears to have been fixed recently, likely by levi's RenderLayer change. Neither the test case attached to this bug nor the one linked from the downstream buh reproduce the problem in recent builds.
Note You need to log in before you can comment on or make changes to this bug.