[webkit-reviews] review granted: [Bug 56052] percentages are incorrectly rounded in WebKit : [Attachment 86214] used narrowPrecisionToFloat per Simon's review notes
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Mon Mar 21 10:19:00 PDT 2011
Simon Fraser (smfr) <simon.fraser at apple.com> has granted Rik Cabanier
<cabanier at adobe.com>'s request for review:
Bug 56052: percentages are incorrectly rounded in WebKit
https://bugs.webkit.org/show_bug.cgi?id=56052
Attachment 86214: used narrowPrecisionToFloat per Simon's review notes
https://bugs.webkit.org/attachment.cgi?id=86214&action=review
------- Additional Comments from Simon Fraser (smfr) <simon.fraser at apple.com>
View in context: https://bugs.webkit.org/attachment.cgi?id=86214&action=review
> Source/WebCore/platform/Length.h:76
> + m_floatValue = static_cast<float>(m_floatValue*v);
> + else
> + m_intValue = static_cast<int>(m_intValue*v);
Spaces around the * please.
> Source/WebCore/platform/Length.h:170
> + if (m_isFloat)
> + return !m_floatValue;
> +
> + return !m_intValue;
Maybe slightly cleaner as return m_isFloat ? !m_floatValue : !m_intValue;
> Source/WebCore/platform/Length.h:196
> + float fromPercent = from.isZero() ? 0.f : from.percent();
> + float toPercent = isZero() ? 0.f : percent();
Is the 0.f required to fix a compiler issue? If not, stick with 0.
> Source/WebCore/platform/Length.h:201
> + float fromValue = from.isZero() ? 0.f : from.value();
> + float toValue = isZero() ? 0.f : value();
Ditto.
> Source/WebCore/rendering/AutoTableLayout.cpp:235
> + const float epsilon = 1 / 128.0f;
It's not obvious why you chose 1/128 here.
More information about the webkit-reviews
mailing list