One of these is more than enough... CC'ing somebody who might be interested :)
Created attachment 544512 [details] [diff] [review]
First pass at this, let me know if this wasn't the intended approach.
Compiles fine locally, with no warnings on the changed lines (the rest of /content/svg/ is another matter, but don't get me started! More to do in bug 187528, but anyway).
However, slight query about how liberal I should be about #includes ? ie: I've added a few to make it compile, but should I be including nsMathUtils.h in absolutely every file I've added NS_finite into, to prevent it only being included by chance via another file?
Likewise, in the files where I've s/NS_FloatIsFinite/NS_finite/g, I've removed the existing #include "nsContentUtils.h", on the premise that NS_FloatIsFinite is no longer being used. However it's plausible that nsContentUtils.h is being used for other stuff and it only compiles by chance inclusion elsewhere.
Basically I don't want to make the bug 557565 / bug 634839 type situation any worse - and don't know what the recommendations are here?
The "no bootlegging" principle would suggest including nsMathUtils.h everywhere. For nsContentUtils.h, I'd remove it (unless the file uses an nsContentUtils::* function, of course).
Comment on attachment 544512 [details] [diff] [review]
>+ * Check whether a floating point number is finite (not +/-infinity and not a
>+ * NaN value).
> inline NS_HIDDEN_(bool) NS_finite(double d)
> #ifdef WIN32
> // NOTE: '!!' casts an int to bool without spamming MSVC warning C4800.
> return !!_finite(d);
> return finite(d);
Created attachment 544578 [details] [diff] [review]
Thanks Ms2ger :-)
Same as prior patch, other than nsMathUtils.h being included everywhere to avoid bootlegging + the nit for the nsMathUtils.h comment style.
Ping for review. Thanks :-)
Comment on attachment 544578 [details] [diff] [review]
Sorry, totally forgot about this. r=jwatt although it would be nice if you could tidy up the trailing "\" chars on the lines in nsContentUtils.h.
Created attachment 549823 [details] [diff] [review]
Updated to tip, tidied nsContentUtils.h trailing "\" chars; carrying forwards r+.
Thanks Jonathan :-)
Created attachment 549830 [details] [diff] [review]
Added missing #include "nsMathUtils.h" in nsSVGIntegerPair.cpp after updating to tip. Carrying forwards r+.