Bug 139571

Summary: Use is<>() / downcast<>() for StyleRuleBase subclasses
Product: WebKit Reporter: Chris Dumez <cdumez>
Component: CSSAssignee: Chris Dumez <cdumez>
Status: RESOLVED FIXED    
Severity: Normal CC: benjamin, commit-queue, dino, kling
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch none

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.