[Webkit-unassigned] [Bug 88222] Improve the performance of pushScope in StyleResolver

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Jun 4 18:10:41 PDT 2012


Hajime Morrita <morrita at google.com> changed:

           What    |Removed                     |Added
 Attachment #145558|review?                     |review-
               Flag|                            |

--- Comment #2 from Hajime Morrita <morrita at google.com>  2012-06-04 18:10:40 PST ---
(From update of attachment 145558)
View in context: https://bugs.webkit.org/attachment.cgi?id=145558&action=review

> Source/WebCore/ChangeLog:10
> +        Reviewed by NOBODY (OOPS!).

The "Reviewed By" line should be jut after the bug URL. See others.

> Source/WebCore/css/StyleResolver.cpp:563
>      for (; parent; parent = parent->parentOrHostNode()) {

It would be better to introduce new local variable for this loop instead of reusing the parameter.
It's generally a bad style to reuse it and that is a source of this bug.

> Source/WebCore/css/StyleResolver.cpp:597
> +            const ScopeStackFrame& lastFrame = m_scopeStack[m_scopeStack.size() - 1];

Vector::last() is preferred. Then it's easy to pack the conditional into the single if clause.
Also, why do we need isEmpty() check?

Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

More information about the webkit-unassigned mailing list