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

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

Issue 2049063002: Revert of Use element id's for animations (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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
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 342 matching lines...) Expand 10 before | Expand all | Expand 10 after
353 compositorOffsetFromBlinkOffset(m_targetOffset)); 353 compositorOffsetFromBlinkOffset(m_targetOffset));
354 } 354 }
355 355
356 if (m_runState == RunState::WaitingToCancelOnCompositorButNewScroll) 356 if (m_runState == RunState::WaitingToCancelOnCompositorButNewScroll)
357 m_animationCurve->setInitialValue(compositorOffsetFromBlinkOffset(cu rrentPosition())); 357 m_animationCurve->setInitialValue(compositorOffsetFromBlinkOffset(cu rrentPosition()));
358 358
359 m_runState = RunState::WaitingToSendToCompositor; 359 m_runState = RunState::WaitingToSendToCompositor;
360 } 360 }
361 361
362 if (m_runState == RunState::WaitingToSendToCompositor) { 362 if (m_runState == RunState::WaitingToSendToCompositor) {
363 if (!m_compositorAnimationAttachedToElementId) 363 if (!m_compositorAnimationAttachedToLayerId)
364 reattachCompositorPlayerIfNeeded(getScrollableArea()->compositorAnim ationTimeline()); 364 reattachCompositorPlayerIfNeeded(getScrollableArea()->compositorAnim ationTimeline());
365 365
366 if (!m_animationCurve) 366 if (!m_animationCurve)
367 createAnimationCurve(); 367 createAnimationCurve();
368 368
369 bool runningOnMainThread = false; 369 bool runningOnMainThread = false;
370 bool sentToCompositor = sendAnimationToCompositor(); 370 bool sentToCompositor = sendAnimationToCompositor();
371 if (!sentToCompositor) { 371 if (!sentToCompositor) {
372 runningOnMainThread = registerAndScheduleAnimation(); 372 runningOnMainThread = registerAndScheduleAnimation();
373 if (runningOnMainThread) 373 if (runningOnMainThread)
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
463 } 463 }
464 return true; 464 return true;
465 } 465 }
466 466
467 DEFINE_TRACE(ScrollAnimator) 467 DEFINE_TRACE(ScrollAnimator)
468 { 468 {
469 ScrollAnimatorBase::trace(visitor); 469 ScrollAnimatorBase::trace(visitor);
470 } 470 }
471 471
472 } // namespace blink 472 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698