File chromium-82-gcc-constexpr.patch of Package chromium.openSUSE_Leap_15.1_Update

From 5812cd9bc2c15a034db24e0d2a43cc923d8a66cc Mon Sep 17 00:00:00 2001
From: Jose Dapena Paz <jdapena@igalia.com>
Date: Thu, 20 Feb 2020 13:00:16 +0100
Subject: [PATCH] GCC: DOMRect constexpr equal operator depends on non constexpr operators

Make accessors of DOMRectReadOnly constexpr so the equal operator can be
also constexpr.

../../third_party/blink/renderer/core/geometry/dom_rect.h: In function ‘constexpr bool blink::operator==(const blink::DOMRect&, const blink::DOMRect&)’:
../../third_party/blink/renderer/core/geometry/dom_rect.h:38:15: error: call to non-‘constexpr’ function ‘double blink::DOMRectReadOnly::x() const’

Bug: 819294
Change-Id: Ic1fed89c5480ce4eedaaf7add2779d000b77cc48
---

Index: chromium-83.0.4103.14/third_party/blink/renderer/core/geometry/dom_rect_read_only.h
===================================================================
--- chromium-83.0.4103.14.orig/third_party/blink/renderer/core/geometry/dom_rect_read_only.h
+++ chromium-83.0.4103.14/third_party/blink/renderer/core/geometry/dom_rect_read_only.h
@@ -31,10 +31,10 @@ class CORE_EXPORT DOMRectReadOnly : publ
 
   DOMRectReadOnly(double x, double y, double width, double height);
 
-  double x() const { return x_; }
-  double y() const { return y_; }
-  double width() const { return width_; }
-  double height() const { return height_; }
+  constexpr double x() const { return x_; }
+  constexpr double y() const { return y_; }
+  constexpr double width() const { return width_; }
+  constexpr double height() const { return height_; }
 
   double top() const { return geometry_util::NanSafeMin(y_, y_ + height_); }
   double right() const { return geometry_util::NanSafeMax(x_, x_ + width_); }
openSUSE Build Service is sponsored by