Bug 70109 - Stricter management of WebKitCSSKeyframeRules.
Summary: Stricter management of WebKitCSSKeyframeRules.
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: CSS (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Andreas Kling
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-10-14 07:58 PDT by Andreas Kling
Modified: 2011-10-14 09:00 PDT (History)
0 users

See Also:


Attachments
Proposed patch (7.93 KB, patch)
2011-10-14 07:59 PDT, Andreas Kling
koivisto: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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>