[Webkit-unassigned] [Bug 60585] Convert RenderBox::setLocation, setLogicalLocation and setLogicalSize to IntPoint/IntSize

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu May 12 10:40:16 PDT 2011


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





--- Comment #6 from Emil A Eklund <eae at chromium.org>  2011-05-12 10:40:15 PST ---
(From update of attachment 93209)
View in context: https://bugs.webkit.org/attachment.cgi?id=93209&action=review

>> Source/WebCore/platform/graphics/FloatPoint.h:207
>> +    return IntPoint(lroundf(p.x()), lroundf(p.y()));
> 
> I don't understand why this is the right name?

I don't particularly like the name either but it was the best I could come up with given that roundedIntPoint was already taken and the difference between lround and other similar rounding functions such rint is the handling of the half way case.

Anyway, I suppose I should be using roundedIntPoint instead, it'll introduce an extra cast but simplifies the code.

>> Source/WebCore/rendering/RenderBox.cpp:1374
>> +        setLocation(roundedAwayFromZeroIntPoint(FloatPoint(box->x(), box->y())));
> 
> Seems we should add a box->position() accessor...  Except aren't x() y() ints here?

The patch for bug 44412 adds a box->position method, once that has been landed this will change to 
setLocation(roundedAwayFromZeroIntPoint(box->location()));

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