pkgsrc-WIP-changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

webkit-gtk: add more std::*() patches



Module Name:	pkgsrc-wip
Committed By:	Leonardo Taccari <leot%NetBSD.org@localhost>
Pushed By:	leot
Date:		Sat Dec 24 16:51:17 2022 +0100
Changeset:	783e7df1936951915121df9f63716940a87422d2

Modified Files:
	webkit-gtk/distinfo
Added Files:
	webkit-gtk/patches/patch-Source_WebCore_css_calc_CSSCalcOperationNode.cpp
	webkit-gtk/patches/patch-Source_WebCore_css_calc_CSSCalcOperationNode.h
	webkit-gtk/patches/patch-Source_WebCore_css_calc_CSSCalcValue.cpp
	webkit-gtk/patches/patch-Source_WebCore_rendering_RenderBox.h

Log Message:
webkit-gtk: add more std::*() patches

Patch more functions usages without std:: namespace use.

To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=783e7df1936951915121df9f63716940a87422d2

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

diffstat:
 webkit-gtk/distinfo                                |  4 ++
 ...ource_WebCore_css_calc_CSSCalcOperationNode.cpp | 54 ++++++++++++++++++++++
 ...-Source_WebCore_css_calc_CSSCalcOperationNode.h | 15 ++++++
 .../patch-Source_WebCore_css_calc_CSSCalcValue.cpp | 15 ++++++
 .../patch-Source_WebCore_rendering_RenderBox.h     | 15 ++++++
 5 files changed, 103 insertions(+)

diffs:
diff --git a/webkit-gtk/distinfo b/webkit-gtk/distinfo
index 5a213c6a65..66762204ee 100644
--- a/webkit-gtk/distinfo
+++ b/webkit-gtk/distinfo
@@ -22,9 +22,13 @@ SHA1 (patch-Source_WTF_wtf_StackBounds.cpp) = 22a71daac8443f079ad8bcc7285cfd7319
 SHA1 (patch-Source_WebCore_Scripts_check-xcfilelists.sh) = b292baf2494bcd459d9af91386263123046c6615
 SHA1 (patch-Source_WebCore_Scripts_generate-unified-sources.sh) = 64b876041b6a444690e828fe186ee41a1f7cd1b4
 SHA1 (patch-Source_WebCore_crypto_algorithms_CryptoAlgorithmAES__GCM.cpp) = 03337c5eec54d6974dfea1766b14cb2c1b9f7750
+SHA1 (patch-Source_WebCore_css_calc_CSSCalcOperationNode.cpp) = 8c8e60692152a3bb67a820b214bde0a6e6b72611
+SHA1 (patch-Source_WebCore_css_calc_CSSCalcOperationNode.h) = f9c7f117490e58bd8d58f57f6202f63aad6fc423
+SHA1 (patch-Source_WebCore_css_calc_CSSCalcValue.cpp) = c219e5c4ac9a5c9df042614e3d250fcb97efb10c
 SHA1 (patch-Source_WebCore_inspector_InspectorFrontendHost.cpp) = daf6351a1a0b5a49592a2bb6db0d54620c7b09e3
 SHA1 (patch-Source_WebCore_platform_graphics_filters_FEMorphology.cpp) = 43f423af652533a64d0793ec6d15150b908da0f8
 SHA1 (patch-Source_WebCore_platform_network_DNS.h) = dd9fb67aae0029c6a452e7d8f09eeed1235d5700
+SHA1 (patch-Source_WebCore_rendering_RenderBox.h) = e43015aa76b38848079bc598ca8af9cfc585b99b
 SHA1 (patch-Source_WebCore_rendering_RenderLayerBacking.h) = ecf722df1d1cca13573786b34fe1e3d85edf1e1e
 SHA1 (patch-Source_WebCore_rendering_shapes_RasterShape.cpp) = 551e47698dee50d097b11e3218f13bb3447edfea
 SHA1 (patch-Source_WebCore_rendering_shapes_ShapeOutsideInfo.cpp) = 3a4d9415e7d3ac78a948b9e7eb5e0377575835c3
