Move ns{Int,}{Point,Size,Margin,Rect} into namespace mozilla

RESOLVED WONTFIX

Status

()

Core
Graphics
--
enhancement
RESOLVED WONTFIX
9 years ago
6 years ago

People

(Reporter: zwol, Unassigned)

Tracking

Trunk
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

9 years ago
The classes listed in the summary should move into namespace mozilla and lose the ns-prefix.  Post bug 470506, their base classes are already in namespace mozilla.  This change is straightforward but requires search-and-replace fixups through a lot of code (will probably be done with pork).

We might want to rename the classes at the same time - thinking about this pattern:

  nsIntPoint -> mozilla::PxPoint
  nsPoint    -> mozilla::AuPoint

The prefixes encode the units of the coordinates stored in each type: 'Px' is for CSS pixels, 'Au' is for app units (a bit obscure, alas).  Am open to better ideas.
(Reporter)

Updated

9 years ago
No longer depends on: 470506

Comment 1

9 years ago
Au is probably bad since it is an actual unit
(Reporter)

Comment 2

9 years ago
It is?  The only thing it means to me is the chemical symbol for gold, but that's clearly irrelevant in this context...

Comment 3

9 years ago
1au = 1.49598e14 millimeters
(Reporter)

Comment 4

9 years ago
i've been handed a clue on irc: astronomical units, of course.

suggestions for better name very welcome.
what's wrong with "AppPoint" (AppRect/AppSize)?  I don't really like PxPoint either, since fractional pixels are just fine.. I'd keep that as IntPoint, since the type is the explicit piece there that's important.
(Reporter)

Updated

9 years ago
Depends on: 470506
(Reporter)

Comment 6

8 years ago
I no longer work for Mozilla.  Deassigning myself from bugs I don't intend to work on as a volunteer.
Assignee: zackw → nobody
Status: ASSIGNED → NEW
We now have mozilla::gfx::{Int,}{Point,Size,Margin,Rect}; I don't know that there's a lot of benefit to changing legacy nsRect et al.
Status: NEW → RESOLVED
Last Resolved: 6 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.