Changeset 194416 in webkit


Ignore:
Timestamp:
Dec 24, 2015 12:47:50 PM (8 years ago)
Author:
Simon Fraser
Message:

Remove the unused #define _USE_MATH_DEFINES
https://bugs.webkit.org/show_bug.cgi?id=152034

Reviewed by Tim Horton.

Source/WebCore:

_USE_MATH_DEFINES was added in r123968 but no longer does anything.

  • platform/graphics/cg/GraphicsContextCG.cpp:
  • platform/graphics/cg/PDFDocumentImage.cpp:
  • rendering/mathml/RenderMathMLMenclose.cpp:
  • rendering/mathml/RenderMathMLOperator.cpp:

Tools:

Update this test to use piDouble from MathExtras.h, and
std::numeric_limits<>.

  • TestWebKitAPI/Tests/WTF/MediaTime.cpp:
Location:
trunk
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r194414 r194416  
     12015-12-24  Simon Fraser  <simon.fraser@apple.com>
     2
     3        Remove the unused #define _USE_MATH_DEFINES
     4        https://bugs.webkit.org/show_bug.cgi?id=152034
     5
     6        Reviewed by Tim Horton.
     7       
     8        _USE_MATH_DEFINES was added in r123968 but no longer does anything.
     9
     10        * platform/graphics/cg/GraphicsContextCG.cpp:
     11        * platform/graphics/cg/PDFDocumentImage.cpp:
     12        * rendering/mathml/RenderMathMLMenclose.cpp:
     13        * rendering/mathml/RenderMathMLOperator.cpp:
     14
    1152015-12-23  Brady Eidson  <beidson@apple.com>
    216
  • trunk/Source/WebCore/platform/graphics/cg/GraphicsContextCG.cpp

    r192194 r194416  
    2525 */
    2626
    27 #define _USE_MATH_DEFINES 1
    2827#include "config.h"
    2928#include "GraphicsContextCG.h"
  • trunk/Source/WebCore/platform/graphics/cg/PDFDocumentImage.cpp

    r192140 r194416  
    2424 */
    2525
    26 #define _USE_MATH_DEFINES 1
    2726#include "config.h"
    2827#include "PDFDocumentImage.h"
  • trunk/Source/WebCore/rendering/mathml/RenderMathMLMenclose.cpp

    r192140 r194416  
    2424 */
    2525
    26 #define _USE_MATH_DEFINES 1
    2726#include "config.h"
    2827
  • trunk/Source/WebCore/rendering/mathml/RenderMathMLOperator.cpp

    r194031 r194416  
    2626 */
    2727
    28 #define _USE_MATH_DEFINES 1
    2928#include "config.h"
    3029
  • trunk/Tools/ChangeLog

    r194415 r194416  
     12015-12-24  Simon Fraser  <simon.fraser@apple.com>
     2
     3        Remove the unused #define _USE_MATH_DEFINES
     4        https://bugs.webkit.org/show_bug.cgi?id=152034
     5
     6        Reviewed by Tim Horton.
     7       
     8        Update this test to use piDouble from MathExtras.h, and
     9        std::numeric_limits<>.
     10
     11        * TestWebKitAPI/Tests/WTF/MediaTime.cpp:
     12
    1132015-12-24  Youenn Fablet  <youenn.fablet@crf.canon.fr>
    214
  • trunk/Tools/TestWebKitAPI/Tests/WTF/MediaTime.cpp

    r176863 r194416  
    2727 */
    2828
    29 #define _USE_MATH_DEFINES 1
    3029#include "config.h"
    3130
     31#include <limits>
     32#include <wtf/MathExtras.h>
    3233#include <wtf/MediaTime.h>
    3334
     
    172173    EXPECT_EQ(MediaTime(1, 1 << 16).toFloat(), 1 / pow(2.0f, 16.0f));
    173174    EXPECT_EQ(MediaTime(1, 1 << 30).toDouble(), 1 / pow(2.0, 30.0));
    174     EXPECT_EQ(MediaTime::createWithDouble(M_PI, 1 << 30), MediaTime(3373259426U, 1 << 30));
    175     EXPECT_EQ(MediaTime::createWithFloat(INFINITY), MediaTime::positiveInfiniteTime());
    176     EXPECT_EQ(MediaTime::createWithFloat(-INFINITY), MediaTime::negativeInfiniteTime());
    177     EXPECT_EQ(MediaTime::createWithFloat(NAN), MediaTime::invalidTime());
    178     EXPECT_EQ(MediaTime::createWithDouble(INFINITY), MediaTime::positiveInfiniteTime());
    179     EXPECT_EQ(MediaTime::createWithDouble(-INFINITY), MediaTime::negativeInfiniteTime());
    180     EXPECT_EQ(MediaTime::createWithDouble(NAN), MediaTime::invalidTime());
     175    EXPECT_EQ(MediaTime::createWithDouble(piDouble, 1 << 30), MediaTime(3373259426U, 1 << 30));
     176
     177    EXPECT_EQ(MediaTime::createWithFloat(std::numeric_limits<float>::infinity()), MediaTime::positiveInfiniteTime());
     178    EXPECT_EQ(MediaTime::createWithFloat(-std::numeric_limits<float>::infinity()), MediaTime::negativeInfiniteTime());
     179    EXPECT_EQ(MediaTime::createWithFloat(std::numeric_limits<float>::quiet_NaN()), MediaTime::invalidTime());
     180
     181    EXPECT_EQ(MediaTime::createWithDouble(std::numeric_limits<double>::infinity()), MediaTime::positiveInfiniteTime());
     182    EXPECT_EQ(MediaTime::createWithDouble(-std::numeric_limits<double>::infinity()), MediaTime::negativeInfiniteTime());
     183    EXPECT_EQ(MediaTime::createWithDouble(std::numeric_limits<double>::quiet_NaN()), MediaTime::invalidTime());
    181184
    182185    // Floating Point Round Trip
Note: See TracChangeset for help on using the changeset viewer.