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

Side by Side Diff: cc/trees/layer_tree_host_impl.h

Issue 2422353002: Iframe/div MD scrollbars get idle when mouse leaves the nested elements. (Closed)
Patch Set: Unittest passes asan build bot. Created 4 years, 1 month 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 // Copyright 2011 The Chromium Authors. All rights reserved. 1 // Copyright 2011 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 #ifndef CC_TREES_LAYER_TREE_HOST_IMPL_H_ 5 #ifndef CC_TREES_LAYER_TREE_HOST_IMPL_H_
6 #define CC_TREES_LAYER_TREE_HOST_IMPL_H_ 6 #define CC_TREES_LAYER_TREE_HOST_IMPL_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 9
10 #include <bitset> 10 #include <bitset>
(...skipping 421 matching lines...) Expand 10 before | Expand all | Expand 10 after
432 return pending_tree_ ? pending_tree_.get() : active_tree_.get(); 432 return pending_tree_ ? pending_tree_.get() : active_tree_.get();
433 } 433 }
434 virtual void CreatePendingTree(); 434 virtual void CreatePendingTree();
435 virtual void ActivateSyncTree(); 435 virtual void ActivateSyncTree();
436 436
437 // Shortcuts to layers on the active tree. 437 // Shortcuts to layers on the active tree.
438 LayerImpl* InnerViewportScrollLayer() const; 438 LayerImpl* InnerViewportScrollLayer() const;
439 LayerImpl* OuterViewportScrollLayer() const; 439 LayerImpl* OuterViewportScrollLayer() const;
440 LayerImpl* CurrentlyScrollingLayer() const; 440 LayerImpl* CurrentlyScrollingLayer() const;
441 441
442 int scroll_layer_id_when_mouse_over_scrollbar() const {
443 return scroll_layer_id_when_mouse_over_scrollbar_;
444 }
445 bool scroll_affects_scroll_handler() const { 442 bool scroll_affects_scroll_handler() const {
446 return scroll_affects_scroll_handler_; 443 return scroll_affects_scroll_handler_;
447 } 444 }
448 void QueueSwapPromiseForMainThreadScrollUpdate( 445 void QueueSwapPromiseForMainThreadScrollUpdate(
449 std::unique_ptr<SwapPromise> swap_promise); 446 std::unique_ptr<SwapPromise> swap_promise);
450 447
451 bool IsActivelyScrolling() const; 448 bool IsActivelyScrolling() const;
452 449
453 virtual void SetVisible(bool visible); 450 virtual void SetVisible(bool visible);
454 bool visible() const { return visible_; } 451 bool visible() const { return visible_; }
(...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after
664 661
665 void UpdateTileManagerMemoryPolicy(const ManagedMemoryPolicy& policy); 662 void UpdateTileManagerMemoryPolicy(const ManagedMemoryPolicy& policy);
666 663
667 // This function should only be called from PrepareToDraw, as DidDrawAllLayers 664 // This function should only be called from PrepareToDraw, as DidDrawAllLayers
668 // must be called if this helper function is called. Returns DRAW_SUCCESS if 665 // must be called if this helper function is called. Returns DRAW_SUCCESS if
669 // the frame should be drawn. 666 // the frame should be drawn.
670 DrawResult CalculateRenderPasses(FrameData* frame); 667 DrawResult CalculateRenderPasses(FrameData* frame);
671 668
672 void ClearCurrentlyScrollingLayer(); 669 void ClearCurrentlyScrollingLayer();
673 670
674 void HandleMouseOverScrollbar(LayerImpl* layer_impl);
675
676 LayerImpl* FindScrollLayerForDeviceViewportPoint( 671 LayerImpl* FindScrollLayerForDeviceViewportPoint(
677 const gfx::PointF& device_viewport_point, 672 const gfx::PointF& device_viewport_point,
678 InputHandler::ScrollInputType type, 673 InputHandler::ScrollInputType type,
679 LayerImpl* layer_hit_by_point, 674 LayerImpl* layer_hit_by_point,
680 bool* scroll_on_main_thread, 675 bool* scroll_on_main_thread,
681 uint32_t* main_thread_scrolling_reason) const; 676 uint32_t* main_thread_scrolling_reason) const;
682 float DeviceSpaceDistanceToLayer(const gfx::PointF& device_viewport_point, 677 float DeviceSpaceDistanceToLayer(const gfx::PointF& device_viewport_point,
683 LayerImpl* layer_impl); 678 LayerImpl* layer_impl);
684 void StartScrollbarFadeRecursive(LayerImpl* layer); 679 void StartScrollbarFadeRecursive(LayerImpl* layer);
685 void SetManagedMemoryPolicy(const ManagedMemoryPolicy& policy); 680 void SetManagedMemoryPolicy(const ManagedMemoryPolicy& policy);
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
741 std::unique_ptr<LayerTreeImpl> pending_tree_; 736 std::unique_ptr<LayerTreeImpl> pending_tree_;
742 737
743 // In impl-side painting mode, inert tree with layers that can be recycled 738 // In impl-side painting mode, inert tree with layers that can be recycled
744 // by the next sync from the main thread. 739 // by the next sync from the main thread.
745 std::unique_ptr<LayerTreeImpl> recycle_tree_; 740 std::unique_ptr<LayerTreeImpl> recycle_tree_;
746 741
747 InputHandlerClient* input_handler_client_; 742 InputHandlerClient* input_handler_client_;
748 bool did_lock_scrolling_layer_; 743 bool did_lock_scrolling_layer_;
749 bool wheel_scrolling_; 744 bool wheel_scrolling_;
750 bool scroll_affects_scroll_handler_; 745 bool scroll_affects_scroll_handler_;
751 int scroll_layer_id_when_mouse_over_scrollbar_; 746 int scroll_layer_id_mouse_currently_over_;
752 int captured_scrollbar_layer_id_;
753 747
754 std::vector<std::unique_ptr<SwapPromise>> 748 std::vector<std::unique_ptr<SwapPromise>>
755 swap_promises_for_main_thread_scroll_update_; 749 swap_promises_for_main_thread_scroll_update_;
756 750
757 // An object to implement the ScrollElasticityHelper interface and 751 // An object to implement the ScrollElasticityHelper interface and
758 // hold all state related to elasticity. May be NULL if never requested. 752 // hold all state related to elasticity. May be NULL if never requested.
759 std::unique_ptr<ScrollElasticityHelper> scroll_elasticity_helper_; 753 std::unique_ptr<ScrollElasticityHelper> scroll_elasticity_helper_;
760 754
761 bool tile_priorities_dirty_; 755 bool tile_priorities_dirty_;
762 756
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
840 834
841 std::unique_ptr<PendingTreeDurationHistogramTimer> 835 std::unique_ptr<PendingTreeDurationHistogramTimer>
842 pending_tree_duration_timer_; 836 pending_tree_duration_timer_;
843 837
844 DISALLOW_COPY_AND_ASSIGN(LayerTreeHostImpl); 838 DISALLOW_COPY_AND_ASSIGN(LayerTreeHostImpl);
845 }; 839 };
846 840
847 } // namespace cc 841 } // namespace cc
848 842
849 #endif // CC_TREES_LAYER_TREE_HOST_IMPL_H_ 843 #endif // CC_TREES_LAYER_TREE_HOST_IMPL_H_
OLDNEW
« no previous file with comments | « cc/input/scrollbar_animation_controller_thinning_unittest.cc ('k') | cc/trees/layer_tree_host_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698