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

Side by Side Diff: cc/trees/layer_tree_impl.cc

Issue 2664253002: Revert "Blink handle selection handle visibility" (Closed)
Patch Set: Created 3 years, 10 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 // 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 #include "cc/trees/layer_tree_impl.h" 5 #include "cc/trees/layer_tree_impl.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <algorithm> 10 #include <algorithm>
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 max_page_scale_factor_(0), 75 max_page_scale_factor_(0),
76 device_scale_factor_(1.f), 76 device_scale_factor_(1.f),
77 painted_device_scale_factor_(1.f), 77 painted_device_scale_factor_(1.f),
78 elastic_overscroll_(elastic_overscroll), 78 elastic_overscroll_(elastic_overscroll),
79 layers_(new OwnedLayerImplList), 79 layers_(new OwnedLayerImplList),
80 viewport_size_invalid_(false), 80 viewport_size_invalid_(false),
81 needs_update_draw_properties_(true), 81 needs_update_draw_properties_(true),
82 needs_full_tree_sync_(true), 82 needs_full_tree_sync_(true),
83 next_activation_forces_redraw_(false), 83 next_activation_forces_redraw_(false),
84 has_ever_been_drawn_(false), 84 has_ever_been_drawn_(false),
85 handle_visibility_changed_(false),
86 have_scroll_event_handlers_(false), 85 have_scroll_event_handlers_(false),
87 event_listener_properties_(), 86 event_listener_properties_(),
88 browser_controls_shrink_blink_size_(false), 87 browser_controls_shrink_blink_size_(false),
89 top_controls_height_(0), 88 top_controls_height_(0),
90 bottom_controls_height_(0), 89 bottom_controls_height_(0),
91 top_controls_shown_ratio_(top_controls_shown_ratio) { 90 top_controls_shown_ratio_(top_controls_shown_ratio) {
92 property_trees()->is_main_thread = false; 91 property_trees()->is_main_thread = false;
93 } 92 }
94 93
95 LayerTreeImpl::~LayerTreeImpl() { 94 LayerTreeImpl::~LayerTreeImpl() {
(...skipping 1892 matching lines...) Expand 10 before | Expand all | Expand 10 after
1988 bool update_lcd_text = false; 1987 bool update_lcd_text = false;
1989 if (!UpdateDrawProperties(update_lcd_text)) 1988 if (!UpdateDrawProperties(update_lcd_text))
1990 return NULL; 1989 return NULL;
1991 FindTouchEventLayerFunctor func = {screen_space_point}; 1990 FindTouchEventLayerFunctor func = {screen_space_point};
1992 FindClosestMatchingLayerState state; 1991 FindClosestMatchingLayerState state;
1993 FindClosestMatchingLayer(screen_space_point, layer_list_[0], func, &state); 1992 FindClosestMatchingLayer(screen_space_point, layer_list_[0], func, &state);
1994 return state.closest_match; 1993 return state.closest_match;
1995 } 1994 }
1996 1995
1997 void LayerTreeImpl::RegisterSelection(const LayerSelection& selection) { 1996 void LayerTreeImpl::RegisterSelection(const LayerSelection& selection) {
1998 if (selection_ == selection)
1999 return;
2000
2001 handle_visibility_changed_ = true;
2002 selection_ = selection; 1997 selection_ = selection;
2003 } 1998 }
2004 1999
2005 bool LayerTreeImpl::GetAndResetHandleVisibilityChanged() {
2006 bool curr_handle_visibility_changed = handle_visibility_changed_;
2007 handle_visibility_changed_ = false;
2008 return curr_handle_visibility_changed;
2009 }
2010
2011 static gfx::SelectionBound ComputeViewportSelectionBound( 2000 static gfx::SelectionBound ComputeViewportSelectionBound(
2012 const LayerSelectionBound& layer_bound, 2001 const LayerSelectionBound& layer_bound,
2013 LayerImpl* layer, 2002 LayerImpl* layer,
2014 float device_scale_factor) { 2003 float device_scale_factor) {
2015 gfx::SelectionBound viewport_bound; 2004 gfx::SelectionBound viewport_bound;
2016 viewport_bound.set_type(layer_bound.type); 2005 viewport_bound.set_type(layer_bound.type);
2017 2006
2018 if (!layer || layer_bound.type == gfx::SelectionBound::EMPTY) 2007 if (!layer || layer_bound.type == gfx::SelectionBound::EMPTY)
2019 return viewport_bound; 2008 return viewport_bound;
2020 2009
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
2106 2095
2107 void LayerTreeImpl::ResetAllChangeTracking() { 2096 void LayerTreeImpl::ResetAllChangeTracking() {
2108 layers_that_should_push_properties_.clear(); 2097 layers_that_should_push_properties_.clear();
2109 // Iterate over all layers, including masks. 2098 // Iterate over all layers, including masks.
2110 for (auto& layer : *layers_) 2099 for (auto& layer : *layers_)
2111 layer->ResetChangeTracking(); 2100 layer->ResetChangeTracking();
2112 property_trees_.ResetAllChangeTracking(); 2101 property_trees_.ResetAllChangeTracking();
2113 } 2102 }
2114 2103
2115 } // namespace cc 2104 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698