Last Comment Bug 670111 - Add double overloads to NSToCoord(Round|Floor|Ceil|Clamped) to stop numerous build warnings
: Add double overloads to NSToCoord(Round|Floor|Ceil|Clamped) to stop numerous ...
Status: RESOLVED FIXED
[build_warning]
:
Product: Core
Classification: Components
Component: Graphics (show other bugs)
: Trunk
: All All
: -- normal (vote)
: mozilla8
Assigned To: Ed Morley [:emorley]
:
:
Mentors:
Depends on: 629196
Blocks: buildwarning 447838
  Show dependency treegraph
 
Reported: 2011-07-08 04:46 PDT by Ed Morley [:emorley]
Modified: 2011-07-27 03:42 PDT (History)
5 users (show)
bzbarsky: in‑testsuite-
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
Patch v1 (3.22 KB, patch)
2011-07-08 04:50 PDT, Ed Morley [:emorley]
roc: review+
Details | Diff | Splinter Review

Description Ed Morley [:emorley] 2011-07-08 04:46:01 PDT
Bug 447838 is trying to stop the build warnings in nsTextFrameThebes.cpp, many of which are along the lines of:
> warning C4244: 'argument' : conversion from 'gfxFloat' to 'float', possible loss of data

To save countless delightful changes like:
-    *snappedEndEdge = NSToCoordFloor(gfxFloat(frameWidth) - advanceWidth);
+    *snappedEndEdge = NSToCoordFloor(float(gfxFloat(frameWidth) - advanceWidth));

Roc suggested that I add double overloads to NSToCoord(Round|Floor|Ceil|Clamped).

A quick glance at |conversion from 'gfxFloat' to 'float'| build warnings in files other than nsTextFrameThebes.cpp, shows that this will fix some of the warnings in other files as well :-)
Comment 1 Ed Morley [:emorley] 2011-07-08 04:50:21 PDT
Created attachment 544777 [details] [diff] [review]
Patch v1

Double overloads of NSToCoord(Round|Floor|Ceil|Clamped), broken out from bug 447838.

Thanks :-)
Comment 2 Robert O'Callahan (:roc) (email my personal email if necessary) 2011-07-08 15:16:39 PDT
Comment on attachment 544777 [details] [diff] [review]
Patch v1

Review of attachment 544777 [details] [diff] [review]:
-----------------------------------------------------------------
Comment 3 Ed Morley [:emorley] 2011-07-09 03:58:22 PDT
Passed try:
http://dev.philringnalda.com/tbpl/?tree=Try&rev=7e2dec83b318
Comment 4 Boris Zbarsky [:bz] (still a bit busy) 2011-07-11 06:21:40 PDT
http://hg.mozilla.org/integration/mozilla-inbound/rev/e2139ab44181
Comment 5 Mounir Lamouri (:mounir) 2011-07-12 03:42:43 PDT
Merged:
http://hg.mozilla.org/mozilla-central/rev/e2139ab44181
Comment 6 :Ehsan Akhgari 2011-07-15 13:29:59 PDT
I've backed this out from inbound to see if it affects the frequency of bug 629196: <http://hg.mozilla.org/integration/mozilla-inbound/rev/2f5959074445>
Comment 7 Joe Drew (not getting mail) 2011-07-17 17:30:12 PDT
And this backout was merged to m-c: http://hg.mozilla.org/mozilla-central/rev/2f5959074445
Comment 8 Ed Morley [:emorley] 2011-07-26 12:42:00 PDT
Ehsan, please can this and bug 670338 be relanded now, given 4 x 100 OS X 10.6 reftest try runs showed no correlation (https://bugzilla.mozilla.org/show_bug.cgi?id=629196#c27) and that the test has now been adjusted / bug 629196 resolved fixed anyway (https://bugzilla.mozilla.org/show_bug.cgi?id=629196#c30).

Thanks :-)
Comment 9 :Ehsan Akhgari 2011-07-26 14:55:23 PDT
Sure, just pushed them both to inbound.  Thanks for the investigation!
Comment 10 Marco Bonardo [::mak] 2011-07-27 03:42:35 PDT
http://hg.mozilla.org/mozilla-central/rev/10601c08fc30

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