Bug 139571 - Use is<>() / downcast<>() for StyleRuleBase subclasses
Summary: Use is<>() / downcast<>() for StyleRuleBase subclasses
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: CSS (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Chris Dumez
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-12-11 17:26 PST by Chris Dumez
Modified: 2014-12-12 12:27 PST (History)
4 users (show)

See Also:


Attachments
Patch (27.67 KB, patch)
2014-12-11 17:43 PST, Chris Dumez
no flags Details | Formatted Diff | Diff
Patch (27.92 KB, patch)
2014-12-11 18:07 PST, 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-12-11 17:26:01 PST
Use is<>() / downcast<>() for StyleRuleBase subclasses for safety.
Comment 1 Chris Dumez 2014-12-11 17:43:25 PST
Created attachment 243167 [details]
Patch
Comment 2 Chris Dumez 2014-12-11 18:07:07 PST
Created attachment 243170 [details]
Patch
Comment 3 Andreas Kling 2014-12-12 11:46:00 PST
Comment on attachment 243170 [details]
Patch

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

r=me

> Source/WebCore/inspector/InspectorCSSAgent.cpp:-1049
> -        if (!matchedRules[i]->isStyleRule())
> -            continue;

Hah, this was silly.
Comment 4 Chris Dumez 2014-12-12 12:05:41 PST
Comment on attachment 243170 [details]
Patch

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

>> Source/WebCore/inspector/InspectorCSSAgent.cpp:-1049
>> -            continue;
> 
> Hah, this was silly.

It is nice that is<>() / downcast<>() give build failures on useless type checks / casts.
Comment 5 WebKit Commit Bot 2014-12-12 12:27:40 PST
Comment on attachment 243170 [details]
Patch

Clearing flags on attachment: 243170

Committed r177228: <http://trac.webkit.org/changeset/177228>
Comment 6 WebKit Commit Bot 2014-12-12 12:27:45 PST
All reviewed patches have been landed.  Closing bug.