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

Unified Diff: chrome/browser/gtk/tabs/dragged_tab_gtk.cc

Issue 200122: Remove code doing a no-op due to float -> int rounding. (Closed)
Patch Set: Created 11 years, 3 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 | « chrome/browser/gtk/tab_contents_drag_source.cc ('k') | chrome/browser/gtk/tabs/tab_gtk.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/gtk/tabs/dragged_tab_gtk.cc
diff --git a/chrome/browser/gtk/tabs/dragged_tab_gtk.cc b/chrome/browser/gtk/tabs/dragged_tab_gtk.cc
index 2ddb607148ba408b0134634294e34e17db81d487..5809cd18ab4d0bbbd9e1e5b9652808c49b1b71cd 100644
--- a/chrome/browser/gtk/tabs/dragged_tab_gtk.cc
+++ b/chrome/browser/gtk/tabs/dragged_tab_gtk.cc
@@ -263,8 +263,9 @@ void DraggedTabGtk::SetContainerShapeMask(GdkPixbuf* pixbuf) {
// border).
cairo_identity_matrix(cairo_context);
cairo_set_source_rgba(cairo_context, 1.0f, 1.0f, 1.0f, 1.0f);
- int tab_height = kScalingFactor * gdk_pixbuf_get_height(pixbuf) -
- kDragFrameBorderSize;
+ int tab_height = static_cast<int>(kScalingFactor *
+ gdk_pixbuf_get_height(pixbuf) -
+ kDragFrameBorderSize);
cairo_rectangle(cairo_context,
0, tab_height,
size.width(), size.height() - tab_height);
@@ -295,8 +296,10 @@ gboolean DraggedTabGtk::OnExposeEvent(GtkWidget* widget,
}
// Only used when not attached.
- int tab_height = kScalingFactor * gdk_pixbuf_get_height(pixbuf);
- int tab_width = kScalingFactor * gdk_pixbuf_get_width(pixbuf);
+ int tab_height = static_cast<int>(kScalingFactor *
+ gdk_pixbuf_get_height(pixbuf));
+ int tab_width = static_cast<int>(kScalingFactor *
+ gdk_pixbuf_get_width(pixbuf));
// Draw the render area.
if (dragged_tab->backing_store_ && !dragged_tab->attached_) {
« no previous file with comments | « chrome/browser/gtk/tab_contents_drag_source.cc ('k') | chrome/browser/gtk/tabs/tab_gtk.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698