Bug 82221

Summary: Add rounding to Plugin creation in SubframeLoader
Product: WebKit Reporter: Levi Weintraub <leviw>
Component: Layout and RenderingAssignee: Levi Weintraub <leviw>
Status: RESOLVED FIXED    
Severity: Normal CC: eae, eric, japhet, jchaffraix, 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 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.