[Webkit-unassigned] [Bug 22759] dropdown menu disappears on mouse-over

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Dec 29 16:55:11 PST 2010


https://bugs.webkit.org/show_bug.cgi?id=22759


Darin Adler <darin at apple.com> changed:

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




--- Comment #15 from Darin Adler <darin at apple.com>  2010-12-29 16:55:10 PST ---
(From update of attachment 76255)
View in context: https://bugs.webkit.org/attachment.cgi?id=76255&action=review

Change looks fine, but review- for a slight bit of unneeded work due to the way the code is structured.

> WebCore/css/CSSPrimitiveValue.cpp:439
> +    double roundedResult = result;
> +    if (shouldRound)
> +        roundedResult = round(result);
>      if (!applyZoomMultiplier || multiplier == 1.0)
> -        return result;
> -     
> +        return roundedResult;

Why compute roundedResult outside the if statement where it’s being returned? That seems like extra work for no benefit. I would write:

    if (!applyZoomMultiplier || multiplier == 1.0)
        return shouldRound ? round(result) : result;

Or the equivalent with two if statements.

-- 
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