[webkit-reviews] review granted: [Bug 73121] Factor element pointer out of CSSMutableStyleDeclaration. : [Attachment 116599] Proposed patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Nov 25 05:11:35 PST 2011


Antti Koivisto <koivisto at iki.fi> has granted Andreas Kling <kling at webkit.org>'s
request for review:
Bug 73121: Factor element pointer out of CSSMutableStyleDeclaration.
https://bugs.webkit.org/show_bug.cgi?id=73121

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

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


r=me, nice!

> Source/WebCore/css/CSSMutableStyleDeclaration.cpp:615
> +    if (isElementStyleDeclaration() &&
static_cast<CSSElementStyleDeclaration*>(this)->element()) {
> +	   StyledElement* element =
static_cast<CSSElementStyleDeclaration*>(this)->element();

This could could live in CSSElementStyleDeclaration

> Source/WebCore/css/CSSMutableStyleDeclaration.h:179
>  
> +class CSSElementStyleDeclaration : public CSSMutableStyleDeclaration {
> +public:

This should probably have a file of its own at some point.

> Source/WebCore/css/CSSStyleDeclaration.h:124
> +    // CSSElementStyleDeclaration bits:
> +    bool m_isElementStyleDeclaration : 1;
> +    bool m_isInlineStyleDeclaration : 1;

Type enum would be another alternative. It might read slightly better in some
places (like where the inline bit is passed down in constructor).


More information about the webkit-reviews mailing list