Changeset 195011 in webkit


Ignore:
Timestamp:
Jan 14, 2016 12:50:23 AM (8 years ago)
Author:
peavo@outlook.com
Message:

[Win] Remove workarounds for fixed bugs in fmod and pow.
https://bugs.webkit.org/show_bug.cgi?id=153071

Reviewed by Brent Fulgham.

Source/WebCore:

Compile fix, help MSVC pick correct pow overload.

  • rendering/shapes/BoxShape.cpp:

(WebCore::adjustRadiusForMarginBoxShape):

Source/WTF:

The bugs have been fixed in the MSVC CRT, and we can remove the workarounds.

  • wtf/MathExtras.h:

(wtf_fmod): Deleted.
(wtf_pow): Deleted.

Location:
trunk/Source
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WTF/ChangeLog

    r194980 r195011  
     12016-01-14  Per Arne Vollan  <peavo@outlook.com>
     2
     3        [Win] Remove workarounds for fixed bugs in fmod and pow.
     4        https://bugs.webkit.org/show_bug.cgi?id=153071
     5
     6        Reviewed by Brent Fulgham.
     7
     8        The bugs have been fixed in the MSVC CRT, and we can remove the workarounds.
     9
     10        * wtf/MathExtras.h:
     11        (wtf_fmod): Deleted.
     12        (wtf_pow): Deleted.
     13
    1142016-01-13  Commit Queue  <commit-queue@webkit.org>
    215
  • trunk/Source/WTF/wtf/MathExtras.h

    r192320 r195011  
    119119}
    120120
    121 // Work around a bug in the Microsoft CRT, where fmod(x, +-infinity) yields NaN instead of x.
    122 extern "C" inline double wtf_fmod(double x, double y) { return (!std::isinf(x) && std::isinf(y)) ? x : fmod(x, y); }
    123 
    124 // Work around a bug in the Microsoft CRT, where pow(NaN, 0) yields NaN instead of 1.
    125 extern "C" inline double wtf_pow(double x, double y) { return y == 0 ? 1 : pow(x, y); }
    126 
    127121#define atan2(x, y) wtf_atan2(x, y)
    128 #define fmod(x, y) wtf_fmod(x, y)
    129 #define pow(x, y) wtf_pow(x, y)
    130122
    131123#endif // COMPILER(MSVC)
  • trunk/Source/WebCore/ChangeLog

    r195010 r195011  
     12016-01-14  Per Arne Vollan  <peavo@outlook.com>
     2
     3        [Win] Remove workarounds for fixed bugs in fmod and pow.
     4        https://bugs.webkit.org/show_bug.cgi?id=153071
     5
     6        Reviewed by Brent Fulgham.
     7
     8        Compile fix, help MSVC pick correct pow overload.
     9
     10        * rendering/shapes/BoxShape.cpp:
     11        (WebCore::adjustRadiusForMarginBoxShape):
     12
    1132016-01-14  Youenn Fablet  <youenn.fablet@crf.canon.fr>
    214
  • trunk/Source/WebCore/rendering/shapes/BoxShape.cpp

    r173348 r195011  
    4444    LayoutUnit ratio = radius / margin;
    4545    if (ratio < 1)
    46         return radius + (margin * (1 + pow(ratio - 1, 3)));
     46        return radius + (margin * (1 + pow(ratio - 1, 3.0)));
    4747
    4848    return radius + margin;
Note: See TracChangeset for help on using the changeset viewer.