Open
Bug 981617
Opened 12 years ago
Updated 1 year ago
"Rounded" methods in Units.h should specify how they round
Categories
(Core :: Layout, defect)
Tracking
()
NEW
People
(Reporter: roc, Unassigned)
Details
Attachments
(1 file)
|
3.12 KB,
patch
|
kats
:
review+
|
Details | Diff | Splinter Review |
Otherwise it can be confusing, since there are different rounding methods. In particular, in other places we call ToNearest.
Also, it's pretty much always wrong to round a rectangle by rounding its x/y/width/height independently.
| Reporter | ||
Comment 1•12 years ago
|
||
Attachment #8388492 -
Flags: review?(bugmail.mozilla)
Comment 2•12 years ago
|
||
Comment on attachment 8388492 [details] [diff] [review]
Part 1: Rename CSSPixel::FromAppUnitsRounded to FromAppUnitsToNearest
Review of attachment 8388492 [details] [diff] [review]:
-----------------------------------------------------------------
r=me with comment fixed
Also, can you change the two call sites to CSSIntRect::FromAppUnitsRounded in nsGlobalWindow.cpp to be CSSIntSize::FromAppUnitsRounded? It's misleading that they're called on CSSIntRect when in fact they deal with size properties.
::: layout/base/Units.h
@@ +75,5 @@
> */
> struct CSSPixel {
>
> + static CSSIntRect FromUntyped(const nsIntRect& aPoint) {
> + return CSSIntRect(aPoint.x, aPoint.y, aPoint.width, aPoint.height);
s/aPoint/aRect/g
Attachment #8388492 -
Flags: review?(bugmail.mozilla) → review+
| Reporter | ||
Updated•10 years ago
|
Assignee: roc → nobody
Updated•3 years ago
|
Severity: normal → S3
You need to log in
before you can comment on or make changes to this bug.
Description
•