Bug 23663 - Should add void toRenderBox method to catch unnecessary casts
Summary: Should add void toRenderBox method to catch unnecessary casts
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Layout and Rendering (show other bugs)
Version: 528+ (Nightly build)
Hardware: Other All
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-01-31 08:26 PST by Adam Treat
Modified: 2009-01-31 10:08 PST (History)
0 users

See Also:


Attachments
Add void toRenderBox casting method (4.18 KB, patch)
2009-01-31 08:27 PST, Adam Treat
darin: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Adam Treat 2009-01-31 08:26:14 PST
RenderBox should add a void toRenderBox method to catch unnecessary casts much like David Hyatt has added for other RenderFoo classes.
Comment 1 Adam Treat 2009-01-31 08:27:59 PST
Created attachment 27217 [details]
Add void toRenderBox casting method

Adds the check and also fixes four cases of unnecessary toRenderBox casts.
Comment 2 Darin Adler 2009-01-31 08:55:33 PST
Comment on attachment 27217 [details]
Add void toRenderBox casting method

> +// This will catch anyone doing an unnecessary cast.
> +void toRenderBox(const RenderBox* o);

We should leave out the "o" here.

r=me
Comment 3 Adam Treat 2009-01-31 10:08:27 PST
Fixed with r40452.