Bug 70109

Summary: Stricter management of WebKitCSSKeyframeRules.
Product: WebKit Reporter: Andreas Kling <kling>
Component: CSSAssignee: Andreas Kling <kling>
Status: RESOLVED FIXED    
Severity: Normal    
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Proposed patch koivisto: review+

Description Andreas Kling 2011-10-14 07:58:40 PDT
WebKitCSSKeyframesRule should only ever manage WebKitCSSKeyframeRule rules, so let's be a bit more strict about this.
Comment 1 Andreas Kling 2011-10-14 07:59:31 PDT
Created attachment 111015 [details]
Proposed patch
Comment 2 WebKit Review Bot 2011-10-14 08:02:05 PDT
Attachment 111015 [details] did not pass style-queue:

Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'Source/WebCore/ChangeLog', u'Source/WebCor..." exit_code: 1

Source/WebCore/ChangeLog:3:  ChangeLog entry has no bug number  [changelog/bugnumber] [5]
Total errors found: 1 in 4 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 3 Andreas Kling 2011-10-14 08:04:37 PDT
(In reply to comment #2)
> Attachment 111015 [details] did not pass style-queue:
> 
> Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'Source/WebCore/ChangeLog', u'Source/WebCor..." exit_code: 1
> 
> Source/WebCore/ChangeLog:3:  ChangeLog entry has no bug number  [changelog/bugnumber] [5]
> Total errors found: 1 in 4 files

D'oh, I has the dumb.
Comment 4 Antti Koivisto 2011-10-14 08:12:14 PDT
Comment on attachment 111015 [details]
Proposed patch

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

r=me, with one change

> Source/WebCore/css/StyleBase.h:-55
> -        virtual bool isKeyframeRule() const { return false; }

Please keep this so you can assert before casting.

> Source/WebCore/css/WebKitCSSKeyframesRule.cpp:80
> +    return static_cast<const WebKitCSSKeyframeRule*>(m_lstCSSRules->item(index));

assert here.
Comment 5 Andreas Kling 2011-10-14 09:00:15 PDT
Committed r97468: <http://trac.webkit.org/changeset/97468>