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

Unified Diff: ui/views/view.cc

Issue 143803010: Disable Views fuzzing with --disable-views-rect-based-targeting. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Condition HitTestMask use on IsRectBasedTargetingEnabled. Created 6 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
« no previous file with comments | « no previous file | no next file » | 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 9e6d59df3ed405ff8e039bf7d9ce0534ee6cd443..c98dd2a8470b83ae4839ba8b148efcd200de895a 100644
--- a/ui/views/view.cc
+++ b/ui/views/view.cc
@@ -42,6 +42,7 @@
#include "ui/views/layout/layout_manager.h"
#include "ui/views/rect_based_targeting_utils.h"
#include "ui/views/views_delegate.h"
+#include "ui/views/views_switches.h"
#include "ui/views/widget/native_widget_private.h"
#include "ui/views/widget/root_view.h"
#include "ui/views/widget/tooltip_manager.h"
@@ -97,7 +98,7 @@ class PostEventDispatchHandler : public ui::EventHandler {
public:
explicit PostEventDispatchHandler(View* owner)
: owner_(owner),
- touch_dnd_enabled_(switches::IsTouchDragDropEnabled()) {
+ touch_dnd_enabled_(::switches::IsTouchDragDropEnabled()) {
}
virtual ~PostEventDispatchHandler() {}
@@ -949,7 +950,7 @@ bool View::HitTestPoint(const gfx::Point& point) const {
bool View::HitTestRect(const gfx::Rect& rect) const {
if (GetLocalBounds().Intersects(rect)) {
- if (HasHitTestMask()) {
+ if (views::switches::IsRectBasedTargetingEnabled() && HasHitTestMask()) {
sadrul 2014/01/23 00:40:42 Does this break hit-testing along the slanted edge
msw 2014/01/23 00:54:32 Hmm, yeah. Adjacent tabs obscure the right half of
gfx::Path mask;
HitTestSource source = HIT_TEST_SOURCE_MOUSE;
if (!views::UsePointBasedTargeting(rect))
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698