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

zalan
Reported 2016-06-11 21:36:19 PDT
Modernize it.
Attachments
Patch (4.93 KB, patch)
2016-06-11 21:39 PDT, zalan
no flags
Patch (4.94 KB, patch)
2016-06-12 13:43 PDT, zalan
no flags
zalan
Comment 1 2016-06-11 21:39:13 PDT
Simon Fraser (smfr)
Comment 2 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 ().
zalan
Comment 3 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.
zalan
Comment 4 2016-06-12 13:43:20 PDT
WebKit Commit Bot
Comment 5 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>
WebKit Commit Bot
Comment 6 2016-06-12 13:55:41 PDT
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.