Add Round{In,Out} to BaseRect

RESOLVED FIXED in mozilla11

Status

()

Core
Graphics
RESOLVED FIXED
6 years ago
6 years ago

People

(Reporter: Joe Drew (not getting mail), Assigned: Joe Drew (not getting mail))

Tracking

Trunk
mozilla11
x86
Mac OS X
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment, 1 obsolete attachment)

(Assignee)

Description

6 years ago
Created attachment 558975 [details] [diff] [review]
Add BaseRect::Round{In,Out}

Just like we have gfxRect::RoundIn and RoundOut, we should have BaseRect::RoundIn and RoundOut.
Attachment #558975 - Flags: review?(bas.schouten)
(Assignee)

Updated

6 years ago
Assignee: nobody → joe
Comment on attachment 558975 [details] [diff] [review]
Add BaseRect::Round{In,Out}

Review of attachment 558975 [details] [diff] [review]:
-----------------------------------------------------------------

I don't -really- care. It doesn't make a whole lot of sense for Int though. I'm fine with this, but asking Roc what he thinks.
Attachment #558975 - Flags: review?(roc)
Attachment #558975 - Flags: review?(bas.schouten)
Attachment #558975 - Flags: review+
(Assignee)

Comment 2

6 years ago
It doesn't really matter to me where Round* goes; I only added it to BaseRect because the similar ScaleRound* functions were on it. Scale obviously would do something on IntRects, whereas Round wouldn't, but it seemed natural enough anyways.
Comment on attachment 558975 [details] [diff] [review]
Add BaseRect::Round{In,Out}

Review of attachment 558975 [details] [diff] [review]:
-----------------------------------------------------------------

Seems OK. Shouldn't you remove RoundOut/RoundIn from gfxRect? Why not add Round() here too?

I think IntRect should declare RoundOut/RoundIn/Round and just define them to be noops.
(Assignee)

Comment 4

6 years ago
Created attachment 559545 [details] [diff] [review]
move Round{,In,Out} to BaseRect, remove it from gfxRect

Don't know precisely how I missed the fact that gfxRect is derived from BaseRect. Anyways, this removes the gfxRect versions, and adds an empty version to IntRect. These functions aren't virtual, but it doesn't matter since they should be no-ops on integers, and we always operate on the concrete class anyways.
Attachment #558975 - Attachment is obsolete: true
Attachment #558975 - Flags: review?(roc)
Attachment #559545 - Flags: review?(bas.schouten)
(Assignee)

Comment 5

6 years ago
Bas, review ping?
(Assignee)

Comment 6

6 years ago
Er, whoops - Bas wasn't cc'd.

Bas, review ping?
Comment on attachment 559545 [details] [diff] [review]
move Round{,In,Out} to BaseRect, remove it from gfxRect

Review of attachment 559545 [details] [diff] [review]:
-----------------------------------------------------------------

r+ which change discussed on IRC.
Attachment #559545 - Flags: review?(bas.schouten) → review+

Comment 8

6 years ago
https://hg.mozilla.org/mozilla-central/rev/e6705f49eaaa
Status: NEW → RESOLVED
Last Resolved: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla11
You need to log in before you can comment on or make changes to this bug.