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

Unified Diff: chrome/browser/ui/views/autofill/autofill_popup_view_views.cc

Issue 24883002: Uses and returns the fractional width in text eliding (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix win bots Created 7 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
Index: chrome/browser/ui/views/autofill/autofill_popup_view_views.cc
diff --git a/chrome/browser/ui/views/autofill/autofill_popup_view_views.cc b/chrome/browser/ui/views/autofill/autofill_popup_view_views.cc
index 818112c82f15c7d980dd906fc93bde63ec8dd33d..c9436367fea3e64a3fdc8176a7851cc6c9677cf6 100644
--- a/chrome/browser/ui/views/autofill/autofill_popup_view_views.cc
+++ b/chrome/browser/ui/views/autofill/autofill_popup_view_views.cc
@@ -14,6 +14,7 @@
#include "ui/gfx/native_widget_types.h"
#include "ui/gfx/point.h"
#include "ui/gfx/rect.h"
+#include "ui/gfx/rect_conversions.h"
#include "ui/gfx/screen.h"
#include "ui/views/border.h"
#include "ui/views/event_utils.h"
@@ -72,7 +73,7 @@ void AutofillPopupViewViews::OnPaint(gfx::Canvas* canvas) {
OnPaintBorder(canvas);
for (size_t i = 0; i < controller_->names().size(); ++i) {
- gfx::Rect line_rect = controller_->GetRowBounds(i);
+ gfx::Rect line_rect = gfx::ToEnclosingRect(controller_->GetRowBounds(i));
if (controller_->identifiers()[i] ==
WebAutofillClient::MenuItemIDSeparator) {
@@ -194,11 +195,11 @@ void AutofillPopupViewViews::Show() {
}
void AutofillPopupViewViews::InvalidateRow(size_t row) {
- SchedulePaintInRect(controller_->GetRowBounds(row));
+ SchedulePaintInRect(gfx::ToEnclosingRect(controller_->GetRowBounds(row)));
}
void AutofillPopupViewViews::UpdateBoundsAndRedrawPopup() {
- GetWidget()->SetBounds(controller_->popup_bounds());
+ GetWidget()->SetBounds(gfx::ToEnclosingRect(controller_->popup_bounds()));
SchedulePaint();
}

Powered by Google App Engine
This is Rietveld 408576698