Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(122)

Unified Diff: third_party/WebKit/Source/core/animation/Timing.h

Issue 1906463002: Web Animations: Throw TypeErrors for invalid timing parameters (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix unit tests Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/animation/Timing.h
diff --git a/third_party/WebKit/Source/core/animation/Timing.h b/third_party/WebKit/Source/core/animation/Timing.h
index 96ed8858701edaf34e12a88c55f81767818546dd..14ae79a5e2be33f6347ab1ca6140671cb84a819e 100644
--- a/third_party/WebKit/Source/core/animation/Timing.h
+++ b/third_party/WebKit/Source/core/animation/Timing.h
@@ -31,6 +31,7 @@
#ifndef Timing_h
#define Timing_h
+#include "core/style/DataEquivalency.h"
#include "platform/animation/TimingFunction.h"
#include "wtf/Allocator.h"
#include "wtf/MathExtras.h"
@@ -93,11 +94,15 @@ public:
bool operator==(const Timing &other) const
{
- return startDelay == other.startDelay && endDelay == other.endDelay
- && fillMode == other.fillMode && iterationStart == other.iterationStart
- && iterationCount == other.iterationCount && iterationDuration == other.iterationDuration
- && playbackRate == other.playbackRate && direction == other.direction
- && *timingFunction == *other.timingFunction;
+ return startDelay == other.startDelay
+ && endDelay == other.endDelay
+ && fillMode == other.fillMode
+ && iterationStart == other.iterationStart
+ && iterationCount == other.iterationCount
+ && ((std::isnan(iterationDuration) && std::isnan(other.iterationDuration)) || iterationDuration == other.iterationDuration)
+ && playbackRate == other.playbackRate
+ && direction == other.direction
+ && dataEquivalent(timingFunction.get(), other.timingFunction.get());
}
bool operator!=(const Timing &other) const

Powered by Google App Engine
This is Rietveld 408576698