Bug 82549

Summary: Change WebKit/WebKit2 platform code to use pixel snapped values
Product: WebKit Reporter: Emil A Eklund <eae>
Component: PlatformAssignee: Emil A Eklund <eae>
Status: RESOLVED FIXED    
Severity: Normal CC: andersca, eric, hyatt, leviw, mitz, simon.fraser, webkit.review.bot
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on:    
Bug Blocks: 60318    
Attachments:
Description Flags
Patch none

Description Emil A Eklund 2012-03-28 16:34:20 PDT
Change WebKit and WebKit2 platform code to use rounded locations and pixel snapped rects and sizes. This avoids having to expose the fractional layout types to the platform code.
Comment 1 Emil A Eklund 2012-03-28 16:48:06 PDT
Created attachment 134444 [details]
Patch
Comment 2 Eric Seidel (no email) 2012-03-28 17:06:55 PDT
Comment on attachment 134444 [details]
Patch

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

> Source/WebCore/dom/Node.h:380
>      LayoutRect renderRect(bool* isReplaced);
> +    IntRect pixelSnappedRenderRect(bool* isReplaced) { return pixelSnappedIntRect(renderRect(isReplaced)); }

Wouldn't this be easier to call renderRect().pixelSnapped() in the caller instead?
Comment 3 Emil A Eklund 2012-03-28 17:10:13 PDT
(In reply to comment #2)
> (From update of attachment 134444 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=134444&action=review
> 
> > Source/WebCore/dom/Node.h:380
> >      LayoutRect renderRect(bool* isReplaced);
> > +    IntRect pixelSnappedRenderRect(bool* isReplaced) { return pixelSnappedIntRect(renderRect(isReplaced)); }
> 
> Wouldn't this be easier to call renderRect().pixelSnapped() in the caller instead?

It would but that would break the encapsulation and expose LayoutRects to the WebKit platform code, something we have been trying to avoid.
Comment 4 Emil A Eklund 2012-03-30 16:48:08 PDT
Ping?
Comment 5 Eric Seidel (no email) 2012-03-30 16:51:21 PDT
Comment on attachment 134444 [details]
Patch

Thank you for the ping.
Comment 6 Emil A Eklund 2012-03-30 16:54:41 PDT
Comment on attachment 134444 [details]
Patch

Thanks for the review!
Comment 7 WebKit Review Bot 2012-03-30 17:58:05 PDT
Comment on attachment 134444 [details]
Patch

Clearing flags on attachment: 134444

Committed r112758: <http://trac.webkit.org/changeset/112758>
Comment 8 WebKit Review Bot 2012-03-30 17:58:10 PDT
All reviewed patches have been landed.  Closing bug.