[webkit-reviews] review granted: [Bug 82728] Split remaining CSSRules into internal and CSSOM types : [Attachment 135091] patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Apr 2 07:48:35 PDT 2012


Andreas Kling <kling at webkit.org> has granted Antti Koivisto <koivisto at iki.fi>'s
request for review:
Bug 82728: Split remaining CSSRules into internal and CSSOM types
https://bugs.webkit.org/show_bug.cgi?id=82728

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

------- Additional Comments from Andreas Kling <kling at webkit.org>
View in context: https://bugs.webkit.org/attachment.cgi?id=135091&action=review


Love it.
Would be nice to get EWS input though.

> Source/WebCore/ChangeLog:27
> +	   StyleRuleBase is refounted. 

Typo, refcounted.

> Source/WebCore/css/CSSImportRule.h:57
>      // to avoid adding a vptr to CSSImportRule.

This comment should be updated to say StyleRuleImport.

> Source/WebCore/css/CSSMediaRule.cpp:45
> +    for (unsigned i = 0; i < m_childRuleCSSOMWrappers.size(); ++i) {

Official Antti Coding Style dictates that size() should be kept in a separate
variable.

> Source/WebCore/css/CSSMediaRule.h:58
> +    mutable Vector<RefPtr<CSSRule> > m_childRuleCSSOMWrappers;

This would be more memory-efficient as OwnPtr<Vector<RefPtr<CSSRule>>> as CSSOM
wrappers are rarely constructed.

> Source/WebCore/css/CSSStyleSheet.cpp:493
> +	for (unsigned i = 0; i < m_importRules.size(); ++i) {

Antti Coding Style!

> Source/WebCore/css/CSSStyleSheet.h:69
> +    virtual CSSStyleSheet* parentStyleSheet() const;

OVERRIDE.

> Source/WebCore/css/StyleRule.h:83
> +    signed m_sourceLine : 28;

We should make this unsigned at some point, the default value is 0, and there
is no need for negative values AFAICT.

> Source/WebCore/css/WebKitCSSKeyframesRule.cpp:74
> +    for (unsigned i = 0; i < m_keyframes.size(); ++i) {

Antti Coding Style!

> Source/WebCore/css/WebKitCSSKeyframesRule.h:56
> +    String name() const { return m_name; }	 
> +    void setName(const String& name) { m_name = AtomicString(name); }

These should probably pass AtomicString around rather than String.

> Source/WebCore/css/WebKitCSSRegionRule.cpp:49
> +    for (unsigned i = 0; i < m_childRuleCSSOMWrappers.size(); ++i) {

Antti Coding Style.


More information about the webkit-reviews mailing list