Closed
Bug 742581
Opened 12 years ago
Closed 12 years ago
nsStyleCoord::GetCoordValue() signature is inconsistent (nscoord vs PRInt32)
Categories
(Core :: CSS Parsing and Computation, defect)
Core
CSS Parsing and Computation
Tracking
()
RESOLVED
FIXED
mozilla14
People
(Reporter: dholbert, Assigned: dholbert)
Details
Attachments
(1 file)
827 bytes,
patch
|
dbaron
:
review+
|
Details | Diff | Splinter Review |
I just noticed that the method-signature for nsStyleCoord::GetCoordValue doesn't match, between the function declaration & the function definition. (nscoord vs PRInt32) Relevant code: > 90 class nsStyleCoord { [...] > 162 nscoord GetCoordValue() const; [...] > 185 }; [...] > 290 inline PRInt32 nsStyleCoord::GetCoordValue() const > 291 { > 292 NS_ASSERTION((mUnit == eStyleUnit_Coord), "not a coord value"); > 293 if (mUnit == eStyleUnit_Coord) { > 294 return mValue.mInt; > 295 } > 296 return 0; > 297 } Of course, nscoord and PRInt32 end up evaluating to the same type, but we should make that consistent.
Assignee | ||
Comment 1•12 years ago
|
||
This actually dates back to the original version of this file in CVS, from 1998, it looks like: http://bonsai.mozilla.org/cvsblame.cgi?file=mozilla/layout/style/nsStyleCoord.h&rev=3.1
Assignee | ||
Comment 2•12 years ago
|
||
This changes the definition to use "nscoord" (to match the function declaration). This also makes it symmetric with SetCoordValue, which takes an nscoord-typed argument.
Assignee | ||
Updated•12 years ago
|
OS: Linux → All
Hardware: x86_64 → All
Comment on attachment 613017 [details] [diff] [review] fix r=dbaron
Attachment #613017 -
Flags: review?(dbaron) → review+
Assignee | ||
Comment 4•12 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/be20d1f8c8a3
Target Milestone: --- → mozilla14
Comment 5•12 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/be20d1f8c8a3
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•