diff --git a/webkit-gtk/patches/patch-Source_WebCore_css_calc_CSSCalcOperationNode.cpp b/webkit-gtk/patches/patch-Source_WebCore_css_calc_CSSCalcOperationNode.cpp
new file mode 100644
index 0000000000..6225b0918a
--- /dev/null
+++ b/webkit-gtk/patches/patch-Source_WebCore_css_calc_CSSCalcOperationNode.cpp
@@ -0,0 +1,54 @@
+$NetBSD$
+
+Properly calls std::{isinf,signbits}()
+
+--- Source/WebCore/css/calc/CSSCalcOperationNode.cpp.orig	2022-08-31 07:59:55.834516800 +0000
++++ Source/WebCore/css/calc/CSSCalcOperationNode.cpp
+@@ -1459,10 +1459,10 @@ double CSSCalcOperationNode::evaluateOpe
+     case CalcOperator::Up: {
+         if (children.size() != 2)
+             return std::numeric_limits<double>::quiet_NaN();
+-        if (!isinf(children[0]) && std::isinf(children[1])) {
++        if (!std::isinf(children[0]) && std::isinf(children[1])) {
+             if (!children[0])
+                 return children[0];
+-            return signbit(children[0]) ? -0.0 : std::numeric_limits<double>::infinity();
++            return std::signbit(children[0]) ? -0.0 : std::numeric_limits<double>::infinity();
+         }
+         auto ret = getNearestMultiples(children[0], children[1]);
+         return ret.second;
+@@ -1470,10 +1470,10 @@ double CSSCalcOperationNode::evaluateOpe
+     case CalcOperator::Down: {
+         if (children.size() != 2)
+             return std::numeric_limits<double>::quiet_NaN();
+-        if (!isinf(children[0]) && isinf(children[1])) {
++        if (!std::isinf(children[0]) && std::isinf(children[1])) {
+             if (!children[0])
+                 return children[0];
+-            return signbit(children[0]) ? -std::numeric_limits<double>::infinity() : +0.0;
++            return std::signbit(children[0]) ? -std::numeric_limits<double>::infinity() : +0.0;
+         }
+         auto ret = getNearestMultiples(children[0], children[1]);
+         return ret.first;
+@@ -1481,8 +1481,8 @@ double CSSCalcOperationNode::evaluateOpe
+     case CalcOperator::Nearest: {
+         if (children.size() != 2)
+             return std::numeric_limits<double>::quiet_NaN();
+-        if (!isinf(children[0]) && isinf(children[1]))
+-            return signbit(children[0]) ? -0.0 : +0.0;
++        if (!std::isinf(children[0]) && std::isinf(children[1]))
++            return std::signbit(children[0]) ? -0.0 : +0.0;
+         auto ret = getNearestMultiples(children[0], children[1]);
+         auto upperB = ret.second;
+         auto lowerB = ret.first;
+@@ -1491,8 +1491,8 @@ double CSSCalcOperationNode::evaluateOpe
+     case CalcOperator::ToZero: {
+         if (children.size() != 2)
+             return std::numeric_limits<double>::quiet_NaN();
+-        if (!isinf(children[0]) && isinf(children[1]))
+-            return signbit(children[0]) ? -0.0 : +0.0;
++        if (!std::isinf(children[0]) && std::isinf(children[1]))
++            return std::signbit(children[0]) ? -0.0 : +0.0;
+         auto ret = getNearestMultiples(children[0], children[1]);
+         auto upperB = ret.second;
+         auto lowerB = ret.first;
diff --git a/webkit-gtk/patches/patch-Source_WebCore_css_calc_CSSCalcOperationNode.h b/webkit-gtk/patches/patch-Source_WebCore_css_calc_CSSCalcOperationNode.h
new file mode 100644
index 0000000000..4700ae3ab6
--- /dev/null
+++ b/webkit-gtk/patches/patch-Source_WebCore_css_calc_CSSCalcOperationNode.h
@@ -0,0 +1,15 @@
+$NetBSD$
+
+Properly calls std::isnan()
+
+--- Source/WebCore/css/calc/CSSCalcOperationNode.h.orig	2022-08-31 07:59:55.834516800 +0000
++++ Source/WebCore/css/calc/CSSCalcOperationNode.h
+@@ -132,7 +132,7 @@ private:
+     
+     static double convertToTopLevelValue(double value)
+     {
+-        if (isnan(value))
++        if (std::isnan(value))
+             value = std::numeric_limits<double>::infinity();
+         return value;
+     }
diff --git a/webkit-gtk/patches/patch-Source_WebCore_css_calc_CSSCalcValue.cpp b/webkit-gtk/patches/patch-Source_WebCore_css_calc_CSSCalcValue.cpp
new file mode 100644
index 0000000000..4c0338fa11
--- /dev/null
+++ b/webkit-gtk/patches/patch-Source_WebCore_css_calc_CSSCalcValue.cpp
@@ -0,0 +1,15 @@
+$NetBSD$
+
+Properly calls std::is{inf,nan}()
+
+--- Source/WebCore/css/calc/CSSCalcValue.cpp.orig	2022-08-31 07:59:55.834516800 +0000
++++ Source/WebCore/css/calc/CSSCalcValue.cpp
+@@ -325,7 +325,7 @@ bool CSSCalcValue::equals(const CSSCalcV
+ 
+ inline double CSSCalcValue::clampToPermittedRange(double value) const
+ {
+-    if (primitiveType() == CSSUnitType::CSS_DEG && (isnan(value) || isinf(value)))
++    if (primitiveType() == CSSUnitType::CSS_DEG && (std::isnan(value) || std::isinf(value)))
+         return 0;
+     return m_shouldClampToNonNegative && value < 0 ? 0 : value;
+ }
diff --git a/webkit-gtk/patches/patch-Source_WebCore_rendering_RenderBox.h b/webkit-gtk/patches/patch-Source_WebCore_rendering_RenderBox.h
new file mode 100644
index 0000000000..eca60bc445
--- /dev/null
+++ b/webkit-gtk/patches/patch-Source_WebCore_rendering_RenderBox.h
@@ -0,0 +1,15 @@
+$NetBSD$
+
+Properly calls std::isnan()
+
+--- Source/WebCore/rendering/RenderBox.h.orig	2022-09-14 11:58:10.516863300 +0000
++++ Source/WebCore/rendering/RenderBox.h
+@@ -732,7 +732,7 @@ protected:
+ 
+     void computePreferredLogicalWidths(const Length& minWidth, const Length& maxWidth, LayoutUnit borderAndPadding);
+     
+-    bool isAspectRatioDegenerate(double aspectRatio) const { return !aspectRatio || isnan(aspectRatio); }
++    bool isAspectRatioDegenerate(double aspectRatio) const { return !aspectRatio || std::isnan(aspectRatio); }
+     
+ private:
+     bool replacedMinMaxLogicalHeightComputesAsNone(SizeType) const;


Home | Main Index | Thread Index | Old Index