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

Side by Side Diff: third_party/WebKit/Source/platform/scroll/ScrollAnimator.cpp

Issue 2919273002: Don't move raw pointers in third_party/WebKit (Closed)
Patch Set: Created 3 years, 6 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
« no previous file with comments | « third_party/WebKit/Source/modules/sensor/Sensor.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2011, Google Inc. All rights reserved. 2 * Copyright (c) 2011, 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 391 matching lines...) Expand 10 before | Expand all | Expand 10 after
402 // over an animation, do nothing to avoid judder. 402 // over an animation, do nothing to avoid judder.
403 if (HasRunningAnimation()) 403 if (HasRunningAnimation())
404 return; 404 return;
405 405
406 cc::ScrollOffsetAnimationCurve* scroll_offset_animation_curve = 406 cc::ScrollOffsetAnimationCurve* scroll_offset_animation_curve =
407 curve->ToScrollOffsetAnimationCurve(); 407 curve->ToScrollOffsetAnimationCurve();
408 ScrollOffset target_value(scroll_offset_animation_curve->target_value().x(), 408 ScrollOffset target_value(scroll_offset_animation_curve->target_value().x(),
409 scroll_offset_animation_curve->target_value().y()); 409 scroll_offset_animation_curve->target_value().y());
410 if (WillAnimateToOffset(target_value)) { 410 if (WillAnimateToOffset(target_value)) {
411 animation_curve_ = CompositorScrollOffsetAnimationCurve::Create( 411 animation_curve_ = CompositorScrollOffsetAnimationCurve::Create(
412 std::move(scroll_offset_animation_curve)); 412 scroll_offset_animation_curve);
413 start_time_ = animation_start_time; 413 start_time_ = animation_start_time;
414 } 414 }
415 } 415 }
416 416
417 void ScrollAnimator::CancelAnimation() { 417 void ScrollAnimator::CancelAnimation() {
418 ScrollAnimatorCompositorCoordinator::CancelAnimation(); 418 ScrollAnimatorCompositorCoordinator::CancelAnimation();
419 } 419 }
420 420
421 void ScrollAnimator::TakeOverCompositorAnimation() { 421 void ScrollAnimator::TakeOverCompositorAnimation() {
422 if (run_state_ == RunState::kRunningOnCompositor || 422 if (run_state_ == RunState::kRunningOnCompositor ||
(...skipping 17 matching lines...) Expand all
440 return false; 440 return false;
441 } 441 }
442 return true; 442 return true;
443 } 443 }
444 444
445 DEFINE_TRACE(ScrollAnimator) { 445 DEFINE_TRACE(ScrollAnimator) {
446 ScrollAnimatorBase::Trace(visitor); 446 ScrollAnimatorBase::Trace(visitor);
447 } 447 }
448 448
449 } // namespace blink 449 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/modules/sensor/Sensor.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698