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

Unified Diff: ui/views/view.cc

Issue 327843002: Views which cannot process events cannot be tooltip targets (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: test coverage added Created 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | ui/views/view_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/view.cc
diff --git a/ui/views/view.cc b/ui/views/view.cc
index 3d902a6487fb939c2f0bd437a5215d4701034f6e..6cb29e9f85c25b1bed8b71ec853af80f423643cf 100644
--- a/ui/views/view.cc
+++ b/ui/views/view.cc
@@ -912,7 +912,7 @@ bool View::CanProcessEventsWithinSubtree() const {
}
View* View::GetTooltipHandlerForPoint(const gfx::Point& point) {
- if (!HitTestPoint(point))
+ if (!HitTestPoint(point) || !CanProcessEventsWithinSubtree())
return NULL;
// Walk the child Views recursively looking for the View that most
@@ -922,9 +922,6 @@ View* View::GetTooltipHandlerForPoint(const gfx::Point& point) {
if (!child->visible())
continue;
- if (!child->CanProcessEventsWithinSubtree())
- continue;
-
gfx::Point point_in_child_coords(point);
ConvertPointToTarget(this, child, &point_in_child_coords);
View* handler = child->GetTooltipHandlerForPoint(point_in_child_coords);
« no previous file with comments | « no previous file | ui/views/view_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698