Bug 82221 - Add rounding to Plugin creation in SubframeLoader
Summary: Add rounding to Plugin creation in SubframeLoader
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-03-26 10:42 PDT by Levi Weintraub
Modified: 2012-04-02 03:48 PDT (History)
5 users (show)

See Also:


Attachments
Patch (2.71 KB, patch)
2012-03-27 06:48 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-03-26 10:42:46 PDT
Widgets are always positioned at pixel boundaries, so we're safe to round the sizes. We need to do so in SubframeLoader when we create plugins.
Comment 1 Levi Weintraub 2012-03-26 10:44:24 PDT
This depends on the patch to 82196 because it uses LayoutRect::pixelSnappedSize().
Comment 2 Levi Weintraub 2012-03-27 06:26:24 PDT
On second look, we only need rounding, not pixel snapping. Patch forthcoming.
Comment 3 Levi Weintraub 2012-03-27 06:48:02 PDT
Created attachment 134046 [details]
Patch
Comment 4 Eric Seidel (no email) 2012-03-27 12:29:28 PDT
Comment on attachment 134046 [details]
Patch

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

> Source/WebCore/loader/SubframeLoader.cpp:363
> +    IntSize contentSize = roundedIntSize(LayoutSize(renderer->contentWidth(), renderer->contentHeight()));

Really?  No contentSize()?
Comment 5 Levi Weintraub 2012-03-27 14:07:21 PDT
(In reply to comment #4)
> (From update of attachment 134046 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=134046&action=review
> 
> > Source/WebCore/loader/SubframeLoader.cpp:363
> > +    IntSize contentSize = roundedIntSize(LayoutSize(renderer->contentWidth(), renderer->contentHeight()));
> 
> Really?  No contentSize()?

I thought the same thing initially, but then declined to implement it to prevent misuse. This should only be rounded when dealing with Widgets. Otherwise, it should be pixel snapped, which requires more work (but in the case of Widgets, would yield the same value... perhaps this is premature optimization?).
Comment 6 WebKit Review Bot 2012-04-02 03:47:55 PDT
Comment on attachment 134046 [details]
Patch

Clearing flags on attachment: 134046

Committed r112852: <http://trac.webkit.org/changeset/112852>
Comment 7 WebKit Review Bot 2012-04-02 03:48:05 PDT
All reviewed patches have been landed.  Closing bug.