Bug 158670

Summary: Cleanup RenderBlock::removePositionedObjects
Product: WebKit Reporter: zalan <zalan>
Component: Layout and RenderingAssignee: zalan <zalan>
Status: RESOLVED FIXED    
Severity: Normal CC: commit-queue, esprehn+autocc, glenn, kondapallykalyan, simon.fraser
Priority: P2    
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch none

Description zalan 2016-06-11 21:36:19 PDT
Modernize it.
Comment 1 zalan 2016-06-11 21:39:13 PDT
Created attachment 281118 [details]
Patch
Comment 2 Simon Fraser (smfr) 2016-06-12 06:36:05 PDT
Comment on attachment 281118 [details]
Patch

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

> Source/WebCore/rendering/RenderBlock.cpp:2208
> +        // It is parent blocks job to add positioned child to positioned objects list of its containing block

"It is the parent block's job to add the positioned child lot the positioned objects list of its"

> Source/WebCore/rendering/RenderBlock.cpp:2209
> +        // Parent layout needs to be invalidated to ensure this happens.

"The parent's layout needs"

> Source/WebCore/rendering/RenderBlock.cpp:2211
> +        for (;parent && !parent->isRenderBlock(); parent = parent->parent()) { }

I don't find this more readable than the while ().
Comment 3 zalan 2016-06-12 13:31:59 PDT
(In reply to comment #2)
> Comment on attachment 281118 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=281118&action=review
> 
> > Source/WebCore/rendering/RenderBlock.cpp:2208
> > +        // It is parent blocks job to add positioned child to positioned objects list of its containing block
> 
> "It is the parent block's job to add the positioned child lot the positioned
> objects list of its"
> 
> > Source/WebCore/rendering/RenderBlock.cpp:2209
> > +        // Parent layout needs to be invalidated to ensure this happens.
> 
> "The parent's layout needs"
Happens when you just copy&paste the rest of the code.

> 
> > Source/WebCore/rendering/RenderBlock.cpp:2211
> > +        for (;parent && !parent->isRenderBlock(); parent = parent->parent()) { }
> 
> I don't find this more readable than the while ().
I started using it after someone pointed it out in one of code reviews. I don't have a strong preference on this though.
Comment 4 zalan 2016-06-12 13:43:20 PDT
Created attachment 281128 [details]
Patch
Comment 5 WebKit Commit Bot 2016-06-12 13:55:37 PDT
Comment on attachment 281128 [details]
Patch

Clearing flags on attachment: 281128

Committed r201985: <http://trac.webkit.org/changeset/201985>
Comment 6 WebKit Commit Bot 2016-06-12 13:55:41 PDT
All reviewed patches have been landed.  Closing bug.