[webkit-reviews] review granted: [Bug 26362] :nth-child() is not re-evaluated when adding or removing children : [Attachment 31265] Patch, testcase, changelog

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Sun Jun 14 11:43:24 PDT 2009


Darin Adler <darin at apple.com> has granted Simon Fraser (smfr)
<simon.fraser at apple.com>'s request for review:
Bug 26362: :nth-child() is not re-evaluated when adding or removing children
https://bugs.webkit.org/show_bug.cgi?id=26362

Attachment 31265: Patch, testcase, changelog
https://bugs.webkit.org/attachment.cgi?id=31265&action=review

------- Additional Comments from Darin Adler <darin at apple.com>
> -Node::StyleChange Node::diff( RenderStyle *s1, RenderStyle *s2 )
> +Node::StyleChange Node::diff(RenderStyle *s1, RenderStyle *s2)

Since you're touching this line to tweak style, please move the "*" characters
next to the type name too.

> +    bool pseudoClassStateEquivalent(const RenderStyle* style)
> +    {
> +	   return m_affectedByEmpty == style->affectedByEmpty() &&
> +		  (!m_affectedByEmpty || m_emptyState == style->emptyState())
&&
> +		  m_firstChildState == style->firstChildState() &&
> +		  m_lastChildState == style->lastChildState() &&
> +		  m_childIndex == style->childIndex();
> +    }

The WebKit coding style (and my person preference) put the operators on the
starts of lines, not the ends of lines. Like this:

    return m_affectedByEmpty == style->affectedByEmpty()
	&& (!m_affectedByEmpty || m_emptyState == style->emptyState())
	&& m_firstChildState == style->firstChildState()
	&& m_lastChildState == style->lastChildState()
	&& m_childIndex == style->childIndex();

r=me


More information about the webkit-reviews mailing list