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

Unified Diff: Source/modules/webaudio/AudioParamTimeline.cpp

Issue 1328963003: setValueCurve can start at the end of other automations (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 3 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
« no previous file with comments | « LayoutTests/webaudio/audioparam-setValueCurve-exceptions-expected.txt ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/modules/webaudio/AudioParamTimeline.cpp
diff --git a/Source/modules/webaudio/AudioParamTimeline.cpp b/Source/modules/webaudio/AudioParamTimeline.cpp
index 1acd5ee52adbc0fd856408ce727659cab7c6c110..ae6c2ba6a02eb75c24bce7978ce11343d8f7f93e 100644
--- a/Source/modules/webaudio/AudioParamTimeline.cpp
+++ b/Source/modules/webaudio/AudioParamTimeline.cpp
@@ -193,9 +193,11 @@ void AudioParamTimeline::insertEvent(const ParamEvent& event, ExceptionState& ex
for (i = 0; i < m_events.size(); ++i) {
if (event.type() == ParamEvent::SetValueCurve) {
- // If this event is a SetValueCurve, make sure it doesn't overlap any existing event.
+ // If this event is a SetValueCurve, make sure it doesn't overlap any existing
+ // event. It's ok if the SetValueCurve starts at the same time as the end of some other
+ // duration.
double endTime = event.time() + event.duration();
- if (m_events[i].time() >= event.time() && m_events[i].time() < endTime) {
+ if (m_events[i].time() > event.time() && m_events[i].time() < endTime) {
exceptionState.throwDOMException(
NotSupportedError,
eventToString(event) + " overlaps " + eventToString(m_events[i]));
« no previous file with comments | « LayoutTests/webaudio/audioparam-setValueCurve-exceptions-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698