Bug 158670 - Cleanup RenderBlock::removePositionedObjects
Summary: Cleanup RenderBlock::removePositionedObjects
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Layout and Rendering (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: zalan
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-06-11 21:36 PDT by zalan
Modified: 2016-06-12 13:55 PDT (History)
5 users (show)

See Also:


Attachments
Patch (4.93 KB, patch)
2016-06-11 21:39 PDT, zalan
no flags Details | Formatted Diff | Diff
Patch (4.94 KB, patch)
2016-06-12 13:43 PDT, zalan
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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.