[webkit-changes] [WebKit/WebKit] da9344: Prefer std::abs over fabs

Rose noreply at github.com
Mon Mar 13 13:06:34 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: da934454c84ac2dcbf9fca9e5f4ac2644ef25d72
      https://github.com/WebKit/WebKit/commit/da934454c84ac2dcbf9fca9e5f4ac2644ef25d72
  Author: Rose <83477269+AtariDreams at users.noreply.github.com>
  Date:   2023-03-13 (Mon, 13 Mar 2023)

  Changed paths:
    M Source/JavaScriptCore/assembler/MacroAssembler.h
    M Source/JavaScriptCore/b3/B3ConstDoubleValue.cpp
    M Source/JavaScriptCore/b3/B3ConstFloatValue.cpp
    M Source/JavaScriptCore/b3/testb3_3.cpp
    M Source/JavaScriptCore/dfg/DFGAbstractInterpreterInlines.h
    M Source/JavaScriptCore/dfg/DFGOperations.cpp
    M Source/JavaScriptCore/jit/AssemblyHelpersSpoolers.h
    M Source/JavaScriptCore/runtime/DateConversion.cpp
    M Source/JavaScriptCore/runtime/ISO8601.cpp
    M Source/JavaScriptCore/runtime/MathCommon.cpp
    M Source/JavaScriptCore/runtime/MathObject.cpp
    M Source/JavaScriptCore/runtime/NumberPrototype.cpp
    M Source/JavaScriptCore/wasm/WasmBBQJIT.cpp
    M Source/WTF/wtf/CurrentTime.cpp
    M Source/WTF/wtf/DateMath.cpp
    M Source/WTF/wtf/MediaTime.cpp
    M Source/WTF/wtf/text/TextStream.cpp
    M Source/WebCore/Modules/mediasession/MediaSessionCoordinator.cpp
    M Source/WebCore/Modules/webaudio/AudioParam.cpp
    M Source/WebCore/Modules/webaudio/AudioParamTimeline.cpp
    M Source/WebCore/Modules/webaudio/IIRFilterNode.cpp
    M Source/WebCore/Modules/webaudio/OscillatorNode.cpp
    M Source/WebCore/Modules/webaudio/PeriodicWave.cpp
    M Source/WebCore/Modules/webaudio/RealtimeAnalyser.cpp
    M Source/WebCore/accessibility/AccessibilityRenderObject.cpp
    M Source/WebCore/bindings/js/JSDOMConvertNumbers.cpp
    M Source/WebCore/contentextensions/DFABytecodeCompiler.cpp
    M Source/WebCore/display/css/DisplayBoxDecorationPainter.cpp
    M Source/WebCore/editing/FrameSelection.cpp
    M Source/WebCore/editing/cocoa/HTMLConverter.mm
    M Source/WebCore/html/CustomPaintImage.cpp
    M Source/WebCore/html/HTMLMediaElement.cpp
    M Source/WebCore/inspector/InspectorOverlay.cpp
    M Source/WebCore/layout/Verification.cpp
    M Source/WebCore/page/EventHandler.cpp
    M Source/WebCore/page/Frame.cpp
    M Source/WebCore/page/WheelEventDeltaFilter.cpp
    M Source/WebCore/page/ios/FrameIOS.mm
    M Source/WebCore/platform/LayoutUnit.h
    M Source/WebCore/platform/LocalizedStrings.cpp
    M Source/WebCore/platform/ScrollAnimationKeyboard.cpp
    M Source/WebCore/platform/ScrollAnimationKinetic.cpp
    M Source/WebCore/platform/ScrollView.cpp
    M Source/WebCore/platform/audio/Biquad.cpp
    M Source/WebCore/platform/audio/Cone.cpp
    M Source/WebCore/platform/audio/DenormalDisabler.h
    M Source/WebCore/platform/audio/FFTFrame.cpp
    M Source/WebCore/platform/audio/HRTFPanner.cpp
    M Source/WebCore/platform/audio/IIRFilter.cpp
    M Source/WebCore/platform/audio/cocoa/AudioSampleDataSource.mm
    M Source/WebCore/platform/graphics/FloatLine.cpp
    M Source/WebCore/platform/graphics/FloatSize.cpp
    M Source/WebCore/platform/graphics/GradientImage.cpp
    M Source/WebCore/platform/graphics/IntSize.h
    M Source/WebCore/platform/graphics/PathUtilities.cpp
    M Source/WebCore/platform/graphics/ShadowBlur.cpp
    M Source/WebCore/platform/graphics/UnitBezier.h
    M Source/WebCore/platform/graphics/cairo/CairoOperations.cpp
    M Source/WebCore/platform/graphics/texmap/coordinated/TiledBackingStore.cpp
    M Source/WebCore/platform/graphics/transforms/AffineTransform.cpp
    M Source/WebCore/platform/graphics/transforms/TransformationMatrix.cpp
    M Source/WebCore/platform/graphics/win/FontCacheWin.cpp
    M Source/WebCore/platform/graphics/win/MediaPlayerPrivateMediaFoundation.cpp
    M Source/WebCore/platform/graphics/win/SystemFontDatabaseWin.cpp
    M Source/WebCore/platform/ios/ScrollAnimatorIOS.mm
    M Source/WebCore/platform/ios/WebAVPlayerController.mm
    M Source/WebCore/platform/ios/wak/WKView.mm
    M Source/WebCore/platform/mac/ScrollAnimationRubberBand.mm
    M Source/WebCore/platform/mac/ScrollingEffectsController.mm
    M Source/WebCore/platform/win/BitmapInfo.h
    M Source/WebCore/platform/win/PopupMenuWin.cpp
    M Source/WebCore/platform/xr/openxr/OpenXRUtils.h
    M Source/WebCore/rendering/AttachmentLayout.mm
    M Source/WebCore/rendering/BorderPainter.cpp
    M Source/WebCore/rendering/RenderLayerScrollableArea.cpp
    M Source/WebCore/rendering/RenderListBox.cpp
    M Source/WebCore/rendering/RenderMarquee.cpp
    M Source/WebCore/rendering/shapes/RasterShape.cpp
    M Source/WebCore/rendering/svg/SVGMarkerData.h
    M Source/WebCore/rendering/svg/SVGTextLayoutEngineBaseline.cpp
    M Source/WebCore/style/StyleBuilderConverter.h
    M Source/WebCore/style/StyleFontSizeFunctions.cpp
    M Source/WebCore/svg/SVGPathParser.cpp
    M Source/WebCore/svg/properties/SVGAnimationAdditiveValueFunctionImpl.h
    M Source/WebKit/UIProcess/API/ios/WKWebViewIOS.mm
    M Source/WebKit/UIProcess/gtk/KeyBindingTranslator.cpp
    M Source/WebKit/UIProcess/gtk/ViewGestureControllerGtk.cpp
    M Source/WebKit/UIProcess/ios/WKKeyboardScrollingAnimator.mm
    M Source/WebKit/UIProcess/win/WebPopupMenuProxyWin.cpp
    M Source/WebKit/WebProcess/WebPage/ios/WebPageIOS.mm
    M Source/WebKitLegacy/ios/WebCoreSupport/WebFrameIOS.mm
    M Source/WebKitLegacy/mac/WebView/WebDynamicScrollBarsView.mm
    M Tools/TestRunnerShared/EventSerialization/mac/EventSerializerMac.mm
    M Tools/TestWebKitAPI/Tests/WebKitCocoa/GPUProcess.mm
    M Tools/TestWebKitAPI/Tests/WebKitCocoa/UIDelegate.mm
    M Tools/TestWebKitAPI/Tests/ios/FullscreenTouchSecheuristicTests.cpp
    M Tools/WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp

  Log Message:
  -----------
  Prefer std::abs over fabs
