Bug 121676

Summary: Add valueForLength/minimumValueForLength wrappers to RenderObject.
Product: WebKit Reporter: Andreas Kling <kling>
Component: Layout and RenderingAssignee: Andreas Kling <kling>
Status: RESOLVED FIXED    
Severity: Normal CC: commit-queue
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch idea
koivisto: review+
Land none

Description Andreas Kling 2013-09-20 06:29:37 PDT
So much "&view()" everywhere.
Comment 1 Andreas Kling 2013-09-20 06:30:29 PDT
Created attachment 212157 [details]
Patch idea
Comment 2 Antti Koivisto 2013-09-20 06:43:00 PDT
Comment on attachment 212157 [details]
Patch idea

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

> Source/WebCore/rendering/RenderObject.h:1003
> +    LayoutUnit valueForLength(const Length& length, LayoutUnit maximumValue, bool roundPercentages = false) const
> +    {
> +        return WebCore::valueForLength(length, maximumValue, &view(), roundPercentages);
> +    }
> +
> +    LayoutUnit minimumValueForLength(const Length& length, LayoutUnit maximumValue, bool roundPercentages = false) const
> +    {
> +        return WebCore::minimumValueForLength(length, maximumValue, &view(), roundPercentages);
> +    }

RenderText should not have any valid uses for these. Please move to RenderElement.
Comment 3 Andreas Kling 2013-09-20 08:17:50 PDT
Created attachment 212168 [details]
Land
Comment 4 WebKit Commit Bot 2013-09-20 08:33:15 PDT
Comment on attachment 212168 [details]
Land

Clearing flags on attachment: 212168

Committed r156166: <http://trac.webkit.org/changeset/156166>
Comment 5 WebKit Commit Bot 2013-09-20 08:33:16 PDT
All reviewed patches have been landed.  Closing bug.