Bug 83621 - Correct pixel snapping error in RenderBox::pixelSnappedClientWidth/Height
Summary: Correct pixel snapping error in RenderBox::pixelSnappedClientWidth/Height
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Layout and Rendering (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Levi Weintraub
URL:
Keywords:
Depends on:
Blocks: 60318
  Show dependency treegraph
 
Reported: 2012-04-10 14:41 PDT by Levi Weintraub
Modified: 2012-04-11 18:11 PDT (History)
4 users (show)

See Also:


Attachments
Patch (2.41 KB, patch)
2012-04-10 14:54 PDT, Levi Weintraub
no flags Details | Formatted Diff | Diff
Patch for landing (2.49 KB, patch)
2012-04-11 16:42 PDT, Levi Weintraub
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Levi Weintraub 2012-04-10 14:41:19 PDT
These pixel snapping convenience functions were failing to take the Box's location into account, which could result in reporting bad values. Thanks to Julien for catching this.
Comment 1 Levi Weintraub 2012-04-10 14:54:40 PDT
Created attachment 136547 [details]
Patch
Comment 2 Julien Chaffraix 2012-04-11 10:20:25 PDT
Comment on attachment 136547 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=136547&action=review

> Source/WebCore/ChangeLog:13
> +        No new tests. Untestable until we switch to FractionalLayoutUnits.

Did this show a difference once we switch to FractionalLayoutUnit? If not, it really sounds like we should try to land a test that would show the difference.
Comment 3 Levi Weintraub 2012-04-11 13:59:12 PDT
(In reply to comment #2)
> (From update of attachment 136547 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=136547&action=review
> 
> > Source/WebCore/ChangeLog:13
> > +        No new tests. Untestable until we switch to FractionalLayoutUnits.
> 
> Did this show a difference once we switch to FractionalLayoutUnit? If not, it really sounds like we should try to land a test that would show the difference.

This is easy to test for once we've cut over to FractionalLayoutUnits. Currently though, the parameter that was changed is unused :p

I've uploaded a test case to our sub-pixel branch that will be included when we "flip the switch." You can see it here: http://trac.webkit.org/browser/branches/subpixellayout/LayoutTests/fast/sub-pixel/client-width-height-snapping.html
Comment 4 Eric Seidel (no email) 2012-04-11 14:42:39 PDT
Comment on attachment 136547 [details]
Patch

OK.
Comment 5 Levi Weintraub 2012-04-11 16:42:25 PDT
Created attachment 136787 [details]
Patch for landing
Comment 6 Levi Weintraub 2012-04-11 16:42:50 PDT
(In reply to comment #5)
> Created an attachment (id=136787) [details]
> Patch for landing

Added a comment in the changelog explicitly stating that the test is forthcoming.
Comment 7 WebKit Review Bot 2012-04-11 18:11:20 PDT
Comment on attachment 136787 [details]
Patch for landing

Clearing flags on attachment: 136787

Committed r113932: <http://trac.webkit.org/changeset/113932>
Comment 8 WebKit Review Bot 2012-04-11 18:11:24 PDT
All reviewed patches have been landed.  Closing bug.