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

Unified Diff: cc/trees/layer_tree_impl.cc

Issue 2201853002: Blink handle selection handle visibility (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fixed incorrect rebase Created 3 years, 11 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 side-by-side diff with in-line comments
Download patch
Index: cc/trees/layer_tree_impl.cc
diff --git a/cc/trees/layer_tree_impl.cc b/cc/trees/layer_tree_impl.cc
index 0344d8f2e4a5f962077062e4495944f79d92add9..4af17462e71e1bc8d7dc903ee0349dd0cea91bc6 100644
--- a/cc/trees/layer_tree_impl.cc
+++ b/cc/trees/layer_tree_impl.cc
@@ -82,6 +82,7 @@ LayerTreeImpl::LayerTreeImpl(
needs_full_tree_sync_(true),
next_activation_forces_redraw_(false),
has_ever_been_drawn_(false),
+ handle_visibility_changed_(false),
have_scroll_event_handlers_(false),
event_listener_properties_(),
browser_controls_shrink_blink_size_(false),
@@ -1984,9 +1985,19 @@ LayerImpl* LayerTreeImpl::FindLayerThatIsHitByPointInTouchHandlerRegion(
}
void LayerTreeImpl::RegisterSelection(const LayerSelection& selection) {
+ if (selection_ == selection)
+ return;
+
+ handle_visibility_changed_ = true;
selection_ = selection;
}
+bool LayerTreeImpl::GetAndResetHandleVisibilityChanged() {
+ bool curr_handle_visibility_changed = handle_visibility_changed_;
+ handle_visibility_changed_ = false;
+ return curr_handle_visibility_changed;
+}
+
static gfx::SelectionBound ComputeViewportSelectionBound(
const LayerSelectionBound& layer_bound,
LayerImpl* layer,

Powered by Google App Engine
This is Rietveld 408576698