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

Unified Diff: content/renderer/disambiguation_popup_helper.cc

Issue 11377068: ui: Make gfx::Size::Scale() mutate the class. Add gfx::ScaleSize() similar to Rect/Point. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebaseTOGO 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
Index: content/renderer/disambiguation_popup_helper.cc
diff --git a/content/renderer/disambiguation_popup_helper.cc b/content/renderer/disambiguation_popup_helper.cc
index 1399518701b56cfc6bf932d8a641304802cc14d8..75bb913551ebdafefee50b09ff816e275768f734 100644
--- a/content/renderer/disambiguation_popup_helper.cc
+++ b/content/renderer/disambiguation_popup_helper.cc
@@ -66,7 +66,7 @@ gfx::Rect CropZoomArea(const gfx::Rect& zoom_rect,
gfx::Size max_size = viewport_size;
max_size.Enlarge(-2 * kDisambiguationPopupBoundsMargin,
-2 * kDisambiguationPopupBoundsMargin);
- max_size = ToCeiledSize(max_size.Scale(1.0 / scale));
+ max_size = ToCeiledSize(ScaleSize(max_size, 1.0 / scale));
int left = touch_point.x() - zoom_rect.x();
int right = zoom_rect.right() - touch_point.x();

Powered by Google App Engine
This is Rietveld 408576698