Bug 135326

Summary: Cleanup RenderSelectionInfoBase/RenderSelectionInfo/RenderBlockSelectionInfo.
Product: WebKit Reporter: zalan <zalan>
Component: Layout and RenderingAssignee: zalan <zalan>
Status: RESOLVED FIXED    
Severity: Normal CC: bunhere, commit-queue, esprehn+autocc, glenn, gyuyoung.kim, kondapallykalyan, rakuco, rniwa, sergio, simon.fraser
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch
none
Patch none

Description zalan 2014-07-26 20:59:54 PDT
instead of pointer to the renderer.
Comment 1 zalan 2014-07-26 22:28:41 PDT
Created attachment 235581 [details]
Patch
Comment 2 Darin Adler 2014-07-27 23:10:55 PDT
Comment on attachment 235581 [details]
Patch

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

Good refactoring.

> Source/WebCore/ChangeLog:3
> +        RenderSelectionInfoBase/RenderSelectionInfo/RenderBlockSelectionInfo should take renderer reference.

Bug title is a little more specific than the slightly broader refactoring this patch does.

> Source/WebCore/rendering/RenderSelectionInfo.h:37
> +    explicit RenderSelectionInfoBase(RenderObject& renderer)

Too bad we can’t make the type tighter than RenderObject, but I don’t think we can.

> Source/WebCore/rendering/RenderSelectionInfo.h:51
> +    void repaintRectangle(const LayoutRect& repaintRect)
> +    {
> +        m_renderer.repaintUsingContainer(m_repaintContainer, enclosingIntRect(repaintRect));
> +    }

I’m not sure this should be in the class definition. I think classes are easier to read if we move multiple-line function definitions out of the class definitions. I’ve been doing that when working on various header files.

> Source/WebCore/rendering/RenderSelectionInfo.h:84
> -    Vector<LayoutRect> m_rects;
> +    Vector<LayoutRect> m_rects; // relative to repaint container
>      LayoutRect m_rect; // relative to repaint container

Really unclear how these data members relate. Same is true of the two public functions that expose them; not clear why we have both.
Comment 3 zalan 2014-07-28 21:00:32 PDT
Created attachment 235661 [details]
Patch
Comment 4 zalan 2014-07-28 21:00:51 PDT
Comment on attachment 235661 [details]
Patch

EWS testing.
Comment 5 zalan 2014-07-29 07:02:17 PDT
Created attachment 235686 [details]
Patch
Comment 6 zalan 2014-07-29 07:02:39 PDT
Comment on attachment 235686 [details]
Patch

EWS
Comment 7 WebKit Commit Bot 2014-07-29 07:51:51 PDT
Comment on attachment 235686 [details]
Patch

Clearing flags on attachment: 235686

Committed r171744: <http://trac.webkit.org/changeset/171744>
Comment 8 WebKit Commit Bot 2014-07-29 07:51:57 PDT
All reviewed patches have been landed.  Closing bug.