Bug 82549 - Change WebKit/WebKit2 platform code to use pixel snapped values
Summary: Change WebKit/WebKit2 platform code to use pixel snapped values
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Platform (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Emil A Eklund
URL:
Keywords:
Depends on:
Blocks: 60318
  Show dependency treegraph
 
Reported: 2012-03-28 16:34 PDT by Emil A Eklund
Modified: 2012-03-30 17:58 PDT (History)
7 users (show)

See Also:


Attachments
Patch (13.41 KB, patch)
2012-03-28 16:48 PDT, Emil A Eklund
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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.