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

Side by Side Diff: cc/animation/element_animations.cc

Issue 2059143002: "up-to-date" should only use hyphens when used as compound modifier of a noun (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase 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
« no previous file with comments | « build/linux/sysroot_scripts/install-sysroot.py ('k') | cc/trees/property_tree_builder.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "cc/animation/element_animations.h" 5 #include "cc/animation/element_animations.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <algorithm> 9 #include <algorithm>
10 10
(...skipping 510 matching lines...) Expand 10 before | Expand all | Expand 10 after
521 !animations_[i] 521 !animations_[i]
522 ->curve() 522 ->curve()
523 ->ToScrollOffsetAnimationCurve() 523 ->ToScrollOffsetAnimationCurve()
524 ->HasSetInitialValue()) { 524 ->HasSetInitialValue()) {
525 gfx::ScrollOffset current_scroll_offset; 525 gfx::ScrollOffset current_scroll_offset;
526 if (element_animations_impl->has_element_in_active_list()) { 526 if (element_animations_impl->has_element_in_active_list()) {
527 current_scroll_offset = 527 current_scroll_offset =
528 element_animations_impl->ScrollOffsetForAnimation(); 528 element_animations_impl->ScrollOffsetForAnimation();
529 } else { 529 } else {
530 // The owning layer isn't yet in the active tree, so the main thread 530 // The owning layer isn't yet in the active tree, so the main thread
531 // scroll offset will be up-to-date. 531 // scroll offset will be up to date.
532 current_scroll_offset = ScrollOffsetForAnimation(); 532 current_scroll_offset = ScrollOffsetForAnimation();
533 } 533 }
534 animations_[i]->curve()->ToScrollOffsetAnimationCurve()->SetInitialValue( 534 animations_[i]->curve()->ToScrollOffsetAnimationCurve()->SetInitialValue(
535 current_scroll_offset); 535 current_scroll_offset);
536 } 536 }
537 537
538 // The new animation should be set to run as soon as possible. 538 // The new animation should be set to run as soon as possible.
539 Animation::RunState initial_run_state = 539 Animation::RunState initial_run_state =
540 Animation::WAITING_FOR_TARGET_AVAILABILITY; 540 Animation::WAITING_FOR_TARGET_AVAILABILITY;
541 std::unique_ptr<Animation> to_add( 541 std::unique_ptr<Animation> to_add(
(...skipping 894 matching lines...) Expand 10 before | Expand all | Expand 10 after
1436 if (animation_host()) { 1436 if (animation_host()) {
1437 DCHECK(animation_host()->mutator_host_client()); 1437 DCHECK(animation_host()->mutator_host_client());
1438 return animation_host()->mutator_host_client()->GetScrollOffsetForAnimation( 1438 return animation_host()->mutator_host_client()->GetScrollOffsetForAnimation(
1439 element_id()); 1439 element_id());
1440 } 1440 }
1441 1441
1442 return gfx::ScrollOffset(); 1442 return gfx::ScrollOffset();
1443 } 1443 }
1444 1444
1445 } // namespace cc 1445 } // namespace cc
OLDNEW
« no previous file with comments | « build/linux/sysroot_scripts/install-sysroot.py ('k') | cc/trees/property_tree_builder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698