Bug 137764

Summary: Use is<>() / downcast<>() for list-related render objects
Product: WebKit Reporter: Chris Dumez <cdumez>
Component: Layout and RenderingAssignee: Chris Dumez <cdumez>
Status: RESOLVED FIXED    
Severity: Normal CC: benjamin, commit-queue, darin, kling, mihnea
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on: 137424    
Bug Blocks:    
Attachments:
Description Flags
Patch
none
Patch none

Description Chris Dumez 2014-10-15 19:15:41 PDT
Use is<>() / downcast<>() for list-related render objects
Comment 1 Chris Dumez 2014-10-15 19:20:28 PDT
Created attachment 239917 [details]
Patch
Comment 2 Benjamin Poulain 2014-10-15 21:17:48 PDT
Comment on attachment 239917 [details]
Patch

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

> Source/WebCore/html/HTMLLIElement.cpp:97
>      while (!listNode) {

This loop is so weird.

I would prefer a while(true)+break or a do-while.

> Source/WebCore/rendering/RenderListItem.cpp:155
> +        Node* otherList = enclosingList(downcast<RenderListItem>(renderer));

Node->Element
Comment 3 Chris Dumez 2014-10-15 21:34:19 PDT
Created attachment 239927 [details]
Patch
Comment 4 WebKit Commit Bot 2014-10-15 23:04:38 PDT
Comment on attachment 239927 [details]
Patch

Clearing flags on attachment: 239927

Committed r174759: <http://trac.webkit.org/changeset/174759>
Comment 5 WebKit Commit Bot 2014-10-15 23:04:42 PDT
All reviewed patches have been landed.  Closing bug.