Last Comment Bug 491589 - Convert ns{Int,}{Point,Size,Margin,Rect} to typedefs
: Convert ns{Int,}{Point,Size,Margin,Rect} to typedefs
Status: RESOLVED FIXED
:
Product: Core
Classification: Components
Component: Graphics (show other bugs)
: Trunk
: All All
: -- enhancement (vote)
: ---
Assigned To: Nobody; OK to take it and work on it
:
: Milan Sreckovic [:milan]
Mentors:
Depends on: 470506
Blocks:
  Show dependency treegraph
 
Reported: 2009-05-05 15:04 PDT by Zack Weinberg (:zwol)
Modified: 2011-10-07 09:23 PDT (History)
3 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments

Description Zack Weinberg (:zwol) 2009-05-05 15:04:11 PDT
Bug 470506 collapsed the nsPoint/nsIntPoint, nsSize/nsIntSize, etc. class pairs together using templates, but leaves the types nsPoint/nsIntPoint etc as subclasses of the template base class, which requires a bunch of boilerplate to define constructors again and so on.

The types used in general code should be converted to typedefs (adding a dummy template parameter to the base class so that when NS_COORD_IS_FLOAT is not defined, the two members of each pair are still not the same type), and all places that currently forward-declare one of these classes should be changed to include the appropriate headers instead.
Comment 1 Zack Weinberg (:zwol) 2010-08-18 09:50:17 PDT
I no longer work for Mozilla.  Deassigning myself from bugs I don't intend to work on as a volunteer.
Comment 2 Bas Schouten (:bas.schouten) 2011-10-07 09:23:25 PDT
We unified these classes.

Note You need to log in before you can comment on or make changes to this bug.