|
|
5266162 |
From 87902b3202f81d689dd314c17006ffc907fe12a1 Mon Sep 17 00:00:00 2001
|
|
|
5266162 |
From: Wang Qing <wangqing-hf@loongson.cn>
|
|
|
5266162 |
Date: Mon, 3 Sep 2018 02:41:08 +0000
|
|
|
5266162 |
Subject: [PATCH] Fix build error for blink.
|
|
|
5266162 |
MIME-Version: 1.0
|
|
|
5266162 |
Content-Type: text/plain; charset=UTF-8
|
|
|
5266162 |
Content-Transfer-Encoding: 8bit
|
|
|
5266162 |
|
|
|
5266162 |
This CLs fixed the error of constexpr function call to non-constexpr function.
|
|
|
5266162 |
|
|
|
5266162 |
Bug: 878202
|
|
|
5266162 |
Change-Id: I6ad217a687e62a9a384980d852743a56479de3a9
|
|
|
5266162 |
Reviewed-on: https://chromium-review.googlesource.com/1192467
|
|
|
5266162 |
Commit-Queue: 汪 清 <wangqing-hf@loongson.cn>
|
|
|
5266162 |
Reviewed-by: Eric Willigers <ericwilligers@chromium.org>
|
|
|
5266162 |
Cr-Commit-Position: refs/heads/master@{#588316}
|
|
|
5266162 |
---
|
|
|
5266162 |
.../core/animation/animation_time_delta.cc | 22 ++++++++++++++
|
|
|
5266162 |
.../core/animation/animation_time_delta.h | 30 +++++++------------
|
|
|
5266162 |
2 files changed, 32 insertions(+), 20 deletions(-)
|
|
|
5266162 |
|
|
|
5266162 |
diff --git a/third_party/blink/renderer/core/animation/animation_time_delta.cc b/third_party/blink/renderer/core/animation/animation_time_delta.cc
|
|
|
5266162 |
index 1b25469c7f2f..2e30a18890da 100644
|
|
|
5266162 |
--- a/third_party/blink/renderer/core/animation/animation_time_delta.cc
|
|
|
5266162 |
+++ b/third_party/blink/renderer/core/animation/animation_time_delta.cc
|
|
|
5266162 |
@@ -7,6 +7,28 @@
|
|
|
5266162 |
namespace blink {
|
|
|
5266162 |
|
|
|
5266162 |
#if !defined(BLINK_ANIMATION_USE_TIME_DELTA)
|
|
|
5266162 |
+// Comparison operators on AnimationTimeDelta.
|
|
|
5266162 |
+bool CORE_EXPORT operator==(const AnimationTimeDelta& lhs,
|
|
|
5266162 |
+ const AnimationTimeDelta& rhs) {
|
|
|
5266162 |
+ return lhs.InSecondsF() == rhs.InSecondsF();
|
|
|
5266162 |
+}
|
|
|
5266162 |
+bool CORE_EXPORT operator!=(const AnimationTimeDelta& lhs,
|
|
|
5266162 |
+ const AnimationTimeDelta& rhs) {
|
|
|
5266162 |
+ return lhs.InSecondsF() != rhs.InSecondsF();
|
|
|
5266162 |
+}
|
|
|
5266162 |
+bool CORE_EXPORT operator>(const AnimationTimeDelta& lhs,
|
|
|
5266162 |
+ const AnimationTimeDelta& rhs) {
|
|
|
5266162 |
+ return lhs.InSecondsF() > rhs.InSecondsF();
|
|
|
5266162 |
+}
|
|
|
5266162 |
+bool CORE_EXPORT operator>=(const AnimationTimeDelta& lhs,
|
|
|
5266162 |
+ const AnimationTimeDelta& rhs) {
|
|
|
5266162 |
+ return lhs.InSecondsF() >= rhs.InSecondsF();
|
|
|
5266162 |
+}
|
|
|
5266162 |
+bool CORE_EXPORT operator<=(const AnimationTimeDelta& lhs,
|
|
|
5266162 |
+ const AnimationTimeDelta& rhs) {
|
|
|
5266162 |
+ return lhs.InSecondsF() <= rhs.InSecondsF();
|
|
|
5266162 |
+}
|
|
|
5266162 |
+
|
|
|
5266162 |
std::ostream& operator<<(std::ostream& os, AnimationTimeDelta time) {
|
|
|
5266162 |
return os << time.InSecondsF() << " s";
|
|
|
5266162 |
}
|
|
|
5266162 |
diff --git a/third_party/blink/renderer/core/animation/animation_time_delta.h b/third_party/blink/renderer/core/animation/animation_time_delta.h
|
|
|
5266162 |
index 1903c1150d3e..95d218466d90 100644
|
|
|
5266162 |
--- a/third_party/blink/renderer/core/animation/animation_time_delta.h
|
|
|
5266162 |
+++ b/third_party/blink/renderer/core/animation/animation_time_delta.h
|
|
|
5266162 |
@@ -90,26 +90,16 @@ AnimationTimeDelta operator*(T a, AnimationTimeDelta td) {
|
|
|
5266162 |
}
|
|
|
5266162 |
|
|
|
5266162 |
// Comparison operators on AnimationTimeDelta.
|
|
|
5266162 |
-constexpr bool CORE_EXPORT operator==(const AnimationTimeDelta& lhs,
|
|
|
5266162 |
- const AnimationTimeDelta& rhs) {
|
|
|
5266162 |
- return lhs.InSecondsF() == rhs.InSecondsF();
|
|
|
5266162 |
-}
|
|
|
5266162 |
-constexpr bool CORE_EXPORT operator!=(const AnimationTimeDelta& lhs,
|
|
|
5266162 |
- const AnimationTimeDelta& rhs) {
|
|
|
5266162 |
- return lhs.InSecondsF() != rhs.InSecondsF();
|
|
|
5266162 |
-}
|
|
|
5266162 |
-constexpr bool CORE_EXPORT operator>(const AnimationTimeDelta& lhs,
|
|
|
5266162 |
- const AnimationTimeDelta& rhs) {
|
|
|
5266162 |
- return lhs.InSecondsF() > rhs.InSecondsF();
|
|
|
5266162 |
-}
|
|
|
5266162 |
-constexpr bool CORE_EXPORT operator>=(const AnimationTimeDelta& lhs,
|
|
|
5266162 |
- const AnimationTimeDelta& rhs) {
|
|
|
5266162 |
- return lhs.InSecondsF() >= rhs.InSecondsF();
|
|
|
5266162 |
-}
|
|
|
5266162 |
-constexpr bool CORE_EXPORT operator<=(const AnimationTimeDelta& lhs,
|
|
|
5266162 |
- const AnimationTimeDelta& rhs) {
|
|
|
5266162 |
- return lhs.InSecondsF() <= rhs.InSecondsF();
|
|
|
5266162 |
-}
|
|
|
5266162 |
+bool CORE_EXPORT operator==(const AnimationTimeDelta& lhs,
|
|
|
5266162 |
+ const AnimationTimeDelta& rhs);
|
|
|
5266162 |
+bool CORE_EXPORT operator!=(const AnimationTimeDelta& lhs,
|
|
|
5266162 |
+ const AnimationTimeDelta& rhs);
|
|
|
5266162 |
+bool CORE_EXPORT operator>(const AnimationTimeDelta& lhs,
|
|
|
5266162 |
+ const AnimationTimeDelta& rhs);
|
|
|
5266162 |
+bool CORE_EXPORT operator>=(const AnimationTimeDelta& lhs,
|
|
|
5266162 |
+ const AnimationTimeDelta& rhs);
|
|
|
5266162 |
+bool CORE_EXPORT operator<=(const AnimationTimeDelta& lhs,
|
|
|
5266162 |
+ const AnimationTimeDelta& rhs);
|
|
|
5266162 |
|
|
|
5266162 |
// Defined to allow DCHECK_EQ/etc to work with the class.
|
|
|
5266162 |
CORE_EXPORT std::ostream& operator<<(std::ostream& os, AnimationTimeDelta time);
|
|
|
5266162 |
--
|
|
|
5266162 |
2.17.2
|
|
|
5266162 |
|