Bug 137764 - Use is<>() / downcast<>() for list-related render objects
Summary: Use is<>() / downcast<>() for list-related render objects
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Layout and Rendering (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Chris Dumez
URL:
Keywords:
Depends on: 137424
Blocks:
  Show dependency treegraph
 
Reported: 2014-10-15 19:15 PDT by Chris Dumez
Modified: 2014-10-15 23:04 PDT (History)
5 users (show)

See Also:


Attachments
Patch (37.11 KB, patch)
2014-10-15 19:20 PDT, Chris Dumez
no flags Details | Formatted Diff | Diff
Patch (37.47 KB, patch)
2014-10-15 21:34 PDT, Chris Dumez
no flags Details | Formatted Diff | Diff

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