Bug 83147

Summary: Update LayoutUnit usage in RenderView
Product: WebKit Reporter: Levi Weintraub <leviw>
Component: Layout and RenderingAssignee: Levi Weintraub <leviw>
Status: RESOLVED FIXED    
Severity: Normal CC: eae, eric, jchaffraix, webkit.review.bot
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on: 83372    
Bug Blocks: 60318    
Attachments:
Description Flags
Patch
none
Patch for landing
none
Patch for landing none

Description Levi Weintraub 2012-04-04 04:50:55 PDT
Mostly updating painting functions. Also adding an assert to ensure views aren't called to paint at sub-pixel coordinates, since currently this is never expected behavior.
Comment 1 Levi Weintraub 2012-04-04 05:29:08 PDT
Created attachment 135565 [details]
Patch
Comment 2 Julien Chaffraix 2012-04-05 20:06:23 PDT
Comment on attachment 135565 [details]
Patch

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

> Source/WebCore/rendering/RenderView.cpp:221
> +    // RenderViews should never be called to paint with an offset not on device pixels.
> +    ASSERT(LayoutPoint(IntPoint(paintOffset.x(), paintOffset.y())) == paintOffset);

I feel this will be used at several places to ensure that we properly converted / rounded. Maybe it would be worth having a convenience function to check that (like bool isPixelAlignedLayoutPoint)?

> Source/WebCore/rendering/RenderView.cpp:-329
> -        // FIXME: Hardcoded offsets here are not good.

I think this comment still applies. I read this comment as: the offset is hardcoded to the start of the object padding box (which it still is). I wonder if it really does add something though.

> Source/WebCore/rendering/RenderView.h:72
> +    virtual void computeRectForRepaint(RenderBoxModelObject* repaintContainer, LayoutRect&, bool fixed = false) const;
> +    virtual void repaintViewRectangle(const LayoutRect&, bool immediate = false);

please decorate the virtual overridden functions as you go with OVERRIDE (not repeated).
Comment 3 Levi Weintraub 2012-04-06 05:39:49 PDT
Created attachment 136009 [details]
Patch for landing
Comment 4 WebKit Review Bot 2012-04-06 07:11:01 PDT
Comment on attachment 136009 [details]
Patch for landing

Clearing flags on attachment: 136009

Committed r113431: <http://trac.webkit.org/changeset/113431>
Comment 5 WebKit Review Bot 2012-04-06 07:11:06 PDT
All reviewed patches have been landed.  Closing bug.
Comment 6 Levi Weintraub 2012-04-06 08:38:20 PDT
Reopening to attach new patch.
Comment 7 Levi Weintraub 2012-04-06 08:38:27 PDT
Created attachment 136028 [details]
Patch for landing
Comment 8 Levi Weintraub 2012-04-06 08:39:04 PDT
(In reply to comment #7)
> Created an attachment (id=136028) [details]
> Patch for landing

Removed the offending overrides.
Comment 9 WebKit Review Bot 2012-04-06 13:05:14 PDT
Comment on attachment 136028 [details]
Patch for landing

Clearing flags on attachment: 136028

Committed r113487: <http://trac.webkit.org/changeset/113487>
Comment 10 WebKit Review Bot 2012-04-06 13:05:19 PDT
All reviewed patches have been landed.  Closing bug.