summaryrefslogtreecommitdiff
path: root/www-client/chromium/files/chromium-76-gcc-blink-constexpr.patch
diff options
context:
space:
mode:
authorGravatar Chris Xiong <chirs241097@gmail.com> 2021-10-14 19:01:18 -0400
committerGravatar Chris Xiong <chirs241097@gmail.com> 2021-10-14 19:01:18 -0400
commit846cdbdbf965fc50478bcc4c6436e3dc6a489f3f (patch)
tree4a39385c982291a110f513871aba340f0a7a061e /www-client/chromium/files/chromium-76-gcc-blink-constexpr.patch
downloadppo-846cdbdbf965fc50478bcc4c6436e3dc6a489f3f.tar.xz
Initial commit.
Diffstat (limited to 'www-client/chromium/files/chromium-76-gcc-blink-constexpr.patch')
-rw-r--r--www-client/chromium/files/chromium-76-gcc-blink-constexpr.patch32
1 files changed, 32 insertions, 0 deletions
diff --git a/www-client/chromium/files/chromium-76-gcc-blink-constexpr.patch b/www-client/chromium/files/chromium-76-gcc-blink-constexpr.patch
new file mode 100644
index 0000000..26bba05
--- /dev/null
+++ b/www-client/chromium/files/chromium-76-gcc-blink-constexpr.patch
@@ -0,0 +1,32 @@
+From cf6d6b40d711fce93a24a2cf517fa3becdbae8bb Mon Sep 17 00:00:00 2001
+From: Jose Dapena Paz <jose.dapena@lge.com>
+Date: Wed, 05 Jun 2019 17:18:40 +0000
+Subject: [PATCH] Make blink::LayoutUnit::HasFraction constexpr
+
+Other HasFraction methods as in PhysicalUnit are declared already
+constexpr and using it. It breaks GCC build.
+
+Bug: 819294.
+Change-Id: I0c4bd9bd206d45cf31f7fa815ce8533718a425cb
+Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1645222
+Reviewed-by: vmpstr <vmpstr@chromium.org>
+Reviewed-by: Xianzhu Wang <wangxianzhu@chromium.org>
+Commit-Queue: José Dapena Paz <jose.dapena@lge.com>
+Cr-Commit-Position: refs/heads/master@{#666336}
+---
+
+diff --git a/third_party/blink/renderer/platform/geometry/layout_unit.h b/third_party/blink/renderer/platform/geometry/layout_unit.h
+index f073986..b6dbc76 100644
+--- a/third_party/blink/renderer/platform/geometry/layout_unit.h
++++ b/third_party/blink/renderer/platform/geometry/layout_unit.h
+@@ -202,7 +202,9 @@
+ return value_ > 0 ? LayoutUnit() : *this;
+ }
+
+- bool HasFraction() const { return RawValue() % kFixedPointDenominator; }
++ constexpr bool HasFraction() const {
++ return RawValue() % kFixedPointDenominator;
++ }
+
+ LayoutUnit Fraction() const {
+ // Compute fraction using the mod operator to preserve the sign of the value