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

Unified Diff: chrome/browser/ui/views/frame/browser_non_client_frame_view_ash.cc

Issue 265713007: views: Update event-related API to use PointF/RectF instead of Point/Rect. Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 8 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: chrome/browser/ui/views/frame/browser_non_client_frame_view_ash.cc
diff --git a/chrome/browser/ui/views/frame/browser_non_client_frame_view_ash.cc b/chrome/browser/ui/views/frame/browser_non_client_frame_view_ash.cc
index 19d916148cd326f012dea84d4b5fa3150ac6025a..fe12aa36c29e59afe2176fddf7fb8751a8123803 100644
--- a/chrome/browser/ui/views/frame/browser_non_client_frame_view_ash.cc
+++ b/chrome/browser/ui/views/frame/browser_non_client_frame_view_ash.cc
@@ -295,7 +295,7 @@ const char* BrowserNonClientFrameViewAsh::GetClassName() const {
return kViewClassName;
}
-bool BrowserNonClientFrameViewAsh::HitTestRect(const gfx::Rect& rect) const {
+bool BrowserNonClientFrameViewAsh::HitTestRect(const gfx::RectF& rect) const {
if (!views::View::HitTestRect(rect)) {
// |rect| is outside BrowserNonClientFrameViewAsh's bounds.
return false;
@@ -305,11 +305,8 @@ bool BrowserNonClientFrameViewAsh::HitTestRect(const gfx::Rect& rect) const {
if (tabstrip && browser_view()->IsTabStripVisible()) {
// Claim |rect| only if it is above the bottom of the tabstrip in a non-tab
// portion.
- gfx::RectF rect_in_tabstrip_coords_f(rect);
- View::ConvertRectToTarget(this, tabstrip, &rect_in_tabstrip_coords_f);
- gfx::Rect rect_in_tabstrip_coords = gfx::ToEnclosingRect(
- rect_in_tabstrip_coords_f);
-
+ gfx::RectF rect_in_tabstrip_coords(rect);
+ View::ConvertRectToTarget(this, tabstrip, &rect_in_tabstrip_coords);
if (rect_in_tabstrip_coords.y() > tabstrip->height())
return false;

Powered by Google App Engine
This is Rietveld 408576698