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

Unified Diff: ui/views/controls/tree/tree_view_views.cc

Issue 11359172: ui: Remove implicit flooring in skia rect conversion methods. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Make root window transform in tests produce an integer result Created 8 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/controls/table/table_view_views.cc ('k') | ui/views/view.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/controls/tree/tree_view_views.cc
diff --git a/ui/views/controls/tree/tree_view_views.cc b/ui/views/controls/tree/tree_view_views.cc
index f24a24d06418b6d4aa0ec93ed02da162843b8404..694f8a10adfba986daf73375f795a9c9d6b6ea3a 100644
--- a/ui/views/controls/tree/tree_view_views.cc
+++ b/ui/views/controls/tree/tree_view_views.cc
@@ -15,6 +15,7 @@
#include "ui/base/resource/resource_bundle.h"
#include "ui/gfx/canvas.h"
#include "ui/gfx/image/image.h"
+#include "ui/gfx/rect_conversions.h"
#include "ui/gfx/skia_util.h"
#include "ui/views/background.h"
#include "ui/views/controls/scroll_view.h"
@@ -512,7 +513,9 @@ void TreeView::OnPaint(gfx::Canvas* canvas) {
{
SkRect sk_clip_rect;
if (canvas->sk_canvas()->getClipBounds(&sk_clip_rect)) {
- gfx::Rect clip_rect = gfx::SkRectToRect(sk_clip_rect);
+ // Pixels partially inside the clip rect should be included.
+ gfx::Rect clip_rect = gfx::ToEnclosingRect(
+ gfx::SkRectToRectF(sk_clip_rect));
min_y = clip_rect.y();
max_y = clip_rect.bottom();
} else {
« no previous file with comments | « ui/views/controls/table/table_view_views.cc ('k') | ui/views/view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698