Bug 137641 - Use is<>() / downcast<>() for Table render objects
Summary: Use is<>() / downcast<>() for Table 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-11 17:49 PDT by Chris Dumez
Modified: 2014-10-13 11:21 PDT (History)
5 users (show)

See Also:


Attachments
Patch (71.38 KB, patch)
2014-10-11 17:58 PDT, Chris Dumez
no flags Details | Formatted Diff | Diff
Patch (71.72 KB, patch)
2014-10-13 10:24 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-11 17:49:59 PDT
Use is<>() / downcast<>() for Table render objects.
Comment 1 Chris Dumez 2014-10-11 17:58:22 PDT
Created attachment 239692 [details]
Patch
Comment 2 WebKit Commit Bot 2014-10-11 17:59:23 PDT
Attachment 239692 [details] did not pass style-queue:


ERROR: Source/WebCore/rendering/RenderTreeAsText.cpp:470:  Multi line control clauses should use braces.  [whitespace/braces] [4]
ERROR: Source/WebCore/rendering/RenderTreeAsText.cpp:492:  Multi line control clauses should use braces.  [whitespace/braces] [4]
Total errors found: 2 in 25 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 3 Mihnea Ovidenie 2014-10-13 08:04:52 PDT
Comment on attachment 239692 [details]
Patch

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

r=me with the two comments

> Source/WebCore/rendering/AutoTableLayout.cpp:192
> +            RenderBlock* renderBlock = table->containingBlock();

I believe containingBlock is better than renderBlock here if you want to change it from cb.

> Source/WebCore/rendering/RenderTableCol.cpp:33
> +#include "RenderTableCaption.h"

Is this include needed?
Comment 4 Chris Dumez 2014-10-13 10:22:35 PDT
Comment on attachment 239692 [details]
Patch

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

>> Source/WebCore/rendering/AutoTableLayout.cpp:192
>> +            RenderBlock* renderBlock = table->containingBlock();
> 
> I believe containingBlock is better than renderBlock here if you want to change it from cb.

Sounds good.

>> Source/WebCore/rendering/RenderTableCol.cpp:33
>> +#include "RenderTableCaption.h"
> 
> Is this include needed?

Yes, see below.

> Source/WebCore/rendering/RenderTableCol.cpp:174
> +        if (is<RenderTableCaption>(*next))

The include is needed because of this check. RenderTableCaption type and its template specialization need to be defined.
Comment 5 Chris Dumez 2014-10-13 10:24:28 PDT
Created attachment 239731 [details]
Patch
Comment 6 WebKit Commit Bot 2014-10-13 10:27:24 PDT
Attachment 239731 [details] did not pass style-queue:


ERROR: Source/WebCore/rendering/RenderTreeAsText.cpp:470:  Multi line control clauses should use braces.  [whitespace/braces] [4]
ERROR: Source/WebCore/rendering/RenderTreeAsText.cpp:492:  Multi line control clauses should use braces.  [whitespace/braces] [4]
Total errors found: 2 in 25 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 7 WebKit Commit Bot 2014-10-13 11:21:12 PDT
Comment on attachment 239731 [details]
Patch

Clearing flags on attachment: 239731

Committed r174653: <http://trac.webkit.org/changeset/174653>
Comment 8 WebKit Commit Bot 2014-10-13 11:21:17 PDT
All reviewed patches have been landed.  Closing bug.