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

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

Issue 2297943002: Rename kAnimatingScrollOnMainThread to kHandlingScrollFromMainThread (Closed)
Patch Set: update more comments Created 4 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2010, Google Inc. All rights reserved. 2 * Copyright (c) 2010, Google Inc. All rights reserved.
3 * Copyright (C) 2008, 2011 Apple Inc. All Rights Reserved. 3 * Copyright (C) 2008, 2011 Apple Inc. All Rights Reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are 6 * modification, are permitted provided that the following conditions are
7 * met: 7 * met:
8 * 8 *
9 * * Redistributions of source code must retain the above copyright 9 * * Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 517 matching lines...) Expand 10 before | Expand all | Expand 10 after
528 bool ScrollableArea::shouldScrollOnMainThread() const 528 bool ScrollableArea::shouldScrollOnMainThread() const
529 { 529 {
530 if (GraphicsLayer* layer = layerForScrolling()) { 530 if (GraphicsLayer* layer = layerForScrolling()) {
531 uint32_t reasons = layer->platformLayer()->mainThreadScrollingReasons(); 531 uint32_t reasons = layer->platformLayer()->mainThreadScrollingReasons();
532 // Should scroll on main thread unless the reason is the one that is set 532 // Should scroll on main thread unless the reason is the one that is set
533 // by the ScrollAnimator, in which case, the animation can still be 533 // by the ScrollAnimator, in which case, the animation can still be
534 // scheduled on the compositor. 534 // scheduled on the compositor.
535 // TODO(ymalik): We have a non-transient "main thread scrolling reason" 535 // TODO(ymalik): We have a non-transient "main thread scrolling reason"
536 // that doesn't actually cause shouldScrollOnMainThread() to be true. 536 // that doesn't actually cause shouldScrollOnMainThread() to be true.
537 // This is confusing and should be cleaned up. 537 // This is confusing and should be cleaned up.
538 return !!(reasons & ~MainThreadScrollingReason::kAnimatingScrollOnMainTh read); 538 return !!(reasons & ~MainThreadScrollingReason::kHandlingScrollFromMainT hread);
539 } 539 }
540 return true; 540 return true;
541 } 541 }
542 542
543 DoubleRect ScrollableArea::visibleContentRectDouble(IncludeScrollbarsInRect scro llbarInclusion) const 543 DoubleRect ScrollableArea::visibleContentRectDouble(IncludeScrollbarsInRect scro llbarInclusion) const
544 { 544 {
545 return visibleContentRect(scrollbarInclusion); 545 return visibleContentRect(scrollbarInclusion);
546 } 546 }
547 547
548 IntRect ScrollableArea::visibleContentRect(IncludeScrollbarsInRect scrollbarIncl usion) const 548 IntRect ScrollableArea::visibleContentRect(IncludeScrollbarsInRect scrollbarIncl usion) const
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
612 std::max(0, size.height() - horizontalScrollbarHeight())); 612 std::max(0, size.height() - horizontalScrollbarHeight()));
613 } 613 }
614 614
615 DEFINE_TRACE(ScrollableArea) 615 DEFINE_TRACE(ScrollableArea)
616 { 616 {
617 visitor->trace(m_scrollAnimator); 617 visitor->trace(m_scrollAnimator);
618 visitor->trace(m_programmaticScrollAnimator); 618 visitor->trace(m_programmaticScrollAnimator);
619 } 619 }
620 620
621 } // namespace blink 621 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/platform/scroll/ScrollAnimator.cpp ('k') | ui/events/blink/input_handler_proxy.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698