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

Side by Side Diff: third_party/WebKit/Source/core/animation/AnimationTimeline.cpp

Issue 2809543002: bindings: Pass is_null flag to attribute setters when they are nullable (Closed)
Patch Set: Created 3 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2013 Google Inc. All rights reserved. 2 * Copyright (C) 2013 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after
215 215
216 double AnimationTimeline::currentTime() { 216 double AnimationTimeline::currentTime() {
217 return CurrentTimeInternal() * 1000; 217 return CurrentTimeInternal() * 1000;
218 } 218 }
219 219
220 double AnimationTimeline::CurrentTimeInternal() { 220 double AnimationTimeline::CurrentTimeInternal() {
221 bool is_null; 221 bool is_null;
222 return CurrentTimeInternal(is_null); 222 return CurrentTimeInternal(is_null);
223 } 223 }
224 224
225 void AnimationTimeline::setCurrentTime(double current_time) { 225 void AnimationTimeline::setCurrentTime(double current_time, bool is_null) {
226 SetCurrentTimeInternal(current_time / 1000); 226 SetCurrentTimeInternal(current_time / 1000);
227 } 227 }
228 228
229 void AnimationTimeline::SetCurrentTimeInternal(double current_time) { 229 void AnimationTimeline::SetCurrentTimeInternal(double current_time) {
230 if (!IsActive()) 230 if (!IsActive())
231 return; 231 return;
232 zero_time_ = playback_rate_ == 0 232 zero_time_ = playback_rate_ == 0
233 ? current_time 233 ? current_time
234 : GetDocument()->GetAnimationClock().CurrentTime() - 234 : GetDocument()->GetAnimationClock().CurrentTime() -
235 current_time / playback_rate_; 235 current_time / playback_rate_;
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
318 } 318 }
319 319
320 DEFINE_TRACE(AnimationTimeline) { 320 DEFINE_TRACE(AnimationTimeline) {
321 visitor->Trace(document_); 321 visitor->Trace(document_);
322 visitor->Trace(timing_); 322 visitor->Trace(timing_);
323 visitor->Trace(animations_needing_update_); 323 visitor->Trace(animations_needing_update_);
324 visitor->Trace(animations_); 324 visitor->Trace(animations_);
325 } 325 }
326 326
327 } // namespace blink 327 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698