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

Unified Diff: views/view.cc

Issue 342116: Attempt 2 at:... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 11 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 | « chrome/browser/views/notifications/balloon_view.cc ('k') | views/widget/widget.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: views/view.cc
===================================================================
--- views/view.cc (revision 30929)
+++ views/view.cc (working copy)
@@ -429,14 +429,12 @@
if (HasHitTestMask()) {
gfx::Path mask;
GetHitTestMask(&mask);
+ ScopedRegion rgn(mask.CreateNativeRegion());
+ // TODO: can this use SkRegion's contains instead?
#if defined(OS_WIN)
- ScopedHRGN rgn(mask.CreateHRGN());
return !!PtInRegion(rgn, l.x(), l.y());
#elif defined(OS_LINUX)
- GdkRegion* region = mask.CreateGdkRegion();
- bool result = gdk_region_point_in(region, l.x(), l.y());
- gdk_region_destroy(region);
- return result;
+ return gdk_region_point_in(rgn.Get(), l.x(), l.y());
#endif
}
// No mask, but inside our bounds.
« no previous file with comments | « chrome/browser/views/notifications/balloon_view.cc ('k') | views/widget/widget.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698