[webkit-reviews] review denied: [Bug 73040] FloatQuad::isRectilinear() returns false for 180degree rotations : [Attachment 116411] use std::numeric_limits<float>::epsilon() for equality comparison

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Sun Nov 27 11:07:45 PST 2011


James Robinson <jamesr at chromium.org> has denied Dana Jansens
<danakj at chromium.org>'s request for review:
Bug 73040: FloatQuad::isRectilinear() returns false for 180degree rotations
https://bugs.webkit.org/show_bug.cgi?id=73040

Attachment 116411: use std::numeric_limits<float>::epsilon() for equality
comparison
https://bugs.webkit.org/attachment.cgi?id=116411&action=review

------- Additional Comments from James Robinson <jamesr at chromium.org>
View in context: https://bugs.webkit.org/attachment.cgi?id=116411&action=review


> Source/WebCore/ChangeLog:8
> +	   No new tests. (will be covered in layout tests for opaque flag:
https://bugs.webkit.org/show_bug.cgi?id=70634)

really? you can't even right a unit test for this?

> Source/WebCore/platform/graphics/FloatQuad.cpp:89
> +static inline bool equal(float a, float b)

do we actually need this? are there actual cases where exact comparisons fail
but this succeeds?

this function name isn't very good since it isn't actually testing for equality


> Source/WebCore/platform/graphics/FloatQuad.cpp:91
> +    return fabs(a - b) < std::numeric_limits<float>::epsilon();

WebKit style is to not use the 'std::' qualifier here, add an appropriate using
definition at the top of the .cpp and use numeric_limits<> unqualified.


More information about the webkit-reviews mailing list