https://bugs.webkit.org/show_bug.cgi?id=252974

Reviewed by Ryosuke Niwa.

Unlike the C library versions, std::abs has overloads for every type, so one does not need to worry about which version of the function to call.

* Source/JavaScriptCore/assembler/MacroAssembler.h:
* Source/JavaScriptCore/b3/B3ConstDoubleValue.cpp:
* Source/JavaScriptCore/b3/B3ConstFloatValue.cpp:
* Source/JavaScriptCore/b3/testb3_3.cpp:
* Source/JavaScriptCore/dfg/DFGAbstractInterpreterInlines.h:
* Source/JavaScriptCore/dfg/DFGOperations.cpp:
* Source/JavaScriptCore/jit/AssemblyHelpersSpoolers.h:
* Source/JavaScriptCore/runtime/DateConversion.cpp:
* Source/JavaScriptCore/runtime/ISO8601.cpp:
* Source/JavaScriptCore/runtime/MathCommon.cpp:
* Source/JavaScriptCore/runtime/MathObject.cpp:
* Source/JavaScriptCore/runtime/NumberPrototype.cpp:
* Source/JavaScriptCore/wasm/WasmBBQJIT.cpp:
* Source/WTF/wtf/CurrentTime.cpp:
* Source/WTF/wtf/DateMath.cpp:
* Source/WTF/wtf/MediaTime.cpp:
* Source/WTF/wtf/text/TextStream.cpp:
* Source/WebCore/Modules/mediasession/MediaSessionCoordinator.cpp:
* Source/WebCore/Modules/webaudio/AudioParam.cpp:
* Source/WebCore/Modules/webaudio/AudioParamTimeline.cpp:
* Source/WebCore/Modules/webaudio/IIRFilterNode.cpp:
* Source/WebCore/Modules/webaudio/OscillatorNode.cpp:
* Source/WebCore/Modules/webaudio/PeriodicWave.cpp:
* Source/WebCore/Modules/webaudio/RealtimeAnalyser.cpp:
* Source/WebCore/accessibility/AccessibilityRenderObject.cpp:
* Source/WebCore/bindings/js/JSDOMConvertNumbers.cpp:
* Source/WebCore/contentextensions/DFABytecodeCompiler.cpp:
* Source/WebCore/display/css/DisplayBoxDecorationPainter.cpp:
* Source/WebCore/editing/FrameSelection.cpp:
* Source/WebCore/editing/cocoa/HTMLConverter.mm:
* Source/WebCore/html/CustomPaintImage.cpp:
* Source/WebCore/html/HTMLMediaElement.cpp:
* Source/WebCore/inspector/InspectorOverlay.cpp:
* Source/WebCore/layout/Verification.cpp:
* Source/WebCore/page/EventHandler.cpp:
* Source/WebCore/page/Frame.cpp:
* Source/WebCore/page/WheelEventDeltaFilter.cpp:
* Source/WebCore/page/ios/FrameIOS.mm:
* Source/WebCore/platform/LayoutUnit.h:
* Source/WebCore/platform/LocalizedStrings.cpp:
* Source/WebCore/platform/ScrollAnimationKeyboard.cpp:
* Source/WebCore/platform/ScrollAnimationKinetic.cpp:
* Source/WebCore/platform/ScrollView.cpp:
* Source/WebCore/platform/audio/Biquad.cpp:
* Source/WebCore/platform/audio/Cone.cpp:
* Source/WebCore/platform/audio/DenormalDisabler.h:
* Source/WebCore/platform/audio/FFTFrame.cpp:
* Source/WebCore/platform/audio/HRTFPanner.cpp:
* Source/WebCore/platform/audio/IIRFilter.cpp:
* Source/WebCore/platform/audio/cocoa/AudioSampleDataSource.mm:
* Source/WebCore/platform/graphics/FloatLine.cpp:
* Source/WebCore/platform/graphics/FloatSize.cpp:
* Source/WebCore/platform/graphics/GradientImage.cpp:
* Source/WebCore/platform/graphics/IntSize.h:
* Source/WebCore/platform/graphics/PathUtilities.cpp:
* Source/WebCore/platform/graphics/ShadowBlur.cpp:
* Source/WebCore/platform/graphics/UnitBezier.h:
* Source/WebCore/platform/graphics/cairo/CairoOperations.cpp:
* Source/WebCore/platform/graphics/texmap/coordinated/TiledBackingStore.cpp:
* Source/WebCore/platform/graphics/transforms/AffineTransform.cpp:
* Source/WebCore/platform/graphics/transforms/TransformationMatrix.cpp:
* Source/WebCore/platform/graphics/win/FontCacheWin.cpp:
* Source/WebCore/platform/graphics/win/MediaPlayerPrivateMediaFoundation.cpp:
* Source/WebCore/platform/graphics/win/SystemFontDatabaseWin.cpp:
* Source/WebCore/platform/ios/ScrollAnimatorIOS.mm:
* Source/WebCore/platform/ios/WebAVPlayerController.mm:
* Source/WebCore/platform/ios/wak/WKView.mm:
* Source/WebCore/platform/mac/ScrollAnimationRubberBand.mm:
* Source/WebCore/platform/mac/ScrollingEffectsController.mm:
* Source/WebCore/platform/win/BitmapInfo.h:
* Source/WebCore/platform/win/PopupMenuWin.cpp:
* Source/WebCore/platform/xr/openxr/OpenXRUtils.h:
* Source/WebCore/rendering/AttachmentLayout.mm:
* Source/WebCore/rendering/BorderPainter.cpp:
* Source/WebCore/rendering/RenderLayerScrollableArea.cpp:
* Source/WebCore/rendering/RenderListBox.cpp:
* Source/WebCore/rendering/RenderMarquee.cpp:
* Source/WebCore/rendering/shapes/RasterShape.cpp:
* Source/WebCore/rendering/svg/SVGMarkerData.h:
* Source/WebCore/rendering/svg/SVGTextLayoutEngineBaseline.cpp:
* Source/WebCore/style/StyleBuilderConverter.h:
* Source/WebCore/style/StyleFontSizeFunctions.cpp:
* Source/WebCore/svg/SVGPathParser.cpp:
* Source/WebCore/svg/properties/SVGAnimationAdditiveValueFunctionImpl.h:
* Source/WebKit/UIProcess/API/ios/WKWebViewIOS.mm:
* Source/WebKit/UIProcess/gtk/KeyBindingTranslator.cpp:
* Source/WebKit/UIProcess/gtk/ViewGestureControllerGtk.cpp:
* Source/WebKit/UIProcess/ios/WKKeyboardScrollingAnimator.mm:
* Source/WebKit/UIProcess/win/WebPopupMenuProxyWin.cpp:
* Source/WebKit/WebProcess/WebPage/ios/WebPageIOS.mm:
* Source/WebKitLegacy/ios/WebCoreSupport/WebFrameIOS.mm:
* Source/WebKitLegacy/mac/WebView/WebDynamicScrollBarsView.mm:
* Tools/TestRunnerShared/EventSerialization/mac/EventSerializerMac.mm:
* Tools/TestWebKitAPI/Tests/WebKitCocoa/GPUProcess.mm:
* Tools/TestWebKitAPI/Tests/WebKitCocoa/UIDelegate.mm:
* Tools/TestWebKitAPI/Tests/ios/FullscreenTouchSecheuristicTests.cpp:
* Tools/WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp:

Canonical link: https://commits.webkit.org/261584@main




More information about the webkit-changes mailing list