[Webkit-unassigned] [Bug 77299] Reduce non-CSSOM API of CSSStyleDeclaration

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Feb 7 12:41:55 PST 2012


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





--- Comment #19 from Darin Adler <darin at apple.com>  2012-02-07 12:41:55 PST ---
(From update of attachment 124518)
View in context: https://bugs.webkit.org/attachment.cgi?id=124518&action=review

>> Source/WebCore/css/CSSComputedStyleDeclaration.cpp:2582
>> +    if (!propertyID)
>> +        return 0;
>> +    return getPropertyCSSValue(propertyID);
> 
> If the common case is property is found (which I assume), I'd swap these.

We like early return for error cases. The comment implies we think that compilers run an if statement faster if it is true; that is not correct. The style here should not be changed!

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