[webkit-reviews] review granted: [Bug 71382] Devirtualize CSSRule. : [Attachment 113347] Possibly a patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Nov 2 12:30:14 PDT 2011


Antti Koivisto <koivisto at iki.fi> has granted Andreas Kling <kling at webkit.org>'s
request for review:
Bug 71382: Devirtualize CSSRule.
https://bugs.webkit.org/show_bug.cgi?id=71382

Attachment 113347: Possibly a patch
https://bugs.webkit.org/attachment.cgi?id=113347&action=review

------- Additional Comments from Antti Koivisto <koivisto at iki.fi>
View in context: https://bugs.webkit.org/attachment.cgi?id=113347&action=review


r=me with a few comments.

> Source/WebCore/css/CSSImportRule.h:60
> +    class ImportedStyleSheetClient : public CachedStyleSheetClient {

This could use a comment explaining why the class itself can't implement the
interface.

> Source/WebCore/css/CSSRule.cpp:76
> +void CSSRule::deref()
> +{
> +    if (!derefBase())
> +	   return;
> +    switch (type()) {
> +    case UNKNOWN_RULE:

The deletion part should be factored into a function. deref() can be inlined.

> Source/WebCore/css/CSSRule.h:40
> +    // Override RefCounted's deref() to ensure operator delete is called on
> +    // the appropriate subclass type.
> +    void deref();

You should explain that this class is non-virtual for a reason.


More information about the webkit-reviews mailing list