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

Unified Diff: ui/views/view.cc

Issue 32463003: Modify hit test masks for tabs and tab close buttons (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: patch for landing Created 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/views/view.h ('k') | 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 3e0d55a4d070e112f2a6d946256a9be2e98477b1..3d6b8f68471d663ccf96044961dce8794732ecee 100644
--- a/ui/views/view.cc
+++ b/ui/views/view.cc
@@ -38,6 +38,7 @@
#include "ui/views/context_menu_controller.h"
#include "ui/views/drag_controller.h"
#include "ui/views/layout/layout_manager.h"
+#include "ui/views/rect_based_targeting_utils.h"
#include "ui/views/views_delegate.h"
#include "ui/views/widget/native_widget_private.h"
#include "ui/views/widget/root_view.h"
@@ -892,7 +893,10 @@ bool View::HitTestRect(const gfx::Rect& rect) const {
if (GetLocalBounds().Intersects(rect)) {
if (HasHitTestMask()) {
gfx::Path mask;
- GetHitTestMask(&mask);
+ HitTestSource source = HIT_TEST_SOURCE_MOUSE;
+ if (!views::UsePointBasedTargeting(rect))
+ source = HIT_TEST_SOURCE_TOUCH;
+ GetHitTestMask(source, &mask);
#if defined(USE_AURA)
// TODO: should we use this every where?
SkRegion clip_region;
@@ -1501,7 +1505,7 @@ bool View::HasHitTestMask() const {
return false;
}
-void View::GetHitTestMask(gfx::Path* mask) const {
+void View::GetHitTestMask(HitTestSource source, gfx::Path* mask) const {
DCHECK(mask);
}
« no previous file with comments | « ui/views/view.h ('k') | ui/views/view_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698